diff --git a/ChangeLog b/ChangeLog index c49d38941d..889fe89627 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-23 Matthias Clasen + + * gtk/gtkrecentchooser.c: + * gtk/gtkuimanager.c: Fix issues found by pltcheck + 2009-01-23 Matthias Clasen * NEWS: Updates diff --git a/gtk/gtkrecentchooser.c b/gtk/gtkrecentchooser.c index 298a125300..7002663574 100644 --- a/gtk/gtkrecentchooser.c +++ b/gtk/gtkrecentchooser.c @@ -1103,8 +1103,8 @@ _gtk_recent_chooser_activatable_update (GtkActivatable *activatable, GtkRecentAction *recent_action = GTK_RECENT_ACTION (action); if (strcmp (property_name, "show-numbers") == 0 && recent_chooser_has_show_numbers (recent_chooser)) - gtk_recent_chooser_set_show_numbers (recent_chooser, - gtk_recent_action_get_show_numbers (recent_action)); + g_object_set (recent_chooser, "show-numbers", + gtk_recent_action_get_show_numbers (recent_action), NULL); else if (strcmp (property_name, "show-private") == 0) gtk_recent_chooser_set_show_private (recent_chooser, gtk_recent_chooser_get_show_private (action_chooser)); else if (strcmp (property_name, "show-not-found") == 0) @@ -1134,8 +1134,9 @@ _gtk_recent_chooser_activatable_reset (GtkActivatable *activatable, return; if (recent_chooser_has_show_numbers (recent_chooser)) - gtk_recent_chooser_set_show_numbers (recent_chooser, - gtk_recent_action_get_show_numbers (GTK_RECENT_ACTION (action))); + g_object_set (recent_chooser, "show-numbers", + gtk_recent_action_get_show_numbers (GTK_RECENT_ACTION (action)), + NULL); gtk_recent_chooser_set_show_private (recent_chooser, gtk_recent_chooser_get_show_private (action_chooser)); gtk_recent_chooser_set_show_not_found (recent_chooser, gtk_recent_chooser_get_show_not_found (action_chooser)); gtk_recent_chooser_set_show_tips (recent_chooser, gtk_recent_chooser_get_show_tips (action_chooser)); diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 1066af9227..24267a6bfa 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -31,6 +31,7 @@ #include "config.h" #include +#include "gtkactivatable.h" #include "gtkbuildable.h" #include "gtkintl.h" #include "gtkmarshalers.h" @@ -2351,7 +2352,7 @@ update_node (GtkUIManager *self, } } - gtk_action_disconnect_proxy (info->action, info->proxy); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL); gtk_container_remove (GTK_CONTAINER (info->proxy->parent), info->proxy); g_object_unref (info->proxy); @@ -2416,7 +2417,7 @@ update_node (GtkUIManager *self, } } else - gtk_action_connect_proxy (action, info->proxy); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action); if (prev_submenu) { @@ -2559,7 +2560,7 @@ update_node (GtkUIManager *self, g_signal_handlers_disconnect_by_func (info->proxy, G_CALLBACK (update_smart_separators), NULL); - gtk_action_disconnect_proxy (info->action, info->proxy); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL); gtk_container_remove (GTK_CONTAINER (info->proxy->parent), info->proxy); g_object_unref (info->proxy); @@ -2587,7 +2588,7 @@ update_node (GtkUIManager *self, G_CALLBACK (update_smart_separators), NULL); gtk_menu_item_set_submenu (GTK_MENU_ITEM (info->proxy), NULL); - gtk_action_connect_proxy (action, info->proxy); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action); } if (info->proxy) @@ -2611,7 +2612,7 @@ update_node (GtkUIManager *self, g_signal_handlers_disconnect_by_func (info->proxy, G_CALLBACK (update_smart_separators), NULL); - gtk_action_disconnect_proxy (info->action, info->proxy); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL); gtk_container_remove (GTK_CONTAINER (info->proxy->parent), info->proxy); g_object_unref (info->proxy); @@ -2638,7 +2639,7 @@ update_node (GtkUIManager *self, g_signal_handlers_disconnect_by_func (info->proxy, G_CALLBACK (update_smart_separators), NULL); - gtk_action_connect_proxy (action, info->proxy); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action); } if (info->proxy)