summaryrefslogtreecommitdiff
path: root/gtk/gtkrecentchooser.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2006-08-14 20:58:21 +0000
committerEmmanuele Bassi <ebassi@src.gnome.org>2006-08-14 20:58:21 +0000
commite4f6c9d4d00daf6bac3898e75268ebdb92bba091 (patch)
tree071c9c5f0bd7b54a77bdb16f9a39406f24ba0e0f /gtk/gtkrecentchooser.c
parentf060a9866f4a1b6214ac8defd13cb875b9050630 (diff)
downloadgtk+-e4f6c9d4d00daf6bac3898e75268ebdb92bba091.tar.gz
Add a check on the filter argument, instead of blindly passing it to
2006-08-14 Emmanuele Bassi <ebassi@gnome.org> * gtk/gtkrecentchooser.c: (gtk_recent_chooser_add_filter), (gtk_recent_chooser_remove_filter), (gtk_recent_chooser_set_filter): Add a check on the filter argument, instead of blindly passing it to underlying implementation. * gtk/gtkrecentchoosermenu.c: (gtk_recent_chooser_menu_add_filter), (gtk_recent_chooser_menu_remove_filter), (gtk_recent_chooser_menu_list_filters): Implement these GtkRecentChooser methods, by setting and returning the only GtkRecentFilter object supported by a GtkRecentChooserMenu. (#347856, reported by Rod Butcher)
Diffstat (limited to 'gtk/gtkrecentchooser.c')
-rw-r--r--gtk/gtkrecentchooser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkrecentchooser.c b/gtk/gtkrecentchooser.c
index fe2c39dc19..06b5fdd764 100644
--- a/gtk/gtkrecentchooser.c
+++ b/gtk/gtkrecentchooser.c
@@ -884,6 +884,7 @@ gtk_recent_chooser_add_filter (GtkRecentChooser *chooser,
GtkRecentFilter *filter)
{
g_return_if_fail (GTK_IS_RECENT_CHOOSER (chooser));
+ g_return_if_fail (GTK_IS_RECENT_FILTER (filter));
GTK_RECENT_CHOOSER_GET_IFACE (chooser)->add_filter (chooser, filter);
}
@@ -902,6 +903,7 @@ gtk_recent_chooser_remove_filter (GtkRecentChooser *chooser,
GtkRecentFilter *filter)
{
g_return_if_fail (GTK_IS_RECENT_CHOOSER (chooser));
+ g_return_if_fail (GTK_IS_RECENT_FILTER (filter));
GTK_RECENT_CHOOSER_GET_IFACE (chooser)->remove_filter (chooser, filter);
}
@@ -940,6 +942,7 @@ gtk_recent_chooser_set_filter (GtkRecentChooser *chooser,
GtkRecentFilter *filter)
{
g_return_if_fail (GTK_IS_RECENT_CHOOSER (chooser));
+ g_return_if_fail (GTK_IS_RECENT_FILTER (filter));
g_object_set (G_OBJECT (chooser), "filter", filter, NULL);
}