~ted/libindicator/bug587811

« back to all changes in this revision

Viewing changes to tools/indicator-loader.c

  • Committer: Ted Gould
  • Date: 2010-09-19 18:26:01 UTC
  • mfrom: (377.1.6 about-to-show-root)
  • Revision ID: ted@gould.cx-20100919182601-brdwteoc3jf1km2y
Adding in the about-to-show signal

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#define ENTRY_DATA_NAME "indicator-custom-entry-data"
29
29
 
30
30
static void
 
31
activate_entry (GtkWidget * widget, gpointer user_data)
 
32
{
 
33
        g_return_if_fail(INDICATOR_IS_OBJECT(user_data));
 
34
        gpointer entry = g_object_get_data(G_OBJECT(widget), ENTRY_DATA_NAME);
 
35
        g_return_if_fail(entry == NULL);
 
36
 
 
37
        indicator_object_entry_activate(INDICATOR_OBJECT(user_data), (IndicatorObjectEntry *)entry, gtk_get_current_event_time());
 
38
        return;
 
39
}
 
40
 
 
41
static void
31
42
entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data)
32
43
{
33
44
        g_debug("Signal: Entry Added");
48
59
                gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(entry->menu));
49
60
        }
50
61
 
 
62
        g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(activate_entry), io);
 
63
 
51
64
        gtk_menu_shell_append(GTK_MENU_SHELL(user_data), menuitem);
52
65
        gtk_widget_show(menuitem);
53
66