comparison src/ui_pathsel.c @ 42:606fcf461a68

Sat May 14 13:04:23 2005 John Ellis <johne@verizon.net> * po/cs.po: Update Czech translation, submitted by Jan Raska <jan.raska@tiscali.cz> * de.po, fr.po: Typo and spelling fixes. Sat May 14 12:23:19 2005 John Ellis <johne@verizon.net> * image.c, pixbuf-renderer.c: Fix sending of complete signal. * ui_pathsel.c: Guard against strcmp of NULL dd->path, fixes crash. * utilops.c: Additional validation for destination of copy/move dialogs, and do not include extension when conveniently selecting filename text in rename dialogs. ##### Note: GQview CVS on sourceforge is not always up to date, please use ##### ##### an offical release when making enhancements and translation updates. #####
author gqview
date Sat, 14 May 2005 20:58:18 +0000
parents d907d608745f
children 04ff0df3ad2f
comparison
equal deleted inserted replaced
41:6281cc38e5ca 42:606fcf461a68
163 GList *file_list = NULL; 163 GList *file_list = NULL;
164 GList *list; 164 GList *list;
165 GtkListStore *store; 165 GtkListStore *store;
166 gchar *pathl; 166 gchar *pathl;
167 167
168 if(!path) return; 168 if (!path) return;
169 169
170 pathl = path_from_utf8(path); 170 pathl = path_from_utf8(path);
171 dp = opendir(pathl); 171 dp = opendir(pathl);
172 if (!dp) 172 if (!dp)
173 { 173 {
858 Dest_Data *dd = data; 858 Dest_Data *dd = data;
859 const gchar *path; 859 const gchar *path;
860 gchar *buf; 860 gchar *buf;
861 861
862 path = gtk_entry_get_text(GTK_ENTRY(dd->entry)); 862 path = gtk_entry_get_text(GTK_ENTRY(dd->entry));
863 if (strcmp(path, dd->path) == 0) return; 863 if (dd->path && strcmp(path, dd->path) == 0) return;
864 864
865 buf = remove_level_from_path(path); 865 buf = remove_level_from_path(path);
866 866
867 if (buf && strcmp(buf, dd->path) != 0) 867 if (buf && (!dd->path || strcmp(buf, dd->path) != 0))
868 { 868 {
869 gchar *tmp = remove_trailing_slash(path); 869 gchar *tmp = remove_trailing_slash(path);
870 if (isdir(tmp)) 870 if (isdir(tmp))
871 { 871 {
872 dest_populate(dd, tmp); 872 dest_populate(dd, tmp);
1247 1247
1248 if (!dd) return; 1248 if (!dd) return;
1249 1249
1250 path = gtk_entry_get_text(GTK_ENTRY(entry)); 1250 path = gtk_entry_get_text(GTK_ENTRY(entry));
1251 1251
1252 if (isdir(path) && strcmp(path, dd->path) != 0) 1252 if (isdir(path) && (!dd->path || strcmp(path, dd->path) != 0))
1253 { 1253 {
1254 dest_populate(dd, path); 1254 dest_populate(dd, path);
1255 } 1255 }
1256 else 1256 else
1257 { 1257 {
1258 gchar *buf = remove_level_from_path(path); 1258 gchar *buf = remove_level_from_path(path);
1259 if (isdir(buf) && strcmp(buf, dd->path) != 0) 1259 if (isdir(buf) && (!dd->path || strcmp(buf, dd->path) != 0))
1260 { 1260 {
1261 dest_populate(dd, buf); 1261 dest_populate(dd, buf);
1262 } 1262 }
1263 g_free(buf); 1263 g_free(buf);
1264 } 1264 }