Merge lp:~jaapz-b/switchboard/fix-1079368 into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Jaap Broekhuizen
Status: Merged
Merged at revision: 338
Proposed branch: lp:~jaapz-b/switchboard/fix-1079368
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 27 lines (+8/-2)
1 file modified
Switchboard/switchboard-app.vala (+8/-2)
To merge this branch: bzr merge lp:~jaapz-b/switchboard/fix-1079368
Reviewer Review Type Date Requested Status
David Gomes (community) Approve
Review via email: mp+134804@code.launchpad.net

Description of the change

When application is already running, but launched again, it now presents the window of the already running instance.

To post a comment you must log in.
lp:~jaapz-b/switchboard/fix-1079368 updated
339. By Jaap Broekhuizen

Reverted another change i made...

340. By Jaap Broekhuizen

Fix tab.

Revision history for this message
David Gomes (davidgomes) wrote :

Good job.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Switchboard/switchboard-app.vala'
2--- Switchboard/switchboard-app.vala 2012-10-14 12:52:23 +0000
3+++ Switchboard/switchboard-app.vala 2012-11-18 13:30:25 +0000
4@@ -504,7 +504,13 @@
5 }
6
7 public override void activate () {
8- build ();
9+ // If app is already running, present the current window.
10+ if (get_windows () != null) {
11+ get_windows ().data.present ();
12+ return;
13+ }
14+
15+ build ();
16 }
17 }
18
19@@ -534,7 +540,7 @@
20 // In the future, the plug_root_dir should be overridable by CLI flags.
21 var switchboard_app = new SwitchboardApp ();
22
23- Bus.own_name (BusType.SESSION, "org.elementary.switchboard",
24+ GLib.Bus.own_name (BusType.SESSION, "org.elementary.switchboard",
25 BusNameOwnerFlags.NONE,
26 (conn) => {
27 try {

Subscribers

People subscribed via source and target branches

to all changes: