Merge lp:~didrocks/unity/fix-709707 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: 827
Proposed branch: lp:~didrocks/unity/fix-709707
Merge into: lp:unity
Diff against target: 65 lines (+4/-25)
2 files modified
src/BamfLauncherIcon.cpp (+4/-24)
src/BamfLauncherIcon.h (+0/-1)
To merge this branch: bzr merge lp:~didrocks/unity/fix-709707
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+48759@code.launchpad.net

Description of the change

Middle click to open a new instance (LP: #709707)
drop the menu entry, now that we have a way to launch the application reliably.
We will add additional one to individual .desktop file

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 'src/BamfLauncherIcon.cpp'
2--- src/BamfLauncherIcon.cpp 2011-02-03 17:31:47 +0000
3+++ src/BamfLauncherIcon.cpp 2011-02-07 08:26:18 +0000
4@@ -390,10 +390,11 @@
5 void
6 BamfLauncherIcon::OnMouseClick (int button)
7 {
8- if (button != 1)
9- return;
10+ if (button == 1)
11+ Activate ();
12+ else if (button == 2)
13+ OpenInstance ();
14
15- Activate ();
16 }
17
18 void
19@@ -580,12 +581,6 @@
20 }
21
22 void
23-BamfLauncherIcon::OnLaunch (DbusmenuMenuitem *item, int time, BamfLauncherIcon *self)
24-{
25- self->OpenInstance ();
26-}
27-
28-void
29 BamfLauncherIcon::OnQuit (DbusmenuMenuitem *item, int time, BamfLauncherIcon *self)
30 {
31 GList *children, *l;
32@@ -640,21 +635,6 @@
33 {
34 DbusmenuMenuitem *menu_item;
35
36- /* Launch */
37- if (_menu_items.find ("Launch") == _menu_items.end ())
38- {
39- menu_item = dbusmenu_menuitem_new ();
40- g_object_ref (menu_item);
41-
42- dbusmenu_menuitem_property_set (menu_item, DBUSMENU_MENUITEM_PROP_LABEL, _("Open New Window"));
43- dbusmenu_menuitem_property_set_bool (menu_item, DBUSMENU_MENUITEM_PROP_ENABLED, true);
44- dbusmenu_menuitem_property_set_bool (menu_item, DBUSMENU_MENUITEM_PROP_VISIBLE, true);
45-
46- g_signal_connect (menu_item, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, (GCallback) &BamfLauncherIcon::OnLaunch, this);
47-
48- _menu_items["Launch"] = menu_item;
49- }
50-
51 /* Pin */
52 if (_menu_items.find ("Pin") == _menu_items.end ())
53 {
54
55=== modified file 'src/BamfLauncherIcon.h'
56--- src/BamfLauncherIcon.h 2011-02-03 17:31:47 +0000
57+++ src/BamfLauncherIcon.h 2011-02-07 08:26:18 +0000
58@@ -83,7 +83,6 @@
59 static void OnChildAdded (BamfView *view, BamfView *child, gpointer data);
60 static void OnChildRemoved (BamfView *view, BamfView *child, gpointer data);
61
62- static void OnLaunch (DbusmenuMenuitem *item, int time, BamfLauncherIcon *self);
63 static void OnQuit (DbusmenuMenuitem *item, int time, BamfLauncherIcon *self);
64 static void OnTogglePin (DbusmenuMenuitem *item, int time, BamfLauncherIcon *self);
65 };