[pygobject/pygobject-2-28] [gi-demos] get appwindow demo working again



commit 09c0534e4ac673ffdbfb41bc0aa34353be3b88e2
Author: John (J5) Palmieri <johnp redhat com>
Date:   Mon Feb 14 15:06:38 2011 -0500

    [gi-demos] get appwindow demo working again

 demos/gtk-demo/demos/appwindow.py |   24 ++++--------------------
 1 files changed, 4 insertions(+), 20 deletions(-)
---
diff --git a/demos/gtk-demo/demos/appwindow.py b/demos/gtk-demo/demos/appwindow.py
index 8b7c99c..d468524 100644
--- a/demos/gtk-demo/demos/appwindow.py
+++ b/demos/gtk-demo/demos/appwindow.py
@@ -38,7 +38,7 @@ global _demoapp
 def widget_destroy(widget, button):
     widget.destroy()
 
-def activate_action(action):
+def activate_action(action, user_data):
     global window
 
     name = action.get_name()
@@ -59,7 +59,7 @@ def activate_action(action):
     dialog.connect('response', widget_destroy)
     dialog.show()
 
-def activate_radio_action(action, current):
+def activate_radio_action(action, current, user_data):
     global infobar
     global messagelabel
 
@@ -87,20 +87,6 @@ def update_statusbar(buffer, statusbar):
 def mark_set_callback(buffer, new_location, mark, data):
     update_statusbar(buffer, data)
 
-def update_resize_grip(widget, event, statusbar):
-    # FIXME: for some reason we get attribute errors in handlers
-    #        if we try to access flags without first evaluating
-    #        the parent struct
-    Gdk.WindowState
-
-    # FIXME: event should be a Gdk.EventWindowState but is only a Gdk.Event
-    if event.window_state.changed_mask and (Gdk.WindowState.MAXIMIZED or
-			       Gdk.WindowState.FULLSCREEN):
-
-        maximized = event.window_state.new_window_state and (Gdk.WindowState.MAXIMIZED or
-					        Gdk.WindowState.FULLSCREEN)
-        statusbar.set_has_resize_grip(not maximized)
-
 def activate_email(about, link, data):
     text = 'send mail to %s' % (link,)
     print text
@@ -337,8 +323,8 @@ def main(demoapp=None):
     window.set_title('Application Window')
     window.set_icon_name('gtk-open')
     window.connect_after('destroy', _quit)
-    table = Gtk.Table(n_rows=1,
-                      n_columns=5,
+    table = Gtk.Table(rows=1,
+                      columns=5,
                       homogeneous=False)
     window.add(table)
 
@@ -412,8 +398,6 @@ def main(demoapp=None):
     buffer.connect('changed', update_statusbar, statusbar)
     buffer.connect('mark_set', mark_set_callback, statusbar)
 
-    window.connect('window_state_event', update_resize_grip, statusbar)
-
     update_statusbar(buffer, statusbar);
 
     window.set_default_size(200, 200)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]