[gtk+/resizegrips] Fix demo/test programs that used gtk_statusbar_set_has_resize_grip()



commit de8a094ae3f49665d79f013d5176bef7e2f05708
Author: Cody Russell <bratsche gnome org>
Date:   Thu Sep 30 13:15:23 2010 -0500

    Fix demo/test programs that used gtk_statusbar_set_has_resize_grip()

 demos/gtk-demo/appwindow.c |   23 -----------------------
 tests/print-editor.c       |   24 +-----------------------
 2 files changed, 1 insertions(+), 46 deletions(-)
---
diff --git a/demos/gtk-demo/appwindow.c b/demos/gtk-demo/appwindow.c
index 6381458..b5003e5 100644
--- a/demos/gtk-demo/appwindow.c
+++ b/demos/gtk-demo/appwindow.c
@@ -384,23 +384,6 @@ mark_set_callback (GtkTextBuffer     *buffer,
   update_statusbar (buffer, GTK_STATUSBAR (data));
 }
 
-static void
-update_resize_grip (GtkWidget           *widget,
-		    GdkEventWindowState *event,
-		    GtkStatusbar        *statusbar)
-{
-  if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
-			     GDK_WINDOW_STATE_FULLSCREEN))
-    {
-      gboolean maximized;
-
-      maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
-					     GDK_WINDOW_STATE_FULLSCREEN);
-      gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
-    }
-}
-
-
 GtkWidget *
 do_appwindow (GtkWidget *do_widget)
 {
@@ -569,12 +552,6 @@ do_appwindow (GtkWidget *do_widget)
                                statusbar,
                                0);
 
-      g_signal_connect_object (window,
-			       "window_state_event",
-			       G_CALLBACK (update_resize_grip),
-			       statusbar,
-			       0);
-
       update_statusbar (buffer, GTK_STATUSBAR (statusbar));
     }
 
diff --git a/tests/print-editor.c b/tests/print-editor.c
index fe812ba..c4de8b7 100644
--- a/tests/print-editor.c
+++ b/tests/print-editor.c
@@ -821,22 +821,6 @@ mark_set_callback (GtkTextBuffer     *buffer,
 }
 
 static void
-update_resize_grip (GtkWidget           *widget,
-		    GdkEventWindowState *event,
-		    GtkStatusbar        *statusbar)
-{
-  if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED | 
-			     GDK_WINDOW_STATE_FULLSCREEN))
-    {
-      gboolean maximized;
-
-      maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED | 
-					     GDK_WINDOW_STATE_FULLSCREEN);
-      gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
-    }
-}
-
-static void
 create_window (void)
 {
   GtkWidget *bar;
@@ -935,13 +919,7 @@ create_window (void)
 			   G_CALLBACK (mark_set_callback),
 			   NULL,
 			   0);
-  
-  g_signal_connect_object (main_window, 
-			   "window_state_event", 
-			   G_CALLBACK (update_resize_grip),
-			   statusbar,
-			   0);
-  
+
   update_ui ();
   
   gtk_widget_show_all (main_window);



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