ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #00701
[Merge] lp:~ted/indicator-messages/dbusmenu-0.2 into lp:indicator-messages
Ted Gould has proposed merging lp:~ted/indicator-messages/dbusmenu-0.2 into lp:indicator-messages.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
--
https://code.launchpad.net/~ted/indicator-messages/dbusmenu-0.2/+merge/16504
Your team ayatana-commits is subscribed to branch lp:indicator-messages.
=== modified file 'configure.ac'
--- configure.ac 2009-11-06 04:33:59 +0000
+++ configure.ac 2009-12-22 20:27:14 +0000
@@ -31,7 +31,7 @@
PANEL_REQUIRED_VERSION=2.0.0
INDICATE_REQUIRED_VERSION=0.2.0
INDICATOR_REQUIRED_VERSION=0.3.0
-DBUSMENUGTK_REQUIRED_VERSION=0.1.1
+DBUSMENUGTK_REQUIRED_VERSION=0.2.0
PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
=== modified file 'src/im-menu-item.c'
--- src/im-menu-item.c 2009-10-26 21:45:17 +0000
+++ src/im-menu-item.c 2009-12-22 20:27:14 +0000
@@ -442,7 +442,7 @@
priv->attention = FALSE;
priv->show = TRUE;
- dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), "type", INDICATOR_MENUITEM_TYPE);
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_TYPE, INDICATOR_MENUITEM_TYPE);
indicate_listener_displayed(listener, server, indicator, TRUE);
=== modified file 'src/indicator-messages.c'
--- src/indicator-messages.c 2009-11-04 21:20:36 +0000
+++ src/indicator-messages.c 2009-12-22 20:27:14 +0000
@@ -218,14 +218,14 @@
/* Whenever we have a property change on a DbusmenuMenuitem
we need to be responsive to that. */
static void
-indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, gchar * value, indicator_item_t * mi_data)
+indicator_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GValue * value, indicator_item_t * mi_data)
{
if (!g_strcmp0(prop, INDICATOR_MENUITEM_PROP_LABEL)) {
/* Set the main label */
- gtk_label_set_text(GTK_LABEL(mi_data->label), value);
+ gtk_label_set_text(GTK_LABEL(mi_data->label), g_value_get_string(value));
} else if (!g_strcmp0(prop, INDICATOR_MENUITEM_PROP_RIGHT)) {
/* Set the right label */
- gtk_label_set_text(GTK_LABEL(mi_data->right), value);
+ gtk_label_set_text(GTK_LABEL(mi_data->right), g_value_get_string(value));
} else if (!g_strcmp0(prop, INDICATOR_MENUITEM_PROP_ICON)) {
/* We don't use the value here, which is probably less efficient,
but it's easier to use the easy function. And since th value
@@ -351,7 +351,7 @@
GtkWidget * app_label = gtk_label_new(dbusmenu_menuitem_property_get(newitem, LAUNCHER_MENUITEM_PROP_APP_NAME));
gtk_misc_set_alignment(GTK_MISC(app_label), 0.0, 0.5);
GtkWidget * dsc_label = gtk_label_new("");
- gtk_misc_set_alignment(GTK_MISC(dsc_label), 0.05, 0.5);
+ gtk_misc_set_alignment(GTK_MISC(dsc_label), 0.0, 0.5);
gtk_label_set_ellipsize(GTK_LABEL(dsc_label), PANGO_ELLIPSIZE_END);
gtk_widget_set_size_request(dsc_label, 200, -1);
gchar * markup = g_markup_printf_escaped("<span font-size=\"smaller\">%s</span>", dbusmenu_menuitem_property_get(newitem, LAUNCHER_MENUITEM_PROP_APP_DESC));
=== modified file 'src/launcher-menu-item.c'
--- src/launcher-menu-item.c 2009-09-23 16:48:09 +0000
+++ src/launcher-menu-item.c 2009-12-22 20:27:14 +0000
@@ -131,7 +131,7 @@
priv->desktop = g_strdup(desktop_file);
g_debug("\tName: %s", launcher_menu_item_get_name(self));
- dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), "type", LAUNCHER_MENUITEM_TYPE);
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_TYPE, LAUNCHER_MENUITEM_TYPE);
dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), LAUNCHER_MENUITEM_PROP_APP_NAME, launcher_menu_item_get_name(self));
dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), LAUNCHER_MENUITEM_PROP_APP_DESC, launcher_menu_item_get_description(self));
=== modified file 'src/messages-service.c'
--- src/messages-service.c 2009-10-04 20:30:48 +0000
+++ src/messages-service.c 2009-12-22 20:27:14 +0000
@@ -488,7 +488,7 @@
/* Build a separator */
sl_item->separator = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(sl_item->separator, "type", DBUSMENU_CLIENT_TYPES_SEPARATOR);
+ dbusmenu_menuitem_property_set(sl_item->separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
/* Incase we got an indicator first */
GList * alreadythere = g_list_find_custom(serverList, sl_item, serverList_equal);
@@ -1139,7 +1139,7 @@
/* Build a separator */
ll->separator = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(ll->separator, "type", DBUSMENU_CLIENT_TYPES_SEPARATOR);
+ dbusmenu_menuitem_property_set(ll->separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
/* Add it to the list */
launcherList = g_list_insert_sorted(launcherList, ll, launcherList_sort);
Follow ups