Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd7caa5072 |
3 changed files with 108 additions and 1 deletions
80
wicd-1.7.2.4-new-urwid.patch
Normal file
80
wicd-1.7.2.4-new-urwid.patch
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
diff -up wicd-1.7.2.4/curses/curses_misc.py.orig wicd-1.7.2.4/curses/curses_misc.py
|
||||
--- wicd-1.7.2.4/curses/curses_misc.py.orig 2011-10-18 17:26:55.000000000 -0400
|
||||
+++ wicd-1.7.2.4/curses/curses_misc.py 2013-03-14 15:12:38.443563839 -0400
|
||||
@@ -350,6 +350,10 @@ class ComboBox(urwid.WidgetWrap):
|
||||
self.use_enter = use_enter
|
||||
|
||||
self.focus = focus
|
||||
+ if urwid.VERSION < (1, 1, 0):
|
||||
+ self.focus = focus
|
||||
+ else:
|
||||
+ self._w.focus_position = focus
|
||||
|
||||
self.callback = callback
|
||||
self.user_args = user_args
|
||||
@@ -363,6 +367,14 @@ class ComboBox(urwid.WidgetWrap):
|
||||
|
||||
def set_focus(self,index):
|
||||
self.focus = index
|
||||
+ if urwid.VERSION < (1, 1, 0):
|
||||
+ self.focus = index
|
||||
+ else:
|
||||
+ try:
|
||||
+ self._w.focus_position = index
|
||||
+ except IndexError:
|
||||
+ pass
|
||||
+
|
||||
# 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 +388,21 @@ class ComboBox(urwid.WidgetWrap):
|
||||
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._w.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 +436,10 @@ class ComboBox(urwid.WidgetWrap):
|
||||
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._w.focus_position
|
||||
|
||||
def get_sensitive(self):
|
||||
return self.cbox.get_sensitive()
|
||||
diff -up wicd-1.7.2.4/curses/wicd-curses.py.orig wicd-1.7.2.4/curses/wicd-curses.py
|
||||
--- wicd-1.7.2.4/curses/wicd-curses.py.orig 2013-03-14 15:11:27.647883677 -0400
|
||||
+++ wicd-1.7.2.4/curses/wicd-curses.py 2013-03-14 15:12:38.443563839 -0400
|
||||
@@ -1041,6 +1041,10 @@ def setup_dbus(force=True):
|
||||
print 'Error connecting to wicd via D-Bus. Please make sure the wicd service is running.'
|
||||
sys.exit(3)
|
||||
|
||||
+ if daemon is None:
|
||||
+ print 'Error connecting to wicd via D-Bus. Please make sure the wicd service is running.'
|
||||
+ sys.exit(3)
|
||||
+
|
||||
netentry_curses.dbus_init(dbus_ifaces)
|
||||
return True
|
||||
|
||||
15
wicd-1.7.2.4-translate.patch
Normal file
15
wicd-1.7.2.4-translate.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff -up wicd-1.7.2.4/wicd/misc.py.orig wicd-1.7.2.4/wicd/misc.py
|
||||
--- wicd-1.7.2.4/wicd/misc.py.orig 2012-04-30 15:20:09.000000000 -0400
|
||||
+++ wicd-1.7.2.4/wicd/misc.py 2013-03-14 15:17:58.921643114 -0400
|
||||
@@ -430,7 +430,10 @@ def sanitize_config(s):
|
||||
""" Sanitize property names to be used in config-files. """
|
||||
allowed = string.ascii_letters + '_' + string.digits
|
||||
table = string.maketrans(allowed, ' ' * len(allowed))
|
||||
- return s.translate(None, table)
|
||||
+
|
||||
+ # s is a dbus.String -- since we don't allow unicode property keys,
|
||||
+ # make it simple.
|
||||
+ return str(s).translate(None, table)
|
||||
|
||||
def sanitize_escaped(s):
|
||||
""" Sanitize double-escaped unicode strings. """
|
||||
14
wicd.spec
14
wicd.spec
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
Name: wicd
|
||||
Version: 1.7.2.4
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Wireless and wired network connection manager
|
||||
|
||||
Group: System Environment/Base
|
||||
|
|
@ -22,6 +22,8 @@ Patch0: wicd-1.7.0-remove-WHEREAREMYFILES.patch
|
|||
Patch1: wicd-1.7.1-dbus-failure.patch
|
||||
Patch2: wicd-1.7.0-dbus-policy.patch
|
||||
Patch3: wicd-1.7.1-DaemonClosing.patch
|
||||
Patch4: wicd-1.7.2.4-new-urwid.patch
|
||||
Patch5: wicd-1.7.2.4-translate.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
||||
BuildRequires: babel
|
||||
|
|
@ -102,6 +104,12 @@ Client program for wicd that uses a GTK+ interface.
|
|||
# Work around bug in DaemonClosing() calls
|
||||
%patch3 -p1
|
||||
|
||||
# Support the latest python-urwid
|
||||
%patch4 -p1
|
||||
|
||||
# Backport an upstream patch to fix a traceback calling translate()
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
rm -f po/ast.po
|
||||
%{__python} setup.py configure \
|
||||
|
|
@ -287,6 +295,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
|
||||
|
||||
%changelog
|
||||
* Thu Mar 14 2013 David Cantrell <dcantrell@redhat.com> - 1.7.2.4-2
|
||||
- Work with the latest python-urwid (#894646)
|
||||
- Backport an upstream patch to fix traceback issue with translate() (#894650)
|
||||
|
||||
* Thu Aug 02 2012 David Cantrell <dcantrell@redhat.com> - 1.7.2.4-1
|
||||
- Upgrade to wicd-1.7.2.4
|
||||
- Remove duplicate logrotate file (#820139)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue