From 1b40a682eac74a10720e4941cb9fc5e45038d3da Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 27 Jan 2010 10:25:49 -0600 Subject: Making it so there is another level of translation so that we can use different strings in the enum. --- src/libappindicator/app-indicator-enum-types.c.in | 61 ---------------------- .../app-indicator-enum-types.gen.c.in | 61 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 61 deletions(-) delete mode 100644 src/libappindicator/app-indicator-enum-types.c.in create mode 100644 src/libappindicator/app-indicator-enum-types.gen.c.in (limited to 'src/libappindicator') diff --git a/src/libappindicator/app-indicator-enum-types.c.in b/src/libappindicator/app-indicator-enum-types.c.in deleted file mode 100644 index 449f3fc..0000000 --- a/src/libappindicator/app-indicator-enum-types.c.in +++ /dev/null @@ -1,61 +0,0 @@ -/*** BEGIN file-header ***/ -/* -An object to represent the application as an application indicator -in the system panel. - -Copyright 2009 Canonical Ltd. - -Authors: - Ted Gould - -This program is free software: you can redistribute it and/or modify it -under the terms of either or both of the following licenses: - -1) the GNU Lesser General Public License version 3, as published by the - Free Software Foundation; and/or -2) the GNU Lesser General Public License version 2.1, as published by - the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR -PURPOSE. See the applicable version of the GNU Lesser General Public -License for more details. - -You should have received a copy of both the GNU Lesser General Public -License version 3 and version 2.1 along with this program. If not, see - -*/ - -#include "libappindicator/app-indicator-enum-types.h" - -/*** END file-header ***/ - -/*** BEGIN file-production ***/ -#include "@filename@" -/*** END file-production ***/ - -/*** BEGIN value-header ***/ -GType -@enum_name@_get_type (void) -{ - static GType etype = 0; - if (G_UNLIKELY(etype == 0)) { - static const G@Type@Value values[] = { -/*** END value-header ***/ - -/*** BEGIN value-production ***/ - { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, -/*** END value-production ***/ - -/*** BEGIN value-tail ***/ - { 0, NULL, NULL} - }; - - etype = g_@type@_register_static (g_intern_static_string("@EnumName@"), values); - } - - return etype; -} - -/*** END value-tail ***/ diff --git a/src/libappindicator/app-indicator-enum-types.gen.c.in b/src/libappindicator/app-indicator-enum-types.gen.c.in new file mode 100644 index 0000000..449f3fc --- /dev/null +++ b/src/libappindicator/app-indicator-enum-types.gen.c.in @@ -0,0 +1,61 @@ +/*** BEGIN file-header ***/ +/* +An object to represent the application as an application indicator +in the system panel. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the + Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by + the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ + +#include "libappindicator/app-indicator-enum-types.h" + +/*** END file-header ***/ + +/*** BEGIN file-production ***/ +#include "@filename@" +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type (void) +{ + static GType etype = 0; + if (G_UNLIKELY(etype == 0)) { + static const G@Type@Value values[] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL} + }; + + etype = g_@type@_register_static (g_intern_static_string("@EnumName@"), values); + } + + return etype; +} + +/*** END value-tail ***/ -- cgit v1.2.3 From 4b0a319f650031f8eea0ff63fdc3e9386cde274e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 2 Feb 2010 16:09:52 -0800 Subject: Changing the prototype of the activate signal --- src/libappindicator/app-indicator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libappindicator') diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index b0f721e..575b613 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -977,7 +977,7 @@ app_indicator_set_icon (AppIndicator *self, const gchar *icon_name) } static void -activate_menuitem (DbusmenuMenuitem *mi, gpointer user_data) +activate_menuitem (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data) { GtkWidget *widget = (GtkWidget *)user_data; -- cgit v1.2.3 From 770470f8307a9d9ad6ffa63560a7454eaa7f95ac Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Tue, 2 Feb 2010 16:59:18 -0800 Subject: icon -> icon-name sensitive -> enabled toggle-checked -> toggle-state toggle-state type is now an int --- src/libappindicator/app-indicator.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/libappindicator') diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index b0f721e..8c1fa4c 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -987,9 +987,9 @@ activate_menuitem (DbusmenuMenuitem *mi, gpointer user_data) static void widget_toggled (GtkWidget *widget, DbusmenuMenuitem *mi) { - dbusmenu_menuitem_property_set (mi, - DBUSMENU_MENUITEM_PROP_TOGGLE_CHECKED, - gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); + dbusmenu_menuitem_property_set_int (mi, + DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, + gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); } static void @@ -1014,7 +1014,7 @@ update_icon_name (DbusmenuMenuitem *menuitem, return; dbusmenu_menuitem_property_set (menuitem, - DBUSMENU_MENUITEM_PROP_ICON, + DBUSMENU_MENUITEM_PROP_ICON_NAME, image->data.name.icon_name); } @@ -1031,7 +1031,7 @@ update_stock_item (DbusmenuMenuitem *menuitem, gtk_stock_lookup (image->data.stock.stock_id, &stock); dbusmenu_menuitem_property_set (menuitem, - DBUSMENU_MENUITEM_PROP_ICON, + DBUSMENU_MENUITEM_PROP_ICON_NAME, image->data.stock.stock_id); if (stock.label != NULL) @@ -1074,7 +1074,7 @@ widget_notify_cb (GtkWidget *widget, if (pspec->name == g_intern_static_string ("sensitive")) { dbusmenu_menuitem_property_set_bool (child, - DBUSMENU_MENUITEM_PROP_SENSITIVE, + DBUSMENU_MENUITEM_PROP_ENABLED, GTK_WIDGET_IS_SENSITIVE (widget)); } else if (pspec->name == g_intern_static_string ("label")) @@ -1121,9 +1121,9 @@ container_iterate (GtkWidget *widget, label_set = TRUE; - dbusmenu_menuitem_property_set (child, - DBUSMENU_MENUITEM_PROP_TOGGLE_CHECKED, - gtk_check_menu_item_get_active (check) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); + dbusmenu_menuitem_property_set_int (child, + DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, + gtk_check_menu_item_get_active (check) ? DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED : DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED); g_signal_connect (widget, "toggled", -- cgit v1.2.3