diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-12-13 01:06:55 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-12-13 01:06:55 +0000 |
commit | 829c6708f29d27e6e63dab8f93e41ba4b15e925e (patch) | |
tree | f4df948b363529b9c9aa2e8ecd0b173ef0146fac | |
parent | e4fc95abb141350e1283f620d5d5fc86ffdf627b (diff) | |
download | gdk-pixbuf-829c6708f29d27e6e63dab8f93e41ba4b15e925e.tar.gz |
Include "." and ".." in the list of entries; they are needed for correct
Thu Dec 12 19:51:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (open_new_dir): Include "."
and ".." in the list of entries; they are needed for
correct handling of .<TAB>, ..<TAB>; were lost
with the GDir conversion. (Francisco Bustamante,
#89972)
* gtk/gtkfilesel.c (open_new_dir): If we hit
EOF unexpectedly, that's OK... a file was just
deleted while we were reading the directory.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 12 | ||||
-rw-r--r-- | gtk/gtkfilesel.c | 17 |
7 files changed, 82 insertions, 7 deletions
@@ -1,3 +1,15 @@ +Thu Dec 12 19:51:45 2002 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_new_dir): Include "." + and ".." in the list of entries; they are needed for + correct handling of .<TAB>, ..<TAB>; were lost + with the GDir conversion. (Francisco Bustamante, + #89972) + + * gtk/gtkfilesel.c (open_new_dir): If we hit + EOF unexpectedly, that's OK... a file was just + deleted while we were reading the directory. + Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_do_event): Intercept events diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 229c986be..040993592 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,15 @@ +Thu Dec 12 19:51:45 2002 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_new_dir): Include "." + and ".." in the list of entries; they are needed for + correct handling of .<TAB>, ..<TAB>; were lost + with the GDir conversion. (Francisco Bustamante, + #89972) + + * gtk/gtkfilesel.c (open_new_dir): If we hit + EOF unexpectedly, that's OK... a file was just + deleted while we were reading the directory. + Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_do_event): Intercept events diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 229c986be..040993592 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,15 @@ +Thu Dec 12 19:51:45 2002 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_new_dir): Include "." + and ".." in the list of entries; they are needed for + correct handling of .<TAB>, ..<TAB>; were lost + with the GDir conversion. (Francisco Bustamante, + #89972) + + * gtk/gtkfilesel.c (open_new_dir): If we hit + EOF unexpectedly, that's OK... a file was just + deleted while we were reading the directory. + Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_do_event): Intercept events diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 229c986be..040993592 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,15 @@ +Thu Dec 12 19:51:45 2002 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_new_dir): Include "." + and ".." in the list of entries; they are needed for + correct handling of .<TAB>, ..<TAB>; were lost + with the GDir conversion. (Francisco Bustamante, + #89972) + + * gtk/gtkfilesel.c (open_new_dir): If we hit + EOF unexpectedly, that's OK... a file was just + deleted while we were reading the directory. + Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_do_event): Intercept events diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 229c986be..040993592 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,15 @@ +Thu Dec 12 19:51:45 2002 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_new_dir): Include "." + and ".." in the list of entries; they are needed for + correct handling of .<TAB>, ..<TAB>; were lost + with the GDir conversion. (Francisco Bustamante, + #89972) + + * gtk/gtkfilesel.c (open_new_dir): If we hit + EOF unexpectedly, that's OK... a file was just + deleted while we were reading the directory. + Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_do_event): Intercept events diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 229c986be..040993592 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,15 @@ +Thu Dec 12 19:51:45 2002 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfilesel.c (open_new_dir): Include "." + and ".." in the list of entries; they are needed for + correct handling of .<TAB>, ..<TAB>; were lost + with the GDir conversion. (Francisco Bustamante, + #89972) + + * gtk/gtkfilesel.c (open_new_dir): If we hit + EOF unexpectedly, that's OK... a file was just + deleted while we were reading the directory. + Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_main_do_event): Intercept events diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index e74f7391c..a92001f99 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -3048,6 +3048,8 @@ open_new_dir (gchar *dir_name, while ((dirent = g_dir_read_name (directory)) != NULL) entry_count++; + entry_count += 2; /* For ".",".." */ + sent->entries = g_new (CompletionDirEntry, entry_count); sent->entry_count = entry_count; @@ -3057,14 +3059,15 @@ open_new_dir (gchar *dir_name, { GError *error = NULL; - dirent = g_dir_read_name (directory); - - if (!dirent) + if (i == 0) + dirent = "."; + else if (i == 1) + dirent = ".."; + else { - g_warning ("Failure reading folder '%s'", sys_dir_name); - g_dir_close (directory); - g_free (sys_dir_name); - return NULL; + dirent = g_dir_read_name (directory); + if (!dirent) /* Directory changed */ + break; } sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, &error); |