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

curses/prefs_curses.py:

Removed the external entry point
  Removed the removing of a blank string that caused
wicd/misc.py:
  Made sure that "advanced_settings" in get_language_list_gui() actually is
    "Advanced Settings"
This commit is contained in:
Andrew Psaltis
2009-02-04 17:28:43 -05:00
parent bb3be43a3e
commit 96f55c0d3b
4 changed files with 3 additions and 55 deletions

View File

@@ -49,7 +49,7 @@ Why didn't you call it wicd-urwid? There is a hachoir-urwid package out there.
Why don't you support lower-case keybindings for most of the commands? Why don't you support lower-case keybindings for most of the commands?
I was trying to prevent mass chaos from happening because of mashing keys. I was trying to prevent mass chaos from happening because of mashing keys.
Of course, if you unwittingly have caps-lock on, that's going to cause said Of course, if you unwittingly have caps-lock on, that's going to cause mass
chaos, too, so you might want to check that (or ask me about changing the chaos, too, so you might want to check that (or ask me about changing the
keymaps to ctrl/meta+KEY) keymaps to ctrl/meta+KEY)

View File

@@ -323,8 +323,6 @@ class PrefsDialog(urwid.WidgetWrap):
pass # It defaults to 0 anyway pass # It defaults to 0 anyway
self.backends = daemon.GetBackendList() self.backends = daemon.GetBackendList()
# Remove the blank string b/c of some dbus mess
self.backends.remove('')
self.thebackends= [unicode(w) for w in self.backends] self.thebackends= [unicode(w) for w in self.backends]
self.backend_cbox.set_list(self.thebackends) self.backend_cbox.set_list(self.thebackends)
cur_backend = daemon.GetSavedBackend() cur_backend = daemon.GetSavedBackend()
@@ -438,53 +436,3 @@ class PrefsDialog(urwid.WidgetWrap):
return False return False
if self.OK_PRESSED or 'meta enter' in keys: if self.OK_PRESSED or 'meta enter' in keys:
return True return True
###
### EXTERNAL ENTRY POINT STUFF
###
def run_it():
dialog = PrefsDialog(None,(0,0),ui,dbusmanager.get_dbus_ifaces())
keys = True
dim = ui.get_cols_rows()
dialog.load_settings()
dialog.ready_comboboxes(ui,dialog)
while True:
if keys:
ui.draw_screen(dim, dialog.render(dim, True))
keys = ui.get_input()
if "window resize" in keys:
dim = ui.get_cols_rows()
if "esc" in keys or 'Q' in keys:
return False
for k in keys:
dialog.keypress(dim, k)
if dialog.CANCEL_PRESSED:
return False
if dialog.OK_PRESSED:
dialog.save_results()
return True
if __name__=='__main__':
try:
dbusmanager.connect_to_dbus()
except DBusException:
# I may need to be a little more verbose here.
# Suggestions as to what should go here
print "Can't connect to the daemon. Are you sure it is running?"
print "Please check the wicd log for error messages."
raise
ui = urwid.curses_display.Screen()
ui.register_palette([
('body','light gray','default'),
('focus','dark magenta','light gray'),
('header','light blue','default'),
('important','light red','default'),
('connected','dark green','default'),
('connected focus','default','dark green'),
('editcp', 'default', 'default', 'standout'),
('editbx', 'light gray', 'dark blue'),
('editfc', 'white','dark blue', 'bold'),
('tab active','dark green','light gray')])
ui.run_wrapper(run_it)

View File

@@ -27,7 +27,7 @@ import subprocess
# VERSIONNUMBER # VERSIONNUMBER
VERSION_NUM = '1.6.0' VERSION_NUM = '1.6.0'
REVISION_NUM = 'unknown' REVISION_NUM = 'unknown'
CURSES_REVNO = 'r269' CURSES_REVNO = 'r270'
try: try:
if not os.path.exists('vcsinfo.py'): if not os.path.exists('vcsinfo.py'):

View File

@@ -454,7 +454,7 @@ def get_language_list_gui():
language['use_static_ip'] = _('Use Static IPs') language['use_static_ip'] = _('Use Static IPs')
language['use_static_dns'] = _('Use Static DNS') language['use_static_dns'] = _('Use Static DNS')
language['use_encryption'] = _('Use Encryption') language['use_encryption'] = _('Use Encryption')
language['advanced_settings'] = _('Properties') language['advanced_settings'] = _('Advanced Settings')
language['wired_network'] = _('Wired Network') language['wired_network'] = _('Wired Network')
language['wired_network_instructions'] = _('To connect to a wired network,' language['wired_network_instructions'] = _('To connect to a wired network,'
' you must create a network profile. To create a network profile, type a' ' you must create a network profile. To create a network profile, type a'