slackware-current/source/l/gtk+/gtk+-1.2.10-deletedir.patch
Patrick J Volkerding 646a5c1cbf Mon May 28 19:12:29 UTC 2018
a/pkgtools-15.0-noarch-13.txz:  Rebuilt.
  installpkg: default line length for --terselength is the number of columns.
  removepkg: added --terse mode.
  upgradepkg: default line length for --terselength is the number of columns.
  upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz:  Upgraded.
d/bison-3.0.5-x86_64-1.txz:  Upgraded.
e/emacs-26.1-x86_64-1.txz:  Upgraded.
kde/kopete-4.14.3-x86_64-8.txz:  Rebuilt.
  Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz:  Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz:  Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz:  Upgraded.
n/links-2.16-x86_64-2.txz:  Rebuilt.
  Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz:  Upgraded.
n/nftables-0.8.5-x86_64-1.txz:  Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz:  Upgraded.
n/ulogd-2.0.7-x86_64-1.txz:  Upgraded.
n/whois-5.3.1-x86_64-1.txz:  Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz:  Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz:  Upgraded.
2018-05-31 23:39:35 +02:00

188 lines
4.9 KiB
Diff

--- gtk+-1.2.10/gtk/gtkfilesel.c.deletedir Thu Feb 15 23:36:19 2001
+++ gtk+-1.2.10/gtk/gtkfilesel.c Wed Apr 17 20:36:25 2002
@@ -325,7 +325,8 @@
static void gtk_file_selection_populate (GtkFileSelection *fs,
gchar *rel_path,
- gint try_complete);
+ gboolean try_complete,
+ gboolean reset_entry);
static void gtk_file_selection_abort (GtkFileSelection *fs);
static void gtk_file_selection_update_history_menu (GtkFileSelection *fs,
@@ -522,7 +523,7 @@
}
else
{
- gtk_file_selection_populate (filesel, "", FALSE);
+ gtk_file_selection_populate (filesel, "", FALSE, TRUE);
}
gtk_widget_grab_focus (filesel->selection_entry);
@@ -637,7 +638,7 @@
name = last_slash + 1;
}
- gtk_file_selection_populate (filesel, buf, FALSE);
+ gtk_file_selection_populate (filesel, buf, FALSE, TRUE);
if (filesel->selection_entry)
gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), name);
@@ -673,7 +674,7 @@
if (filesel->selection_entry)
gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), pattern);
- gtk_file_selection_populate (filesel, (gchar*) pattern, TRUE);
+ gtk_file_selection_populate (filesel, (gchar*) pattern, TRUE, TRUE);
}
static void
@@ -806,7 +807,7 @@
g_free (full_path);
gtk_widget_destroy (fs->fileop_dialog);
- gtk_file_selection_populate (fs, "", FALSE);
+ gtk_file_selection_populate (fs, "", FALSE, FALSE);
}
static void
@@ -903,7 +904,7 @@
g_free (full_path);
gtk_widget_destroy (fs->fileop_dialog);
- gtk_file_selection_populate (fs, "", FALSE);
+ gtk_file_selection_populate (fs, "", FALSE, TRUE);
}
static void
@@ -1009,8 +1010,9 @@
g_free (new_filename);
g_free (old_filename);
+ gtk_file_selection_populate (fs, "", FALSE, FALSE);
+ gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), file);
gtk_widget_destroy (fs->fileop_dialog);
- gtk_file_selection_populate (fs, "", FALSE);
}
static void
@@ -1112,7 +1114,7 @@
text = g_strdup (text);
- gtk_file_selection_populate (fs, text, TRUE);
+ gtk_file_selection_populate (fs, text, TRUE, TRUE);
g_free (text);
@@ -1124,7 +1126,6 @@
return FALSE;
}
-
static void
gtk_file_selection_history_callback (GtkWidget *widget, gpointer data)
{
@@ -1142,7 +1143,7 @@
if (callback_arg->menu_item == widget)
{
- gtk_file_selection_populate (fs, callback_arg->directory, FALSE);
+ gtk_file_selection_populate (fs, callback_arg->directory, FALSE, FALSE);
break;
}
@@ -1272,7 +1273,7 @@
gpointer user_data)
{
GtkFileSelection *fs = NULL;
- gchar *filename, *temp = NULL;
+ gchar *filename = NULL;
g_return_if_fail (GTK_IS_CLIST (widget));
@@ -1280,39 +1281,23 @@
g_return_if_fail (fs != NULL);
g_return_if_fail (GTK_IS_FILE_SELECTION (fs));
- gtk_clist_get_text (GTK_CLIST (fs->dir_list), row, 0, &temp);
- filename = g_strdup (temp);
-
- if (filename)
- {
- if (bevent)
- switch (bevent->type)
- {
- case GDK_2BUTTON_PRESS:
- gtk_file_selection_populate (fs, filename, FALSE);
- 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);
- }
+ gtk_clist_get_text (GTK_CLIST (fs->dir_list), row, 0, &filename);
+
+ if (filename && bevent && bevent->type == GDK_2BUTTON_PRESS)
+ gtk_file_selection_populate (fs, filename, FALSE, FALSE);
}
static void
gtk_file_selection_populate (GtkFileSelection *fs,
gchar *rel_path,
- gint try_complete)
+ gboolean try_complete,
+ gboolean reset_entry)
{
CompletionState *cmpl_state;
PossibleCompletion* poss;
gchar* filename;
gint row;
- gchar* rem_path = rel_path;
+ gchar* rem_path;
gchar* sel_text;
gchar* text[2];
gint did_recurse = FALSE;
@@ -1323,6 +1308,8 @@
g_return_if_fail (fs != NULL);
g_return_if_fail (GTK_IS_FILE_SELECTION (fs));
+
+ rem_path = rel_path = g_strdup (rel_path);
cmpl_state = (CompletionState*) fs->cmpl_state;
poss = cmpl_completion_matches (rel_path, &rem_path, cmpl_state);
@@ -1422,7 +1409,7 @@
did_recurse = TRUE;
- gtk_file_selection_populate (fs, dir_name, TRUE);
+ gtk_file_selection_populate (fs, dir_name, TRUE, TRUE);
g_free (dir_name);
}
@@ -1441,7 +1428,7 @@
gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), rem_path);
}
}
- else
+ else if (reset_entry)
{
if (fs->selection_entry)
gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), "");
@@ -1466,8 +1453,9 @@
{
gtk_file_selection_update_history_menu (fs, cmpl_reference_position (cmpl_state));
}
-
}
+
+ g_free (rel_path);
}
static void