Merge lp:~ted/indicator-applet/send-to-show into lp:indicator-applet/0.4

Proposed by Ted Gould
Status: Merged
Merged at revision: 372
Proposed branch: lp:~ted/indicator-applet/send-to-show
Merge into: lp:indicator-applet/0.4
Diff against target: 30 lines (+13/-0)
1 file modified
src/applet-main.c (+13/-0)
To merge this branch: bzr merge lp:~ted/indicator-applet/send-to-show
Reviewer Review Type Date Requested Status
David Barth Approve
Review via email: mp+35960@code.launchpad.net

Description of the change

Attaches to activates on the menuitems so that we can pass down the activate signal.

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/applet-main.c'
--- src/applet-main.c 2010-09-03 18:49:57 +0000
+++ src/applet-main.c 2010-09-19 18:53:41 +0000
@@ -216,6 +216,17 @@
216}216}
217217
218static void218static void
219entry_activated (GtkWidget * widget, gpointer user_data)
220{
221 g_return_if_fail(GTK_IS_WIDGET(widget));
222 gpointer pio = g_object_get_data(G_OBJECT(widget), "indicator");
223 g_return_if_fail(INDICATOR_IS_OBJECT(pio));
224 IndicatorObject * io = INDICATOR_OBJECT(pio);
225
226 return indicator_object_entry_activate(io, (IndicatorObjectEntry *)user_data, gtk_get_current_event_time());
227}
228
229static void
219entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, GtkWidget * menubar)230entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, GtkWidget * menubar)
220{231{
221 g_debug("Signal: Entry Added");232 g_debug("Signal: Entry Added");
@@ -229,6 +240,8 @@
229 g_object_set_data (G_OBJECT (menuitem), "indicator", io);240 g_object_set_data (G_OBJECT (menuitem), "indicator", io);
230 g_object_set_data (G_OBJECT (menuitem), "box", box);241 g_object_set_data (G_OBJECT (menuitem), "box", box);
231242
243 g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(entry_activated), entry);
244
232 if (entry->image != NULL) {245 if (entry->image != NULL) {
233 gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(entry->image), FALSE, FALSE, 1);246 gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(entry->image), FALSE, FALSE, 1);
234 if (gtk_widget_get_visible(GTK_WIDGET(entry->image))) {247 if (gtk_widget_get_visible(GTK_WIDGET(entry->image))) {

Subscribers

People subscribed via source and target branches

to status/vote changes: