Hello community,
here is the log from the commit of package gtk2
checked in at Tue Apr 18 16:05:48 CEST 2006.
--------
--- GNOME/gtk2/gtk2.changes 2006-04-03 13:33:51.000000000 +0200
+++ STABLE/gtk2/gtk2.changes 2006-04-17 20:23:49.000000000 +0200
@@ -1,0 +2,10 @@
+Mon Apr 17 20:23:31 CEST 2006 - federico@novell.com
+
+- Updated gtk2-filechooser-new-features.diff to fix these bugs:
+ https://bugzilla.novell.com/show_bug.cgi?id=163234 - The file
+ chooser now sorts the list of Beagle hits by modification date.
+ https://bugzilla.novell.com/show_bug.cgi?id=166906 - The file
+ chooser in SAVE mode will now give the right filename if the user
+ just switched folders.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gtk2.spec ++++++
--- /var/tmp/diff_new_pack.hSf00W/_old 2006-04-18 16:05:10.000000000 +0200
+++ /var/tmp/diff_new_pack.hSf00W/_new 2006-04-18 16:05:10.000000000 +0200
@@ -22,7 +22,7 @@
Requires: gnome-filesystem
PreReq: /usr/bin/touch /bin/rm /bin/rmdir
Version: 2.8.10
-Release: 28
+Release: 31
Summary: Library for Creation of Graphical User Interfaces
Source: ftp://ftp.gnome.org/pub/GNOME/sources/gtk+/2.8/gtk+-%{version}.tar.bz2
Source1: SuSEconfig.gtk2
@@ -366,6 +366,13 @@
%{prefix}/share/gtk-doc/html/*
%changelog -n gtk2
+* Mon Apr 17 2006 - federico@novell.com
+- Updated gtk2-filechooser-new-features.diff to fix these bugs:
+ https://bugzilla.novell.com/show_bug.cgi?id=163234 - The file
+ chooser now sorts the list of Beagle hits by modification date.
+ https://bugzilla.novell.com/show_bug.cgi?id=166906 - The file
+ chooser in SAVE mode will now give the right filename if the user
+ just switched folders.
* Mon Apr 03 2006 - sbrabec@suse.cz
- Fixed context translation bugs (GNOME#336645).
* Thu Mar 30 2006 - federico@novell.com
++++++ gtk2-filechooser-new-features.diff ++++++
--- /var/tmp/diff_new_pack.hSf00W/_old 2006-04-18 16:05:12.000000000 +0200
+++ /var/tmp/diff_new_pack.hSf00W/_new 2006-04-18 16:05:12.000000000 +0200
@@ -1,5 +1,23 @@
FILENAME ENTRY:
+2006-04-17 Federico Mena Quintero
+
+ * gtk/gtkfilechooserdefault.c (pending_select_paths_process):
+ Oops, we *do* need to check that we are in OPEN mode before
+ selecting the first row in the file list. See
+ https://bugzilla.novell.com/show_bug.cgi?id=166906
+ (gtk_file_chooser_default_get_paths): If we are in the case for
+ the file list, and the list has no selected rows, jump to the case
+ for the filename entry. This is so that
+
+ 1. The user types a filename in the SAVE filename entry
+ ("foo.txt").
+
+ 2. He then double-clicks on a folder ("bar") in the file
+ list.
+
+ will yield the expected "bar/foo.txt" selection.
+
2006-03-29 Federico Mena Quintero
* gtk/gtkpathbar.c (gtk_path_bar_init): Reduce the inter-button
@@ -2876,8 +2894,7 @@
- * select a *different* folder from the one into which the user just
- * navigated.
*/
-- if (GTK_WIDGET_MAPPED (impl) && impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
-+ if (GTK_WIDGET_MAPPED (impl))
+ if (GTK_WIDGET_MAPPED (impl) && impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
browse_files_select_first_row (impl);
}
@@ -3009,16 +3026,16 @@
- info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter);
+ info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter);
-
-- if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
-- change_entry = !gtk_file_info_get_is_folder (info); /* We don't want the name to change when clicking on a folder... */
++
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
+ || impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
+ || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
+ change_entry = !gtk_file_info_get_is_folder (info); /* We don't want the name to change when clicking on a folder... */
+ else
+ change_entry = TRUE; /* ... unless we are in CREATE_FOLDER mode */
-+
+
+- if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
+- change_entry = !gtk_file_info_get_is_folder (info); /* We don't want the name to change when clicking on a folder... */
+ if (change_entry)
+ file_part = gtk_file_info_get_display_name (info);
+ }
@@ -3126,7 +3143,7 @@
if (strlen (gtk_entry_get_text (GTK_ENTRY (chooser_entry))) == 0)
{
-@@ -5751,17 +6426,38 @@ gtk_file_chooser_default_get_paths (GtkF
+@@ -5751,15 +6426,47 @@ gtk_file_chooser_default_get_paths (GtkF
{
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
struct get_paths_closure info;
@@ -3152,24 +3169,32 @@
{
- gboolean is_well_formed, is_empty, is_file_part_empty;
+ GtkTreeSelection *selection;
-
-- check_save_entry (impl, &info.path_from_entry, &is_well_formed, &is_empty, &is_file_part_empty);
++
+ file_list:
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
+ gtk_tree_selection_selected_foreach (selection, get_paths_foreach, &info);
++
++ /* If there is no selection in the file list, we probably have this situation:
++ *
++ * 1. The user typed a filename in the SAVE filename entry ("foo.txt").
++ * 2. He then double-clicked on a folder ("bar") in the file list
++ *
++ * So we want the selection to be "bar/foo.txt". Jump to the case for the
++ * filename entry to see if that is the case.
++ */
++ if (info.result == NULL && impl->location_entry)
++ goto file_entry;
+ }
+ else if (impl->location_entry && current_focus == impl->location_entry)
+ {
+ gboolean is_well_formed, is_empty, is_file_part_empty;
+
+ file_entry:
-+
-+ check_save_entry (impl, &info.path_from_entry, &is_well_formed, &is_empty, &is_file_part_empty);
- if (!is_well_formed)
- return NULL;
-@@ -5774,19 +6470,23 @@ gtk_file_chooser_default_get_paths (GtkF
+ check_save_entry (impl, &info.path_from_entry, &is_well_formed, &is_empty, &is_file_part_empty);
+
+@@ -5774,19 +6481,23 @@ gtk_file_chooser_default_get_paths (GtkF
return NULL;
}
}
@@ -3202,7 +3227,7 @@
/* If there's no folder selected, and we're in SELECT_FOLDER mode, then we
* fall back to the current directory */
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER &&
-@@ -5926,13 +6626,16 @@ gtk_file_chooser_default_add_shortcut_fo
+@@ -5926,13 +6637,16 @@ gtk_file_chooser_default_add_shortcut_fo
pos = shortcuts_get_pos_for_shortcut_folder (impl, impl->num_shortcuts);
@@ -3222,7 +3247,7 @@
return result;
}
-@@ -5958,15 +6661,15 @@ gtk_file_chooser_default_remove_shortcut
+@@ -5958,15 +6672,15 @@ gtk_file_chooser_default_remove_shortcut
for (i = 0; i < impl->num_shortcuts; i++)
{
gpointer col_data;
@@ -3241,7 +3266,7 @@
shortcut = col_data;
if (gtk_file_path_compare (shortcut, path) == 0)
-@@ -6014,15 +6717,15 @@ gtk_file_chooser_default_list_shortcut_f
+@@ -6014,15 +6728,15 @@ gtk_file_chooser_default_list_shortcut_f
for (i = 0; i < impl->num_shortcuts; i++)
{
gpointer col_data;
@@ -3260,7 +3285,7 @@
shortcut = col_data;
list = g_slist_prepend (list, gtk_file_path_copy (shortcut));
-@@ -6353,6 +7056,23 @@ should_respond_after_confirm_overwrite (
+@@ -6353,6 +7067,23 @@ should_respond_after_confirm_overwrite (
}
}
@@ -3284,7 +3309,7 @@
/* Implementation for GtkFileChooserEmbed::should_respond() */
static gboolean
gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
-@@ -6399,6 +7119,9 @@ gtk_file_chooser_default_should_respond
+@@ -6399,6 +7130,9 @@ gtk_file_chooser_default_should_respond
g_assert (impl->action >= GTK_FILE_CHOOSER_ACTION_OPEN && impl->action <= GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER);
@@ -3294,7 +3319,7 @@
selection_check (impl, &num_selected, &all_files, &all_folders);
if (num_selected > 2)
-@@ -6444,7 +7167,7 @@ gtk_file_chooser_default_should_respond
+@@ -6444,7 +7178,7 @@ gtk_file_chooser_default_should_respond
g_assert_not_reached ();
}
}
@@ -3303,7 +3328,7 @@
{
GtkFilePath *path;
gboolean is_well_formed, is_empty, is_file_part_empty;
-@@ -6456,9 +7179,12 @@ gtk_file_chooser_default_should_respond
+@@ -6456,9 +7190,12 @@ gtk_file_chooser_default_should_respond
save_entry:
g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
@@ -3318,7 +3343,7 @@
check_save_entry (impl, &path, &is_well_formed, &is_empty, &is_file_part_empty);
if (is_empty || !is_well_formed)
-@@ -6470,27 +7196,35 @@ gtk_file_chooser_default_should_respond
+@@ -6470,27 +7207,35 @@ gtk_file_chooser_default_should_respond
is_folder = check_is_folder (impl->file_system, path, &error);
if (is_folder)
{
@@ -3358,7 +3383,7 @@
{
/* Oops, the user typed the name of an existing path which is not a folder */
error_creating_folder_over_existing_file_dialog (impl, path, error);
-@@ -6514,7 +7248,7 @@ gtk_file_chooser_default_should_respond
+@@ -6514,7 +7259,7 @@ gtk_file_chooser_default_should_respond
{
const char *file_part;
@@ -3367,7 +3392,7 @@
retval = should_respond_after_confirm_overwrite (impl, file_part, parent_path);
}
else
-@@ -6562,8 +7296,7 @@ gtk_file_chooser_default_should_respond
+@@ -6562,8 +7307,7 @@ gtk_file_chooser_default_should_respond
if (shortcuts_get_selected (impl, &iter))
{
shortcuts_activate_iter (impl, &iter);
@@ -3377,7 +3402,7 @@
}
else
goto file_list;
-@@ -6577,6 +7310,18 @@ gtk_file_chooser_default_should_respond
+@@ -6577,6 +7321,18 @@ gtk_file_chooser_default_should_respond
*/
goto file_list;
}
@@ -3396,7 +3421,7 @@
else
/* The focus is on a dialog's action area button or something else */
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
-@@ -6600,19 +7345,467 @@ gtk_file_chooser_default_initial_focus (
+@@ -6600,19 +7356,471 @@ gtk_file_chooser_default_initial_focus (
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
@@ -3725,6 +3750,10 @@
+ impl,
+ NULL);
+
++ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (impl->search_model),
++ SEARCH_MODEL_COL_STAT,
++ GTK_SORT_DESCENDING);
++
+ gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), GTK_TREE_MODEL (impl->search_model));
+}
+
@@ -3866,7 +3895,7 @@
static void
set_current_filter (GtkFileChooserDefault *impl,
GtkFileFilter *filter)
-@@ -6662,26 +7855,45 @@ check_preview_change (GtkFileChooserDefa
+@@ -6662,26 +7870,45 @@ check_preview_change (GtkFileChooserDefa
{
GtkTreePath *cursor_path;
const GtkFilePath *new_path;
@@ -3878,14 +3907,14 @@
- {
- GtkTreeIter iter;
- GtkTreeIter child_iter;
-
+-
- gtk_tree_model_get_iter (GTK_TREE_MODEL (impl->sort_model), &iter, cursor_path);
- gtk_tree_path_free (cursor_path);
+
+- gtk_tree_model_sort_convert_iter_to_child_iter (impl->sort_model, &child_iter, &iter);
+ new_path = NULL;
+ new_display_name = NULL;
-- gtk_tree_model_sort_convert_iter_to_child_iter (impl->sort_model, &child_iter, &iter);
--
- new_path = _gtk_file_system_model_get_path (impl->browse_files_model, &child_iter);
- new_info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter);
- }
@@ -3927,7 +3956,7 @@
}
if (new_path != impl->preview_path &&
-@@ -6697,7 +7909,7 @@ check_preview_change (GtkFileChooserDefa
+@@ -6697,7 +7924,7 @@ check_preview_change (GtkFileChooserDefa
if (new_path)
{
impl->preview_path = gtk_file_path_copy (new_path);
@@ -3936,7 +3965,7 @@
}
else
{
-@@ -6721,6 +7933,8 @@ shortcuts_activate_volume (GtkFileChoose
+@@ -6721,6 +7948,8 @@ shortcuts_activate_volume (GtkFileChoose
{
GtkFilePath *path;
@@ -3945,7 +3974,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.
*/
-@@ -6757,6 +7971,8 @@ shortcuts_activate_volume (GtkFileChoose
+@@ -6757,6 +7986,8 @@ shortcuts_activate_volume (GtkFileChoose
if (path != NULL)
{
change_folder_and_display_error (impl, path);
@@ -3954,7 +3983,7 @@
gtk_file_path_free (path);
}
-@@ -6771,17 +7987,16 @@ shortcuts_activate_iter (GtkFileChooserD
+@@ -6771,17 +8002,16 @@ shortcuts_activate_iter (GtkFileChooserD
GtkTreeIter *iter)
{
gpointer col_data;
@@ -3977,7 +4006,7 @@
{
GtkFileSystemVolume *volume;
-@@ -6789,12 +8004,17 @@ shortcuts_activate_iter (GtkFileChooserD
+@@ -6789,12 +8019,17 @@ shortcuts_activate_iter (GtkFileChooserD
shortcuts_activate_volume (impl, volume);
}
@@ -3996,7 +4025,7 @@
}
}
-@@ -6808,15 +8028,13 @@ shortcuts_row_activated_cb (GtkTreeView
+@@ -6808,15 +8043,13 @@ shortcuts_row_activated_cb (GtkTreeView
GtkTreeIter iter;
GtkTreeIter child_iter;
@@ -4014,24 +4043,24 @@
}
/* Handler for GtkWidget::key-press-event on the shortcuts list */
-@@ -6856,8 +8074,15 @@ shortcuts_select_func (GtkTreeSelection
+@@ -6856,8 +8089,15 @@ shortcuts_select_func (GtkTreeSelection
gpointer data)
{
GtkFileChooserDefault *impl = data;
+ GtkTreeIter filter_iter;
+ ShortcutType shortcut_type;
-
-- return (*gtk_tree_path_get_indices (path) != shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS_SEPARATOR));
++
+ if (!gtk_tree_model_get_iter (impl->shortcuts_pane_filter_model, &filter_iter, path))
+ g_assert_not_reached ();
+
+ gtk_tree_model_get (impl->shortcuts_pane_filter_model, &filter_iter, SHORTCUTS_COL_TYPE, &shortcut_type, -1);
-+
+
+- return (*gtk_tree_path_get_indices (path) != shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS_SEPARATOR));
+ return (shortcut_type != SHORTCUT_TYPE_SEPARATOR);
}
static gboolean
-@@ -6869,6 +8094,9 @@ list_select_func (GtkTreeSelection *se
+@@ -6869,6 +8109,9 @@ list_select_func (GtkTreeSelection *se
{
GtkFileChooserDefault *impl = data;
@@ -4041,7 +4070,7 @@
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
-@@ -6894,7 +8122,7 @@ list_selection_changed (GtkTreeSelection
+@@ -6894,7 +8137,7 @@ list_selection_changed (GtkTreeSelection
GtkFileChooserDefault *impl)
{
/* See if we are in the new folder editable row for Save mode */
@@ -4050,7 +4079,7 @@
{
const GtkFileInfo *info;
gboolean had_selection;
-@@ -6909,6 +8137,8 @@ list_selection_changed (GtkTreeSelection
+@@ -6909,6 +8152,8 @@ list_selection_changed (GtkTreeSelection
out:
@@ -4059,7 +4088,7 @@
update_chooser_entry (impl);
check_preview_change (impl);
bookmarks_check_add_sensitivity (impl);
-@@ -6926,6 +8156,12 @@ list_row_activated (GtkTreeView
+@@ -6926,6 +8171,12 @@ list_row_activated (GtkTreeView
GtkTreeIter iter, child_iter;
const GtkFileInfo *info;
@@ -4072,7 +4101,7 @@
if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (impl->sort_model), &iter, path))
return;
-@@ -6996,6 +8232,15 @@ list_icon_data_func (GtkTreeViewColumn *
+@@ -6996,6 +8247,15 @@ list_icon_data_func (GtkTreeViewColumn *
const GtkFileInfo *info;
gboolean sensitive = TRUE;
@@ -4088,7 +4117,7 @@
profile_start ("start", NULL);
info = get_list_file_info (impl, iter);
-@@ -7040,19 +8285,38 @@ list_name_data_func (GtkTreeViewColumn *
+@@ -7040,19 +8300,38 @@ list_name_data_func (GtkTreeViewColumn *
gpointer data)
{
GtkFileChooserDefault *impl = data;
@@ -4130,7 +4159,7 @@
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
-@@ -7062,6 +8326,7 @@ list_name_data_func (GtkTreeViewColumn *
+@@ -7062,6 +8341,7 @@ list_name_data_func (GtkTreeViewColumn *
g_object_set (cell,
"text", gtk_file_info_get_display_name (info),
"sensitive", sensitive,
@@ -4138,7 +4167,7 @@
NULL);
}
-@@ -7081,21 +8346,25 @@ list_size_data_func (GtkTreeViewColumn *
+@@ -7081,21 +8361,25 @@ list_size_data_func (GtkTreeViewColumn *
if (!info || gtk_file_info_get_is_folder (info))
{
@@ -4170,7 +4199,7 @@
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
sensitive = FALSE;
-@@ -7103,6 +8372,7 @@ list_size_data_func (GtkTreeViewColumn *
+@@ -7103,6 +8387,7 @@ list_size_data_func (GtkTreeViewColumn *
g_object_set (cell,
"text", str,
"sensitive", sensitive,
@@ -4178,7 +4207,7 @@
NULL);
g_free (str);
-@@ -7118,7 +8388,6 @@ list_mtime_data_func (GtkTreeViewColumn
+@@ -7118,7 +8403,6 @@ list_mtime_data_func (GtkTreeViewColumn
gpointer data)
{
GtkFileChooserDefault *impl;
@@ -4186,7 +4215,7 @@
GtkFileTime time_mtime, time_now;
GDate mtime, now;
int days_diff;
-@@ -7127,17 +8396,35 @@ list_mtime_data_func (GtkTreeViewColumn
+@@ -7127,17 +8411,35 @@ list_mtime_data_func (GtkTreeViewColumn
impl = data;
@@ -4230,7 +4259,7 @@
if (time_mtime == 0)
strcpy (buf, _("Unknown"));
-@@ -7168,10 +8455,6 @@ list_mtime_data_func (GtkTreeViewColumn
+@@ -7168,10 +8470,6 @@ list_mtime_data_func (GtkTreeViewColumn
}
}
@@ -4241,7 +4270,7 @@
g_object_set (cell,
"text", buf,
"sensitive", sensitive,
-@@ -7186,250 +8469,49 @@ _gtk_file_chooser_default_new (const cha
+@@ -7186,250 +8484,49 @@ _gtk_file_chooser_default_new (const cha
NULL);
}
@@ -4298,8 +4327,7 @@
- _("The folder you specified is an invalid path."));
- return FALSE;
- }
-+ GtkWidget *widget_to_focus;
-
+-
- if (file_part[0] == '\0')
- return change_folder_and_display_error (impl, folder_path);
- else
@@ -4328,7 +4356,8 @@
-
- error = NULL;
- subfolder_path = gtk_file_system_make_path (impl->file_system, folder_path, file_part, &error);
--
++ GtkWidget *widget_to_focus;
+
- if (!subfolder_path)
- {
- char *msg;
@@ -4386,11 +4415,11 @@
- g_object_unref (folder);
-
- gtk_file_path_free (subfolder_path);
-+ widget_to_focus = impl->location_entry;
-
+-
- if (info)
- gtk_file_info_free (info);
--
++ widget_to_focus = impl->location_entry;
+
- return result;
+ gtk_widget_grab_focus (widget_to_focus);
+ return;
@@ -4519,7 +4548,7 @@
}
/* Handler for the "up-folder" keybinding signal */
-@@ -7461,6 +8543,7 @@ switch_to_shortcut (GtkFileChooserDefaul
+@@ -7461,6 +8558,7 @@ switch_to_shortcut (GtkFileChooserDefaul
g_assert_not_reached ();
shortcuts_activate_iter (impl, &iter);
@@ -4527,7 +4556,7 @@
}
/* Handler for the "home-folder" keybinding signal */
-@@ -7484,26 +8567,26 @@ desktop_folder_handler (GtkFileChooserDe
+@@ -7484,26 +8582,26 @@ desktop_folder_handler (GtkFileChooserDe
/* Drag and drop interfaces */
static void
@@ -4560,7 +4589,7 @@
pos = *gtk_tree_path_get_indices (path);
bookmarks_pos = shortcuts_get_index (model->impl, SHORTCUTS_BOOKMARKS);
-@@ -7513,13 +8596,13 @@ shortcuts_model_filter_row_draggable (Gt
+@@ -7513,13 +8611,13 @@ shortcuts_model_filter_row_draggable (Gt
/* GtkTreeDragSource::drag_data_get implementation for the shortcuts filter model */
static gboolean
@@ -4577,7 +4606,7 @@
/* FIXME */
-@@ -7528,30 +8611,30 @@ shortcuts_model_filter_drag_data_get (Gt
+@@ -7528,30 +8626,30 @@ shortcuts_model_filter_drag_data_get (Gt
/* Fill the GtkTreeDragSourceIface vtable */
static void
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...