mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
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.
This commit is contained in:
parent
e4fc95abb1
commit
829c6708f2
12
ChangeLog
12
ChangeLog
@ -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>
|
Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
||||||
|
@ -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>
|
Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
||||||
|
@ -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>
|
Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
||||||
|
@ -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>
|
Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
||||||
|
@ -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>
|
Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
||||||
|
@ -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>
|
Thu Dec 12 18:02:34 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
* gtk/gtkmain.c (gtk_main_do_event): Intercept events
|
||||||
|
@ -3048,6 +3048,8 @@ open_new_dir (gchar *dir_name,
|
|||||||
while ((dirent = g_dir_read_name (directory)) != NULL)
|
while ((dirent = g_dir_read_name (directory)) != NULL)
|
||||||
entry_count++;
|
entry_count++;
|
||||||
|
|
||||||
|
entry_count += 2; /* For ".",".." */
|
||||||
|
|
||||||
sent->entries = g_new (CompletionDirEntry, entry_count);
|
sent->entries = g_new (CompletionDirEntry, entry_count);
|
||||||
sent->entry_count = entry_count;
|
sent->entry_count = entry_count;
|
||||||
|
|
||||||
@ -3057,14 +3059,15 @@ open_new_dir (gchar *dir_name,
|
|||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
dirent = g_dir_read_name (directory);
|
if (i == 0)
|
||||||
|
dirent = ".";
|
||||||
if (!dirent)
|
else if (i == 1)
|
||||||
|
dirent = "..";
|
||||||
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Failure reading folder '%s'", sys_dir_name);
|
dirent = g_dir_read_name (directory);
|
||||||
g_dir_close (directory);
|
if (!dirent) /* Directory changed */
|
||||||
g_free (sys_dir_name);
|
break;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, &error);
|
sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, &error);
|
||||||
|
Loading…
Reference in New Issue
Block a user