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
1=== modified file 'src/applet-main.c'
2--- src/applet-main.c 2010-09-03 18:49:57 +0000
3+++ src/applet-main.c 2010-09-19 18:53:41 +0000
4@@ -216,6 +216,17 @@
5 }
6
7 static void
8+entry_activated (GtkWidget * widget, gpointer user_data)
9+{
10+ g_return_if_fail(GTK_IS_WIDGET(widget));
11+ gpointer pio = g_object_get_data(G_OBJECT(widget), "indicator");
12+ g_return_if_fail(INDICATOR_IS_OBJECT(pio));
13+ IndicatorObject * io = INDICATOR_OBJECT(pio);
14+
15+ return indicator_object_entry_activate(io, (IndicatorObjectEntry *)user_data, gtk_get_current_event_time());
16+}
17+
18+static void
19 entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, GtkWidget * menubar)
20 {
21 g_debug("Signal: Entry Added");
22@@ -229,6 +240,8 @@
23 g_object_set_data (G_OBJECT (menuitem), "indicator", io);
24 g_object_set_data (G_OBJECT (menuitem), "box", box);
25
26+ g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(entry_activated), entry);
27+
28 if (entry->image != NULL) {
29 gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(entry->image), FALSE, FALSE, 1);
30 if (gtk_widget_get_visible(GTK_WIDGET(entry->image))) {

Subscribers

People subscribed via source and target branches

to status/vote changes: