rpms/gtk2/devel gtk+-2.10.0-search.patch, 1.2, 1.3 gtk2.spec, 1.163, 1.164
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Jul 18 15:14:56 UTC 2006
- Previous message (by thread): rpms/policycoreutils/devel policycoreutils-rhat.patch, 1.211, 1.212 policycoreutils.spec, 1.293, 1.294
- Next message (by thread): rpms/mkinitrd/devel .cvsignore, 1.117, 1.118 mkinitrd.spec, 1.141, 1.142 sources, 1.141, 1.142
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/dist/rpms/gtk2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv6693
Modified Files:
gtk+-2.10.0-search.patch gtk2.spec
Log Message:
Fix more search issues
gtk+-2.10.0-search.patch:
gtkfilechooserdefault.c | 1441 ++++++++++++++++++++++++++++++++++++++++--------
gtkfilechooserprivate.h | 42 +
2 files changed, 1241 insertions(+), 242 deletions(-)
Index: gtk+-2.10.0-search.patch
===================================================================
RCS file: /cvs/dist/rpms/gtk2/devel/gtk+-2.10.0-search.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gtk+-2.10.0-search.patch 16 Jul 2006 23:28:19 -0000 1.2
+++ gtk+-2.10.0-search.patch 18 Jul 2006 15:14:54 -0000 1.3
@@ -1,5 +1,102 @@
+--- gtk+-2.10.0/gtk/gtkfilechooserprivate.h.search 2006-05-03 18:29:48.000000000 -0400
++++ gtk+-2.10.0/gtk/gtkfilechooserprivate.h 2006-07-18 10:36:09.000000000 -0400
+@@ -147,6 +147,20 @@
+ LOCATION_MODE_FILENAME_ENTRY
+ } LocationMode;
+
++typedef enum {
++ OPERATION_MODE_BROWSE,
++ OPERATION_MODE_SEARCH
++} OperationMode;
++
++typedef struct _BeagleHit BeagleHit;
++typedef struct _BeagleQuery BeagleQuery;
++typedef struct _BeagleClient BeagleClient;
++typedef struct _BeagleRequest BeagleRequest;
++typedef struct _BeagleFinishedResponse BeagleFinishedResponse;
++typedef struct _BeagleHitsAddedResponse BeagleHitsAddedResponse;
++typedef struct _BeagleQueryPartProperty BeagleQueryPartProperty;
++typedef struct _BeagleQueryPart BeagleQueryPart;
++
+ struct _GtkFileChooserDefault
+ {
+ GtkVBox parent_instance;
+@@ -175,10 +189,18 @@
+ GtkWidget *browse_files_popup_menu_add_shortcut_item;
+ GtkWidget *browse_files_popup_menu_hidden_files_item;
+ GtkWidget *browse_new_folder_button;
++ GtkWidget *browse_path_bar_hbox;
+ GtkWidget *browse_path_bar;
+
+ GtkFileSystemModel *browse_files_model;
+
++ /* Widgets for searching */
++ GtkWidget *search_hbox;
++ GtkWidget *search_entry;
++ BeagleClient *search_client;
++ BeagleQuery *search_query;
++ GtkListStore *search_model;
++
+ GtkWidget *filter_combo_hbox;
+ GtkWidget *filter_combo;
+ GtkWidget *preview_box;
+@@ -194,7 +216,16 @@
+ LocationMode location_mode;
+
+ GtkListStore *shortcuts_model;
+- GtkTreeModel *shortcuts_filter_model;
++
++ /* Filter for the shortcuts pane. We filter out the "current folder" row and
++ * the separator that we use for the "Save in folder" combo.
++ */
++ GtkTreeModel *shortcuts_pane_filter_model;
++
++ /* Filter for the "Save in folder" combo. We filter out the Search row and
++ * its separator.
++ */
++ GtkTreeModel *shortcuts_combo_filter_model;
+
+ GtkTreeModelSort *sort_model;
+
+@@ -213,6 +244,8 @@
+ ReloadState reload_state;
+ guint load_timeout_id;
+
++ OperationMode operation_mode;
++
+ GSList *pending_select_paths;
+
+ GtkFileFilter *current_filter;
+@@ -220,9 +253,6 @@
+
+ GtkTooltips *tooltips;
+
+- gboolean has_home;
+- gboolean has_desktop;
+-
+ int num_volumes;
+ int num_shortcuts;
+ int num_bookmarks;
+@@ -237,6 +267,7 @@
+
+ GtkTreeViewColumn *list_name_column;
+ GtkCellRenderer *list_name_renderer;
++ GtkTreeViewColumn *list_mtime_column;
+
+ GSource *edited_idle;
+ char *edited_new_text;
+@@ -264,6 +295,9 @@
+ guint changing_folder : 1;
+ guint shortcuts_current_folder_active : 1;
+ guint processing_pending_selections : 1;
++ guint has_home : 1;
++ guint has_desktop : 1;
++ guint has_search : 1;
+
+ #if 0
+ guint shortcuts_drag_outside : 1;
--- gtk+-2.10.0/gtk/gtkfilechooserdefault.c.search 2006-06-19 13:43:59.000000000 -0400
-+++ gtk+-2.10.0/gtk/gtkfilechooserdefault.c 2006-07-16 18:44:32.000000000 -0400
++++ gtk+-2.10.0/gtk/gtkfilechooserdefault.c 2006-07-18 10:46:35.000000000 -0400
@@ -78,6 +78,8 @@
#include <errno.h>
#include <string.h>
@@ -398,6 +495,15 @@
if (request->type == SHORTCUTS_CURRENT_FOLDER
&& request->impl->save_folder_combo != NULL)
+@@ -1410,7 +1593,7 @@
+ g_signal_handlers_block_by_func (request->impl->save_folder_combo,
+ G_CALLBACK (save_folder_combo_changed_cb),
+ request->impl);
+- gtk_combo_box_set_active (GTK_COMBO_BOX (request->impl->save_folder_combo), pos);
++ gtk_combo_box_set_active (GTK_COMBO_BOX (request->impl->save_folder_combo), request->impl->has_search ? pos - 2 : pos);
+ g_signal_handlers_unblock_by_func (request->impl->save_folder_combo,
+ G_CALLBACK (save_folder_combo_changed_cb),
+ request->impl);
@@ -1436,7 +1619,7 @@
static void
shortcuts_insert_path (GtkFileChooserDefault *impl,
@@ -470,7 +576,17 @@
if (type == SHORTCUTS_CURRENT_FOLDER && impl->save_folder_combo != NULL)
{
-@@ -1544,6 +1737,30 @@
+@@ -1530,7 +1723,8 @@
+ g_signal_handlers_block_by_func (impl->save_folder_combo,
+ G_CALLBACK (save_folder_combo_changed_cb),
+ impl);
+- gtk_combo_box_set_active (GTK_COMBO_BOX (impl->save_folder_combo), combo_pos);
++ gtk_combo_box_set_active (GTK_COMBO_BOX (impl->save_folder_combo),
++ impl->has_search ? combo_pos - 2 : combo_pos);
+ g_signal_handlers_unblock_by_func (impl->save_folder_combo,
+ G_CALLBACK (save_folder_combo_changed_cb),
+ impl);
+@@ -1544,6 +1738,30 @@
profile_end ("end", NULL);
}
@@ -501,7 +617,7 @@
/* Appends an item for the user's home directory to the shortcuts model */
static void
shortcuts_append_home (GtkFileChooserDefault *impl)
-@@ -1562,7 +1779,8 @@
+@@ -1562,7 +1780,8 @@
home_path = gtk_file_system_filename_to_path (impl->file_system, home);
@@ -511,7 +627,7 @@
gtk_file_path_free (home_path);
-@@ -1595,7 +1813,9 @@
+@@ -1595,7 +1814,9 @@
path = gtk_file_system_filename_to_path (impl->file_system, name);
g_free (name);
@@ -522,7 +638,7 @@
/* We do not actually pop up an error dialog if there is no desktop directory
* because some people may really not want to have one.
*/
-@@ -1634,7 +1854,7 @@
+@@ -1634,7 +1855,7 @@
label = gtk_file_system_get_bookmark_label (impl->file_system, path);
/* NULL GError, but we don't really want to show error boxes here */
@@ -531,7 +647,7 @@
num_inserted++;
g_free (label);
-@@ -1653,6 +1873,16 @@
+@@ -1653,6 +1874,16 @@
int n;
n = 0;
@@ -548,7 +664,7 @@
if (where == SHORTCUTS_HOME)
goto out;
-@@ -1749,15 +1979,18 @@
+@@ -1749,15 +1980,18 @@
}
}
@@ -570,7 +686,7 @@
impl->changing_folder = old_changing_folders;
-@@ -1767,11 +2000,13 @@
+@@ -1767,11 +2001,13 @@
/* Inserts a separator node in the shortcuts list */
static void
shortcuts_insert_separator (GtkFileChooserDefault *impl,
@@ -586,7 +702,7 @@
gtk_list_store_insert (impl->shortcuts_model, &iter,
shortcuts_get_index (impl, where));
-@@ -1780,6 +2015,7 @@
+@@ -1780,6 +2016,7 @@
SHORTCUTS_COL_PIXBUF_VISIBLE, FALSE,
SHORTCUTS_COL_NAME, NULL,
SHORTCUTS_COL_DATA, NULL,
@@ -594,7 +710,7 @@
-1);
}
-@@ -1792,7 +2028,7 @@
+@@ -1792,7 +2029,7 @@
GtkTreeIter iter;
GtkFilePath *list_selected = NULL;
GtkFilePath *combo_selected = NULL;
@@ -603,7 +719,7 @@
gpointer col_data;
profile_start ("start", NULL);
-@@ -1806,10 +2042,10 @@
+@@ -1806,10 +2043,10 @@
gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model),
&iter,
SHORTCUTS_COL_DATA, &col_data,
@@ -616,9 +732,18 @@
list_selected = gtk_file_path_copy (col_data);
}
-@@ -1820,10 +2056,10 @@
+@@ -1817,13 +2054,18 @@
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (impl->save_folder_combo),
+ &iter))
+ {
++ GtkTreeIter child_iter;
++
++ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (impl->shortcuts_combo_filter_model),
++ &iter,
++ &child_iter);
gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model),
- &iter,
+- &iter,
++ &child_iter,
SHORTCUTS_COL_DATA, &col_data,
- SHORTCUTS_COL_IS_VOLUME, &is_volume,
+ SHORTCUTS_COL_TYPE, &shortcut_type,
@@ -629,7 +754,7 @@
combo_selected = gtk_file_path_copy (col_data);
}
-@@ -1841,8 +2077,11 @@
+@@ -1841,8 +2083,11 @@
if (impl->num_bookmarks > 0)
shortcuts_insert_separator (impl, SHORTCUTS_BOOKMARKS_SEPARATOR);
@@ -643,7 +768,7 @@
if (list_selected)
{
-@@ -1856,8 +2095,8 @@
+@@ -1856,8 +2101,8 @@
pos = shortcut_find_position (impl, combo_selected);
if (pos != -1)
@@ -654,7 +779,7 @@
gtk_file_path_free (combo_selected);
}
-@@ -1902,16 +2141,18 @@
+@@ -1902,16 +2147,18 @@
if (base_path &&
strcmp (gtk_file_path_get_string (base_path), gtk_file_path_get_string (impl->current_folder)) == 0)
{
@@ -677,7 +802,7 @@
}
/* Updates the current folder row in the shortcuts model */
-@@ -1933,9 +2174,9 @@
+@@ -1933,9 +2180,9 @@
/* Filter function used for the shortcuts filter model */
static gboolean
@@ -690,7 +815,7 @@
{
GtkFileChooserDefault *impl;
GtkTreePath *path;
-@@ -1962,11 +2203,17 @@
+@@ -1962,11 +2209,17 @@
GDK_TYPE_PIXBUF, /* pixbuf */
G_TYPE_STRING, /* name */
G_TYPE_POINTER, /* path or volume */
@@ -709,7 +834,7 @@
if (impl->file_system)
{
shortcuts_append_home (impl);
-@@ -1974,12 +2221,12 @@
+@@ -1974,12 +2227,12 @@
shortcuts_add_volumes (impl);
}
@@ -727,7 +852,7 @@
impl,
NULL);
}
-@@ -2197,16 +2444,16 @@
+@@ -2197,16 +2450,16 @@
for (i = 0; i < current_folder_separator_idx; i++)
{
gpointer col_data;
@@ -747,7 +872,7 @@
{
GtkFileSystemVolume *volume;
GtkFilePath *base_path;
-@@ -2222,7 +2469,7 @@
+@@ -2222,7 +2475,7 @@
if (exists)
return i;
}
@@ -756,7 +881,7 @@
{
GtkFilePath *model_path;
-@@ -2328,7 +2575,7 @@
+@@ -2328,7 +2581,7 @@
if (!gtk_tree_selection_get_selected (selection, NULL, &parent_iter))
return FALSE;
@@ -765,7 +890,7 @@
iter,
&parent_iter);
return TRUE;
-@@ -2351,11 +2598,12 @@
+@@ -2351,11 +2604,12 @@
SHORTCUTS_COL_DATA, &col_data,
SHORTCUTS_COL_REMOVABLE, &removable,
-1);
@@ -779,7 +904,7 @@
path = col_data;
error = NULL;
-@@ -2512,6 +2760,16 @@
+@@ -2512,6 +2766,16 @@
gboolean active;
gchar *tip;
@@ -796,7 +921,7 @@
selection_check (impl, &num_selected, NULL, &all_folders);
if (num_selected == 0)
-@@ -3025,7 +3283,7 @@
+@@ -3025,7 +3289,7 @@
{
GtkTreeIter iter;
gpointer col_data;
@@ -805,7 +930,7 @@
GtkTreePath *path;
int old_position;
int bookmarks_index;
-@@ -3050,10 +3308,10 @@
+@@ -3050,10 +3314,10 @@
gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), &iter,
SHORTCUTS_COL_NAME, &name,
SHORTCUTS_COL_DATA, &col_data,
@@ -818,7 +943,7 @@
file_path = col_data;
file_path_copy = gtk_file_path_copy (file_path); /* removal below will free file_path, so we need a copy */
-@@ -3137,17 +3395,11 @@
+@@ -3137,17 +3401,11 @@
GtkTreeIter *iter,
gpointer data)
{
@@ -839,7 +964,7 @@
}
/* Since GtkTreeView has a keybinding attached to '/', we need to catch
-@@ -3394,7 +3646,7 @@
+@@ -3394,7 +3652,7 @@
/* Accessible object name for the file chooser's shortcuts pane */
atk_object_set_name (gtk_widget_get_accessible (impl->browse_shortcuts_tree_view), _("Places"));
@@ -848,7 +973,7 @@
gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view),
GDK_BUTTON1_MASK,
-@@ -3467,8 +3719,7 @@
+@@ -3467,8 +3725,7 @@
gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view),
shortcuts_row_separator_func,
@@ -858,7 +983,7 @@
gtk_tree_view_append_column (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), column);
-@@ -3842,6 +4093,8 @@
+@@ -3842,6 +4099,8 @@
{
file_list_build_popup_menu (impl);
@@ -867,7 +992,7 @@
/* The sensitivity of the Add to Bookmarks item is set in
* bookmarks_check_add_sensitivity()
*/
-@@ -3941,6 +4194,28 @@
+@@ -3941,6 +4200,28 @@
return TRUE;
}
@@ -896,7 +1021,7 @@
/* Creates the widgets for the file list */
static GtkWidget *
create_file_list (GtkFileChooserDefault *impl)
-@@ -3954,7 +4229,7 @@
+@@ -3954,7 +4235,7 @@
swin = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
@@ -905,7 +1030,7 @@
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swin),
GTK_SHADOW_IN);
-@@ -4044,6 +4319,7 @@
+@@ -4044,6 +4325,7 @@
gtk_tree_view_column_set_sort_column_id (column, FILE_LIST_COL_SIZE);
gtk_tree_view_append_column (GTK_TREE_VIEW (impl->browse_files_tree_view), column);
#endif
@@ -913,7 +1038,7 @@
/* Modification time column */
column = gtk_tree_view_column_new ();
-@@ -4054,8 +4330,11 @@
+@@ -4054,8 +4336,11 @@
gtk_tree_view_column_pack_start (column, renderer, TRUE);
gtk_tree_view_column_set_cell_data_func (column, renderer,
list_mtime_data_func, impl, NULL);
@@ -926,7 +1051,7 @@
gtk_widget_show_all (swin);
return swin;
-@@ -4162,9 +4441,59 @@
+@@ -4162,9 +4447,59 @@
return;
if (gtk_combo_box_get_active_iter (combo, &iter))
@@ -987,7 +1112,7 @@
/* Creates the combo box with the save folders */
static GtkWidget *
save_folder_combo_create (GtkFileChooserDefault *impl)
-@@ -4172,8 +4501,14 @@
+@@ -4172,8 +4507,14 @@
GtkWidget *combo;
GtkCellRenderer *cell;
@@ -1003,7 +1128,7 @@
"focus-on-click", FALSE,
NULL);
gtk_widget_show (combo);
-@@ -4195,8 +4530,7 @@
+@@ -4195,8 +4536,7 @@
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo),
shortcuts_row_separator_func,
@@ -1013,7 +1138,7 @@
g_signal_connect (combo, "changed",
G_CALLBACK (save_folder_combo_changed_cb), impl);
-@@ -4521,6 +4855,7 @@
+@@ -4521,6 +4861,7 @@
GtkWidget *hpaned;
GtkWidget *widget;
GtkSizeGroup *size_group;
@@ -1021,7 +1146,7 @@
/* size group is used by the [+][-] buttons and the filter combo */
size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
-@@ -4530,6 +4865,7 @@
+@@ -4530,6 +4871,7 @@
hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
@@ -1029,7 +1154,7 @@
location_button_create (impl);
gtk_box_pack_start (GTK_BOX (hbox), impl->location_button, FALSE, FALSE, 0);
-@@ -4552,7 +4888,10 @@
+@@ -4552,7 +4894,10 @@
impl->location_entry_box = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (vbox), impl->location_entry_box, FALSE, FALSE, 0);
@@ -1041,7 +1166,7 @@
gtk_label_set_use_markup (GTK_LABEL (impl->location_label), TRUE);
gtk_widget_show (impl->location_label);
gtk_box_pack_start (GTK_BOX (impl->location_entry_box), impl->location_label, FALSE, FALSE, 0);
-@@ -5116,6 +5455,9 @@
+@@ -5116,6 +5461,9 @@
impl->shortcuts_activate_iter_handle = NULL;
}
@@ -1051,7 +1176,7 @@
remove_settings_signal (impl, gtk_widget_get_screen (GTK_WIDGET (impl)));
G_OBJECT_CLASS (_gtk_file_chooser_default_parent_class)->dispose (object);
-@@ -5387,31 +5729,32 @@
+@@ -5387,31 +5735,32 @@
GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->map (widget);
@@ -1109,7 +1234,7 @@
bookmarks_changed_cb (impl->file_system, impl);
-@@ -5883,12 +6226,6 @@
+@@ -5883,12 +6232,6 @@
* but rather on behalf of something else like GtkFileChooserButton. In
* that case, the chooser's selection should be what the caller expects,
* as the user can't see that something else got selected. See bug #165264.
@@ -1122,7 +1247,7 @@
*/
if (GTK_WIDGET_MAPPED (impl) && impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
browse_files_select_first_row (impl);
-@@ -5937,17 +6274,11 @@
+@@ -5937,17 +6280,11 @@
profile_end ("end", NULL);
}
@@ -1143,7 +1268,7 @@
if (impl->browse_files_model)
{
g_object_unref (impl->browse_files_model);
-@@ -5959,6 +6290,20 @@
+@@ -5959,6 +6296,20 @@
g_object_unref (impl->sort_model);
impl->sort_model = NULL;
}
@@ -1164,7 +1289,7 @@
set_busy_cursor (impl, TRUE);
gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), NULL);
-@@ -6018,6 +6363,9 @@
+@@ -6018,6 +6369,9 @@
if (impl->processing_pending_selections)
return;
@@ -1174,7 +1299,7 @@
if (!(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
|| ((impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
-@@ -6047,25 +6395,34 @@
+@@ -6047,25 +6401,34 @@
}
else if (closure.num_selected == 1)
{
@@ -1224,7 +1349,7 @@
}
else
{
-@@ -6188,6 +6545,8 @@
+@@ -6188,6 +6551,8 @@
profile_start ("start", (char *) path);
@@ -1233,7 +1358,7 @@
g_assert (path != NULL);
if (impl->local_only &&
-@@ -6229,6 +6588,9 @@
+@@ -6229,6 +6594,9 @@
{
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
@@ -1243,7 +1368,7 @@
if (impl->reload_state == RELOAD_EMPTY)
{
char *current_working_dir;
-@@ -6289,9 +6651,9 @@
+@@ -6289,9 +6657,9 @@
return FALSE;
if (!parent_path)
@@ -1255,7 +1380,7 @@
same_path = FALSE;
else
{
-@@ -6387,6 +6749,16 @@
+@@ -6387,6 +6755,16 @@
gtk_file_chooser_default_select_all (GtkFileChooser *chooser)
{
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
@@ -1272,17 +1397,47 @@
if (impl->select_multiple)
gtk_tree_model_foreach (GTK_TREE_MODEL (impl->sort_model),
maybe_select, impl);
-@@ -6517,6 +6889,9 @@
+@@ -6516,6 +6894,10 @@
+ struct get_paths_closure info;
GtkWindow *toplevel;
GtkWidget *current_focus;
-
++ gboolean file_list_seen;
++
+ if (impl->operation_mode == OPERATION_MODE_SEARCH)
+ return search_get_selected_paths (impl);
-+
+
info.impl = impl;
info.result = NULL;
- info.path_from_entry = NULL;
-@@ -6734,7 +7109,7 @@
+@@ -6527,12 +6909,14 @@
+ else
+ current_focus = NULL;
+
++ file_list_seen = FALSE;
+ if (current_focus == impl->browse_files_tree_view)
+ {
+ GtkTreeSelection *selection;
+
+ file_list:
+
++ file_list_seen = TRUE;
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
+ gtk_tree_selection_selected_foreach (selection, get_paths_foreach, &info);
+
+@@ -6567,7 +6951,12 @@
+ }
+ }
+
+- info.result = g_slist_prepend (info.result, info.path_from_entry);
++ if (info.path_from_entry)
++ info.result = g_slist_prepend (info.result, info.path_from_entry);
++ else if (!file_list_seen)
++ goto file_list;
++ else
++ return NULL;
+ }
+ else if (impl->toplevel_last_focus_widget == impl->browse_files_tree_view)
+ goto file_list;
+@@ -6734,7 +7123,7 @@
pos = shortcuts_get_pos_for_shortcut_folder (data->impl, data->impl->num_shortcuts);
@@ -1291,7 +1446,7 @@
out:
g_object_unref (data->impl);
-@@ -6848,15 +7223,15 @@
+@@ -6848,15 +7237,15 @@
for (i = 0; i < impl->num_shortcuts; i++)
{
gpointer col_data;
@@ -1310,7 +1465,7 @@
shortcut = col_data;
if (gtk_file_path_compare (shortcut, path) == 0)
-@@ -6905,15 +7280,15 @@
+@@ -6905,15 +7294,15 @@
for (i = 0; i < impl->num_shortcuts; i++)
{
gpointer col_data;
@@ -1329,7 +1484,7 @@
shortcut = col_data;
list = g_slist_prepend (list, gtk_file_path_copy (shortcut));
-@@ -7248,6 +7623,23 @@
+@@ -7248,6 +7637,23 @@
}
}
@@ -1353,7 +1508,7 @@
static void
action_create_folder_cb (GtkFileSystemHandle *handle,
const GtkFilePath *path,
-@@ -7447,6 +7839,9 @@
+@@ -7447,6 +7853,9 @@
g_assert (impl->action >= GTK_FILE_CHOOSER_ACTION_OPEN && impl->action <= GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER);
@@ -1363,7 +1518,7 @@
selection_check (impl, &num_selected, &all_files, &all_folders);
if (num_selected > 2)
-@@ -7603,7 +7998,7 @@
+@@ -7603,7 +8012,7 @@
{
shortcuts_activate_iter (impl, &iter);
@@ -1372,7 +1527,7 @@
}
else
goto file_list;
-@@ -7617,6 +8012,11 @@
+@@ -7617,6 +8026,11 @@
*/
goto file_list;
}
@@ -1384,7 +1539,7 @@
else if (impl->location_entry && impl->toplevel_last_focus_widget == impl->location_entry)
{
/* The focus is on a dialog's action area button, *and* the widget that
-@@ -7666,17 +8066,467 @@
+@@ -7666,12 +8080,462 @@
gtk_widget_grab_focus (widget);
}
@@ -1399,14 +1554,10 @@
{
- if (impl->current_filter != filter)
- {
-- int filter_index;
+ GSList **list;
+ const GtkFilePath *file_path;
+ GtkFilePath *file_path_copy;
-
-- /* NULL filters are allowed to reset to non-filtered status
-- */
-- filter_index = g_slist_index (impl->filters, filter);
++
+ list = data;
+
+ gtk_tree_model_get (model, iter, SEARCH_MODEL_COL_PATH, &file_path, -1);
@@ -1852,15 +2003,10 @@
+{
+ if (impl->current_filter != filter)
+ {
-+ int filter_index;
-+
-+ /* NULL filters are allowed to reset to non-filtered status
-+ */
-+ filter_index = g_slist_index (impl->filters, filter);
- if (impl->filters && filter && filter_index < 0)
- return;
+ int filter_index;
-@@ -7714,28 +8564,43 @@
+ /* NULL filters are allowed to reset to non-filtered status
+@@ -7714,28 +8578,43 @@
{
GtkTreePath *cursor_path;
const GtkFilePath *new_path;
@@ -1921,7 +2067,7 @@
}
if (new_path != impl->preview_path &&
-@@ -7751,7 +8616,7 @@
+@@ -7751,7 +8630,7 @@
if (new_path)
{
impl->preview_path = gtk_file_path_copy (new_path);
@@ -1930,7 +2076,7 @@
}
else
{
-@@ -7820,6 +8685,8 @@
+@@ -7820,6 +8699,8 @@
{
GtkFilePath *path;
@@ -1939,7 +2085,7 @@
/* We ref the file chooser since volume_mount() may run a main loop, and the
* user could close the file chooser window in the meantime.
*/
-@@ -7840,6 +8707,8 @@
+@@ -7840,6 +8721,8 @@
if (path != NULL)
{
change_folder_and_display_error (impl, path);
@@ -1948,7 +2094,7 @@
gtk_file_path_free (path);
}
}
-@@ -7872,7 +8741,10 @@
+@@ -7872,7 +8755,10 @@
goto out;
if (!error && gtk_file_info_get_is_folder (info))
@@ -1960,7 +2106,7 @@
else
gtk_file_chooser_default_select_path (GTK_FILE_CHOOSER (data->impl), data->path, NULL);
-@@ -7889,31 +8761,30 @@
+@@ -7889,31 +8775,30 @@
GtkTreeIter *iter)
{
gpointer col_data;
@@ -2000,7 +2146,7 @@
{
struct ShortcutsActivateData *data;
-@@ -7926,6 +8797,10 @@
+@@ -7926,6 +8811,10 @@
GTK_FILE_INFO_IS_FOLDER,
shortcuts_activate_get_info_cb, data);
}
@@ -2011,7 +2157,7 @@
}
/* Callback used when a row in the shortcuts list is activated */
-@@ -7938,15 +8813,13 @@
+@@ -7938,15 +8827,13 @@
GtkTreeIter iter;
GtkTreeIter child_iter;
@@ -2029,7 +2175,7 @@
}
/* Handler for GtkWidget::key-press-event on the shortcuts list */
-@@ -7986,8 +8859,15 @@
+@@ -7986,8 +8873,15 @@
gpointer data)
{
GtkFileChooserDefault *impl = data;
@@ -2046,7 +2192,7 @@
}
static gboolean
-@@ -7999,6 +8879,9 @@
+@@ -7999,6 +8893,9 @@
{
GtkFileChooserDefault *impl = data;
@@ -2056,7 +2202,7 @@
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
-@@ -8024,7 +8907,7 @@
+@@ -8024,7 +8921,7 @@
GtkFileChooserDefault *impl)
{
/* See if we are in the new folder editable row for Save mode */
@@ -2065,7 +2211,7 @@
{
const GtkFileInfo *info;
gboolean had_selection;
-@@ -8039,6 +8922,8 @@
+@@ -8039,6 +8936,8 @@
out:
@@ -2074,7 +2220,7 @@
update_chooser_entry (impl);
check_preview_change (impl);
bookmarks_check_add_sensitivity (impl);
-@@ -8056,6 +8941,12 @@
+@@ -8056,6 +8955,12 @@
GtkTreeIter iter, child_iter;
const GtkFileInfo *info;
@@ -2087,7 +2233,7 @@
if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (impl->sort_model), &iter, path))
return;
-@@ -8126,6 +9017,15 @@
+@@ -8126,6 +9031,15 @@
const GtkFileInfo *info;
gboolean sensitive = TRUE;
@@ -2103,7 +2249,7 @@
profile_start ("start", NULL);
info = get_list_file_info (impl, iter);
-@@ -8175,13 +9075,33 @@
+@@ -8175,13 +9089,33 @@
gpointer data)
{
GtkFileChooserDefault *impl = data;
@@ -2139,7 +2285,7 @@
NULL);
return;
-@@ -8197,6 +9117,7 @@
+@@ -8197,6 +9131,7 @@
g_object_set (cell,
"text", gtk_file_info_get_display_name (info),
"sensitive", sensitive,
@@ -2147,7 +2293,7 @@
NULL);
}
-@@ -8258,7 +9179,6 @@
+@@ -8258,7 +9193,6 @@
gpointer data)
{
GtkFileChooserDefault *impl;
@@ -2155,7 +2301,7 @@
GtkFileTime time_mtime;
GDate mtime, now;
int days_diff;
-@@ -8267,17 +9187,35 @@
+@@ -8267,17 +9201,35 @@
impl = data;
@@ -2199,7 +2345,7 @@
if (time_mtime == 0)
strcpy (buf, _("Unknown"));
-@@ -8308,10 +9246,6 @@
+@@ -8308,10 +9260,6 @@
}
}
@@ -2210,7 +2356,7 @@
g_object_set (cell,
"text", buf,
"sensitive", sensitive,
-@@ -8329,7 +9263,23 @@
+@@ -8329,7 +9277,23 @@
static void
location_popup_handler (GtkFileChooserDefault *impl,
const gchar *path)
@@ -2235,7 +2381,7 @@
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
{
-@@ -8379,6 +9329,7 @@
+@@ -8379,6 +9343,7 @@
g_assert_not_reached ();
shortcuts_activate_iter (impl, &iter);
@@ -2243,7 +2389,7 @@
}
/* Handler for the "home-folder" keybinding signal */
-@@ -8423,26 +9374,26 @@
+@@ -8423,26 +9388,26 @@
/* Drag and drop interfaces */
static void
@@ -2276,7 +2422,7 @@
pos = *gtk_tree_path_get_indices (path);
bookmarks_pos = shortcuts_get_index (model->impl, SHORTCUTS_BOOKMARKS);
-@@ -8452,13 +9403,13 @@
+@@ -8452,13 +9417,13 @@
/* GtkTreeDragSource::drag_data_get implementation for the shortcuts filter model */
static gboolean
@@ -2295,7 +2441,7 @@
/* FIXME */
-@@ -8467,30 +9418,30 @@
+@@ -8467,30 +9432,30 @@
/* Fill the GtkTreeDragSourceIface vtable */
static void
@@ -2337,100 +2483,3 @@
"child-model", child_model,
"virtual-root", root,
NULL);
---- gtk+-2.10.0/gtk/gtkfilechooserprivate.h.search 2006-05-03 18:29:48.000000000 -0400
-+++ gtk+-2.10.0/gtk/gtkfilechooserprivate.h 2006-07-16 16:22:45.000000000 -0400
-@@ -147,6 +147,20 @@
- LOCATION_MODE_FILENAME_ENTRY
- } LocationMode;
-
-+typedef enum {
-+ OPERATION_MODE_BROWSE,
-+ OPERATION_MODE_SEARCH
-+} OperationMode;
-+
-+typedef struct _BeagleHit BeagleHit;
-+typedef struct _BeagleQuery BeagleQuery;
-+typedef struct _BeagleClient BeagleClient;
-+typedef struct _BeagleRequest BeagleRequest;
-+typedef struct _BeagleFinishedResponse BeagleFinishedResponse;
-+typedef struct _BeagleHitsAddedResponse BeagleHitsAddedResponse;
-+typedef struct _BeagleQueryPartProperty BeagleQueryPartProperty;
-+typedef struct _BeagleQueryPart BeagleQueryPart;
-+
- struct _GtkFileChooserDefault
- {
- GtkVBox parent_instance;
-@@ -175,10 +189,18 @@
- GtkWidget *browse_files_popup_menu_add_shortcut_item;
- GtkWidget *browse_files_popup_menu_hidden_files_item;
- GtkWidget *browse_new_folder_button;
-+ GtkWidget *browse_path_bar_hbox;
- GtkWidget *browse_path_bar;
-
- GtkFileSystemModel *browse_files_model;
-
-+ /* Widgets for searching */
-+ GtkWidget *search_hbox;
-+ GtkWidget *search_entry;
-+ BeagleClient *search_client;
-+ BeagleQuery *search_query;
-+ GtkListStore *search_model;
-+
- GtkWidget *filter_combo_hbox;
- GtkWidget *filter_combo;
- GtkWidget *preview_box;
-@@ -194,7 +216,16 @@
- LocationMode location_mode;
-
- GtkListStore *shortcuts_model;
-- GtkTreeModel *shortcuts_filter_model;
-+
-+ /* Filter for the shortcuts pane. We filter out the "current folder" row and
-+ * the separator that we use for the "Save in folder" combo.
-+ */
-+ GtkTreeModel *shortcuts_pane_filter_model;
-+
-+ /* Filter for the "Save in folder" combo. We filter out the Search row and
-+ * its separator.
-+ */
-+ GtkTreeModel *shortcuts_combo_filter_model;
-
- GtkTreeModelSort *sort_model;
-
-@@ -213,6 +244,8 @@
- ReloadState reload_state;
- guint load_timeout_id;
-
-+ OperationMode operation_mode;
-+
- GSList *pending_select_paths;
-
- GtkFileFilter *current_filter;
-@@ -220,9 +253,6 @@
-
- GtkTooltips *tooltips;
-
-- gboolean has_home;
-- gboolean has_desktop;
--
- int num_volumes;
- int num_shortcuts;
- int num_bookmarks;
-@@ -237,6 +267,7 @@
-
- GtkTreeViewColumn *list_name_column;
- GtkCellRenderer *list_name_renderer;
-+ GtkTreeViewColumn *list_mtime_column;
-
- GSource *edited_idle;
- char *edited_new_text;
-@@ -264,6 +295,9 @@
- guint changing_folder : 1;
- guint shortcuts_current_folder_active : 1;
- guint processing_pending_selections : 1;
-+ guint has_home : 1;
-+ guint has_desktop : 1;
-+ guint has_search : 1;
-
- #if 0
- guint shortcuts_drag_outside : 1;
Index: gtk2.spec
===================================================================
RCS file: /cvs/dist/rpms/gtk2/devel/gtk2.spec,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -r1.163 -r1.164
--- gtk2.spec 16 Jul 2006 23:28:19 -0000 1.163
+++ gtk2.spec 18 Jul 2006 15:14:54 -0000 1.164
@@ -16,7 +16,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2
Version: %{base_version}
-Release: 3
+Release: 4
License: LGPL
Group: System Environment/Libraries
Source: gtk+-%{version}.tar.bz2
@@ -277,6 +277,9 @@
%doc tmpdocs/examples
%changelog
+* Tue Jul 18 2006 Matthias Clasen <mclasen at redhat.com> - 2.10.0-4
+- Make the Search support more bulletproof
+
* Sun Jul 16 2006 Matthias Clasen <mclasen at redhat.com> - 2.10.0-3
- Fix a problem with the Search support
- Previous message (by thread): rpms/policycoreutils/devel policycoreutils-rhat.patch, 1.211, 1.212 policycoreutils.spec, 1.293, 1.294
- Next message (by thread): rpms/mkinitrd/devel .cvsignore, 1.117, 1.118 mkinitrd.spec, 1.141, 1.142 sources, 1.141, 1.142
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list