Merge lp:~aroman/switchboard/fix-1305316 into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Avi Romanoff
Status: Merged
Approved by: Corentin Noël
Approved revision: 428
Merged at revision: 428
Proposed branch: lp:~aroman/switchboard/fix-1305316
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 71 lines (+14/-5)
2 files modified
lib/PlugsManager.vala (+1/-0)
src/Switchboard.vala (+13/-5)
To merge this branch: bzr merge lp:~aroman/switchboard/fix-1305316
Reviewer Review Type Date Requested Status
Corentin Noël Approve
Review via email: mp+215050@code.launchpad.net

Commit message

Don't animate the opening of the plug from cli, add debug logging for plug code names, update author info

To post a comment you must log in.
Revision history for this message
Corentin Noël (tintou) wrote :

Nice fix ! The debbuging is indeed useful.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/PlugsManager.vala'
2--- lib/PlugsManager.vala 2013-12-23 23:12:40 +0000
3+++ lib/PlugsManager.vala 2014-04-09 22:17:26 +0000
4@@ -90,6 +90,7 @@
5 }
6
7 private void register_plug (Switchboard.Plug plug) {
8+ debug("%s registered", plug.code_name);
9 if (plugs.contains (plug))
10 return;
11 plugs.add (plug);
12
13=== modified file 'src/Switchboard.vala'
14--- src/Switchboard.vala 2014-03-20 20:03:03 +0000
15+++ src/Switchboard.vala 2014-04-09 22:17:26 +0000
16@@ -28,6 +28,7 @@
17 }
18
19 private static string? plug_to_open = null;
20+ private static bool should_animate_next_transition = true;
21
22 public static int main (string[] args) {
23
24@@ -67,7 +68,7 @@
25 construct {
26 application_id = "org.elementary.Switchboard";
27 program_name = "Switchboard";
28- app_years = "2011-2013";
29+ app_years = "2011-2014";
30 exec_name = "switchboard";
31 app_launcher = exec_name+".desktop";
32
33@@ -77,9 +78,14 @@
34 bug_url = "https://bugs.launchpad.net/switchboard";
35 help_url = "https://answers.launchpad.net/switchboard";
36 translate_url = "https://translations.launchpad.net/switchboard";
37- about_authors = {"Avi Romanoff <aviromanoff@gmail.com>", "Corentin Noël <tintou@mailoo.org>", null};
38+ about_authors = {"Avi Romanoff <avi@elementaryos.org>", "Corentin Noël <tintou@mailoo.org>", null};
39
40 about_license_type = Gtk.License.GPL_3_0;
41+
42+ // If plug_to_open was set from the command line
43+ if (plug_to_open != null) {
44+ should_animate_next_transition = false;
45+ }
46 }
47
48 public override void activate () {
49@@ -225,7 +231,7 @@
50 show_alert (_("No settings found"), _("Install some and re-launch Switchboard"), Gtk.MessageType.WARNING);
51 search_box.sensitive = false;
52 } else {
53-#if HAVE_UNITY
54+#if HAVE_UNITY
55 update_libunity_quicklist ();
56 #endif
57 }
58@@ -283,9 +289,11 @@
59 }
60 }
61
62- // Switches to the socket view
63+ // Switches to the given plug
64 private void switch_to_plug (Switchboard.Plug plug) {
65- stack.set_transition_type (Gtk.StackTransitionType.SLIDE_LEFT);
66+ if (should_animate_next_transition) {
67+ stack.set_transition_type (Gtk.StackTransitionType.SLIDE_LEFT);
68+ }
69 search_box.sensitive = false;
70 plug.shown ();
71 stack.set_visible_child_name (plug.code_name);

Subscribers

People subscribed via source and target branches

to all changes: