mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 12:57:14 +08:00
wicd: rebuild with patches against new urwid + move to /usr/bin
This commit is contained in:
parent
6c00e50b1b
commit
1ea0c90452
66
wicd/831
Normal file
66
wicd/831
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
=== modified file 'curses/curses_misc.py'
|
||||||
|
--- curses/curses_misc.py 2012-05-06 15:16:15 +0000
|
||||||
|
+++ curses/curses_misc.py 2012-11-15 09:26:21 +0000
|
||||||
|
@@ -349,7 +349,10 @@
|
||||||
|
# We need this to pick our keypresses
|
||||||
|
self.use_enter = use_enter
|
||||||
|
|
||||||
|
- self.focus = focus
|
||||||
|
+ if urwid.VERSION < (1, 1, 0):
|
||||||
|
+ self.focus = focus
|
||||||
|
+ else:
|
||||||
|
+ self.focus_position = focus
|
||||||
|
|
||||||
|
self.callback = callback
|
||||||
|
self.user_args = user_args
|
||||||
|
@@ -362,7 +365,11 @@
|
||||||
|
self.list = list
|
||||||
|
|
||||||
|
def set_focus(self,index):
|
||||||
|
- self.focus = index
|
||||||
|
+ if urwid.VERSION < (1, 1, 0):
|
||||||
|
+ self.focus = index
|
||||||
|
+ else:
|
||||||
|
+ self.focus_position = index
|
||||||
|
+
|
||||||
|
# API changed between urwid 0.9.8.4 and 0.9.9
|
||||||
|
try:
|
||||||
|
self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW))
|
||||||
|
@@ -376,16 +383,21 @@
|
||||||
|
def build_combobox(self,parent,ui,row):
|
||||||
|
str,trash = self.label.get_text()
|
||||||
|
|
||||||
|
- self.cbox = DynWrap(SelText([self.list[self.focus]+self.DOWN_ARROW]),
|
||||||
|
+ if urwid.VERSION < (1, 1, 0):
|
||||||
|
+ index = self.focus
|
||||||
|
+ else:
|
||||||
|
+ index = self.focus_position
|
||||||
|
+
|
||||||
|
+ self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
|
||||||
|
attrs=self.attrs,focus_attr=self.focus_attr)
|
||||||
|
if str != '':
|
||||||
|
w = urwid.Columns([('fixed',len(str),self.label),self.cbox],
|
||||||
|
dividechars=1)
|
||||||
|
- self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
|
||||||
|
+ self.overlay = self.ComboSpace(self.list,parent,ui,index,
|
||||||
|
pos=(len(str)+1,row))
|
||||||
|
else:
|
||||||
|
w = urwid.Columns([self.cbox])
|
||||||
|
- self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
|
||||||
|
+ self.overlay = self.ComboSpace(self.list,parent,ui,index,
|
||||||
|
pos=(0,row))
|
||||||
|
|
||||||
|
self._w = w
|
||||||
|
@@ -419,7 +431,10 @@
|
||||||
|
if self.overlay:
|
||||||
|
return self.overlay._listbox.get_focus()
|
||||||
|
else:
|
||||||
|
- return None,self.focus
|
||||||
|
+ if urwid.VERSION < (1, 1, 0):
|
||||||
|
+ return None, self.focus
|
||||||
|
+ else:
|
||||||
|
+ return None, self.focus_position
|
||||||
|
|
||||||
|
def get_sensitive(self):
|
||||||
|
return self.cbox.get_sensitive()
|
||||||
|
|
43
wicd/835
Normal file
43
wicd/835
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
=== modified file 'curses/curses_misc.py'
|
||||||
|
--- curses/curses_misc.py 2012-11-15 09:26:21 +0000
|
||||||
|
+++ curses/curses_misc.py 2012-11-16 09:22:47 +0000
|
||||||
|
@@ -352,7 +352,7 @@
|
||||||
|
if urwid.VERSION < (1, 1, 0):
|
||||||
|
self.focus = focus
|
||||||
|
else:
|
||||||
|
- self.focus_position = focus
|
||||||
|
+ self._w.focus_position = focus
|
||||||
|
|
||||||
|
self.callback = callback
|
||||||
|
self.user_args = user_args
|
||||||
|
@@ -368,7 +368,10 @@
|
||||||
|
if urwid.VERSION < (1, 1, 0):
|
||||||
|
self.focus = index
|
||||||
|
else:
|
||||||
|
- self.focus_position = index
|
||||||
|
+ try:
|
||||||
|
+ self._w.focus_position = index
|
||||||
|
+ except IndexError:
|
||||||
|
+ pass
|
||||||
|
|
||||||
|
# API changed between urwid 0.9.8.4 and 0.9.9
|
||||||
|
try:
|
||||||
|
@@ -386,7 +389,7 @@
|
||||||
|
if urwid.VERSION < (1, 1, 0):
|
||||||
|
index = self.focus
|
||||||
|
else:
|
||||||
|
- index = self.focus_position
|
||||||
|
+ index = self._w.focus_position
|
||||||
|
|
||||||
|
self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
|
||||||
|
attrs=self.attrs,focus_attr=self.focus_attr)
|
||||||
|
@@ -434,7 +437,7 @@
|
||||||
|
if urwid.VERSION < (1, 1, 0):
|
||||||
|
return None, self.focus
|
||||||
|
else:
|
||||||
|
- return None, self.focus_position
|
||||||
|
+ return None, self._w.focus_position
|
||||||
|
|
||||||
|
def get_sensitive(self):
|
||||||
|
return self.cbox.get_sensitive()
|
||||||
|
|
@ -4,36 +4,50 @@
|
|||||||
|
|
||||||
pkgname=wicd
|
pkgname=wicd
|
||||||
pkgver=1.7.2.4
|
pkgver=1.7.2.4
|
||||||
pkgrel=6
|
pkgrel=7
|
||||||
pkgdesc="New and alternative wireless/wired network management utility"
|
pkgdesc="New and alternative wireless/wired network management utility"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="http://wicd.sourceforge.net/"
|
url="http://wicd.sourceforge.net/"
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
depends=('python2' 'dbus-python' 'dhcpcd' 'wpa_supplicant' 'wireless_tools' 'python-babel'
|
depends=('python2' 'dhcpcd' 'wpa_supplicant' 'wireless_tools' 'python-babel'
|
||||||
'net-tools' 'ethtool' 'shared-mime-info' 'python2-urwid' 'python2-gobject'
|
'net-tools' 'ethtool' 'shared-mime-info' 'python2-urwid' 'python2-gobject'
|
||||||
'dbus-python2' 'gettext')
|
'python2-dbus' 'gettext')
|
||||||
optdepends=('python-wpactrl: needed if you want to use the new experimental ioctrl backend'
|
optdepends=('python-wpactrl: needed if you want to use the new experimental ioctrl backend'
|
||||||
'python-iwscan: needed if you want to use the new experimental ioctrl backend'
|
'python-iwscan: needed if you want to use the new experimental ioctrl backend'
|
||||||
'wicd-client-kde: needed if you want to use kde ui')
|
'wicd-client-kde: needed if you want to use kde ui')
|
||||||
conflicts=('wicd-svn')
|
conflicts=('wicd-svn')
|
||||||
install=wicd.install
|
install=wicd.install
|
||||||
source=(https://launchpad.net/wicd/1.7/$pkgver/+download/$pkgname-$pkgver.tar.gz
|
source=(https://launchpad.net/wicd/1.7/$pkgver/+download/$pkgname-$pkgver.tar.gz
|
||||||
wicd.desktop
|
wicd.desktop
|
||||||
dbus_string_fix.patch)
|
dbus_string_fix.patch
|
||||||
|
http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/diff/831
|
||||||
|
http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/diff/835)
|
||||||
categories=('network')
|
categories=('network')
|
||||||
options=('emptydirs')
|
options=('emptydirs')
|
||||||
backup=('etc/wicd/encryption/templates/active')
|
backup=('etc/wicd/encryption/templates/active')
|
||||||
md5sums=('c2435ddfdef0b9898852d72a85a45f0f'
|
md5sums=('c2435ddfdef0b9898852d72a85a45f0f'
|
||||||
'326df163a5732d38741371baa4fce9e5'
|
'326df163a5732d38741371baa4fce9e5'
|
||||||
'1d28a46ef05a972cd5a69530f5b53856')
|
'744b3c12fe901ed435351e884dc8cb1d'
|
||||||
|
'0d2355bc2eb7234a537f42f1773edfe0'
|
||||||
|
'1630d7fe8f09911302d33b26286ff9b8')
|
||||||
|
|
||||||
build() {
|
prepare() {
|
||||||
cd $srcdir/$pkgname-$pkgver
|
cd $pkgbase-$pkgver
|
||||||
|
|
||||||
patch -p0 < $srcdir/dbus_string_fix.patch
|
|
||||||
|
|
||||||
find . -type f -exec sed -i 's@#!/usr.*python@#!/usr/bin/python2@' {} \;
|
find . -type f -exec sed -i 's@#!/usr.*python@#!/usr/bin/python2@' {} \;
|
||||||
export PYTHON=python2
|
export PYTHON=python2
|
||||||
|
|
||||||
|
sed -i 's|/usr/sbin/|/usr/bin/|' other/wicd.service
|
||||||
|
|
||||||
|
patch -p0 < "$srcdir/dbus_string_fix.patch"
|
||||||
|
|
||||||
|
# Fix problem with new urwid FS#33378 LP#1075399
|
||||||
|
patch -Np0 -i "$srcdir/831"
|
||||||
|
patch -Np0 -i "$srcdir/835"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $srcdir/$pkgname-$pkgver
|
||||||
|
|
||||||
python2 setup.py configure --no-install-init \
|
python2 setup.py configure --no-install-init \
|
||||||
--resume=/usr/share/wicd/scripts/ \
|
--resume=/usr/share/wicd/scripts/ \
|
||||||
@ -41,7 +55,8 @@ build() {
|
|||||||
--verbose \
|
--verbose \
|
||||||
--python=/usr/bin/python2 \
|
--python=/usr/bin/python2 \
|
||||||
--lib=/usr/lib \
|
--lib=/usr/lib \
|
||||||
--systemd=/usr/lib/systemd/system
|
--sbin=/usr/bin \
|
||||||
|
--systemd=/usr/lib/systemd/system
|
||||||
|
|
||||||
mkdir -p translations/ast/LC_MESSAGES
|
mkdir -p translations/ast/LC_MESSAGES
|
||||||
msgfmt po/ast.po -o translations/ast/LC_MESSAGES/wicd.mo
|
msgfmt po/ast.po -o translations/ast/LC_MESSAGES/wicd.mo
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
+ # s is a dbus.String -- since we don't allow unicode property keys,
|
+ # s is a dbus.String -- since we don't allow unicode property keys,
|
||||||
+ # make it simple.
|
+ # make it simple.
|
||||||
+ return str(s).translate(None, table)
|
+ return str(s).translate(None, table)
|
||||||
|
|
||||||
def sanitize_escaped(s):
|
def sanitize_escaped(s):
|
||||||
""" Sanitize double-escaped unicode strings. """
|
""" Sanitize double-escaped unicode strings. """
|
||||||
|
|
||||||
|
@ -1,72 +0,0 @@
|
|||||||
diff -ur wicd-1.7.0/wicd/configmanager.py wicd-1.7.0.new/wicd/configmanager.py
|
|
||||||
--- wicd-1.7.0/wicd/configmanager.py 2010-01-15 05:49:11.000000000 +0100
|
|
||||||
+++ wicd-1.7.0.new/wicd/configmanager.py 2010-10-08 13:14:22.084345024 +0200
|
|
||||||
@@ -35,7 +35,7 @@
|
|
||||||
class ConfigManager(RawConfigParser):
|
|
||||||
""" A class that can be used to manage a given configuration file. """
|
|
||||||
def __init__(self, path, debug=False, mark_whitespace="`'`"):
|
|
||||||
- RawConfigParser.__init__(self)
|
|
||||||
+ RawConfigParser.__init__(self, allow_no_value=True)
|
|
||||||
self.config_file = path
|
|
||||||
self.debug = debug
|
|
||||||
self.mrk_ws = mark_whitespace
|
|
||||||
@@ -176,28 +176,35 @@
|
|
||||||
|
|
||||||
|
|
||||||
def _copy_section(self, name):
|
|
||||||
- # Yes, deepcopy sucks, but it is robust to changes in both
|
|
||||||
- # this class and RawConfigParser.
|
|
||||||
- p = copy.deepcopy(self)
|
|
||||||
- for sname in p.sections():
|
|
||||||
- if sname != name:
|
|
||||||
- p.remove_section(sname)
|
|
||||||
+ p = ConfigManager("", self.debug, self.mrk_ws)
|
|
||||||
+ p.add_section(name)
|
|
||||||
+ for (iname, value) in self.items(name):
|
|
||||||
+ p.set(name, iname, value)
|
|
||||||
+ # Store the filename this section was read from.
|
|
||||||
p.config_file = p.get_option(name, '_filename_', p.config_file)
|
|
||||||
p.remove_option(name, '_filename_')
|
|
||||||
return p
|
|
||||||
|
|
||||||
def write(self):
|
|
||||||
""" Writes the loaded config file to disk. """
|
|
||||||
- # Really don't like this deepcopy.
|
|
||||||
- p = copy.deepcopy(self)
|
|
||||||
- for sname in p.sections():
|
|
||||||
- fname = p.get_option(sname, '_filename_')
|
|
||||||
+ in_this_file = []
|
|
||||||
+ for sname in self.sections():
|
|
||||||
+ fname = self.get_option(sname, '_filename_')
|
|
||||||
if fname and fname != self.config_file:
|
|
||||||
+ # Write sections from other files
|
|
||||||
section = self._copy_section(sname)
|
|
||||||
- p.remove_section(sname)
|
|
||||||
section._write_one()
|
|
||||||
+ else:
|
|
||||||
+ # Save names of local sections
|
|
||||||
+ in_this_file.append(sname)
|
|
||||||
|
|
||||||
- for sname in p.sections():
|
|
||||||
+ # Make an instance with only these sections
|
|
||||||
+ p = ConfigManager("", self.debug, self.mrk_ws)
|
|
||||||
+ p.config_file = self.config_file
|
|
||||||
+ for sname in in_this_file:
|
|
||||||
+ p.add_section(sname)
|
|
||||||
+ for (iname, value) in self.items(sname):
|
|
||||||
+ p.set(sname, iname, value)
|
|
||||||
p.remove_option(sname, '_filename_')
|
|
||||||
p._write_one()
|
|
||||||
|
|
||||||
diff -ur wicd-1.7.0/wicd/wicd-daemon.py wicd-1.7.0.new/wicd/wicd-daemon.py
|
|
||||||
--- wicd-1.7.0/wicd/wicd-daemon.py 2010-01-15 05:49:11.000000000 +0100
|
|
||||||
+++ wicd-1.7.0.new/wicd/wicd-daemon.py 2010-10-08 13:11:15.811786603 +0200
|
|
||||||
@@ -1802,7 +1802,7 @@
|
|
||||||
wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus)
|
|
||||||
daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
|
|
||||||
if not no_poll:
|
|
||||||
- child_pid = Popen([misc.find_path("python"), "-O",
|
|
||||||
+ child_pid = Popen([misc.find_path("python2"), "-O",
|
|
||||||
os.path.join(wpath.daemon, "monitor.py")],
|
|
||||||
shell=False, close_fds=True).pid
|
|
||||||
atexit.register(on_exit, child_pid)
|
|
@ -1,11 +0,0 @@
|
|||||||
--- wicd/wnettools.py.bak 2011-08-20 12:55:32.898673334 +0200
|
|
||||||
+++ wicd/wnettools.py 2011-08-20 12:55:56.608671946 +0200
|
|
||||||
@@ -58,7 +58,7 @@
|
|
||||||
wpa2_pattern = re.compile('(WPA2)', _re_mode)
|
|
||||||
|
|
||||||
#iwconfig-only regular expressions.
|
|
||||||
-ip_pattern = re.compile(r'inet [Aa]d?dr[^.]*:([^.]*\.[^.]*\.[^.]*\.[0-9]*)', re.S)
|
|
||||||
+ip_pattern = re.compile(r'inet ([^.]*\.[^.]*\.[^.]*\.[0-9]*)', re.S)
|
|
||||||
bssid_pattern = re.compile('.*Access Point: (([0-9A-Z]{2}:){5}[0-9A-Z]{2})', _re_mode)
|
|
||||||
bitrate_pattern = re.compile('.*Bit Rate[=:](.*?/s)', _re_mode)
|
|
||||||
opmode_pattern = re.compile('.*Mode:(.*?) ', _re_mode)
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -aur wicd-old/opt/wicd/gui.py wicd-new/opt/wicd/gui.py
|
|
||||||
--- wicd-old/opt/wicd/gui.py 2008-01-03 23:18:40.000000000 +0530
|
|
||||||
+++ wicd-new/opt/wicd/gui.py 2008-01-09 00:27:29.000000000 +0530
|
|
||||||
@@ -44,7 +44,7 @@
|
|
||||||
#which is also under GPLv2
|
|
||||||
|
|
||||||
#Get the local directory since we are not installing anything
|
|
||||||
-local_path = os.path.realpath(os.path.dirname(sys.argv[0])) + '/translations'
|
|
||||||
+local_path = ('/usr/share/locale')
|
|
||||||
# Init the list of languages to support
|
|
||||||
langs = list()
|
|
||||||
#Check the default locale
|
|
@ -1,24 +0,0 @@
|
|||||||
=== modified file 'wicd/networking.py'
|
|
||||||
--- wicd/networking.py 2010-01-15 04:02:10 +0000
|
|
||||||
+++ wicd/networking.py 2010-01-27 19:06:21 +0000
|
|
||||||
@@ -215,8 +215,8 @@
|
|
||||||
if self.pre_disconnect_script:
|
|
||||||
print 'Running pre-disconnect script'
|
|
||||||
misc.ExecuteScript(expand_script_macros(self.pre_disconnect_script,
|
|
||||||
- 'pre-disconnection', (mac,
|
|
||||||
- name)),
|
|
||||||
+ 'pre-disconnection',
|
|
||||||
+ mac, name),
|
|
||||||
self.debug)
|
|
||||||
iface.ReleaseDHCP()
|
|
||||||
iface.SetAddress('0.0.0.0')
|
|
||||||
@@ -229,7 +229,7 @@
|
|
||||||
print 'Running post-disconnect script'
|
|
||||||
misc.ExecuteScript(expand_script_macros(self.post_disconnect_script,
|
|
||||||
'post-disconnection',
|
|
||||||
- (mac, name)),
|
|
||||||
+ mac, name),
|
|
||||||
self.debug)
|
|
||||||
|
|
||||||
def ReleaseDHCP(self):
|
|
||||||
|
|
@ -1,208 +0,0 @@
|
|||||||
diff -aur wicd-old/etc/acpi/resume.d/80-wicd-connect.sh wicd-new/etc/acpi/resume.d/80-wicd-connect.sh
|
|
||||||
--- wicd-old/etc/acpi/resume.d/80-wicd-connect.sh 2007-07-25 20:34:25.000000000 +0530
|
|
||||||
+++ wicd-new/etc/acpi/resume.d/80-wicd-connect.sh 2007-12-20 07:19:00.000000000 +0530
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
#!/bin/sh
|
|
||||||
# Bring wifi network interface back up.
|
|
||||||
|
|
||||||
-/opt/wicd/autoconnect.py
|
|
||||||
+/usr/lib/wicd/autoconnect.py
|
|
||||||
diff -aur wicd-old/etc/init.d/wicd wicd-new/etc/init.d/wicd
|
|
||||||
--- wicd-old/etc/init.d/wicd 2007-07-25 20:34:25.000000000 +0530
|
|
||||||
+++ wicd-new/etc/init.d/wicd 2007-12-20 07:19:15.000000000 +0530
|
|
||||||
@@ -5,7 +5,7 @@
|
|
||||||
echo "Stopping any running daemons..."
|
|
||||||
killall daemon.py 2> /dev/null
|
|
||||||
echo "Starting wicd daemon..."
|
|
||||||
- /opt/wicd/daemon.py 2> /dev/null
|
|
||||||
+ /usr/lib/wicd/daemon.py 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $1 = "stop" ]]
|
|
||||||
diff -aur wicd-old/opt/wicd/dapper.py wicd-new/opt/wicd/dapper.py
|
|
||||||
--- wicd-old/opt/wicd/dapper.py 2007-12-01 19:47:51.000000000 +0530
|
|
||||||
+++ wicd-new/opt/wicd/dapper.py 2007-12-20 07:20:35.000000000 +0530
|
|
||||||
@@ -76,7 +76,7 @@
|
|
||||||
if wired.CheckPluggedIn() == True and wired_ip != None:
|
|
||||||
# Only set image/tooltip if it hasn't been set already
|
|
||||||
if stillWired == False:
|
|
||||||
- pic.set_from_file("images/wired.png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/wired.png")
|
|
||||||
tooltip.set_tip(eb,language['connected_to_wired'].replace('$A',
|
|
||||||
wired_ip))
|
|
||||||
stillWired = True
|
|
||||||
@@ -85,7 +85,7 @@
|
|
||||||
# Check to see if we were using a wired connection that has now become
|
|
||||||
# unplugged or disabled.
|
|
||||||
if stillWired == True:
|
|
||||||
- pic.set_from_file("images/no-signal.png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
tooltip.set_tip(eb,language['not_connected'])
|
|
||||||
stillWired = False
|
|
||||||
|
|
||||||
@@ -124,28 +124,28 @@
|
|
||||||
|
|
||||||
if daemon.GetSignalDisplayType()== 0:
|
|
||||||
if wireless_signal > 75:
|
|
||||||
- pic.set_from_file("images/high-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/high-signal" + lock + ".png")
|
|
||||||
elif wireless_signal > 50:
|
|
||||||
- pic.set_from_file("images/good-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/good-signal" + lock + ".png")
|
|
||||||
elif wireless_signal > 25:
|
|
||||||
- pic.set_from_file("images/low-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/low-signal" + lock + ".png")
|
|
||||||
elif wireless_signal > 0:
|
|
||||||
- pic.set_from_file("images/bad-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/bad-signal" + lock + ".png")
|
|
||||||
elif wireless_signal == 0:
|
|
||||||
- pic.set_from_file("images/no-signal.png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
auto_reconnect()
|
|
||||||
else:
|
|
||||||
if wireless_signal >= -60:
|
|
||||||
- pic.set_from_file("images/high-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/high-signal" + lock + ".png")
|
|
||||||
elif wireless_signal >= -70:
|
|
||||||
- pic.set_from_file("images/good-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/good-signal" + lock + ".png")
|
|
||||||
elif wireless_signal >= -80:
|
|
||||||
- pic.set_from_file("images/low-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/low-signal" + lock + ".png")
|
|
||||||
else:
|
|
||||||
- pic.set_from_file("images/bad-signal" + lock + ".png")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/bad-signal" + lock + ".png")
|
|
||||||
|
|
||||||
elif wireless_ip is None and wired_ip is None:
|
|
||||||
- pic.set_from_file("images/no-signal")
|
|
||||||
+ pic.set_from_file("/usr/share/wicd/images/no-signal")
|
|
||||||
tooltip.set_tip(eb,language['not_connected'])
|
|
||||||
auto_reconnect()
|
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@
|
|
||||||
|
|
||||||
gobject.timeout_add(3000,set_signal_image)
|
|
||||||
tooltip.set_tip(eb, "Wicd Systray")
|
|
||||||
-pic.set_from_file("images/no-signal.png")
|
|
||||||
+pic.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
|
|
||||||
eb.connect('button_press_event',tray_clicked)
|
|
||||||
eb.add(pic)
|
|
||||||
diff -aur wicd-old/opt/wicd/edgy.py wicd-new/opt/wicd/edgy.py
|
|
||||||
--- wicd-old/opt/wicd/edgy.py 2007-12-01 19:47:51.000000000 +0530
|
|
||||||
+++ wicd-new/opt/wicd/edgy.py 2007-12-20 07:20:35.000000000 +0530
|
|
||||||
@@ -158,7 +158,7 @@
|
|
||||||
if wired.CheckPluggedIn() == True and wired_ip != None:
|
|
||||||
# Only set image/tooltip if it hasn't been set already
|
|
||||||
if stillWired == False:
|
|
||||||
- tr.set_from_file("images/wired.png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/wired.png")
|
|
||||||
tr.set_tooltip(language['connected_to_wired'].replace('$A',
|
|
||||||
wired_ip))
|
|
||||||
stillWired = True
|
|
||||||
@@ -167,7 +167,7 @@
|
|
||||||
# Check to see if we were using a wired connection that has now become
|
|
||||||
# unplugged or disabled.
|
|
||||||
if stillWired == True:
|
|
||||||
- tr.set_from_file("images/no-signal.png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
tr.set_tooltip(language['not_connected'])
|
|
||||||
stillWired = False
|
|
||||||
|
|
||||||
@@ -209,35 +209,35 @@
|
|
||||||
|
|
||||||
if daemon.GetSignalDisplayType()== 0:
|
|
||||||
if wireless_signal > 75:
|
|
||||||
- tr.set_from_file("images/" + data_string + "high-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/" + data_string + "high-signal" + lock + ".png")
|
|
||||||
elif wireless_signal > 50:
|
|
||||||
- tr.set_from_file("images/" + data_string + "good-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/" + data_string + "good-signal" + lock + ".png")
|
|
||||||
elif wireless_signal > 25:
|
|
||||||
- tr.set_from_file("images/" + data_string + "low-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/" + data_string + "low-signal" + lock + ".png")
|
|
||||||
elif wireless_signal > 0:
|
|
||||||
- tr.set_from_file("images/" + data_string + "bad-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/" + data_string + "bad-signal" + lock + ".png")
|
|
||||||
elif wireless_signal == 0:
|
|
||||||
- tr.set_from_file("images/no-signal.png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
auto_reconnect()
|
|
||||||
else:
|
|
||||||
if wireless_signal >= -60:
|
|
||||||
- tr.set_from_file("images/" + data_string + "high-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/" + data_string + "high-signal" + lock + ".png")
|
|
||||||
elif wireless_signal >= -70:
|
|
||||||
- tr.set_from_file("images/" + data_string + "good-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/" + data_string + "good-signal" + lock + ".png")
|
|
||||||
elif wireless_signal >= -80:
|
|
||||||
- tr.set_from_file("images/" + data_string + "low-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/" + data_string + "low-signal" + lock + ".png")
|
|
||||||
else:
|
|
||||||
- tr.set_from_file("images/bad-signal" + lock + ".png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/bad-signal" + lock + ".png")
|
|
||||||
|
|
||||||
elif wireless_ip is None and wired_ip is None:
|
|
||||||
- tr.set_from_file("images/no-signal.png")
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
tr.set_tooltip(language['not_connected'])
|
|
||||||
auto_reconnect()
|
|
||||||
|
|
||||||
elif tr.current_icon_path.startswith(data_string) == False:
|
|
||||||
print ":"+tr.current_icon_path
|
|
||||||
print "|"+data_string+tr.current_icon_path[tr.current_icon_path.find('-')+1:]
|
|
||||||
- tr.set_from_file("images/"+data_string+tr.current_icon_path[tr.current_icon_path.find('-')+1:])
|
|
||||||
+ tr.set_from_file("/usr/share/wicd/images/"+data_string+tr.current_icon_path[tr.current_icon_path.find('-')+1:])
|
|
||||||
|
|
||||||
if not daemon.GetDebugMode():
|
|
||||||
config.EnableLogging()
|
|
||||||
@@ -301,11 +301,11 @@
|
|
||||||
self.manager.add_ui_from_string(menu)
|
|
||||||
self.menu = self.manager.get_widget('/Menubar/Menu/About').props.parent
|
|
||||||
self.current_icon_path = ''
|
|
||||||
- self.set_from_file("images/no-signal.png")
|
|
||||||
+ self.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
self.set_visible(True)
|
|
||||||
self.connect('activate', self.on_activate)
|
|
||||||
self.connect('popup-menu', self.on_popup_menu)
|
|
||||||
- self.set_from_file("images/no-signal.png")
|
|
||||||
+ self.set_from_file("/usr/share/wicd/images/no-signal.png")
|
|
||||||
self.set_tooltip("Initializing wicd...")
|
|
||||||
|
|
||||||
wireless.SetForcedDisconnect(False)
|
|
||||||
diff -aur wicd-old/opt/wicd/gui.py wicd-new/opt/wicd/gui.py
|
|
||||||
--- wicd-old/opt/wicd/gui.py 2007-12-01 19:47:51.000000000 +0530
|
|
||||||
+++ wicd-new/opt/wicd/gui.py 2007-12-20 07:20:35.000000000 +0530
|
|
||||||
@@ -350,24 +350,24 @@
|
|
||||||
# "converted" to strength bars, so suggestions from people
|
|
||||||
# for a better way would be welcome.
|
|
||||||
if dbm_strength >= -60:
|
|
||||||
- self.image.set_from_file('images/signal-100.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-100.png')
|
|
||||||
elif dbm_strength >= -70:
|
|
||||||
- self.image.set_from_file('images/signal-75.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-75.png')
|
|
||||||
elif dbm_strength >= -80:
|
|
||||||
- self.image.set_from_file('images/signal-50.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-50.png')
|
|
||||||
else:
|
|
||||||
- self.image.set_from_file('images/signal-25.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-25.png')
|
|
||||||
|
|
||||||
else:
|
|
||||||
# Uses normal link quality, should be fine in most cases
|
|
||||||
if strength > 75:
|
|
||||||
- self.image.set_from_file('images/signal-100.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-100.png')
|
|
||||||
elif strength > 50:
|
|
||||||
- self.image.set_from_file('images/signal-75.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-75.png')
|
|
||||||
elif strength > 25:
|
|
||||||
- self.image.set_from_file('images/signal-50.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-50.png')
|
|
||||||
else:
|
|
||||||
- self.image.set_from_file('images/signal-25.png')
|
|
||||||
+ self.image.set_from_file('/usr/share/wicd/images/signal-25.png')
|
|
||||||
self.expander.setSignalStrength(strength, dbm_strength)
|
|
||||||
|
|
||||||
def setMACAddress(self,address):
|
|
Loading…
Reference in New Issue
Block a user