diff options
| author | Ted Gould <ted@gould.cx> | 2010-03-04 13:06:47 -0600 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2010-03-04 13:06:47 -0600 |
| commit | 1cc1da9e68b7899074c90b3a17ead21281b3f4f5 (patch) | |
| tree | d51b98a7e7d325f5d8fd653f29566aac9203d13e /src/app-menu-item.c | |
| parent | b9713df6cd2898e5f86d8dcf1f39634bc1cc6736 (diff) | |
| parent | 586e053b9e3c862c8e0561c2679cd4e146d76f84 (diff) | |
| download | ayatana-indicator-messages-1cc1da9e68b7899074c90b3a17ead21281b3f4f5.tar.gz ayatana-indicator-messages-1cc1da9e68b7899074c90b3a17ead21281b3f4f5.tar.bz2 ayatana-indicator-messages-1cc1da9e68b7899074c90b3a17ead21281b3f4f5.zip | |
Setting up default application names in the menu.
Diffstat (limited to 'src/app-menu-item.c')
| -rw-r--r-- | src/app-menu-item.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c index a37daf4..f792128 100644 --- a/src/app-menu-item.c +++ b/src/app-menu-item.c @@ -30,6 +30,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <libdbusmenu-glib/menuitem-proxy.h> #include "app-menu-item.h" #include "dbus-data.h" +#include "default-applications.h" enum { COUNT_CHANGED, @@ -233,15 +234,20 @@ static void update_label (AppMenuItem * self) { AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self); + const gchar * name = get_default_name(priv->desktop); + + if (name == NULL) { + name = app_menu_item_get_name(self); + } if (priv->unreadcount > 0) { /* TRANSLATORS: This is the name of the program and the number of indicators. So it would read something like "Mail Client (5)" */ - gchar * label = g_strdup_printf(_("%s (%d)"), app_menu_item_get_name(self), priv->unreadcount); + gchar * label = g_strdup_printf(_("%s (%d)"), _(name), priv->unreadcount); dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_LABEL, label); g_free(label); } else { - dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_LABEL, app_menu_item_get_name(self)); + dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_LABEL, _(name)); } return; |
