mirror of
https://github.com/gryf/wicd.git
synced 2025-12-23 22:52:33 +01:00
Reduce cursor flicker in wicd-curses.
This commit is contained in:
@@ -400,7 +400,6 @@ class WiredComboBox(ComboBox):
|
|||||||
self.rebuild_combobox()
|
self.rebuild_combobox()
|
||||||
self.set_focus(prev_focus)
|
self.set_focus(prev_focus)
|
||||||
else:
|
else:
|
||||||
print "updating..."
|
|
||||||
wired.ReadWiredNetworkProfile(self.get_selected_profile())
|
wired.ReadWiredNetworkProfile(self.get_selected_profile())
|
||||||
if key == 'delete':
|
if key == 'delete':
|
||||||
if len(self.theList) == 1:
|
if len(self.theList) == 1:
|
||||||
@@ -768,6 +767,7 @@ class appGUI():
|
|||||||
self.tcount+=1
|
self.tcount+=1
|
||||||
toAppend=self.twirl[self.tcount % 4]
|
toAppend=self.twirl[self.tcount % 4]
|
||||||
self.status_label.set_text(text+' '+toAppend)
|
self.status_label.set_text(text+' '+toAppend)
|
||||||
|
self.update_ui()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Make sure the screen is still working by providing a pretty counter.
|
# Make sure the screen is still working by providing a pretty counter.
|
||||||
@@ -776,6 +776,7 @@ class appGUI():
|
|||||||
#@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'))
|
||||||
|
self.update_ui()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Yeah, I'm copying code. Anything wrong with that?
|
# Yeah, I'm copying code. Anything wrong with that?
|
||||||
@@ -911,17 +912,16 @@ class appGUI():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
def call_update_ui(self,source,cb_condition):
|
def call_update_ui(self,source,cb_condition):
|
||||||
self.update_ui(from_key=True)
|
self.update_ui(True)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Redraw the screen
|
# Redraw the screen
|
||||||
@wrap_exceptions
|
@wrap_exceptions
|
||||||
def update_ui(self,from_key=True,from_alarm=False):
|
def update_ui(self,from_key=False):
|
||||||
#self.update_status()
|
|
||||||
canvas = self.frame.render( (self.size),True )
|
|
||||||
|
|
||||||
if not ui._started:
|
if not ui._started:
|
||||||
return False
|
return False
|
||||||
|
canvas = self.frame.render( (self.size),True )
|
||||||
|
|
||||||
# Update the screen
|
# Update the screen
|
||||||
ui.draw_screen((self.size),canvas)
|
ui.draw_screen((self.size),canvas)
|
||||||
# Get the input data
|
# Get the input data
|
||||||
@@ -932,24 +932,12 @@ class appGUI():
|
|||||||
# Resolve any "alarms" in the waiting
|
# 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 max_wait == None:
|
if from_key:
|
||||||
max_wait = 25
|
max_wait = 20
|
||||||
else:
|
self.update_tag = gobject.timeout_add(max_wait, \
|
||||||
max_wait *= 100
|
self.update_ui,True)
|
||||||
|
self.handle_keys(keys)
|
||||||
max_wait = int(max_wait)
|
return False
|
||||||
self.update_tag = gobject.timeout_add(max_wait, \
|
|
||||||
self.update_ui,False,True)
|
|
||||||
#print keys
|
|
||||||
#if keys == []:
|
|
||||||
# return True
|
|
||||||
self.handle_keys(keys)
|
|
||||||
|
|
||||||
# If we came from the "alarm", die.
|
|
||||||
if from_alarm:
|
|
||||||
return False
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
def connect(self, nettype, networkid, networkentry=None):
|
def connect(self, nettype, networkid, networkentry=None):
|
||||||
""" Initiates the connection process in the daemon. """
|
""" Initiates the connection process in the daemon. """
|
||||||
|
|||||||
Reference in New Issue
Block a user