mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 21:08:06 +01:00
Remove the flickering from wicd-curses, thanks to Ian Ward for reminding me that it was still happening.
This commit is contained in:
@@ -920,23 +920,18 @@ class appGUI():
|
|||||||
def update_ui(self,from_key=False):
|
def update_ui(self,from_key=False):
|
||||||
if not ui._started:
|
if not ui._started:
|
||||||
return False
|
return False
|
||||||
canvas = self.frame.render( (self.size),True )
|
|
||||||
|
input_data = ui.get_input_nonblocking()
|
||||||
|
# Resolve any "alarms" in the waiting
|
||||||
|
self.handle_keys(input_data[1])
|
||||||
|
|
||||||
# Update the screen
|
# Update the screen
|
||||||
|
canvas = self.frame.render( (self.size),True )
|
||||||
ui.draw_screen((self.size),canvas)
|
ui.draw_screen((self.size),canvas)
|
||||||
# Get the input data
|
# Get the input data
|
||||||
input_data = ui.get_input_nonblocking()
|
|
||||||
max_wait = input_data[0]
|
|
||||||
keys = input_data[1]
|
|
||||||
|
|
||||||
# Resolve any "alarms" in the waiting
|
|
||||||
if self.update_tag != None:
|
if self.update_tag != None:
|
||||||
gobject.source_remove(self.update_tag)
|
gobject.source_remove(self.update_tag)
|
||||||
if from_key:
|
#if from_key:
|
||||||
max_wait = 20
|
|
||||||
self.update_tag = gobject.timeout_add(max_wait, \
|
|
||||||
self.update_ui,True)
|
|
||||||
self.handle_keys(keys)
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def connect(self, nettype, networkid, networkentry=None):
|
def connect(self, nettype, networkid, networkentry=None):
|
||||||
@@ -1015,11 +1010,11 @@ def run():
|
|||||||
# This will make sure that it is updated on the second.
|
# This will make sure that it is updated on the second.
|
||||||
gobject.timeout_add(500,app.update_time)
|
gobject.timeout_add(500,app.update_time)
|
||||||
|
|
||||||
app.update_ui()
|
|
||||||
# Get input file descriptors and add callbacks to the ui-updating function
|
# Get input file descriptors and add callbacks to the ui-updating function
|
||||||
fds = ui.get_input_descriptors()
|
fds = ui.get_input_descriptors()
|
||||||
for fd in fds:
|
for fd in fds:
|
||||||
gobject.io_add_watch(fd, gobject.IO_IN,app.call_update_ui)
|
gobject.io_add_watch(fd, gobject.IO_IN,app.call_update_ui)
|
||||||
|
app.update_ui()
|
||||||
loop.run()
|
loop.run()
|
||||||
|
|
||||||
# Mostly borrowed from gui.py
|
# Mostly borrowed from gui.py
|
||||||
@@ -1028,11 +1023,7 @@ def setup_dbus(force=True):
|
|||||||
try:
|
try:
|
||||||
dbusmanager.connect_to_dbus()
|
dbusmanager.connect_to_dbus()
|
||||||
except DBusException:
|
except DBusException:
|
||||||
# I may need to be a little more verbose here.
|
|
||||||
# Suggestions as to what should go here, please?
|
|
||||||
print >> sys.stderr, language['cannot_connect_to_daemon']
|
print >> sys.stderr, language['cannot_connect_to_daemon']
|
||||||
#raise
|
|
||||||
# return False # <- Will need soon.
|
|
||||||
bus = dbusmanager.get_bus()
|
bus = dbusmanager.get_bus()
|
||||||
dbus_ifaces = dbusmanager.get_dbus_ifaces()
|
dbus_ifaces = dbusmanager.get_dbus_ifaces()
|
||||||
daemon = dbus_ifaces['daemon']
|
daemon = dbus_ifaces['daemon']
|
||||||
|
|||||||
Reference in New Issue
Block a user