From a89fe2cf130a13d8eebe14c0344071c0fd7641c5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 28 Jan 2012 20:48:50 -0600 Subject: Adding get/set title functions --- src/app-indicator.c | 42 ++++++++++++++++++++++++++++++++++++++++++ src/app-indicator.h | 3 +++ 2 files changed, 45 insertions(+) diff --git a/src/app-indicator.c b/src/app-indicator.c index f885cc7..17d6261 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -2126,6 +2126,30 @@ app_indicator_set_secondary_activate_target (AppIndicator *self, GtkWidget *menu g_signal_connect(menuitem, "parent-set", G_CALLBACK(sec_activate_target_parent_changed), self); } +/** + * app_indicator_set_title: + * @self: The #AppIndicator + * @title: (allow-none): Title of the app indicator + * + * Sets the title of the application indicator, or how it should be referred + * in a human readable form. This string should be UTF-8 and localized as it + * expected that users will set it. + * + * In the Unity desktop the most prominate place that this is show will be + * in the HUD. HUD listings for this application indicator will start with + * the title as the first part of the line for the menu items. + * + * Setting @title to %NULL removes the title. + */ +void +app_indicator_set_title (AppIndicator *self, const gchar * title) +{ + g_return_if_fail (IS_APP_INDICATOR (self)); + + + return; +} + /** * app_indicator_get_id: * @self: The #AppIndicator object to use @@ -2254,6 +2278,24 @@ app_indicator_get_attention_icon_desc (AppIndicator *self) return self->priv->att_accessible_desc; } +/** + * app_indicator_get_title: + * @self: The #AppIndicator object to use + * + * Gets the title of the application indicator. See the function + * app_indicator_set_title() for information on the title. + * + * Return value: The current title. + */ +const gchar * +app_indicator_get_title (AppIndicator *self) +{ + g_return_val_if_fail (IS_APP_INDICATOR (self), NULL); + + return NULL; +} + + /** * app_indicator_get_menu: * @self: The #AppIndicator object to use diff --git a/src/app-indicator.h b/src/app-indicator.h index 6922248..8ae20b0 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -285,6 +285,8 @@ void app_indicator_set_ordering_index (AppIndicator guint32 ordering_index); void app_indicator_set_secondary_activate_target (AppIndicator *self, GtkWidget *menuitem); +void app_indicator_set_title (AppIndicator *self, + const gchar *title); /* Get properties */ const gchar * app_indicator_get_id (AppIndicator *self); @@ -295,6 +297,7 @@ const gchar * app_indicator_get_icon_desc (AppIndic const gchar * app_indicator_get_icon_theme_path (AppIndicator *self); const gchar * app_indicator_get_attention_icon (AppIndicator *self); const gchar * app_indicator_get_attention_icon_desc (AppIndicator *self); +const gchar * app_indicator_get_title (AppIndicator *self); GtkMenu * app_indicator_get_menu (AppIndicator *self); const gchar * app_indicator_get_label (AppIndicator *self); -- cgit v1.2.3