Commit 33d5c3d6 authored by Matthias Clasen's avatar Matthias Clasen

Fix pltcheck issues

svn path=/trunk/; revision=22198
parent faf6a832
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentchooser.c:
* gtk/gtkuimanager.c: Fix issues found by pltcheck
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* NEWS: Updates
......
......@@ -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));
......
......@@ -31,6 +31,7 @@
#include "config.h"
#include <string.h>
#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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment