nautilus r13595 - in trunk: . libnautilus-private
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r13595 - in trunk: . libnautilus-private
- Date: Mon, 14 Jan 2008 13:38:06 +0000 (GMT)
Author: alexl
Date: Mon Jan 14 13:38:05 2008
New Revision: 13595
URL: http://svn.gnome.org/viewvc/nautilus?rev=13595&view=rev
Log:
2008-01-14 Alexander Larsson <alexl redhat com>
* libnautilus-private/nautilus-ui-utilities.c:
(extension_action_sensitive_callback):
(nautilus_toolbar_action_from_menu_item):
Update toolbar item sensitivity if menu item changes.
Modified:
trunk/ChangeLog
trunk/libnautilus-private/nautilus-ui-utilities.c
Modified: trunk/libnautilus-private/nautilus-ui-utilities.c
==============================================================================
--- trunk/libnautilus-private/nautilus-ui-utilities.c (original)
+++ trunk/libnautilus-private/nautilus-ui-utilities.c Mon Jan 14 13:38:05 2008
@@ -114,6 +114,20 @@
nautilus_menu_item_activate (NAUTILUS_MENU_ITEM (callback_data));
}
+static void
+extension_action_sensitive_callback (NautilusMenuItem *item,
+ GParamSpec *arg1,
+ gpointer user_data)
+{
+ gboolean value;
+
+ g_object_get (G_OBJECT (item),
+ "sensitive", &value,
+ NULL);
+
+ gtk_action_set_sensitive (GTK_ACTION (user_data), value);
+}
+
GtkAction *
nautilus_action_from_menu_item (NautilusMenuItem *item)
{
@@ -206,6 +220,11 @@
g_object_ref (item),
(GClosureNotify)g_object_unref, 0);
+ g_signal_connect_object (item, "notify::sensitive",
+ G_CALLBACK (extension_action_sensitive_callback),
+ action,
+ 0);
+
g_free (name);
g_free (label);
g_free (tip);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]