Merge lp:~elementary-dev-community/switchboard/fix-1358123 into lp:~elementary-pantheon/switchboard/switchboard

Proposed by nhanth87
Status: Merged
Merged at revision: 501
Proposed branch: lp:~elementary-dev-community/switchboard/fix-1358123
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 37 lines (+6/-0)
1 file modified
src/Switchboard.vala (+6/-0)
To merge this branch: bzr merge lp:~elementary-dev-community/switchboard/fix-1358123
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+235896@code.launchpad.net

Commit message

#1358123 Switchboard plug always focus in search box if a plug run from command line

Description of the change

When switchboard run from commandline with -o, searchbox will insensitive.
When switchback to icon, searchbox will sensitive.

Testing this branch:
- basic test
  + run ./switchboard -o network-pantheon-online-accounts, check searchbar insensitive, click on facebook or gmail, check searchbar do not grab cursor focus.
  + click on "back" navigate, check searchbox sensitive again.

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Well done. Merged it with a slightly different bool name.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Switchboard.vala'
2--- src/Switchboard.vala 2014-09-03 16:08:16 +0000
3+++ src/Switchboard.vala 2014-09-25 04:40:05 +0000
4@@ -57,6 +57,7 @@
5 private int default_height = 0;
6
7 private static string? plug_to_open = null;
8+ private static bool plug_direct_open = false;
9 private static bool should_animate_next_transition = true;
10
11 static const OptionEntry[] entries = {
12@@ -132,6 +133,7 @@
13
14 // If plug_to_open was set from the command line
15 should_animate_next_transition = false;
16+ plug_direct_open = true;
17 }
18
19 loaded_plugs = new Gee.LinkedList <string> ();
20@@ -267,6 +269,8 @@
21 navigation_button.hide ();
22
23 main_window.size_allocate.connect (() => {
24+ if (plug_direct_open)
25+ search_box.sensitive = false;
26 category_view.recalculate_columns ();
27 });
28
29@@ -326,6 +330,8 @@
30 // Handles clicking the navigation button
31 private void handle_navigation_button_clicked () {
32 if (navigation_button.get_text () == all_settings_label) {
33+ plug_direct_open = false;
34+ search_box.sensitive = true;
35 switch_to_icons ();
36 navigation_button.hide ();
37 } else {

Subscribers

People subscribed via source and target branches