mirror of
https://github.com/gryf/wicd.git
synced 2025-12-22 05:48:03 +01:00
Checkpoint in getting the Preferences dialog functional. There's still some tweaking left to do.
curses/curses_misc.py: Changed the internal layout of the widgets to allow me to stick buttons on the bottom. curses/prefs_curses.py: Added rudimentary Dbus support to the dialog. Started getting the config settings to save to wicd. Added buttons (which don't do anything yet). The PrefOverlay has been renamed to PrefsDialog. The PrefsDialog widget is wrapped around a TabColumns widget. Added a main entry point into the file to allow for somewhat easier testing. It can now be called indepentently of wicd-curses, if needed. curses/wicd-curses.py: Undid a change that caused the ESC key to disconnect from the current network, in addition to its current function.
This commit is contained in:
@@ -42,8 +42,8 @@ import urwid.curses_display
|
||||
import urwid
|
||||
|
||||
# DBus communication stuff
|
||||
import dbus
|
||||
import dbus.service
|
||||
from dbus import DBusException
|
||||
from dbus import version as dbus_version
|
||||
# It took me a while to figure out that I have to use this.
|
||||
import gobject
|
||||
|
||||
@@ -58,13 +58,7 @@ from time import sleep
|
||||
# Curses UIs for other stuff
|
||||
from curses_misc import SelText,ComboText
|
||||
import prefs_curses
|
||||
from prefs_curses import PrefOverlay
|
||||
|
||||
if getattr(dbus, 'version', (0, 0, 0)) < (0, 80, 0):
|
||||
import dbus.glib
|
||||
else:
|
||||
from dbus.mainloop.glib import DBusGMainLoop
|
||||
DBusGMainLoop(set_as_default=True)
|
||||
from prefs_curses import PrefsDialog
|
||||
|
||||
language = misc.get_language_list_gui()
|
||||
# Whew. Now on to more interesting stuff:
|
||||
@@ -430,12 +424,15 @@ class appGUI():
|
||||
self.update_netlist()
|
||||
if "esc" in keys:
|
||||
# Force disconnect here if connection in progress
|
||||
daemon.CancelConnect()
|
||||
# Prevents automatic reconnecting if that option is enabled
|
||||
daemon.SetForcedDisconnect(True)
|
||||
if self.connecting:
|
||||
daemon.CancelConnect()
|
||||
# Prevents automatic reconnecting if that option is enabled
|
||||
daemon.SetForcedDisconnect(True)
|
||||
if "P" in keys:
|
||||
dialog = PrefOverlay(self.frame,(0,1),ui)
|
||||
dialog = PrefsDialog(self.frame,(0,1),ui,
|
||||
dbusmanager.get_dbus_ifaces())
|
||||
dialog.run(ui,self.size,self.frame)
|
||||
dialog.store_results()
|
||||
for k in keys:
|
||||
if k == "window resize":
|
||||
self.size = ui.get_cols_rows()
|
||||
|
||||
Reference in New Issue
Block a user