3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/wicd/fix-gtk-issues.patch
Sergey Mironov 6901f6346d wicd: [HACK] fix various gtk issues
* hack around s.translate situation
* fix KeyError exception in error dialog
* fix Russian translation
2013-03-31 18:10:28 +00:00

48 lines
1.9 KiB
Diff

diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py
--- wicd-1.7.2.4.orig/gtk/gui.py 2013-03-31 17:01:29.367001288 +0000
+++ wicd-1.7.2.4/gtk/gui.py 2013-03-31 17:55:20.826028396 +0000
@@ -35,7 +35,7 @@
from wicd import misc
from wicd import wpath
from wicd import dbusmanager
-from wicd.misc import noneToString
+from wicd.misc import noneToString, _status_dict
from wicd.translations import _, language
import prefs
from prefs import PreferencesDialog
@@ -250,7 +250,7 @@
def handle_connection_results(self, results):
if results not in ['success', 'aborted'] and self.is_visible:
- error(self.window, language[results], block=False)
+ error(self.window, misc._status_dict[results], block=False)
def create_adhoc_network(self, widget=None):
""" Shows a dialog that creates a new adhoc network. """
diff -ruN wicd-1.7.2.4.orig/po/ru.po wicd-1.7.2.4/po/ru.po
--- wicd-1.7.2.4.orig/po/ru.po 2013-03-31 17:01:29.362001288 +0000
+++ wicd-1.7.2.4/po/ru.po 2013-03-31 17:43:37.909022515 +0000
@@ -173,7 +173,7 @@
#: wicd/misc.py:79
msgid "Connection Failed: Bad password"
-msgstr "Ошибка соединения: Неверный пароль:"
+msgstr "Ошибка соединения: Неверный пароль"
#: wicd/misc.py:89
msgid "Connection Failed: No DHCP offers received."
diff -ruN wicd-1.7.2.4.orig/wicd/misc.py wicd-1.7.2.4/wicd/misc.py
--- wicd-1.7.2.4.orig/wicd/misc.py 2013-03-31 17:01:29.369001288 +0000
+++ wicd-1.7.2.4/wicd/misc.py 2013-03-31 17:23:56.822012593 +0000
@@ -430,7 +430,9 @@
""" 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)
+ #return s.translate(None, table)
+ #return s.translate(table)
+ return s
def sanitize_escaped(s):
""" Sanitize double-escaped unicode strings. """