Back to index

libindicator  12.10.0
indicator-image-helper.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.


GtkImage * indicator_image_helper (const gchar *name)
void indicator_image_helper_update (GtkImage *image, const gchar *name)

Function Documentation

GtkImage* indicator_image_helper ( const gchar *  name)

Definition at line 130 of file indicator-image-helper.c.

       /* Build us an image */
       GtkImage * image = GTK_IMAGE(gtk_image_new());

       indicator_image_helper_update(image, name);

       return image;

Here is the call graph for this function:

void indicator_image_helper_update ( GtkImage *  image,
const gchar *  name 

Definition at line 142 of file indicator-image-helper.c.

       g_return_if_fail(name != NULL);
       g_return_if_fail(name[0] != '\0');
       gboolean seen_previously = FALSE;

       /* Build us a GIcon */
       GIcon * icon_names = g_themed_icon_new_with_default_fallbacks(name);
       g_warn_if_fail(icon_names != NULL);
       g_return_if_fail(icon_names != NULL);

       seen_previously = (g_object_get_data(G_OBJECT(image), INDICATOR_NAMES_DATA) != NULL);

       /* Attach our names to the image */
       g_object_set_data_full(G_OBJECT(image), INDICATOR_NAMES_DATA, icon_names, g_object_unref);

       /* Put the pixbuf in */

       /* Connect to all changes */
       if (!seen_previously) {
              g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()), "changed", G_CALLBACK(theme_changed_cb), image);
              g_signal_connect(G_OBJECT(image), "destroy", G_CALLBACK(image_destroyed_cb), NULL);
              g_signal_connect(G_OBJECT(image), "style-set", G_CALLBACK(image_style_change_cb), NULL);


Here is the call graph for this function:

Here is the caller graph for this function: