From de74fffdc73bcb6a56cabbbaf11d9659ec3d51f2 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 17 Mar 2007 15:02:41 +0000 Subject: [PATCH] Remove useless inlined function and propagate the properties to the 2007-03-17 Emmanuele Bassi * gtk/gtkrecentaction.c (recent_chooser_set_property), (gtk_recent_action_set_property): Remove useless inlined function and propagate the properties to the GtkRecentChooser objects we create, instead of all the proxies. (set_current_filter): Remove 'inline' marker. svn path=/trunk/; revision=17536 --- ChangeLog | 11 +++++++++++ gtk/gtkrecentaction.c | 28 +++++++++------------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01d8c92520..8c9191905a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ +2007-03-17 Emmanuele Bassi + + * gtk/gtkrecentaction.c (recent_chooser_set_property), + (gtk_recent_action_set_property): Remove useless inlined + function and propagate the properties to the GtkRecentChooser + objects we create, instead of all the proxies. + + (set_current_filter): Remove 'inline' marker. + 2007-03-16 Emmanuele Bassi + Apply changes suggested by Michael Natterer. (#338843) + * gtk/gtkaction.h: * gtk/gtkaction.c: Rename get_submenu() to create_menu(); rename gtk_action_get_submenu() to gtk_action_create_menu(). diff --git a/gtk/gtkrecentaction.c b/gtk/gtkrecentaction.c index c55c68ab35..2a70c4a16c 100644 --- a/gtk/gtkrecentaction.c +++ b/gtk/gtkrecentaction.c @@ -81,23 +81,6 @@ G_DEFINE_TYPE_WITH_CODE (GtkRecentAction, G_IMPLEMENT_INTERFACE (GTK_TYPE_RECENT_CHOOSER, gtk_recent_chooser_iface_init)); -static inline void -recent_chooser_set_property (GtkRecentAction *action, - const gchar *property_name, - const GValue *value) -{ - GSList *proxies, *l; - - proxies = gtk_action_get_proxies (GTK_ACTION (action)); - for (l = proxies; l != NULL; l = l->next) - { - GObject *proxy = l->data; - - g_object_set_property (proxy, property_name, value); - } - g_slist_free (proxies); -} - static gboolean gtk_recent_action_set_current_uri (GtkRecentChooser *chooser, const gchar *uri, @@ -227,7 +210,7 @@ gtk_recent_action_set_sort_func (GtkRecentChooser *chooser, } } -static inline void +static void set_current_filter (GtkRecentAction *action, GtkRecentFilter *filter) { @@ -540,6 +523,7 @@ gtk_recent_action_set_property (GObject *gobject, { GtkRecentAction *action = GTK_RECENT_ACTION (gobject); GtkRecentActionPrivate *priv = action->priv; + GSList *l; switch (prop_id) { @@ -583,7 +567,13 @@ gtk_recent_action_set_property (GObject *gobject, return; } - recent_chooser_set_property (action, pspec->name, value); + /* propagate the properties to the proxies we have created */ + for (l = priv->choosers; l != NULL; l = l->next) + { + GObject *proxy = l->data; + + g_object_set_property (proxy, pspec->name, value); + } } static void