Test for filter_info.uri correctly. Fixes #135379, pointed out by Damon
2004-03-01 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilechooserdefault.c (list_model_filter_func): Test for filter_info.uri correctly. Fixes #135379, pointed out by Damon Chaplin. (shortcuts_get_index): Compute the bookmarks index correctly. Fixes #135714, pointed out by Damon Chaplin. (gtk_file_chooser_default_list_shortcut_folders): Handle the case with no shortcuts, and don't run off the end of the list if there are no bookmarks and their separator. Fixes #135572, patch by Damon Chaplin.
This commit is contained in:

committed by
Federico Mena Quintero

parent
fa4514afc6
commit
0775cd28a3
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2004-03-01 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (list_model_filter_func): Test for
|
||||||
|
filter_info.uri correctly. Fixes #135379, pointed out by Damon
|
||||||
|
Chaplin.
|
||||||
|
(shortcuts_get_index): Compute the bookmarks index correctly.
|
||||||
|
Fixes #135714, pointed out by Damon Chaplin.
|
||||||
|
(gtk_file_chooser_default_list_shortcut_folders): Handle the case
|
||||||
|
with no shortcuts, and don't run off the end of the list if there
|
||||||
|
are no bookmarks and their separator. Fixes #135572, patch by
|
||||||
|
Damon Chaplin.
|
||||||
|
|
||||||
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
2004-03-01 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (list_model_filter_func): Test for
|
||||||
|
filter_info.uri correctly. Fixes #135379, pointed out by Damon
|
||||||
|
Chaplin.
|
||||||
|
(shortcuts_get_index): Compute the bookmarks index correctly.
|
||||||
|
Fixes #135714, pointed out by Damon Chaplin.
|
||||||
|
(gtk_file_chooser_default_list_shortcut_folders): Handle the case
|
||||||
|
with no shortcuts, and don't run off the end of the list if there
|
||||||
|
are no bookmarks and their separator. Fixes #135572, patch by
|
||||||
|
Damon Chaplin.
|
||||||
|
|
||||||
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
2004-03-01 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (list_model_filter_func): Test for
|
||||||
|
filter_info.uri correctly. Fixes #135379, pointed out by Damon
|
||||||
|
Chaplin.
|
||||||
|
(shortcuts_get_index): Compute the bookmarks index correctly.
|
||||||
|
Fixes #135714, pointed out by Damon Chaplin.
|
||||||
|
(gtk_file_chooser_default_list_shortcut_folders): Handle the case
|
||||||
|
with no shortcuts, and don't run off the end of the list if there
|
||||||
|
are no bookmarks and their separator. Fixes #135572, patch by
|
||||||
|
Damon Chaplin.
|
||||||
|
|
||||||
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
2004-03-01 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (list_model_filter_func): Test for
|
||||||
|
filter_info.uri correctly. Fixes #135379, pointed out by Damon
|
||||||
|
Chaplin.
|
||||||
|
(shortcuts_get_index): Compute the bookmarks index correctly.
|
||||||
|
Fixes #135714, pointed out by Damon Chaplin.
|
||||||
|
(gtk_file_chooser_default_list_shortcut_folders): Handle the case
|
||||||
|
with no shortcuts, and don't run off the end of the list if there
|
||||||
|
are no bookmarks and their separator. Fixes #135572, patch by
|
||||||
|
Damon Chaplin.
|
||||||
|
|
||||||
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
2004-03-01 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (list_model_filter_func): Test for
|
||||||
|
filter_info.uri correctly. Fixes #135379, pointed out by Damon
|
||||||
|
Chaplin.
|
||||||
|
(shortcuts_get_index): Compute the bookmarks index correctly.
|
||||||
|
Fixes #135714, pointed out by Damon Chaplin.
|
||||||
|
(gtk_file_chooser_default_list_shortcut_folders): Handle the case
|
||||||
|
with no shortcuts, and don't run off the end of the list if there
|
||||||
|
are no bookmarks and their separator. Fixes #135572, patch by
|
||||||
|
Damon Chaplin.
|
||||||
|
|
||||||
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
Mon Mar 1 12:23:06 2004 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
* gtk/gtklabel.c: Handle dynamically resolved bidi direction
|
||||||
|
@ -884,7 +884,7 @@ shortcuts_get_index (GtkFileChooserDefault *impl,
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* If there are no bookmarks there won't be a separator */
|
/* If there are no bookmarks there won't be a separator */
|
||||||
n += impl->num_shortcuts > 0 ? 1 : 0;
|
n += (impl->num_bookmarks > 0) ? 1 : 0;
|
||||||
|
|
||||||
if (where == SHORTCUTS_BOOKMARKS)
|
if (where == SHORTCUTS_BOOKMARKS)
|
||||||
goto out;
|
goto out;
|
||||||
@ -2418,7 +2418,7 @@ list_model_filter_func (GtkFileSystemModel *model,
|
|||||||
if (needed & GTK_FILE_FILTER_URI)
|
if (needed & GTK_FILE_FILTER_URI)
|
||||||
{
|
{
|
||||||
filter_info.uri = gtk_file_system_path_to_uri (impl->file_system, path);
|
filter_info.uri = gtk_file_system_path_to_uri (impl->file_system, path);
|
||||||
if (filter_info.filename)
|
if (filter_info.uri)
|
||||||
filter_info.contains |= GTK_FILE_FILTER_URI;
|
filter_info.contains |= GTK_FILE_FILTER_URI;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3076,6 +3076,9 @@ gtk_file_chooser_default_list_shortcut_folders (GtkFileChooser *chooser)
|
|||||||
int i;
|
int i;
|
||||||
GSList *list;
|
GSList *list;
|
||||||
|
|
||||||
|
if (impl->num_shortcuts == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
pos = shortcuts_get_pos_for_shortcut_folder (impl, 0);
|
pos = shortcuts_get_pos_for_shortcut_folder (impl, 0);
|
||||||
if (!gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (impl->shortcuts_model), &iter, NULL, pos))
|
if (!gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (impl->shortcuts_model), &iter, NULL, pos))
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
@ -3091,9 +3094,12 @@ gtk_file_chooser_default_list_shortcut_folders (GtkFileChooser *chooser)
|
|||||||
|
|
||||||
list = g_slist_prepend (list, gtk_file_path_copy (shortcut));
|
list = g_slist_prepend (list, gtk_file_path_copy (shortcut));
|
||||||
|
|
||||||
|
if (i != impl->num_shortcuts - 1)
|
||||||
|
{
|
||||||
if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model), &iter))
|
if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model), &iter))
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return g_slist_reverse (list);
|
return g_slist_reverse (list);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user