Merge lp:~rcmorano/classicmenu-indicator/classicmenu-indicator-gnome-shell into lp:classicmenu-indicator

Proposed by Roberto C. Morano
Status: Needs review
Proposed branch: lp:~rcmorano/classicmenu-indicator/classicmenu-indicator-gnome-shell
Merge into: lp:classicmenu-indicator
Diff against target: 139 lines (+107/-0)
5 files modified
debian/changelog (+10/-0)
debian/classicmenu-indicator-gnome-shell.install (+1/-0)
debian/control (+9/-0)
gnome-shell-extension/classicmenu-indicator@launchpad.net/extension.js (+80/-0)
gnome-shell-extension/classicmenu-indicator@launchpad.net/metadata.json (+7/-0)
To merge this branch: bzr merge lp:~rcmorano/classicmenu-indicator/classicmenu-indicator-gnome-shell
Reviewer Review Type Date Requested Status
Florian Diesch Pending
Review via email: mp+82911@code.launchpad.net

Description of the change

Hello,

I have created a gnome-shell extension for your indicator in order to place it at the left of the main bar instead of the default location (message/notifications tray).

I have added it to the source as a new package and all you have to do is installing it and enabling the extension through gnome-tweak-tool.

I hope you like the contribution :]

Kind regards.

To post a comment you must log in.

Unmerged revisions

22. By Roberto C. Morano

updated changelog

21. By Roberto C. Morano

added gnome-shell extension and packaging

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-10-14 21:32:29 +0000
+++ debian/changelog 2011-11-21 16:56:30 +0000
@@ -1,3 +1,13 @@
1classicmenu-indicator (0.06rcmorano1) oneiric; urgency=low
2
3 * debian/control:
4 - Added classicmenu-indicator-gnome-shell package
5
6 * gnome-shell-extension:
7 - Added gnome-shell extension for classicmenu-indicator
8
9 -- Roberto C. Morano <rcmova@gmail.com> Mon, 21 Nov 2011 17:45:12 +0200
10
1classicmenu-indicator (0.06) natty; urgency=low11classicmenu-indicator (0.06) natty; urgency=low
212
3 * cmdindicator.py: 13 * cmdindicator.py:
414
=== added file 'debian/classicmenu-indicator-gnome-shell.install'
--- debian/classicmenu-indicator-gnome-shell.install 1970-01-01 00:00:00 +0000
+++ debian/classicmenu-indicator-gnome-shell.install 2011-11-21 16:56:30 +0000
@@ -0,0 +1,1 @@
1gnome-shell-extension/classicmenu-indicator@launchpad.net /usr/share/gnome-shell/extensions
02
=== modified file 'debian/control'
--- debian/control 2011-06-04 23:20:58 +0000
+++ debian/control 2011-11-21 16:56:30 +0000
@@ -14,3 +14,12 @@
14Description: indicator showing the main menu from Gnome Classic14Description: indicator showing the main menu from Gnome Classic
15 classicmenu-indicator displays the main menu from Gnome2/Gnome Classic15 classicmenu-indicator displays the main menu from Gnome2/Gnome Classic
16Homepage: http://www.florian-diesch.de/software/classicmenu-indicator/16Homepage: http://www.florian-diesch.de/software/classicmenu-indicator/
17
18Package: classicmenu-indicator-gnome-shell
19Architecture: all
20Depends: ${misc:Depends}, ${python:Depends}, gnome-shell (>= 3.2), classicmenu-indicator
21Breaks: ${python:Breaks}
22Description: gnome-shell extension that relocates indicator
23 classicmenu-indicator-gnome-shell displays the main menu from Gnome2/Gnome
24 Classic at the left of the gnome-shell main bar.
25Homepage: http://www.florian-diesch.de/software/classicmenu-indicator/
1726
=== added directory 'gnome-shell-extension'
=== added directory 'gnome-shell-extension/classicmenu-indicator@launchpad.net'
=== added file 'gnome-shell-extension/classicmenu-indicator@launchpad.net/extension.js'
--- gnome-shell-extension/classicmenu-indicator@launchpad.net/extension.js 1970-01-01 00:00:00 +0000
+++ gnome-shell-extension/classicmenu-indicator@launchpad.net/extension.js 2011-11-21 16:56:30 +0000
@@ -0,0 +1,80 @@
1/**
2* extension.js
3* Copyright (C) 2011, Roberto C. Morano <rcmova@gmail.com>
4*
5* This software is free software; you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation; either version 2 of the License, or
8* (at your option) any later version.
9*
10* This software is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this library; if not, write to the Free Software
17* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*
19* As a special exception, if you link this library with other files to
20* produce an executable, this library does not by itself cause the
21* resulting executable to be covered by the GNU General Public License.
22* This exception does not however invalidate any other reasons why the
23* executable file might be covered by the GNU General Public License.
24*/
25
26const StatusIconDispatcherOrig = imports.ui.statusIconDispatcher;
27const Main = imports.ui.main;
28const Signals = imports.signals;
29const PanelMenu = imports.ui.panelMenu;
30
31const STANDARD_TRAY_ICON_IMPLEMENTATIONS = imports.ui.statusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS;
32const PANEL_ICON_SIZE = imports.ui.panel.PANEL_ICON_SIZE
33
34function StatusIconDispatcher() {
35 this._init();
36}
37
38StatusIconDispatcher.prototype = {
39 _init: StatusIconDispatcherOrig.StatusIconDispatcher.prototype._init,
40
41 start: StatusIconDispatcherOrig.StatusIconDispatcher.prototype.start,
42 _onTrayIconRemoved: StatusIconDispatcherOrig.StatusIconDispatcher.prototype._onTrayIconRemoved,
43 _onTrayIconAdded: function(o, icon) {
44
45
46 let wmClass = (icon.wm_class || 'unknown').toLowerCase();
47 let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass];
48 if (role)
49 this.emit('status-icon-added', icon, role);
50 else
51 if ( wmClass == "classicmenu-indicator" ) {
52 global.log(wmClass);
53// Main.panel._leftBox.remove_actor(Main.panel._activitiesButton.actor);
54 icon.height = PANEL_ICON_SIZE;
55 let buttonBox = new PanelMenu.ButtonBox();
56 let box = buttonBox.actor;
57 box.add_actor(icon);
58 Main.panel._leftBox.insert_actor(box, 0);
59 }
60 this.emit('message-icon-added', icon);
61 },
62};
63
64Signals.addSignalMethods(StatusIconDispatcher.prototype);
65
66function main(meta) {
67
68 Main.statusIconDispatcher = new StatusIconDispatcher();
69 Main.statusIconDispatcher.start(Main.messageTray.actor);
70}
71
72function init() {
73}
74
75function enable(meta) {
76 main(meta);
77}
78
79function disable() {
80}
081
=== added file 'gnome-shell-extension/classicmenu-indicator@launchpad.net/metadata.json'
--- gnome-shell-extension/classicmenu-indicator@launchpad.net/metadata.json 1970-01-01 00:00:00 +0000
+++ gnome-shell-extension/classicmenu-indicator@launchpad.net/metadata.json 2011-11-21 16:56:30 +0000
@@ -0,0 +1,7 @@
1{
2 "shell-version": ["3.2"],
3 "uuid": "classicmenu-indicator@launchpad.net",
4 "name": "classicmenu-indicator",
5 "description": "Places the indicator at the left of the main gnome-shell bar.",
6 "url": "https://launchpad.net/classicmenu-indicator"
7}

Subscribers

People subscribed via source and target branches