mirror of
https://github.com/gryf/wicd.git
synced 2026-01-05 05:14:17 +01:00
Merged mainline. No other changes to this branch; no need to merge
into mainline.
This commit is contained in:
155
CHANGES
155
CHANGES
@@ -1,4 +1,159 @@
|
|||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
revno: 394
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Thu 2009-05-14 09:44:28 -0400
|
||||||
|
message:
|
||||||
|
Merged typo fix from r331 of experimental-nacl.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.40
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Wed 2009-05-13 19:03:29 -0400
|
||||||
|
message:
|
||||||
|
Fixed typo in wicd-curses.py.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 393
|
||||||
|
committer: Adam Blackburn <compwiz18@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Thu 2009-05-14 19:37:20 +0800
|
||||||
|
message:
|
||||||
|
Fix <b>/</b> tags
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 392
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Tue 2009-05-12 00:06:38 -0400
|
||||||
|
message:
|
||||||
|
Merged r330 of experimental-nacl.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.39
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Tue 2009-05-12 00:04:43 -0400
|
||||||
|
message:
|
||||||
|
If the screen in wicd-curses is not up and an ui update is requested, abort the
|
||||||
|
program.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.38
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Mon 2009-05-11 23:52:43 -0400
|
||||||
|
message:
|
||||||
|
Merged with r391 of mainline 1.6.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 391
|
||||||
|
committer: Dan O'Reilly <oreilldf@gmail.com>
|
||||||
|
branch nick: experimental
|
||||||
|
timestamp: Sun 2009-05-10 13:53:54 -0400
|
||||||
|
message:
|
||||||
|
Don't use dbusmanager.DBusException--it doesn't exist.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 390
|
||||||
|
committer: Adam Blackburn <compwiz18@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Sun 2009-05-10 22:51:49 +0800
|
||||||
|
message:
|
||||||
|
Made the GUI look better with dark themes
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 389
|
||||||
|
committer: Adam Blackburn <compwiz18@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Sun 2009-05-10 22:03:52 +0800
|
||||||
|
message:
|
||||||
|
Removed italicized text from the GTK GUI
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 388
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Sun 2009-05-10 09:51:01 -0400
|
||||||
|
message:
|
||||||
|
Merged with r328 of experimental-nacl.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.37
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Sun 2009-05-10 09:40:38 -0400
|
||||||
|
message:
|
||||||
|
Hopefully fixed bug 355693, related to focus positioning.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.36
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Thu 2009-05-07 00:38:18 -0400
|
||||||
|
message:
|
||||||
|
Redid the decorator to look like the other exception-catching decorators in wicd.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.35
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Thu 2009-05-07 00:37:28 -0400
|
||||||
|
message:
|
||||||
|
Remerge with mainline, doing nothing.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.34
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Thu 2009-05-07 00:30:25 -0400
|
||||||
|
message:
|
||||||
|
Added support for manual distro detection in setup.py.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.33
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Wed 2009-05-06 15:33:12 -0400
|
||||||
|
message:
|
||||||
|
Made scans asynchronous so that users can actually access preferences while the daemon is scanning.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.32
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Wed 2009-05-06 15:19:46 -0400
|
||||||
|
message:
|
||||||
|
Merged r385 of mainline 1.6.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 202.2.31
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: experimental-nacl
|
||||||
|
timestamp: Sat 2009-05-02 18:45:36 -0400
|
||||||
|
message:
|
||||||
|
Merged r379 of mainline 1.6.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 387
|
||||||
|
committer: Dan O'Reilly <oreilldf@gmail.com>
|
||||||
|
branch nick: experimental
|
||||||
|
timestamp: Sat 2009-05-09 20:53:49 -0400
|
||||||
|
message:
|
||||||
|
Make bitrates regex work when it's the last entry in a cell.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 386
|
||||||
|
committer: Andrew Psaltis <ampsaltis@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Wed 2009-05-06 18:13:29 -0400
|
||||||
|
message:
|
||||||
|
Fixed missing endquote in wicd-client.py.
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 385
|
||||||
|
committer: Adam Blackburn <compwiz18@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Tue 2009-05-05 12:56:09 +0800
|
||||||
|
message:
|
||||||
|
Updated translations.py
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 384
|
||||||
|
committer: Adam Blackburn <compwiz18@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Tue 2009-05-05 12:55:35 +0800
|
||||||
|
message:
|
||||||
|
Added code to debug why pynotify fails
|
||||||
|
------------------------------------------------------------
|
||||||
|
revno: 383
|
||||||
|
committer: Adam Blackburn <compwiz18@gmail.com>
|
||||||
|
branch nick: 1.6
|
||||||
|
timestamp: Tue 2009-05-05 12:00:22 +0800
|
||||||
|
message:
|
||||||
|
updated CHANGES/NEWS
|
||||||
|
------------------------------------------------------------
|
||||||
revno: 382
|
revno: 382
|
||||||
committer: Adam Blackburn <compwiz18@gmail.com>
|
committer: Adam Blackburn <compwiz18@gmail.com>
|
||||||
branch nick: 1.6
|
branch nick: 1.6
|
||||||
|
|||||||
12
NEWS
12
NEWS
@@ -1,19 +1,19 @@
|
|||||||
Wicd 1.6.x Branch
|
Wicd 1.6.x Branch
|
||||||
|
|
||||||
Major Changes:
|
Major Changes:
|
||||||
- Improved tray icon and gui images (thanks to Martin Sagastume)
|
- Improved tray icon and GUI images (thanks to Martin Sagastume)
|
||||||
- Reorganized network list in the gui for easier navigation
|
- Reorganized network list in the GUI for easier navigation
|
||||||
- New experimental ioctl backend, which is more cpu-friendly than the
|
- New experimental ioctl backend, which is more cpu-friendly than the
|
||||||
previous one
|
previous one
|
||||||
- Added a curses client (thanks to Andrew Psaltis)
|
- Added a curses client (thanks to Andrew Psaltis)
|
||||||
- Added a right-click connection menu to the tray icon
|
- Added a right-click connection menu to the tray icon
|
||||||
- Added options to specify a dns domain and search domain for static networks
|
- Added options to specify a DNS domain and search domain for static networks
|
||||||
- Reworked the Preferences menu to be more in line with GNOME standards
|
- Reworked the Preferences menu to be more in line with GNOME standards
|
||||||
- Added support for global scripts
|
- Added support for global scripts
|
||||||
- Made it possible to have optional entries in encryption templates
|
- Made it possible to have optional entries in encryption templates
|
||||||
- Added ability to show libnotify notifications on status change
|
- Added ability to show libnotify notifications on status change
|
||||||
|
|
||||||
Minor Changes and Other Enchancements:
|
Minor Changes and Other Enhancements:
|
||||||
- Better autoconnection behavior
|
- Better autoconnection behavior
|
||||||
- Tray/GUI will survive the daemon being killed
|
- Tray/GUI will survive the daemon being killed
|
||||||
- Reasons for connection failures will now bubble back to the GUI
|
- Reasons for connection failures will now bubble back to the GUI
|
||||||
@@ -25,11 +25,11 @@ Minor Changes and Other Enchancements:
|
|||||||
- Moved scanning to its own thread, which makes GUI and daemon more responsive
|
- Moved scanning to its own thread, which makes GUI and daemon more responsive
|
||||||
during scans
|
during scans
|
||||||
- Made it possible to specify macros in script entries
|
- Made it possible to specify macros in script entries
|
||||||
- The gui will now display the encryption entry dialog if you attempt to
|
- The GUI will now display the encryption entry dialog if you attempt to
|
||||||
connect to an encrypted network without entering a password
|
connect to an encrypted network without entering a password
|
||||||
- Static gateway entry is now optional
|
- Static gateway entry is now optional
|
||||||
- Passwords with leading or trailing whitespace are now stored properly
|
- Passwords with leading or trailing whitespace are now stored properly
|
||||||
- Many init/config script, man page, and setup.py fixes/updates, including
|
- Many init/config script, man page, and setup.py fixes/updates, including
|
||||||
better autodetection of file placement with regard to sleep hooks and
|
better autodetection of file placement with regard to sleep hooks and
|
||||||
kde autostart files (thanks to Robby Workman)
|
KDE autostart files (thanks to Robby Workman)
|
||||||
|
|
||||||
|
|||||||
@@ -79,17 +79,11 @@ for i in language.keys():
|
|||||||
########################################
|
########################################
|
||||||
##### SUPPORT CLASSES
|
##### SUPPORT CLASSES
|
||||||
########################################
|
########################################
|
||||||
# A hack to get any errors that pop out of the program to appear ***AFTER*** the
|
# Yay for decorators!
|
||||||
# program exits.
|
def wrap_exceptions(func):
|
||||||
# I also may have been a bit overkill about using this too, I guess I'll find
|
def wrapper(*args, **kargs):
|
||||||
# that out soon enough.
|
|
||||||
# I learned about this from this example:
|
|
||||||
# http://blog.lutzky.net/2007/09/16/exception-handling-decorators-and-python/
|
|
||||||
class wrap_exceptions:
|
|
||||||
def __call__(self, f):
|
|
||||||
def wrap_exceptions(*args, **kargs):
|
|
||||||
try:
|
try:
|
||||||
return f(*args, **kargs)
|
return func(*args, **kargs)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
#gobject.source_remove(redraw_tag)
|
#gobject.source_remove(redraw_tag)
|
||||||
loop.quit()
|
loop.quit()
|
||||||
@@ -117,7 +111,11 @@ class wrap_exceptions:
|
|||||||
#sleep(2)
|
#sleep(2)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
return wrap_exceptions
|
wrapper.__name__ = func.__name__
|
||||||
|
wrapper.__module__ = func.__module__
|
||||||
|
wrapper.__dict__ = func.__dict__
|
||||||
|
wrapper.__doc__ = func.__doc__
|
||||||
|
return wrapper
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
##### SUPPORT FUNCTIONS
|
##### SUPPORT FUNCTIONS
|
||||||
@@ -125,7 +123,7 @@ class wrap_exceptions:
|
|||||||
|
|
||||||
# Look familiar? These two functions are clones of functions found in wicd's
|
# Look familiar? These two functions are clones of functions found in wicd's
|
||||||
# gui.py file, except that now set_status is a function passed to them.
|
# gui.py file, except that now set_status is a function passed to them.
|
||||||
@wrap_exceptions()
|
@wrap_exceptions
|
||||||
def check_for_wired(wired_ip,set_status):
|
def check_for_wired(wired_ip,set_status):
|
||||||
""" Determine if wired is active, and if yes, set the status. """
|
""" Determine if wired is active, and if yes, set the status. """
|
||||||
if wired_ip and wired.CheckPluggedIn():
|
if wired_ip and wired.CheckPluggedIn():
|
||||||
@@ -134,7 +132,7 @@ def check_for_wired(wired_ip,set_status):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@wrap_exceptions()
|
@wrap_exceptions
|
||||||
def check_for_wireless(iwconfig, wireless_ip, set_status):
|
def check_for_wireless(iwconfig, wireless_ip, set_status):
|
||||||
""" Determine if wireless is active, and if yes, set the status. """
|
""" Determine if wireless is active, and if yes, set the status. """
|
||||||
if not wireless_ip:
|
if not wireless_ip:
|
||||||
@@ -586,6 +584,7 @@ class appGUI():
|
|||||||
self.connecting = False
|
self.connecting = False
|
||||||
self.screen_locked = False
|
self.screen_locked = False
|
||||||
self.do_diag_lock = False
|
self.do_diag_lock = False
|
||||||
|
self.scanning = False
|
||||||
|
|
||||||
self.pref = None
|
self.pref = None
|
||||||
|
|
||||||
@@ -593,6 +592,11 @@ class appGUI():
|
|||||||
|
|
||||||
#self.dialog = PrefOverlay(self.frame,self.size)
|
#self.dialog = PrefOverlay(self.frame,self.size)
|
||||||
|
|
||||||
|
def doScan(self, sync=False):
|
||||||
|
self.scanning = True
|
||||||
|
wireless.Scan(False)
|
||||||
|
|
||||||
|
|
||||||
def init_other_optcols(self):
|
def init_other_optcols(self):
|
||||||
# The "tabbed" preferences dialog
|
# The "tabbed" preferences dialog
|
||||||
self.prefCols = OptCols( [('meta enter','OK'),
|
self.prefCols = OptCols( [('meta enter','OK'),
|
||||||
@@ -631,7 +635,7 @@ class appGUI():
|
|||||||
# That dialog will sit there for a while if I don't get rid of it
|
# That dialog will sit there for a while if I don't get rid of it
|
||||||
self.update_ui()
|
self.update_ui()
|
||||||
wireless.SetHiddenNetworkESSID(misc.noneToString(hidden))
|
wireless.SetHiddenNetworkESSID(misc.noneToString(hidden))
|
||||||
wireless.Scan(True)
|
wireless.Scan(False)
|
||||||
wireless.SetHiddenNetworkESSID("")
|
wireless.SetHiddenNetworkESSID("")
|
||||||
|
|
||||||
def update_focusloc(self):
|
def update_focusloc(self):
|
||||||
@@ -653,7 +657,7 @@ class appGUI():
|
|||||||
|
|
||||||
# Be clunky until I get to a later stage of development.
|
# Be clunky until I get to a later stage of development.
|
||||||
# Update the list of networks. Usually called by DBus.
|
# Update the list of networks. Usually called by DBus.
|
||||||
@wrap_exceptions()
|
@wrap_exceptions
|
||||||
def update_netlist(self,state=None, x=None, force_check=False,firstrun=False):
|
def update_netlist(self,state=None, x=None, force_check=False,firstrun=False):
|
||||||
# Don't even try to do this if we are running a dialog
|
# Don't even try to do this if we are running a dialog
|
||||||
if self.diag:
|
if self.diag:
|
||||||
@@ -694,7 +698,7 @@ class appGUI():
|
|||||||
if self.focusloc[0] == self.WIRED_IDX:
|
if self.focusloc[0] == self.WIRED_IDX:
|
||||||
self.thePile.get_focus().get_body().set_focus(self.focusloc[1])
|
self.thePile.get_focus().get_body().set_focus(self.focusloc[1])
|
||||||
else:
|
else:
|
||||||
if self.wlessLB is not self.no_wlan:
|
if self.wlessLB != self.no_wlan:
|
||||||
self.thePile.get_focus().set_focus(self.focusloc[1])
|
self.thePile.get_focus().set_focus(self.focusloc[1])
|
||||||
else:
|
else:
|
||||||
self.thePile.set_focus(self.wiredCB)
|
self.thePile.set_focus(self.wiredCB)
|
||||||
@@ -715,7 +719,7 @@ class appGUI():
|
|||||||
|
|
||||||
# Update the footer/status bar
|
# Update the footer/status bar
|
||||||
conn_status = False
|
conn_status = False
|
||||||
@wrap_exceptions()
|
@wrap_exceptions
|
||||||
def update_status(self):
|
def update_status(self):
|
||||||
wired_connecting = wired.CheckIfWiredConnecting()
|
wired_connecting = wired.CheckIfWiredConnecting()
|
||||||
wireless_connecting = wireless.CheckIfWirelessConnecting()
|
wireless_connecting = wireless.CheckIfWirelessConnecting()
|
||||||
@@ -803,26 +807,28 @@ class appGUI():
|
|||||||
# Make sure the screen is still working by providing a pretty counter.
|
# Make sure the screen is still working by providing a pretty counter.
|
||||||
# Not necessary in the end, but I will be using footer1 for stuff in
|
# Not necessary in the end, but I will be using footer1 for stuff in
|
||||||
# the long run, so I might as well put something there.
|
# the long run, so I might as well put something there.
|
||||||
#@wrap_exceptions()
|
#@wrap_exceptions
|
||||||
def update_time(self):
|
def update_time(self):
|
||||||
self.time_label.set_text(strftime('%H:%M:%S'))
|
self.time_label.set_text(strftime('%H:%M:%S'))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Yeah, I'm copying code. Anything wrong with that?
|
# Yeah, I'm copying code. Anything wrong with that?
|
||||||
#@wrap_exceptions()
|
#@wrap_exceptions
|
||||||
def dbus_scan_finished(self):
|
def dbus_scan_finished(self):
|
||||||
# I'm pretty sure that I'll need this later.
|
# I'm pretty sure that I'll need this later.
|
||||||
#if not self.connecting:
|
#if not self.connecting:
|
||||||
# gobject.idle_add(self.refresh_networks, None, False, None)
|
# gobject.idle_add(self.refresh_networks, None, False, None)
|
||||||
self.unlock_screen()
|
self.unlock_screen()
|
||||||
|
self.scanning = False
|
||||||
|
|
||||||
# Same, same, same, same, same, same
|
# Same, same, same, same, same, same
|
||||||
#@wrap_exceptions()
|
#@wrap_exceptions
|
||||||
def dbus_scan_started(self):
|
def dbus_scan_started(self):
|
||||||
|
self.scanning = True
|
||||||
self.lock_screen()
|
self.lock_screen()
|
||||||
|
|
||||||
def restore_primary(self):
|
def restore_primary(self):
|
||||||
if self.do_diag_lock:
|
if self.do_diag_lock or self.scanning:
|
||||||
self.frame.set_body(self.screen_locker)
|
self.frame.set_body(self.screen_locker)
|
||||||
self.do_diag_lock = False
|
self.do_diag_lock = False
|
||||||
else:
|
else:
|
||||||
@@ -839,23 +845,24 @@ class appGUI():
|
|||||||
#return False
|
#return False
|
||||||
if "f5" in keys or 'R' in keys:
|
if "f5" in keys or 'R' in keys:
|
||||||
self.lock_screen()
|
self.lock_screen()
|
||||||
wireless.Scan(True)
|
self.doScan()
|
||||||
if "D" in keys:
|
if "D" in keys:
|
||||||
# Disconnect from all networks.
|
# Disconnect from all networks.
|
||||||
daemon.Disconnect()
|
daemon.Disconnect()
|
||||||
self.update_netlist()
|
self.update_netlist()
|
||||||
if 'right' in keys:
|
if 'right' in keys:
|
||||||
focus = self.thePile.get_focus()
|
if not self.scanning:
|
||||||
self.frame.set_footer(urwid.Pile([self.confCols,self.footer2]))
|
focus = self.thePile.get_focus()
|
||||||
if focus == self.wiredCB:
|
self.frame.set_footer(urwid.Pile([self.confCols,self.footer2]))
|
||||||
self.diag = WiredSettingsDialog(self.wiredCB.get_body().get_selected_profile())
|
if focus == self.wiredCB:
|
||||||
self.frame.set_body(self.diag)
|
self.diag = WiredSettingsDialog(self.wiredCB.get_body().get_selected_profile())
|
||||||
else:
|
self.frame.set_body(self.diag)
|
||||||
# wireless list only other option
|
else:
|
||||||
wid,pos = self.thePile.get_focus().get_focus()
|
# wireless list only other option
|
||||||
self.diag = WirelessSettingsDialog(pos,self.frame)
|
wid,pos = self.thePile.get_focus().get_focus()
|
||||||
self.diag.ready_widgets(ui,self.frame)
|
self.diag = WirelessSettingsDialog(pos,self.frame)
|
||||||
self.frame.set_body(self.diag)
|
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
|
# Guess what! I actually need to put this here, else I'll have
|
||||||
# tons of references to self.frame lying around. ^_^
|
# tons of references to self.frame lying around. ^_^
|
||||||
if "enter" in keys:
|
if "enter" in keys:
|
||||||
@@ -945,7 +952,7 @@ class appGUI():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Redraw the screen
|
# Redraw the screen
|
||||||
@wrap_exceptions()
|
@wrap_exceptions
|
||||||
def update_ui(self):
|
def update_ui(self):
|
||||||
#self.update_status()
|
#self.update_status()
|
||||||
canvas = self.frame.render( (self.size),True )
|
canvas = self.frame.render( (self.size),True )
|
||||||
@@ -955,6 +962,10 @@ class appGUI():
|
|||||||
# the input. I'll try to get that working at a later time, if people
|
# the input. I'll try to get that working at a later time, if people
|
||||||
# want that "feature".
|
# want that "feature".
|
||||||
#canvaso = urwid.CanvasOverlay(self.dialog.render( (80,20),True),canvas,0,1)
|
#canvaso = urwid.CanvasOverlay(self.dialog.render( (80,20),True),canvas,0,1)
|
||||||
|
# If the screen is turned off for some reason, don't even try to do the
|
||||||
|
# rest of the stuff.
|
||||||
|
if not ui._started:
|
||||||
|
return False
|
||||||
ui.draw_screen((self.size),canvas)
|
ui.draw_screen((self.size),canvas)
|
||||||
keys = ui.get_input()
|
keys = ui.get_input()
|
||||||
self.handle_keys(keys)
|
self.handle_keys(keys)
|
||||||
@@ -988,7 +999,7 @@ def main():
|
|||||||
if options.screen == 'raw':
|
if options.screen == 'raw':
|
||||||
import urwid.raw_display
|
import urwid.raw_display
|
||||||
ui = urwid.raw_display.Screen()
|
ui = urwid.raw_display.Screen()
|
||||||
elif options.screen is 'curses':
|
elif options.screen == 'curses':
|
||||||
import urwid.curses_display
|
import urwid.curses_display
|
||||||
ui = urwid.curses_display.Screen()
|
ui = urwid.curses_display.Screen()
|
||||||
|
|
||||||
|
|||||||
95
setup.py
95
setup.py
@@ -2,6 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2007 - 2009 Adam Blackburn
|
# Copyright (C) 2007 - 2009 Adam Blackburn
|
||||||
# Copyright (C) 2007 - 2009 Dan O'Reilly
|
# Copyright (C) 2007 - 2009 Dan O'Reilly
|
||||||
|
# Copyright (C) 2009 Andrew Psaltis
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License Version 2 as
|
# it under the terms of the GNU General Public License Version 2 as
|
||||||
@@ -24,7 +25,7 @@ import subprocess
|
|||||||
|
|
||||||
# Be sure to keep this updated!
|
# Be sure to keep this updated!
|
||||||
# VERSIONNUMBER
|
# VERSIONNUMBER
|
||||||
VERSION_NUM = '1.6.0a3'
|
VERSION_NUM = '1.6.0b1'
|
||||||
# REVISION_NUM is automatically updated
|
# REVISION_NUM is automatically updated
|
||||||
REVISION_NUM = 'unknown'
|
REVISION_NUM = 'unknown'
|
||||||
CURSES_REVNO = 'uimod'
|
CURSES_REVNO = 'uimod'
|
||||||
@@ -84,6 +85,7 @@ class configure(Command):
|
|||||||
('initfile=', None, 'set the init file to use'),
|
('initfile=', None, 'set the init file to use'),
|
||||||
('initfilename=', None, "set the name of the init file (don't use)"),
|
('initfilename=', None, "set the name of the init file (don't use)"),
|
||||||
('wicdgroup=', None, "set the name of the group used for wicd"),
|
('wicdgroup=', None, "set the name of the group used for wicd"),
|
||||||
|
('distro=', None, 'set the distribution for which wicd will be installed'),
|
||||||
|
|
||||||
# Configure switches
|
# Configure switches
|
||||||
('no-install-init', None, "do not install the init file"),
|
('no-install-init', None, "do not install the init file"),
|
||||||
@@ -120,6 +122,7 @@ class configure(Command):
|
|||||||
self.docdir = '/usr/share/doc/wicd/'
|
self.docdir = '/usr/share/doc/wicd/'
|
||||||
self.mandir = '/usr/share/man/'
|
self.mandir = '/usr/share/man/'
|
||||||
self.kdedir = '/usr/share/autostart/'
|
self.kdedir = '/usr/share/autostart/'
|
||||||
|
self.distro = 'auto'
|
||||||
|
|
||||||
self.no_install_init = False
|
self.no_install_init = False
|
||||||
self.no_install_man = False
|
self.no_install_man = False
|
||||||
@@ -131,49 +134,38 @@ class configure(Command):
|
|||||||
self.no_use_notifications = False
|
self.no_use_notifications = False
|
||||||
|
|
||||||
# Determine the default init file location on several different distros
|
# Determine the default init file location on several different distros
|
||||||
|
|
||||||
self.distro_detect_failed = False
|
self.distro_detect_failed = False
|
||||||
|
|
||||||
self.initfile = 'init/default/wicd'
|
self.initfile = 'init/default/wicd'
|
||||||
|
# ddistro is the detected distro
|
||||||
if os.path.exists('/etc/redhat-release'):
|
if os.path.exists('/etc/redhat-release'):
|
||||||
self.init = '/etc/rc.d/init.d/'
|
self.ddistro = 'redhat'
|
||||||
self.initfile = 'init/redhat/wicd'
|
|
||||||
elif os.path.exists('/etc/SuSE-release'):
|
elif os.path.exists('/etc/SuSE-release'):
|
||||||
self.init = '/etc/init.d/'
|
self.ddistro = 'suse'
|
||||||
self.initfile = 'init/suse/wicd'
|
|
||||||
elif os.path.exists('/etc/fedora-release'):
|
elif os.path.exists('/etc/fedora-release'):
|
||||||
self.init = '/etc/rc.d/init.d/'
|
self.ddistro = 'redhat'
|
||||||
self.initfile = 'init/redhat/wicd'
|
|
||||||
elif os.path.exists('/etc/gentoo-release'):
|
elif os.path.exists('/etc/gentoo-release'):
|
||||||
self.init = '/etc/init.d/'
|
self.ddistro = 'gentoo'
|
||||||
self.initfile = 'init/gentoo/wicd'
|
|
||||||
elif os.path.exists('/etc/debian_version'):
|
elif os.path.exists('/etc/debian_version'):
|
||||||
self.init = '/etc/init.d/'
|
self.ddistro = 'debian'
|
||||||
self.initfile = 'init/debian/wicd'
|
|
||||||
elif os.path.exists('/etc/arch-release'):
|
elif os.path.exists('/etc/arch-release'):
|
||||||
self.init = '/etc/rc.d/'
|
self.ddistro = 'arch'
|
||||||
self.initfile = 'init/arch/wicd'
|
|
||||||
elif os.path.exists('/etc/slackware-version') or \
|
elif os.path.exists('/etc/slackware-version') or \
|
||||||
os.path.exists('/etc/slamd64-version'):
|
os.path.exists('/etc/slamd64-version') or \
|
||||||
self.init = '/etc/rc.d/'
|
os.path.exists('/etc/bluewhite64-version'):
|
||||||
self.initfile = 'init/slackware/rc.wicd'
|
self.ddistro = 'slackware'
|
||||||
self.docdir = '/usr/doc/wicd-%s' % VERSION_NUM
|
|
||||||
self.mandir = '/usr/man/'
|
|
||||||
self.no_install_acpi = True
|
|
||||||
elif os.path.exists('/etc/pld-release'):
|
elif os.path.exists('/etc/pld-release'):
|
||||||
self.init = '/etc/rc.d/init.d/'
|
self.ddistro = 'pld'
|
||||||
self.initfile = 'init/pld/wicd'
|
|
||||||
elif os.path.exists('/usr/bin/crux'):
|
elif os.path.exists('/usr/bin/crux'):
|
||||||
self.init = '/etc/rc.d/'
|
self.ddistro = 'crux'
|
||||||
elif os.path.exists('/etc/lunar.release'):
|
elif os.path.exists('/etc/lunar.release'):
|
||||||
self.init='/etc/init.d/'
|
self.distro = 'lunar'
|
||||||
self.initfile = 'init/lunar/wicd'
|
|
||||||
else:
|
else:
|
||||||
self.init = 'FAIL'
|
self.ddistro = 'FAIL'
|
||||||
self.no_install_init = True
|
#self.no_install_init = True
|
||||||
self.distro_detect_failed = True
|
#self.distro_detect_failed = True
|
||||||
print 'WARNING: Unable to detect the distribution in use. ' + \
|
print 'WARNING: Unable to detect the distribution in use. ' + \
|
||||||
'If you have specified --init and --initfile, configure will continue. ' + \
|
'If you have specified --distro or --init and --initfile, configure will continue. ' + \
|
||||||
'Please report this warning, along with the name of your ' + \
|
'Please report this warning, along with the name of your ' + \
|
||||||
'distribution, to the wicd developers.'
|
'distribution, to the wicd developers.'
|
||||||
|
|
||||||
@@ -229,7 +221,52 @@ class configure(Command):
|
|||||||
self.initfilename = os.path.basename(self.initfile)
|
self.initfilename = os.path.basename(self.initfile)
|
||||||
self.wicdgroup = 'users'
|
self.wicdgroup = 'users'
|
||||||
|
|
||||||
|
def distro_check(self):
|
||||||
|
print "Distro is: "+self.distro
|
||||||
|
if self.distro in ['sles','suse']:
|
||||||
|
self.init = '/etc/init.d/'
|
||||||
|
self.initfile = 'init/suse/wicd'
|
||||||
|
elif self.distro in ['redhat','centos','fedora']:
|
||||||
|
self.init = '/etc/rc.d/init.d/'
|
||||||
|
self.initfile = 'init/redhat/wicd'
|
||||||
|
elif self.distro in ['slackware','slamd64','bluewhite64']:
|
||||||
|
self.init = '/etc/rc.d/'
|
||||||
|
self.initfile = 'init/slackware/rc.wicd'
|
||||||
|
self.docdir = '/usr/doc/wicd-%s' % VERSION_NUM
|
||||||
|
self.mandir = '/usr/man/'
|
||||||
|
self.no_install_acpi = True
|
||||||
|
elif self.distro in ['debian']:
|
||||||
|
self.init = '/etc/init.d/'
|
||||||
|
self.initfile = 'init/debian/wicd'
|
||||||
|
elif self.distro in ['arch']:
|
||||||
|
self.init = '/etc/rc.d/'
|
||||||
|
self.initfile = 'init/arch/wicd'
|
||||||
|
elif self.distro in ['gentoo']:
|
||||||
|
self.init = '/etc/init.d/'
|
||||||
|
self.initfile = 'init/gentoo/wicd'
|
||||||
|
elif self.distro in ['pld']:
|
||||||
|
self.init = '/etc/rc.d/init.d/'
|
||||||
|
self.initfile = 'init/pld/wicd'
|
||||||
|
elif self.distro in ['crux']:
|
||||||
|
self.init = '/etc/rc.d/'
|
||||||
|
elif self.distro in ['lunar']:
|
||||||
|
self.init='/etc/init.d/'
|
||||||
|
self.initfile = 'init/lunar/wicd'
|
||||||
|
else :
|
||||||
|
if self.distro == 'auto':
|
||||||
|
print "NOTICE: Automatic distro detection found: "+self.ddistro+", retrying with that..."
|
||||||
|
self.distro = self.ddistro
|
||||||
|
self.distro_check()
|
||||||
|
else:
|
||||||
|
print "WARNING: Distro detection failed!"
|
||||||
|
self.init='init/default/wicd'
|
||||||
|
self.no_install_init = True
|
||||||
|
self.distro_detect_failed = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def finalize_options(self):
|
def finalize_options(self):
|
||||||
|
self.distro_check()
|
||||||
if self.distro_detect_failed and not self.no_install_init and \
|
if self.distro_detect_failed and not self.no_install_init and \
|
||||||
'FAIL' in [self.init, self.initfile]:
|
'FAIL' in [self.init, self.initfile]:
|
||||||
print 'ERROR: Failed to detect distro. Configure cannot continue. ' + \
|
print 'ERROR: Failed to detect distro. Configure cannot continue. ' + \
|
||||||
|
|||||||
@@ -146,5 +146,5 @@ class GreyLabel(gtk.Label):
|
|||||||
gtk.Label.__init__(self)
|
gtk.Label.__init__(self)
|
||||||
|
|
||||||
def set_label(self, text):
|
def set_label(self, text):
|
||||||
self.set_markup("<span color=\"#666666\"><i>" + text + "</i></span>")
|
self.set_markup(text)
|
||||||
self.set_alignment(0, 0)
|
self.set_alignment(0, 0)
|
||||||
|
|||||||
@@ -555,7 +555,8 @@ class WiredNetworkEntry(NetworkEntry):
|
|||||||
self.image.show()
|
self.image.show()
|
||||||
self.connect_button.show()
|
self.connect_button.show()
|
||||||
|
|
||||||
self.name_label.set_label(language['wired_network'])
|
self.name_label.set_use_markup(True)
|
||||||
|
self.name_label.set_label("<b>" + language['wired_network'] + "</b>")
|
||||||
|
|
||||||
self.is_full_gui = True
|
self.is_full_gui = True
|
||||||
|
|
||||||
@@ -756,7 +757,7 @@ class WirelessNetworkEntry(NetworkEntry):
|
|||||||
'encryption_method'))
|
'encryption_method'))
|
||||||
self.set_channel(wireless.GetWirelessProperty(networkID, 'channel'))
|
self.set_channel(wireless.GetWirelessProperty(networkID, 'channel'))
|
||||||
self.name_label.set_use_markup(True)
|
self.name_label.set_use_markup(True)
|
||||||
self.name_label.set_label("%s %s %s %s" % (self._escape(self.essid),
|
self.name_label.set_label("<b>%s</b> %s %s %s" % (self._escape(self.essid),
|
||||||
self.lbl_strength.get_label(),
|
self.lbl_strength.get_label(),
|
||||||
self.lbl_encryption.get_label(),
|
self.lbl_encryption.get_label(),
|
||||||
self.lbl_channel.get_label(),
|
self.lbl_channel.get_label(),
|
||||||
|
|||||||
@@ -753,7 +753,7 @@ def on_exit():
|
|||||||
if DBUS_AVAIL:
|
if DBUS_AVAIL:
|
||||||
try:
|
try:
|
||||||
daemon.SetGUIOpen(False)
|
daemon.SetGUIOpen(False)
|
||||||
except dbusmanager.DBusException:
|
except DBusException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def handle_no_dbus():
|
def handle_no_dbus():
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ channel_pattern = re.compile('.*Channel:? ?(\d\d?)', _re_mode)
|
|||||||
strength_pattern = re.compile('.*Quality:?=? ?(\d+)\s*/?\s*(\d*)', _re_mode)
|
strength_pattern = re.compile('.*Quality:?=? ?(\d+)\s*/?\s*(\d*)', _re_mode)
|
||||||
altstrength_pattern = re.compile('.*Signal level:?=? ?(\d+)\s*/?\s*(\d*)', _re_mode)
|
altstrength_pattern = re.compile('.*Signal level:?=? ?(\d+)\s*/?\s*(\d*)', _re_mode)
|
||||||
signaldbm_pattern = re.compile('.*Signal level:?=? ?(-\d\d*)', _re_mode)
|
signaldbm_pattern = re.compile('.*Signal level:?=? ?(-\d\d*)', _re_mode)
|
||||||
bitrates_pattern = re.compile('.*Bit Rates:(.*?)E', _re_mode)
|
bitrates_pattern = re.compile('(\d+\s+\S+/s)', _re_mode)
|
||||||
mode_pattern = re.compile('.*Mode:(.*?)\n', _re_mode)
|
mode_pattern = re.compile('.*Mode:(.*?)\n', _re_mode)
|
||||||
freq_pattern = re.compile('.*Frequency:(.*?)\n', _re_mode)
|
freq_pattern = re.compile('.*Frequency:(.*?)\n', _re_mode)
|
||||||
wep_pattern = re.compile('.*Encryption key:(.*?)\n', _re_mode)
|
wep_pattern = re.compile('.*Encryption key:(.*?)\n', _re_mode)
|
||||||
@@ -1114,9 +1114,9 @@ class BaseWirelessInterface(BaseInterface):
|
|||||||
ap['channel'] = self._FreqToChannel(freq)
|
ap['channel'] = self._FreqToChannel(freq)
|
||||||
|
|
||||||
# Bit Rate
|
# Bit Rate
|
||||||
ap['bitrates'] = misc.RunRegex(bitrates_pattern, cell).split('\n')
|
ap['bitrates'] = misc.RunRegex(bitrates_pattern,
|
||||||
ap['bitrates'] = '; '.join(m.strip() for m in ap['bitrates']).rstrip('; ')
|
cell.split("Bit Rates")[-1])
|
||||||
|
|
||||||
# BSSID
|
# BSSID
|
||||||
ap['bssid'] = misc.RunRegex(ap_mac_pattern, cell)
|
ap['bssid'] = misc.RunRegex(ap_mac_pattern, cell)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user