diff options
Diffstat (limited to 'x11-libs/gtk+/files/1.2.10/gtk+-filesel-dirchanged-fix.patch')
-rw-r--r-- | x11-libs/gtk+/files/1.2.10/gtk+-filesel-dirchanged-fix.patch | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/x11-libs/gtk+/files/1.2.10/gtk+-filesel-dirchanged-fix.patch b/x11-libs/gtk+/files/1.2.10/gtk+-filesel-dirchanged-fix.patch deleted file mode 100644 index a12092b72f19..000000000000 --- a/x11-libs/gtk+/files/1.2.10/gtk+-filesel-dirchanged-fix.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff -Nrc -x *~ gtk+-1.2.10.orig/gtk/gtkfilesel.c gtk+-1.2.10/gtk/gtkfilesel.c -*** gtk+-1.2.10.orig/gtk/gtkfilesel.c Fri Apr 12 15:40:33 2002 ---- gtk+-1.2.10/gtk/gtkfilesel.c Fri Apr 12 15:40:15 2002 -*************** -*** 2338,2343 **** ---- 2338,2344 ---- - (GtkSignalFunc) gtk_button_clicked, - GTK_OBJECT (filesel->ok_button)); - gtk_box_pack_start (GTK_BOX (entry_vbox), filesel->selection_entry, TRUE, TRUE, 0); -+ gtk_object_set_data (GTK_OBJECT (filesel->selection_entry), "last_entry_was_dir_selection", (gpointer) FALSE); - gtk_widget_show (filesel->selection_entry); - - if (!cmpl_state_okay (filesel->cmpl_state)) -*************** -*** 2975,2983 **** - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - if (event->keyval == GDK_Tab) - { -- fs = GTK_FILE_SELECTION (user_data); - text = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry)); - - text = g_strdup (text); ---- 2976,2986 ---- - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (event != NULL, FALSE); - -+ fs = GTK_FILE_SELECTION (user_data); -+ gtk_object_set_data (GTK_OBJECT (fs->selection_entry), "last_entry_was_dir_selection", (gpointer) FALSE); -+ - if (event->keyval == GDK_Tab) - { - text = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry)); - - text = g_strdup (text); -*************** -*** 3116,3122 **** - - if (filename) - { -! if (bevent) - switch (bevent->type) - { - case GDK_2BUTTON_PRESS: ---- 3119,3126 ---- - - if (filename) - { -! gtk_object_set_data (GTK_OBJECT (fs->selection_entry), "last_entry_was_dir_selection", (gpointer) FALSE); -! if (bevent) - switch (bevent->type) - { - case GDK_2BUTTON_PRESS: -*************** -*** 3143,3148 **** ---- 3147,3154 ---- - { - GtkFileSelection *fs = NULL; - gchar *filename, *temp = NULL; -+ const gchar *entry_text; -+ gboolean last_entry_was_dir_selection; - - g_return_if_fail (GTK_IS_CLIST (widget)); - -*************** -*** 3153,3158 **** ---- 3159,3168 ---- - gtk_clist_get_text (GTK_CLIST (fs->dir_list), row, 0, &temp); - filename = g_strdup (temp); - -+ entry_text = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry)); -+ last_entry_was_dir_selection = (gboolean) gtk_object_get_data (GTK_OBJECT (fs->selection_entry), -+ "last_entry_was_dir_selection"); -+ - if (filename) - { - if (bevent) -*************** -*** 3163,3176 **** - break; - - default: -! gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename); - break; - } -! else -! gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename); - - g_free (filename); - } - } - - static void ---- 3173,3196 ---- - break; - - default: -! if (!entry_text || !strlen (entry_text) || last_entry_was_dir_selection) -! { -! gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename); -! last_entry_was_dir_selection = TRUE; -! } - break; - } -! else if (!entry_text || !strlen (entry_text) || last_entry_was_dir_selection) -! { -! gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename); -! last_entry_was_dir_selection = TRUE; -! } - - g_free (filename); - } -+ -+ gtk_object_set_data (GTK_OBJECT (fs->selection_entry), "last_entry_was_dir_selection", -+ (gpointer) last_entry_was_dir_selection); - } - - static void -*************** -*** 3313,3319 **** - } - else - { -! if (fs->selection_entry) - gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), ""); - } - ---- 3333,3344 ---- - } - else - { -! gboolean last_entry_was_dir_selection; -! -! last_entry_was_dir_selection = (gboolean) gtk_object_get_data (GTK_OBJECT (fs->selection_entry), -! "last_entry_was_dir_selection"); -! -! if (fs->selection_entry && last_entry_was_dir_selection) - gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), ""); - } - |