1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-27 17:02:30 +01:00

Merged wicd-curses changes from r309 of experimental-nacl.

This commit is contained in:
Andrew Psaltis
2009-04-10 22:13:48 -04:00
5 changed files with 17 additions and 15 deletions

View File

@@ -32,8 +32,8 @@ F2 : Rename selected wired network profile (from the wired ComboBox)
O : Raise ad-hoc network dialog
IN DIALOGS (Meta usually is "Alt"):
ESC or Q: Quit dialog without saving information (if present)
Meta+[/]: Change tabs Left/Right (if tabs present)
ESC or Q or q: Quit dialog without saving information (if present)
Meta+[ / Meta+]: Change tabs Left/Right (if tabs present)
Meta+Enter : Quit dialog and save information
FAQ (WIP):

View File

@@ -1,6 +1,5 @@
Things to do (in no particular order):
* Implement a keyhandler function for the overall frame
* Make keystrokes customizable
* Make keystrokes customizable (Probably not going to happen)
* Make color schemes customizable
* Perform a mass code cleanup

View File

@@ -128,6 +128,8 @@ class MaskingEdit(urwid.Edit):
self.mask_char = mask_char
self.__super.__init__(caption,edit_text,multiline,align,wrap,allow_tab,edit_pos,layout)
def get_caption(self):
return self.caption
def get_mask_mode(self):
return self.mask_mode
def set_mask_mode(self,mode):

View File

@@ -133,11 +133,11 @@ class AdvancedSettingsDialog(urwid.WidgetWrap):
not self.global_dns_cb.get_state():
self.set_net_prop('use_static_dns', True)
self.set_net_prop('use_global_dns', False)
self.set_net_prop('dns_domain', noneToString(self.dns_dom_edit.get_text()))
self.set_net_prop("search_domain", noneToString(self.search_dom_edit.get_text()))
self.set_net_prop("dns1", noneToString(self.dns1.get_text()))
self.set_net_prop("dns2", noneToString(self.dns2.get_text()))
self.set_net_prop("dns3", noneToString(self.dns3.get_text()))
self.set_net_prop('dns_domain', noneToString(self.dns_dom_edit.get_edit_text()))
self.set_net_prop("search_domain", noneToString(self.search_dom_edit.get_edit_text()))
self.set_net_prop("dns1", noneToString(self.dns1.get_edit_text()))
self.set_net_prop("dns2", noneToString(self.dns2.get_edit_text()))
self.set_net_prop("dns3", noneToString(self.dns3.get_edit_text()))
elif self.static_dns_cb.get_state() and \
self.global_dns_cb.get_state():
self.set_net_prop('use_static_dns', True)
@@ -208,10 +208,11 @@ class WiredSettingsDialog(AdvancedSettingsDialog):
########################################
class WirelessSettingsDialog(AdvancedSettingsDialog):
def __init__(self,networkID):
def __init__(self,networkID,parent):
global wireless, daemon
AdvancedSettingsDialog.__init__(self)
self.networkid = networkID
self.parent = parent
global_settings_t = language['global_settings']
encryption_t = language['use_encryption']
autoconnect_t = language['automatic_connect']
@@ -307,9 +308,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
for entry_info in encrypt_info.itervalues():
if entry_info[0].get_edit_text() == "" \
and entry_info[1] == 'required':
error(self.ui, self.overlay,"%s (%s)" \
error(self.ui, self.parent,"%s (%s)" \
% (language['encrypt_info_missing'],
entry_info[0].get_captionabel() )
entry_info[0].get_caption()[0:-2] )
)
return False
@@ -319,7 +320,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
elif not self.encryption_chkbox.get_state() and \
wireless.GetWirelessProperty(self.networkid, "encryption"):
# Encrypt checkbox is off, but the network needs it.
error(self.ui, self.overlay, language['enable_encryption'])
error(self.ui, self.parent, language['enable_encryption'])
return False
else:
self.set_net_prop("enctype", "None")

View File

@@ -197,7 +197,7 @@ def about_dialog(body):
# Modeled after htop's help
def help_dialog(body):
textT = urwid.Text(('header','Wicd-curses help'),'right')
textT = urwid.Text(('header','wicd-curses help'),'right')
textSH = urwid.Text(['This is ',('blue','wicd-curses-'+CURSES_REVNO),' using wicd ',unicode(daemon.Hello()),'\n'])
textH = urwid.Text([
@@ -849,7 +849,7 @@ class appGUI():
else:
# wireless list only other option
wid,pos = self.thePile.get_focus().get_focus()
self.diag = WirelessSettingsDialog(pos)
self.diag = WirelessSettingsDialog(pos,self.frame)
self.diag.ready_widgets(ui,self.frame)
self.frame.set_body(self.diag)
# Guess what! I actually need to put this here, else I'll have