1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 20:38:00 +01:00

Added gnome-shell extension

This commit is contained in:
David Paleino
2012-11-28 16:28:11 +01:00
parent 259836c295
commit 2da23ff605
4 changed files with 41 additions and 0 deletions

29
gnome-shell/extension.js Normal file
View File

@@ -0,0 +1,29 @@
/*
* Copyright © 2012, David Paleino <d.paleino@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
const StatusIconDispatcher = imports.ui.statusIconDispatcher;
function init(metadata) {
}
function enable() {
StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['wicd-client.py'] = 'wicd-gtk';
}
function disable() {
StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['wicd-client.py'] = '';
}

View File

@@ -0,0 +1 @@
{"shell-version": ["3.4.2"], "uuid": "wicd@code.hanskalabs.net", "name": "WICD Network Manager", "description": "Show status of WICD"}

View File

@@ -51,6 +51,7 @@ daemon = '%DAEMON%'
curses = '%CURSES%' curses = '%CURSES%'
gtk = '%GTK%' gtk = '%GTK%'
cli = '%CLI%' cli = '%CLI%'
gnome_shell_extensions = '%GNOME_SHELL_EXTENSIONS%'
translations = '%TRANSLATIONS%' translations = '%TRANSLATIONS%'
icons = '%ICONS%' icons = '%ICONS%'
pixmaps = '%PIXMAPS%' pixmaps = '%PIXMAPS%'
@@ -86,6 +87,7 @@ no_install_docs = %NO_INSTALL_DOCS%
no_install_gtk = %NO_INSTALL_GTK% no_install_gtk = %NO_INSTALL_GTK%
no_install_ncurses = %NO_INSTALL_NCURSES% no_install_ncurses = %NO_INSTALL_NCURSES%
no_install_cli = %NO_INSTALL_CLI% no_install_cli = %NO_INSTALL_CLI%
no_install_gnome_shell_extensions = %NO_INSTALL_GNOME_SHELL_EXTENSIONS%
no_use_notifications = %NO_USE_NOTIFICATIONS% no_use_notifications = %NO_USE_NOTIFICATIONS%
def chdir(f): def chdir(f):

View File

@@ -87,6 +87,7 @@ class configure(Command):
('curses=', None, 'set the curses UI directory'), ('curses=', None, 'set the curses UI directory'),
('gtk=', None, 'set the GTK UI directory'), ('gtk=', None, 'set the GTK UI directory'),
('cli=', None, 'set the CLI directory'), ('cli=', None, 'set the CLI directory'),
('gnome-shell-extensions=', None, 'set the Gnome Shell Extensions directory'),
('networks=', None, 'set the encryption configuration directory'), ('networks=', None, 'set the encryption configuration directory'),
('log=', None, 'set the log directory'), ('log=', None, 'set the log directory'),
('resume=', None, 'set the directory the resume from suspend script is stored in'), ('resume=', None, 'set the directory the resume from suspend script is stored in'),
@@ -131,6 +132,7 @@ class configure(Command):
('no-install-ncurses', None, 'do not install the ncurses client'), ('no-install-ncurses', None, 'do not install the ncurses client'),
('no-install-cli', None, 'do not install the command line executable'), ('no-install-cli', None, 'do not install the command line executable'),
('no-install-gtk', None, 'do not install the gtk client'), ('no-install-gtk', None, 'do not install the gtk client'),
('no-install-gnome-shell-extensions', None, 'do not install the Gnome Shell extension'),
('no-use-notifications', None, 'do not ever allow the use of libnotify notifications') ('no-use-notifications', None, 'do not ever allow the use of libnotify notifications')
] ]
@@ -147,6 +149,7 @@ class configure(Command):
self.curses = self.share + 'curses' self.curses = self.share + 'curses'
self.gtk = self.share + 'gtk' self.gtk = self.share + 'gtk'
self.cli = self.share + 'cli' self.cli = self.share + 'cli'
self.gnome_shell_extensions = '/usr/share/gnome-shell/extensions/'
self.icons = '/usr/share/icons/hicolor/' self.icons = '/usr/share/icons/hicolor/'
self.pixmaps = '/usr/share/pixmaps/' self.pixmaps = '/usr/share/pixmaps/'
self.images = self.share + 'icons' self.images = self.share + 'icons'
@@ -179,6 +182,7 @@ class configure(Command):
self.no_install_gtk = False self.no_install_gtk = False
self.no_install_ncurses = False self.no_install_ncurses = False
self.no_install_cli = False self.no_install_cli = False
self.no_install_gnome_shell_extensions = False
self.no_use_notifications = False self.no_use_notifications = False
# Determine the default init file location on several different distros # Determine the default init file location on several different distros
@@ -477,6 +481,11 @@ class install(_install):
[(os.path.join(imgdir, f)) for f in os.listdir(imgdir) if not f.startswith('.')]) [(os.path.join(imgdir, f)) for f in os.listdir(imgdir) if not f.startswith('.')])
) )
data.append((wpath.pixmaps, ['other/wicd-gtk.xpm'])) data.append((wpath.pixmaps, ['other/wicd-gtk.xpm']))
if not wpath.no_install_gnome_shell_extensions:
data.append(
(wpath.gnome_shell_extensions + 'wicd@code.hanskalabs.net',
['gnome-shell/' + f for f in os.listdir('gnome-shell')])
)
if not wpath.no_install_ncurses: if not wpath.no_install_ncurses:
data.append((wpath.curses, ['curses/curses_misc.py'])) data.append((wpath.curses, ['curses/curses_misc.py']))
data.append((wpath.curses, ['curses/prefs_curses.py'])) data.append((wpath.curses, ['curses/prefs_curses.py']))