Back to index

libappindicator  12.10.0
Classes | Defines | Typedefs | Enumerations | Functions
app-indicator.h File Reference
#include <gtk/gtk.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _AppIndicatorClass
 AppIndicatorClass: : Mia familia : Slot for #AppIndicator::new-icon. More...
struct  _AppIndicator
 AppIndicator: More...

Defines

#define APP_INDICATOR_TYPE   (app_indicator_get_type ())
 APP_INDICATOR_TYPE:
#define APP_INDICATOR(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), APP_INDICATOR_TYPE, AppIndicator))
#define APP_INDICATOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), APP_INDICATOR_TYPE, AppIndicatorClass))
#define IS_APP_INDICATOR(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), APP_INDICATOR_TYPE))
#define IS_APP_INDICATOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), APP_INDICATOR_TYPE))
#define APP_INDICATOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), APP_INDICATOR_TYPE, AppIndicatorClass))
#define APP_INDICATOR_SIGNAL_NEW_ICON   "new-icon"
 APP_INDICATOR_SIGNAL_NEW_ICON:
#define APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON   "new-attention-icon"
#define APP_INDICATOR_SIGNAL_NEW_STATUS   "new-status"
#define APP_INDICATOR_SIGNAL_NEW_LABEL   "new-label"
#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED   "connection-changed"
#define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH   "new-icon-theme-path"
#define APP_INDICATOR_SIGNAL_SCROLL_EVENT   "scroll-event"

Typedefs

typedef struct _AppIndicator
typedef struct _AppIndicatorClass
typedef struct _AppIndicatorPrivate

Enumerations

enum  AppIndicatorCategory {
  APP_INDICATOR_CATEGORY_APPLICATION_STATUS, APP_INDICATOR_CATEGORY_COMMUNICATIONS, APP_INDICATOR_CATEGORY_SYSTEM_SERVICES, APP_INDICATOR_CATEGORY_HARDWARE,
  APP_INDICATOR_CATEGORY_OTHER
}
 AppIndicatorCategory: : The indicator is used to display the status of the application. More...
enum  AppIndicatorStatus { APP_INDICATOR_STATUS_PASSIVE, APP_INDICATOR_STATUS_ACTIVE, APP_INDICATOR_STATUS_ATTENTION }
 AppIndicatorStatus: : The indicator should not be shown to the user. More...

Functions

GType app_indicator_get_type (void) G_GNUC_CONST
AppIndicator * app_indicator_new (const gchar *id, const gchar *icon_name, AppIndicatorCategory category)
AppIndicator * app_indicator_new_with_path (const gchar *id, const gchar *icon_name, AppIndicatorCategory category, const gchar *icon_theme_path)
void app_indicator_set_status (AppIndicator *self, AppIndicatorStatus status)
 app_indicator_get_type:
void app_indicator_set_attention_icon (AppIndicator *self, const gchar *icon_name)
 app_indicator_set_attention_icon: : The #AppIndicator object to use : The name of the attention icon to set for this indicator
void app_indicator_set_attention_icon_full (AppIndicator *self, const gchar *icon_name, const gchar *icon_desc)
 app_indicator_set_attention_icon_full: : The #AppIndicator object to use : The name of the attention icon to set for this indicator : A textual description of the icon
void app_indicator_set_menu (AppIndicator *self, GtkMenu *menu)
 app_indicator_set_menu: : The #AppIndicator : (allow-none): A #GtkMenu to set
void app_indicator_set_icon (AppIndicator *self, const gchar *icon_name)
 app_indicator_set_icon: : The #AppIndicator object to use : The icon name to set.
void app_indicator_set_icon_full (AppIndicator *self, const gchar *icon_name, const gchar *icon_desc)
 app_indicator_set_icon_full: : The #AppIndicator object to use : The icon name to set.
void app_indicator_set_label (AppIndicator *self, const gchar *label, const gchar *guide)
 app_indicator_set_label: : The #AppIndicator object to use : The label to show next to the icon.
void app_indicator_set_icon_theme_path (AppIndicator *self, const gchar *icon_theme_path)
 app_indicator_set_icon_theme_path: : The #AppIndicator object to use : The icon theme path to set.
void app_indicator_set_ordering_index (AppIndicator *self, guint32 ordering_index)
 app_indicator_set_ordering_index: : The #AppIndicator : A value for the ordering of this app indicator
void app_indicator_set_secondary_activate_target (AppIndicator *self, GtkWidget *menuitem)
 app_indicator_set_secondary_activate_target: : The #AppIndicator : (allow-none): A #GtkWidget to be activated on secondary activation
void app_indicator_set_title (AppIndicator *self, const gchar *title)
 app_indicator_set_title: : The #AppIndicator : (allow-none): Title of the app indicator
const gchar * app_indicator_get_id (AppIndicator *self)
 app_indicator_get_id: : The #AppIndicator object to use
AppIndicatorCategory app_indicator_get_category (AppIndicator *self)
 app_indicator_get_category: : The #AppIndicator object to use
AppIndicatorStatus app_indicator_get_status (AppIndicator *self)
 app_indicator_get_status: : The #AppIndicator object to use
const gchar * app_indicator_get_icon (AppIndicator *self)
 app_indicator_get_icon: : The #AppIndicator object to use
const gchar * app_indicator_get_icon_desc (AppIndicator *self)
 app_indicator_get_icon_desc: : The #AppIndicator object to use
const gchar * app_indicator_get_icon_theme_path (AppIndicator *self)
 app_indicator_get_icon_theme_path: : The #AppIndicator object to use
const gchar * app_indicator_get_attention_icon (AppIndicator *self)
 app_indicator_get_attention_icon: : The #AppIndicator object to use
const gchar * app_indicator_get_attention_icon_desc (AppIndicator *self)
 app_indicator_get_attention_icon_desc: : The #AppIndicator object to use
const gchar * app_indicator_get_title (AppIndicator *self)
 app_indicator_get_title: : The #AppIndicator object to use
GtkMenu * app_indicator_get_menu (AppIndicator *self)
 app_indicator_get_menu: : The #AppIndicator object to use
const gchar * app_indicator_get_label (AppIndicator *self)
 app_indicator_get_label: : The #AppIndicator object to use
const gchar * app_indicator_get_label_guide (AppIndicator *self)
 app_indicator_get_label_guide: : The #AppIndicator object to use
guint32 app_indicator_get_ordering_index (AppIndicator *self)
 app_indicator_get_ordering_index: : The #AppIndicator object to use
GtkWidget * app_indicator_get_secondary_activate_target (AppIndicator *self)
 app_indicator_get_secondary_activate_target: : The #AppIndicator object to use
void app_indicator_build_menu_from_desktop (AppIndicator *self, const gchar *desktop_file, const gchar *desktop_profile)
 app_indicator_build_menu_from_desktop: : The #AppIndicator object to use : A path to the desktop file to build the menu from : Which entries should be used from the desktop file

Class Documentation

struct _AppIndicator

AppIndicator:

A application indicator represents the values that are needed to show a unique status in the panel for an application. In general, applications should try to fit in the other indicators that are available on the panel before using this. But, sometimes it is necissary.

Private fields : Parent object. : Internal data.

Definition at line 246 of file app-indicator.h.

Class Members
GObject parent
AppIndicatorPrivate * priv

Define Documentation

#define APP_INDICATOR (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), APP_INDICATOR_TYPE, AppIndicator))

Definition at line 74 of file app-indicator.h.

#define APP_INDICATOR_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), APP_INDICATOR_TYPE, AppIndicatorClass))

Definition at line 75 of file app-indicator.h.

#define APP_INDICATOR_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), APP_INDICATOR_TYPE, AppIndicatorClass))

Definition at line 78 of file app-indicator.h.

#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED   "connection-changed"

Definition at line 119 of file app-indicator.h.

#define APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON   "new-attention-icon"

Definition at line 116 of file app-indicator.h.

#define APP_INDICATOR_SIGNAL_NEW_ICON   "new-icon"

APP_INDICATOR_SIGNAL_NEW_ICON:

String identifier for the #AppIndicator::new-icon signal. APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON:

String identifier for the #AppIndicator::new-attention-icon signal. APP_INDICATOR_SIGNAL_NEW_STATUS:

String identifier for the #AppIndicator::new-status signal. APP_INDICATOR_SIGNAL_NEW_LABEL:

String identifier for the #AppIndicator::new-label signal. APP_INDICATOR_SIGNAL_CONNECTION_CHANGED:

String identifier for the #AppIndicator::connection-changed signal. APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH:

String identifier for the #AppIndicator::new-icon-theme-path signal. APP_INDICATOR_SIGNAL_SCROLL_EVENT:

String identifier for the #AppIndicator::scroll-event signal.

Definition at line 115 of file app-indicator.h.

#define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH   "new-icon-theme-path"

Definition at line 120 of file app-indicator.h.

#define APP_INDICATOR_SIGNAL_NEW_LABEL   "new-label"

Definition at line 118 of file app-indicator.h.

#define APP_INDICATOR_SIGNAL_NEW_STATUS   "new-status"

Definition at line 117 of file app-indicator.h.

#define APP_INDICATOR_SIGNAL_SCROLL_EVENT   "scroll-event"

Definition at line 121 of file app-indicator.h.

APP_INDICATOR_TYPE:

Get the #GType for a #AppIndicator. APP_INDICATOR: : The object to convert

Safely convert a #GObject into an #AppIndicator. APP_INDICATOR_CLASS: : #GObjectClass based class to convert.

Safely convert a #GObjectClass into a #AppIndicatorClass. IS_APP_INDICATOR: : An #GObject to check

Checks to see if is in the object hierarchy of #AppIndicator. IS_APP_INDICATOR_CLASS: : An #GObjectClass to check

Checks to see if is in the object class hierarchy of #AppIndicatorClass. APP_INDICATOR_GET_CLASS: : A #GObject in the class hierarchy of #AppIndicator.

Gets a pointer to the #AppIndicatorClass for the object .

Definition at line 73 of file app-indicator.h.

#define IS_APP_INDICATOR (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), APP_INDICATOR_TYPE))

Definition at line 76 of file app-indicator.h.

#define IS_APP_INDICATOR_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), APP_INDICATOR_TYPE))

Definition at line 77 of file app-indicator.h.


Typedef Documentation

typedef struct _AppIndicator

Definition at line 159 of file app-indicator.h.

typedef struct _AppIndicatorClass

Definition at line 160 of file app-indicator.h.

typedef struct _AppIndicatorPrivate

Definition at line 161 of file app-indicator.h.


Enumeration Type Documentation

AppIndicatorCategory: : The indicator is used to display the status of the application.

: The application is used for communication with other people. : A system indicator relating to something in the user's system. : An indicator relating to the user's hardware. : Something not defined in this enum, please don't use unless you really need it.

The category provides grouping for the indicators so that users can find indicators that are similar together.

Enumerator:
APP_INDICATOR_CATEGORY_APPLICATION_STATUS 
APP_INDICATOR_CATEGORY_COMMUNICATIONS 
APP_INDICATOR_CATEGORY_SYSTEM_SERVICES 
APP_INDICATOR_CATEGORY_HARDWARE 
APP_INDICATOR_CATEGORY_OTHER 

Definition at line 134 of file app-indicator.h.

             { /*< prefix=APP_INDICATOR_CATEGORY >*/
       APP_INDICATOR_CATEGORY_APPLICATION_STATUS, /*< nick=ApplicationStatus >*/
       APP_INDICATOR_CATEGORY_COMMUNICATIONS, /*< nick=Communications >*/
       APP_INDICATOR_CATEGORY_SYSTEM_SERVICES, /*< nick=SystemServices >*/
       APP_INDICATOR_CATEGORY_HARDWARE, /*< nick=Hardware >*/
       APP_INDICATOR_CATEGORY_OTHER /*< nick=Other >*/
} AppIndicatorCategory;

AppIndicatorStatus: : The indicator should not be shown to the user.

: The indicator should be shown in it's default state. : The indicator should show it's attention icon.

These are the states that the indicator can be on in the user's panel. The indicator by default starts in the state and can be shown by setting it to .

Enumerator:
APP_INDICATOR_STATUS_PASSIVE 
APP_INDICATOR_STATUS_ACTIVE 
APP_INDICATOR_STATUS_ATTENTION 

Definition at line 153 of file app-indicator.h.

             { /*< prefix=APP_INDICATOR_STATUS >*/
       APP_INDICATOR_STATUS_PASSIVE, /*< nick=Passive >*/
       APP_INDICATOR_STATUS_ACTIVE, /*< nick=Active >*/
       APP_INDICATOR_STATUS_ATTENTION /*< nick=NeedsAttention >*/
} AppIndicatorStatus;

Function Documentation

void app_indicator_build_menu_from_desktop ( AppIndicator *  self,
const gchar *  desktop_file,
const gchar *  desktop_profile 
)

app_indicator_build_menu_from_desktop: : The #AppIndicator object to use : A path to the desktop file to build the menu from : Which entries should be used from the desktop file

This function allows for building the Application Indicator menu from a static desktop file.

Definition at line 2503 of file app-indicator.c.

{
       g_return_if_fail(IS_APP_INDICATOR(self));
       AppIndicatorPrivate *priv = self->priv;

       /* Build a new shortcuts object */
       if (priv->shorties != NULL) {
              g_object_unref(priv->shorties);
              priv->shorties = NULL;
       }
       priv->shorties = indicator_desktop_shortcuts_new(desktop_file, desktop_profile);
       g_return_if_fail(priv->shorties != NULL);

       const gchar ** nicks = indicator_desktop_shortcuts_get_nicks(priv->shorties);
       int nick_num;

       /* Place the items on a dbusmenu */
       DbusmenuMenuitem * root = dbusmenu_menuitem_new();

       for (nick_num = 0; nicks[nick_num] != NULL; nick_num++) {
              DbusmenuMenuitem * item = dbusmenu_menuitem_new();
              g_object_set_data(G_OBJECT(item), APP_INDICATOR_SHORTY_NICK, (gpointer)nicks[nick_num]);

              gchar * name = indicator_desktop_shortcuts_nick_get_name(priv->shorties, nicks[nick_num]);
              dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, name);
              g_free(name);

              g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(shorty_activated_cb), self);

              dbusmenu_menuitem_child_append(root, item);
       }

       /* Swap it if needed */
       if (priv->menuservice == NULL) {
              gchar * path = g_strdup_printf(DEFAULT_ITEM_PATH "/%s/Menu", priv->clean_id);
              priv->menuservice = dbusmenu_server_new (path);
              g_free(path);
       }

       dbusmenu_server_set_root (priv->menuservice, root);

       if (priv->menu != NULL) {
              g_object_unref(G_OBJECT(priv->menu));
              priv->menu = NULL;
       }

       return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const gchar* app_indicator_get_attention_icon ( AppIndicator *  self)

app_indicator_get_attention_icon: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:attention-icon-name.

Return value: The current attention icon name.

Definition at line 2339 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->attention_icon_name;
}

Here is the caller graph for this function:

const gchar* app_indicator_get_attention_icon_desc ( AppIndicator *  self)

app_indicator_get_attention_icon_desc: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:attention-icon-desc.

Return value: The current attention icon description.

Definition at line 2355 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->att_accessible_desc;
}

app_indicator_get_category: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:category.

Return value: The current category.

Definition at line 2259 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), APP_INDICATOR_CATEGORY_APPLICATION_STATUS);

  return self->priv->category;
}

Here is the caller graph for this function:

const gchar* app_indicator_get_icon ( AppIndicator *  self)

app_indicator_get_icon: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:icon-name.

Return value: The current icon name.

Definition at line 2291 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->icon_name;
}

Here is the caller graph for this function:

const gchar* app_indicator_get_icon_desc ( AppIndicator *  self)

app_indicator_get_icon_desc: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:icon-desc.

Return value: The current icon description.

Definition at line 2307 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->accessible_desc;
}
const gchar* app_indicator_get_icon_theme_path ( AppIndicator *  self)

app_indicator_get_icon_theme_path: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:icon-theme-path.

Return value: The current icon theme path.

Definition at line 2323 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->icon_theme_path;
}
const gchar* app_indicator_get_id ( AppIndicator *  self)

app_indicator_get_id: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:id.

Return value: The current ID

Definition at line 2243 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->id;
}

Here is the caller graph for this function:

const gchar* app_indicator_get_label ( AppIndicator *  self)

app_indicator_get_label: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:label.

Return value: The current label.

Definition at line 2413 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->label;
}

Here is the caller graph for this function:

const gchar* app_indicator_get_label_guide ( AppIndicator *  self)

app_indicator_get_label_guide: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:label-guide.

Return value: The current label guide.

Definition at line 2429 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

  return self->priv->label_guide;
}

Here is the caller graph for this function:

GtkMenu* app_indicator_get_menu ( AppIndicator *  self)

app_indicator_get_menu: : The #AppIndicator object to use

Gets the menu being used for this application indicator. Wrapper function for property #AppIndicator:menu.

Returns: (transfer none): A #GtkMenu object or NULL if one hasn't been set.

Definition at line 2393 of file app-indicator.c.

{
       AppIndicatorPrivate *priv;

       g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

       priv = self->priv;

       return GTK_MENU(priv->menu);
}

Here is the caller graph for this function:

guint32 app_indicator_get_ordering_index ( AppIndicator *  self)

app_indicator_get_ordering_index: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:ordering-index.

Return value: The current ordering index.

Definition at line 2445 of file app-indicator.c.

{
       g_return_val_if_fail (IS_APP_INDICATOR (self), 0);

       if (self->priv->ordering_index == 0) {
              return _generate_id(self->priv->category, self->priv->id);
       } else {
              return self->priv->ordering_index;
       }
}

Here is the call graph for this function:

GtkWidget* app_indicator_get_secondary_activate_target ( AppIndicator *  self)

app_indicator_get_secondary_activate_target: : The #AppIndicator object to use

Gets the menuitem being called on secondary-activate event.

Returns: (transfer none): A #GtkWidget object or NULL if none has been set.

Definition at line 2465 of file app-indicator.c.

{
       g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

       return GTK_WIDGET(self->priv->sec_activate_target);
}
AppIndicatorStatus app_indicator_get_status ( AppIndicator *  self)

app_indicator_get_status: : The #AppIndicator object to use

Wrapper function for property #AppIndicator:status.

Return value: The current status.

Definition at line 2275 of file app-indicator.c.

{
  g_return_val_if_fail (IS_APP_INDICATOR (self), APP_INDICATOR_STATUS_PASSIVE);

  return self->priv->status;
}

Here is the caller graph for this function:

const gchar* app_indicator_get_title ( AppIndicator *  self)

app_indicator_get_title: : 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.

Since: 0.5

Definition at line 2375 of file app-indicator.c.

{
       g_return_val_if_fail (IS_APP_INDICATOR (self), NULL);

       return self->priv->title;
}

Here is the caller graph for this function:

GType app_indicator_get_type ( void  )
AppIndicator* app_indicator_new ( const gchar *  id,
const gchar *  icon_name,
AppIndicatorCategory  category 
)

Definition at line 1767 of file app-indicator.c.

{
  AppIndicator *indicator = g_object_new (APP_INDICATOR_TYPE,
                                          PROP_ID_S, id,
                                          PROP_CATEGORY_S, category_from_enum (category),
                                          PROP_ICON_NAME_S, icon_name,
                                          NULL);

  return indicator;
}

Here is the call graph for this function:

Here is the caller graph for this function:

AppIndicator* app_indicator_new_with_path ( const gchar *  id,
const gchar *  icon_name,
AppIndicatorCategory  category,
const gchar *  icon_theme_path 
)

Definition at line 1795 of file app-indicator.c.

{
       AppIndicator *indicator = g_object_new (APP_INDICATOR_TYPE,
                                               PROP_ID_S, id,
                                               PROP_CATEGORY_S, category_from_enum (category),
                                               PROP_ICON_NAME_S, icon_name,
                                               PROP_ICON_THEME_PATH_S, icon_theme_path,
                                               NULL);

       return indicator;
}

Here is the call graph for this function:

void app_indicator_set_attention_icon ( AppIndicator *  self,
const gchar *  icon_name 
)

app_indicator_set_attention_icon: : The #AppIndicator object to use : The name of the attention icon to set for this indicator

Wrapper for app_indicator_set_attention_icon_full() with a NULL description.

Deprecated: Use app_indicator_set_attention_icon_full() instead.

Definition at line 1868 of file app-indicator.c.

{
       return app_indicator_set_attention_icon_full(self, icon_name, NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void app_indicator_set_attention_icon_full ( AppIndicator *  self,
const gchar *  icon_name,
const gchar *  icon_desc 
)

app_indicator_set_attention_icon_full: : The #AppIndicator object to use : The name of the attention icon to set for this indicator : A textual description of the icon

Wrapper function for property #AppIndicator:attention-icon-name.

Definition at line 1882 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));
       g_return_if_fail (icon_name != NULL);
       gboolean changed = FALSE;

       if (g_strcmp0 (self->priv->attention_icon_name, icon_name) != 0) {
              if (self->priv->attention_icon_name) {
                     g_free (self->priv->attention_icon_name);
              }

              self->priv->attention_icon_name = g_strdup(icon_name);
              changed = TRUE;
       }

       if (g_strcmp0(self->priv->att_accessible_desc, icon_desc) != 0) {
              if (self->priv->att_accessible_desc) {
                     g_free (self->priv->att_accessible_desc);
              }

              self->priv->att_accessible_desc = g_strdup(icon_name);
              changed = TRUE;
       }

       if (changed) {
              g_signal_emit (self, signals[NEW_ATTENTION_ICON], 0, TRUE);

              if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
                     GError * error = NULL;

                     g_dbus_connection_emit_signal(self->priv->connection,
                                                                        NULL,
                                                                        self->priv->path,
                                                                        NOTIFICATION_ITEM_DBUS_IFACE,
                                                                        "NewAttentionIcon",
                                                                        NULL,
                                                                        &error);

                     if (error != NULL) {
                            g_warning("Unable to send signal for NewAttentionIcon: %s", error->message);
                            g_error_free(error);
                     }
              }
       }

       return;
}

Here is the caller graph for this function:

void app_indicator_set_icon ( AppIndicator *  self,
const gchar *  icon_name 
)

app_indicator_set_icon: : The #AppIndicator object to use : The icon name to set.

Wrapper function for app_indicator_set_icon_full() with a NULL description.

Deprecated: Use app_indicator_set_icon_full()

Definition at line 1941 of file app-indicator.c.

{
       return app_indicator_set_icon_full(self, icon_name, NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void app_indicator_set_icon_full ( AppIndicator *  self,
const gchar *  icon_name,
const gchar *  icon_desc 
)

app_indicator_set_icon_full: : The #AppIndicator object to use : The icon name to set.

: A textual description of the icon for accessibility

Sets the default icon to use when the status is active but not set to attention. In most cases, this should be the application icon for the program.

Wrapper function for property #AppIndicator:icon-name and

AppIndicator::icon-desc.

Definition at line 1960 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));
       g_return_if_fail (icon_name != NULL);
       gboolean changed = FALSE;

       if (g_strcmp0 (self->priv->icon_name, icon_name) != 0) {
              if (self->priv->icon_name) {
                     g_free (self->priv->icon_name);
              }

              self->priv->icon_name = g_strdup(icon_name);
              changed = TRUE;
       }

       if (g_strcmp0(self->priv->accessible_desc, icon_desc) != 0) {
              if (self->priv->accessible_desc != NULL) {
                     g_free(self->priv->accessible_desc);
              }

              self->priv->accessible_desc = g_strdup(icon_desc);
              changed = TRUE;
       }

       if (changed) {
              g_signal_emit (self, signals[NEW_ICON], 0, TRUE);

              if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
                     GError * error = NULL;

                     g_dbus_connection_emit_signal(self->priv->connection,
                                                                        NULL,
                                                                        self->priv->path,
                                                                        NOTIFICATION_ITEM_DBUS_IFACE,
                                                                        "NewIcon",
                                                                        NULL,
                                                                        &error);

                     if (error != NULL) {
                            g_warning("Unable to send signal for NewIcon: %s", error->message);
                            g_error_free(error);
                     }
              }
       }

       return;
}

Here is the caller graph for this function:

void app_indicator_set_icon_theme_path ( AppIndicator *  self,
const gchar *  icon_theme_path 
)

app_indicator_set_icon_theme_path: : The #AppIndicator object to use : The icon theme path to set.

Sets the path to use when searching for icons.

Definition at line 2041 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));

       if (g_strcmp0 (self->priv->icon_theme_path, icon_theme_path) != 0) {
              if (self->priv->icon_theme_path != NULL)
                     g_free(self->priv->icon_theme_path);

              self->priv->icon_theme_path = g_strdup(icon_theme_path);

              g_signal_emit (self, signals[NEW_ICON_THEME_PATH], 0, self->priv->icon_theme_path, TRUE);

              if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
                     GError * error = NULL;

                     g_dbus_connection_emit_signal(self->priv->connection,
                                                                        NULL,
                                                                        self->priv->path,
                                                                        NOTIFICATION_ITEM_DBUS_IFACE,
                                                                        "NewIconThemePath",
                                                                        g_variant_new("(s)", self->priv->icon_theme_path),
                                                                        &error);

                     if (error != NULL) {
                            g_warning("Unable to send signal for NewIconThemePath: %s", error->message);
                            g_error_free(error);
                     }
              }
       }

       return;
}

Here is the caller graph for this function:

void app_indicator_set_label ( AppIndicator *  self,
const gchar *  label,
const gchar *  guide 
)

app_indicator_set_label: : The #AppIndicator object to use : The label to show next to the icon.

: A guide to size the label correctly.

This is a wrapper function for the #AppIndicator:label and

AppIndicator:guide properties. This function can take #NULL

as either or and will clear the entries.

Definition at line 2019 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));
       /* Note: The label can be NULL, it's okay */
       /* Note: The guide can be NULL, it's okay */

       g_object_set(G_OBJECT(self),
                    PROP_LABEL_S,       label == NULL ? "" : label,
                    PROP_LABEL_GUIDE_S, guide == NULL ? "" : guide,
                    NULL);

       return;
}

Here is the caller graph for this function:

void app_indicator_set_menu ( AppIndicator *  self,
GtkMenu *  menu 
)

app_indicator_set_menu: : The #AppIndicator : (allow-none): A #GtkMenu to set

Sets the menu that should be shown when the Application Indicator is clicked on in the panel. An application indicator will not be rendered unless it has a menu.

Wrapper function for property #AppIndicator:menu.

Definition at line 2117 of file app-indicator.c.

{
  AppIndicatorPrivate *priv;

  g_return_if_fail (IS_APP_INDICATOR (self));
  g_return_if_fail (GTK_IS_MENU (menu));
  g_return_if_fail (self->priv->clean_id != NULL);

  priv = self->priv;

  if (priv->menu != NULL)
    {
      g_object_unref (priv->menu);
    }

  priv->menu = GTK_WIDGET (menu);
  g_object_ref_sink (priv->menu);

  setup_dbusmenu (self);

  priv->sec_activate_enabled = widget_is_menu_child (self, priv->sec_activate_target);

  check_connect (self);

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void app_indicator_set_ordering_index ( AppIndicator *  self,
guint32  ordering_index 
)

app_indicator_set_ordering_index: : The #AppIndicator : A value for the ordering of this app indicator

Sets the ordering index for the app indicator which effects the placement of it on the panel. For almost all app indicator this is not the function you're looking for.

Wrapper function for property #AppIndicator:ordering-index.

Definition at line 2156 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));

       self->priv->ordering_index = ordering_index;

       return;
}
void app_indicator_set_secondary_activate_target ( AppIndicator *  self,
GtkWidget *  menuitem 
)

app_indicator_set_secondary_activate_target: : The #AppIndicator : (allow-none): A #GtkWidget to be activated on secondary activation

Set the to be activated when a secondary activation event (i.e. a middle-click) is emitted over the #AppIndicator icon/label.

The can be also a complex #GtkWidget, but to get activated when a secondary activation occurs in the #Appindicator, it must be a visible and active child (or inner-child) of the #AppIndicator:menu.

Setting to NULL causes to disable this feature.

Definition at line 2180 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));
       AppIndicatorPrivate *priv = self->priv;

       if (priv->sec_activate_target) {
              g_signal_handlers_disconnect_by_func (priv->sec_activate_target,
                                                    sec_activate_target_parent_changed,
                                                    self);
              g_object_unref(G_OBJECT(priv->sec_activate_target));
              priv->sec_activate_target = NULL;
       }

       if (menuitem == NULL) {
              return;
       }

       g_return_if_fail (GTK_IS_WIDGET (menuitem));

       priv->sec_activate_target = g_object_ref(G_OBJECT(menuitem));
       priv->sec_activate_enabled = widget_is_menu_child(self, menuitem);
       g_signal_connect(menuitem, "parent-set", G_CALLBACK(sec_activate_target_parent_changed), self);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void app_indicator_set_status ( AppIndicator *  self,
AppIndicatorStatus  status 
)

app_indicator_get_type:

Generates or returns the unique #GType for #AppIndicator.

Return value: A unique #GType for #AppIndicator objects. app_indicator_set_status: : The #AppIndicator object to use : The status to set for this indicator

Wrapper function for property #AppIndicator:status.

Definition at line 1826 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));

       if (self->priv->status != status) {
              GEnumValue *value = g_enum_get_value ((GEnumClass *) g_type_class_ref (APP_INDICATOR_TYPE_INDICATOR_STATUS), status);

              self->priv->status = status;
              g_signal_emit (self, signals[NEW_STATUS], 0, value->value_nick);

              if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
                     GError * error = NULL;

                     g_dbus_connection_emit_signal(self->priv->connection,
                                                                        NULL,
                                                                        self->priv->path,
                                                                        NOTIFICATION_ITEM_DBUS_IFACE,
                                                                        "NewStatus",
                                                                        g_variant_new("(s)", value->value_nick),
                                                                        &error);

                     if (error != NULL) {
                            g_warning("Unable to send signal for NewStatus: %s", error->message);
                            g_error_free(error);
                     }
              }
       }

       return;
}

Here is the caller graph for this function:

void app_indicator_set_title ( AppIndicator *  self,
const gchar *  title 
)

app_indicator_set_title: : The #AppIndicator : (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 prominent 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 to NULL removes the title.

Since: 0.5

Definition at line 2223 of file app-indicator.c.

{
       g_return_if_fail (IS_APP_INDICATOR (self));

       g_object_set(G_OBJECT(self),
                    PROP_TITLE_S, title == NULL ? "": title,
                    NULL);

       return;
}

Here is the caller graph for this function: