Merge lp:~kvalo/indicator-network/bug-737743 into lp:~indicator-applet-developers/indicator-network/indicator-network

Proposed by Kalle Valo
Status: Merged
Merged at revision: 178
Proposed branch: lp:~kvalo/indicator-network/bug-737743
Merge into: lp:~indicator-applet-developers/indicator-network/indicator-network
Diff against target: 40 lines (+19/-0)
1 file modified
src/settings/app.vala (+19/-0)
To merge this branch: bzr merge lp:~kvalo/indicator-network/bug-737743
Reviewer Review Type Date Requested Status
Conor Curran (community) Approve
Review via email: mp+54704@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Conor Curran (cjcurran) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/settings/app.vala'
2--- src/settings/app.vala 2011-02-01 12:59:54 +0000
3+++ src/settings/app.vala 2011-03-24 14:14:11 +0000
4@@ -18,6 +18,9 @@
5 * with this program. If not, see <http://www.gnu.org/licenses/>.
6 */
7
8+private static const uint GDK_w = 0x077;
9+
10+
11 public class NetworkSettings : Object {
12
13 // Widgets from GTKBuilder
14@@ -76,10 +79,26 @@
15
16 private void connect_signals() {
17 this.window_main.delete_event.connect(this.on_window_main_delete_event);
18+
19+ var group = new Gtk.AccelGroup();
20+ group.connect(GDK_w, Gdk.ModifierType.CONTROL_MASK, 0,
21+ on_accel_activate);
22+ this.window_main.add_accel_group(group);
23+
24 this.notebook_main.switch_page.connect(this.on_notebook_main_page_switched);
25 }
26
27 /* Callbacks */
28+ private bool on_accel_activate(Gtk.AccelGroup accel_group,
29+ Object acceleratable,
30+ uint keyval, Gdk.ModifierType modifier)
31+ {
32+ stdout.printf("on_accel_activate()\n");
33+ Gtk.main_quit();
34+ /* FIXME: what does this return value mean? */
35+ return false;
36+ }
37+
38 public bool on_window_main_delete_event(Gdk.Event event) {
39 Gtk.main_quit();
40 return true;

Subscribers

People subscribed via source and target branches