Merge lp:~didrocks/unity/rebring-shortcuts-and-super-shift into lp:unity

Proposed by Didier Roche-Tolomelli
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 1544
Proposed branch: lp:~didrocks/unity/rebring-shortcuts-and-super-shift
Merge into: lp:unity
Diff against target: 55 lines (+9/-3)
3 files modified
plugins/unityshell/src/LauncherController.cpp (+1/-0)
plugins/unityshell/src/unityshell.cpp (+7/-2)
plugins/unityshell/src/unityshell.h (+1/-1)
To merge this branch: bzr merge lp:~didrocks/unity/rebring-shortcuts-and-super-shift
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+74977@code.launchpad.net

Description of the change

This branch does 2 things:
- bring back Super + Shift + Num to open a new instance of an app (LP: #842977)
- force sorting at start to get shortcut working (LP: #768076)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/LauncherController.cpp'
2--- plugins/unityshell/src/LauncherController.cpp 2011-08-30 12:15:45 +0000
3+++ plugins/unityshell/src/LauncherController.cpp 2011-09-12 12:16:03 +0000
4@@ -378,6 +378,7 @@
5 icon->SetSortPriority(_sort_priority++);
6 RegisterIcon(icon);
7 }
8+ SortAndUpdate();
9
10 _model->order_changed.connect(sigc::mem_fun(this, &LauncherController::SortAndUpdate));
11 _model->saved.connect(sigc::mem_fun(this, &LauncherController::Save));
12
13=== modified file 'plugins/unityshell/src/unityshell.cpp'
14--- plugins/unityshell/src/unityshell.cpp 2011-09-12 01:07:57 +0000
15+++ plugins/unityshell/src/unityshell.cpp 2011-09-12 12:16:03 +0000
16@@ -313,19 +313,24 @@
17 if (shortcut == 0)
18 continue;
19 CreateSuperNewAction(static_cast<char>(shortcut));
20+ CreateSuperNewAction(static_cast<char>(shortcut), true);
21 }
22
23 for (auto shortcut : dashController->GetAllShortcuts())
24 CreateSuperNewAction(shortcut);
25 }
26
27-void UnityScreen::CreateSuperNewAction(char shortcut)
28+void UnityScreen::CreateSuperNewAction(char shortcut, bool use_shift)
29 {
30 CompActionPtr action(new CompAction());
31
32 CompAction::KeyBinding binding;
33 std::ostringstream sout;
34- sout << "<Super>" << shortcut;
35+ if (use_shift)
36+ sout << "<Shift><Super>" << shortcut;
37+ else
38+ sout << "<Super>" << shortcut;
39+
40 binding.fromString(sout.str());
41
42 action->setKey(binding);
43
44=== modified file 'plugins/unityshell/src/unityshell.h'
45--- plugins/unityshell/src/unityshell.h 2011-09-08 11:23:14 +0000
46+++ plugins/unityshell/src/unityshell.h 2011-09-12 12:16:03 +0000
47@@ -238,7 +238,7 @@
48 void SendExecuteCommand();
49
50 void EnsureSuperKeybindings ();
51- void CreateSuperNewAction(char shortcut);
52+ void CreateSuperNewAction(char shortcut, bool use_shift=false);
53
54 static gboolean initPluginActions(gpointer data);
55 static void initLauncher(nux::NThread* thread, void* InitData);