mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Generic updates and a bugfix.
curses/README,curses/TODO: Cleaned up and updated respectively curses/curses_misc.py: added a get_caption() method to MaskingEdit curses/netentry_curses.py: Actually made the error dialogs work instead of crashing the program. curses/wicd-curses.py: Changed some capitalization in the help.
This commit is contained in:
@@ -32,8 +32,8 @@ F2 : Rename selected wired network profile (from the wired ComboBox)
|
|||||||
O : Raise ad-hoc network dialog
|
O : Raise ad-hoc network dialog
|
||||||
|
|
||||||
IN DIALOGS (Meta usually is "Alt"):
|
IN DIALOGS (Meta usually is "Alt"):
|
||||||
ESC or Q: Quit dialog without saving information (if present)
|
ESC or Q or q: Quit dialog without saving information (if present)
|
||||||
Meta+[/]: Change tabs Left/Right (if tabs present)
|
Meta+[ / Meta+]: Change tabs Left/Right (if tabs present)
|
||||||
Meta+Enter : Quit dialog and save information
|
Meta+Enter : Quit dialog and save information
|
||||||
|
|
||||||
FAQ (WIP):
|
FAQ (WIP):
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
Things to do (in no particular order):
|
Things to do (in no particular order):
|
||||||
|
|
||||||
* Implement a keyhandler function for the overall frame
|
* Make keystrokes customizable (Probably not going to happen)
|
||||||
* Make keystrokes customizable
|
|
||||||
* Make color schemes customizable
|
* Make color schemes customizable
|
||||||
* Perform a mass code cleanup
|
* Perform a mass code cleanup
|
||||||
|
|||||||
@@ -128,6 +128,8 @@ class MaskingEdit(urwid.Edit):
|
|||||||
self.mask_char = mask_char
|
self.mask_char = mask_char
|
||||||
self.__super.__init__(caption,edit_text,multiline,align,wrap,allow_tab,edit_pos,layout)
|
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):
|
def get_mask_mode(self):
|
||||||
return self.mask_mode
|
return self.mask_mode
|
||||||
def set_mask_mode(self,mode):
|
def set_mask_mode(self,mode):
|
||||||
|
|||||||
@@ -208,10 +208,11 @@ class WiredSettingsDialog(AdvancedSettingsDialog):
|
|||||||
########################################
|
########################################
|
||||||
|
|
||||||
class WirelessSettingsDialog(AdvancedSettingsDialog):
|
class WirelessSettingsDialog(AdvancedSettingsDialog):
|
||||||
def __init__(self,networkID):
|
def __init__(self,networkID,parent):
|
||||||
global wireless, daemon
|
global wireless, daemon
|
||||||
AdvancedSettingsDialog.__init__(self)
|
AdvancedSettingsDialog.__init__(self)
|
||||||
self.networkid = networkID
|
self.networkid = networkID
|
||||||
|
self.parent = parent
|
||||||
global_settings_t = language['global_settings']
|
global_settings_t = language['global_settings']
|
||||||
encryption_t = language['use_encryption']
|
encryption_t = language['use_encryption']
|
||||||
autoconnect_t = language['automatic_connect']
|
autoconnect_t = language['automatic_connect']
|
||||||
@@ -307,9 +308,9 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
|||||||
for entry_info in encrypt_info.itervalues():
|
for entry_info in encrypt_info.itervalues():
|
||||||
if entry_info[0].get_edit_text() == "" \
|
if entry_info[0].get_edit_text() == "" \
|
||||||
and entry_info[1] == 'required':
|
and entry_info[1] == 'required':
|
||||||
error(self.ui, self.overlay,"%s (%s)" \
|
error(self.ui, self.parent,"%s (%s)" \
|
||||||
% (language['encrypt_info_missing'],
|
% (language['encrypt_info_missing'],
|
||||||
entry_info[0].get_captionabel() )
|
entry_info[0].get_caption()[0:-2] )
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -319,7 +320,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
|||||||
elif not self.encryption_chkbox.get_state() and \
|
elif not self.encryption_chkbox.get_state() and \
|
||||||
wireless.GetWirelessProperty(self.networkid, "encryption"):
|
wireless.GetWirelessProperty(self.networkid, "encryption"):
|
||||||
# Encrypt checkbox is off, but the network needs it.
|
# 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
|
return False
|
||||||
else:
|
else:
|
||||||
self.set_net_prop("enctype", "None")
|
self.set_net_prop("enctype", "None")
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ def about_dialog(body):
|
|||||||
|
|
||||||
# Modeled after htop's help
|
# Modeled after htop's help
|
||||||
def help_dialog(body):
|
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'])
|
textSH = urwid.Text(['This is ',('blue','wicd-curses-'+CURSES_REVNO),' using wicd ',unicode(daemon.Hello()),'\n'])
|
||||||
|
|
||||||
textH = urwid.Text([
|
textH = urwid.Text([
|
||||||
@@ -849,7 +849,7 @@ class appGUI():
|
|||||||
else:
|
else:
|
||||||
# wireless list only other option
|
# wireless list only other option
|
||||||
wid,pos = self.thePile.get_focus().get_focus()
|
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.diag.ready_widgets(ui,self.frame)
|
||||||
self.frame.set_body(self.diag)
|
self.frame.set_body(self.diag)
|
||||||
# Guess what! I actually need to put this here, else I'll have
|
# Guess what! I actually need to put this here, else I'll have
|
||||||
|
|||||||
Reference in New Issue
Block a user