update gui tweaks - micah

This commit is contained in:
Marcos Pinto 2007-07-20 07:42:35 +00:00
parent e80da672f0
commit 09334d8892
1 changed files with 101 additions and 87 deletions

View File

@ -117,6 +117,10 @@ class DelugeGTK:
self.apply_prefs()
self.load_window_geometry()
# Boolean used in update method to help check whether gui
# should be updated and is set by the window_state_event method
self.is_minimized = False
def connect_signals(self):
self.wtree.signal_autoconnect({
## File Menu
@ -820,6 +824,11 @@ class DelugeGTK:
#Update any active plugins
self.plugins.update_active_plugins()
# only update gui if it's needed
if self.window.get_property("visible") and not self.is_minimized:
print "Visibility", self.window.get_property("visible")
print "Minimized", self.is_minimized
# Put the generated message into the statusbar
# This gives plugins a chance to write to the
# statusbar if they want
@ -1330,6 +1339,11 @@ class DelugeGTK:
self.config.set("window_maximized", True)
else:
self.config.set("window_maximized", False)
if event.changed_mask & gtk.gdk.WINDOW_STATE_ICONIFIED:
if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED:
self.is_minimized = True
else:
self.is_minimized = False
return False