gtk+ r21127 - in trunk/modules/other/gail: . libgail-util tests



Author: mitch
Date: Fri Aug 15 11:37:00 2008
New Revision: 21127
URL: http://svn.gnome.org/viewvc/gtk+?rev=21127&view=rev

Log:
2008-08-15  Michael Natterer  <mitch imendio com>

	* gailbooleancell.c
	* gailimagecell.c
	* gailtextcell.c
	* gailwidget.c
	* tests/Makefile.am
	* tests/testbutton.c
	* tests/testimage.c
	* tests/testlib.c
	* tests/testmenuitem.c
	* tests/testnotebook.c
	* tests/testoptionmenu.c
	* tests/testpaned.c
	* tests/testselection.c
	* tests/testtable.c: some undeprecation.

	* libgail-util/Makefile.am. build with GDK_DISABLE_DEPRECATED
	and GTK_DISABLE_DEPRECATED.



Modified:
   trunk/modules/other/gail/ChangeLog
   trunk/modules/other/gail/gailbooleancell.c
   trunk/modules/other/gail/gailimagecell.c
   trunk/modules/other/gail/gailtextcell.c
   trunk/modules/other/gail/gailwidget.c
   trunk/modules/other/gail/libgail-util/Makefile.am
   trunk/modules/other/gail/tests/Makefile.am
   trunk/modules/other/gail/tests/testbutton.c
   trunk/modules/other/gail/tests/testimage.c
   trunk/modules/other/gail/tests/testlib.c
   trunk/modules/other/gail/tests/testmenuitem.c
   trunk/modules/other/gail/tests/testnotebook.c
   trunk/modules/other/gail/tests/testoptionmenu.c
   trunk/modules/other/gail/tests/testpaned.c
   trunk/modules/other/gail/tests/testselection.c
   trunk/modules/other/gail/tests/testtable.c

Modified: trunk/modules/other/gail/gailbooleancell.c
==============================================================================
--- trunk/modules/other/gail/gailbooleancell.c	(original)
+++ trunk/modules/other/gail/gailbooleancell.c	Fri Aug 15 11:37:00 2008
@@ -71,8 +71,7 @@
   boolean_cell = GAIL_BOOLEAN_CELL(object);
 
   cell->renderer = gtk_cell_renderer_toggle_new ();
-  g_object_ref (cell->renderer);
-  gtk_object_sink (GTK_OBJECT (cell->renderer));
+  g_object_ref_sink (cell->renderer);
   boolean_cell->cell_value = FALSE;
   return atk_object;
 }

Modified: trunk/modules/other/gail/gailimagecell.c
==============================================================================
--- trunk/modules/other/gail/gailimagecell.c	(original)
+++ trunk/modules/other/gail/gailimagecell.c	Fri Aug 15 11:37:00 2008
@@ -84,8 +84,7 @@
   cell = GAIL_RENDERER_CELL(object);
 
   cell->renderer = gtk_cell_renderer_pixbuf_new ();
-  g_object_ref (cell->renderer);
-  gtk_object_sink (GTK_OBJECT (cell->renderer));
+  g_object_ref_sink (cell->renderer);
   return atk_object;
 }
 

Modified: trunk/modules/other/gail/gailtextcell.c
==============================================================================
--- trunk/modules/other/gail/gailtextcell.c	(original)
+++ trunk/modules/other/gail/gailtextcell.c	Fri Aug 15 11:37:00 2008
@@ -175,8 +175,7 @@
   cell = GAIL_RENDERER_CELL(object);
 
   cell->renderer = gtk_cell_renderer_text_new ();
-  g_object_ref (cell->renderer);
-  gtk_object_sink (GTK_OBJECT (cell->renderer));
+  g_object_ref_sink (cell->renderer);
   return atk_object;
 }
 

Modified: trunk/modules/other/gail/gailwidget.c
==============================================================================
--- trunk/modules/other/gail/gailwidget.c	(original)
+++ trunk/modules/other/gail/gailwidget.c	Fri Aug 15 11:37:00 2008
@@ -793,14 +793,14 @@
           else
             {
               gtk_widget_set_uposition (widget, x_current, y_current);
-              gtk_widget_set_usize (widget, width, height);
+              gtk_widget_set_size_request (widget, width, height);
               return TRUE;
             }
         }
       else if (coord_type == ATK_XY_SCREEN)
         {  
           gtk_widget_set_uposition (widget, x, y);
-          gtk_widget_set_usize (widget, width, height);
+          gtk_widget_set_size_request (widget, width, height);
           return TRUE;
         }
     }
@@ -865,7 +865,7 @@
 
   if (GTK_WIDGET_TOPLEVEL (widget))
     {
-      gtk_widget_set_usize (widget, width, height);
+      gtk_widget_set_size_request (widget, width, height);
       return TRUE;
     }
   else

Modified: trunk/modules/other/gail/libgail-util/Makefile.am
==============================================================================
--- trunk/modules/other/gail/libgail-util/Makefile.am	(original)
+++ trunk/modules/other/gail/libgail-util/Makefile.am	Fri Aug 15 11:37:00 2008
@@ -52,7 +52,9 @@
 	-I$(top_builddir)/gdk	\
 	-I$(top_srcdir)/gtk	\
 	-I$(top_builddir)/gtk	\
-	$(AM_CPPFLAGS)
+	$(AM_CPPFLAGS) 		\
+	-DGDK_DISABLE_DEPRECATED\
+	-DGTK_DISABLE_DEPRECATED
 
 libgailutil_la_CFLAGS = \
 	$(GTK_DEP_CFLAGS)	\

Modified: trunk/modules/other/gail/tests/Makefile.am
==============================================================================
--- trunk/modules/other/gail/tests/Makefile.am	(original)
+++ trunk/modules/other/gail/tests/Makefile.am	Fri Aug 15 11:37:00 2008
@@ -37,7 +37,8 @@
 	-I$(top_srcdir)/gdk	\
 	-I$(top_builddir)/gdk	\
 	-I$(top_srcdir)/gtk	\
-	-I$(top_builddir)/gtk
+	-I$(top_builddir)/gtk	\
+	-DGDK_DISABLE_DEPRECATED
 
 AM_CFLAGS = \
 	$(GTK_DEP_CFLAGS)	\

Modified: trunk/modules/other/gail/tests/testbutton.c
==============================================================================
--- trunk/modules/other/gail/tests/testbutton.c	(original)
+++ trunk/modules/other/gail/tests/testbutton.c	Fri Aug 15 11:37:00 2008
@@ -66,9 +66,9 @@
     widget = GTK_ACCESSIBLE (atk_button)->widget;
     g_assert (GTK_IS_BUTTON (widget));
     g_signal_connect (GTK_OBJECT (widget),
-                                    "pressed",
-                           GTK_SIGNAL_FUNC (button_pressed_handler),
-                                    NULL);
+                      "pressed",
+                      G_CALLBACK (button_pressed_handler),
+                      NULL);
     if (GTK_IS_TOGGLE_BUTTON (widget))
     {
       _toggle_inconsistent (GTK_TOGGLE_BUTTON (widget));
@@ -79,9 +79,9 @@
       return;
 
     if (g_getenv ("TEST_ACCESSIBLE_AUTO"))
-    {
-      gtk_idle_add (_do_button_action, atk_button);
-    }
+      {
+        g_idle_add (_do_button_action, atk_button);
+      }
   }
 }
 
@@ -106,7 +106,7 @@
 
   atk_action_do_action (ATK_ACTION (obj), 2);
 
-  gtk_timeout_add (5000, _finish_button_action, obj);
+  g_timeout_add (5000, _finish_button_action, obj);
   return FALSE;
 }
 
@@ -129,11 +129,11 @@
   obj = gtk_widget_get_accessible (GTK_WIDGET (button));
   _print_states (obj);
   _print_button_image_info (obj);
-    
+
   if (GTK_IS_TOGGLE_BUTTON (button))
-  {
-    gtk_idle_add (_toggle_inconsistent, GTK_TOGGLE_BUTTON (button));
-  }
+    {
+      g_idle_add (_toggle_inconsistent, GTK_TOGGLE_BUTTON (button));
+    }
 }
 
 static void 

Modified: trunk/modules/other/gail/tests/testimage.c
==============================================================================
--- trunk/modules/other/gail/tests/testimage.c	(original)
+++ trunk/modules/other/gail/tests/testimage.c	Fri Aug 15 11:37:00 2008
@@ -44,33 +44,30 @@
 		md->arrow4 = gtk_arrow_new(GTK_ARROW_RIGHT,GTK_SHADOW_OUT);
 		md->dialog = gtk_dialog_new();
 		gtk_window_set_modal(GTK_WINDOW(md->dialog), TRUE);
-        gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
-							 md->arrow1, TRUE,TRUE, 0);
+                gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
+                                   md->arrow1, TRUE,TRUE, 0);
 		gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
-							 md->arrow2, TRUE,TRUE, 0);
+                                   md->arrow2, TRUE,TRUE, 0);
 		gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
-							 md->arrow3, TRUE,TRUE, 0);
+                                   md->arrow3, TRUE,TRUE, 0);
 		gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
-							 md->arrow4, TRUE,TRUE, 0);
+                                   md->arrow4, TRUE,TRUE, 0);
 		g_signal_connect(GTK_OBJECT(md->dialog), "destroy",
-							 GTK_SIGNAL_FUNC(destroy), md->dialog);
+                                 G_CALLBACK (destroy), md->dialog);
 
-	    md->image = GTK_IMAGE(gtk_image_new_from_file("circles.xbm"));
+	        md->image = GTK_IMAGE(gtk_image_new_from_file("circles.xbm"));
 		gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
-							 GTK_WIDGET(md->image), TRUE,TRUE, 0);
+                                   GTK_WIDGET(md->image), TRUE,TRUE, 0);
 		md->close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
 		g_signal_connect(GTK_OBJECT(md->close_button), "clicked",
-							 GTK_SIGNAL_FUNC(destroy), md->dialog);
+                                 G_CALLBACK (destroy), md->dialog);
 
 		gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->action_area),
-							md->close_button, TRUE,TRUE, 0);
-
+                                   md->close_button, TRUE,TRUE, 0);
 
 		gtk_widget_show_all(md->dialog);
 		visibleDialog = 1;
-
-	
-	}	
+    }
  }
 }
 

Modified: trunk/modules/other/gail/tests/testlib.c
==============================================================================
--- trunk/modules/other/gail/tests/testlib.c	(original)
+++ trunk/modules/other/gail/tests/testlib.c	Fri Aug 15 11:37:00 2008
@@ -511,7 +511,7 @@
    
       localow->outputBuffer = gtk_text_buffer_new(NULL);
       view = gtk_text_view_new_with_buffer(GTK_TEXT_BUFFER(localow->outputBuffer));
-      gtk_widget_set_usize(view, 700, 500);
+      gtk_widget_set_size_request (view, 700, 500);
       gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD);
       gtk_text_view_set_editable(GTK_TEXT_VIEW(view), FALSE);	
 
@@ -573,15 +573,15 @@
       gtk_window_set_position (GTK_WINDOW(md[window_no]->selecttestsWindow),
                                GTK_WIN_POS_CENTER); 
       g_signal_connect (GTK_OBJECT(md[window_no]->selecttestsWindow), 
-                          "destroy",
-                          GTK_SIGNAL_FUNC(_destroy), 
-                          &md[window_no]->selecttestsWindow);
+                        "destroy",
+                        G_CALLBACK (_destroy),
+                        &md[window_no]->selecttestsWindow);
      
       /* Setup Scrolling */
       scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow),
                                       GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); 
-      gtk_widget_set_usize (scrolledWindow, 500, 600);
+      gtk_widget_set_size_request (scrolledWindow, 500, 600);
       gtk_container_add (GTK_CONTAINER (md[window_no]->selecttestsWindow), 
                          scrolledWindow);
       
@@ -602,9 +602,9 @@
       testcb[window_no].obj = obj;
       testcb[window_no].win_num = window_no; 
       g_signal_connect (GTK_OBJECT (md[window_no]->button), 
-                          "clicked",
-                          GTK_SIGNAL_FUNC (_testselectioncb),  
-                          (gpointer)&testcb[window_no]);
+                        "clicked",
+                        G_CALLBACK (_testselectioncb),
+                        (gpointer)&testcb[window_no]);
      
       /* Show all */
       gtk_widget_grab_focus (md[window_no]->button);
@@ -664,7 +664,7 @@
 	  listoftests[window][testcount[window]].parameterInput[i] = gtk_entry_new();
           gtk_entry_set_text (GTK_ENTRY (listoftests[window][testcount[window]].parameterInput[i]),
             default_names[i]);
-          gtk_widget_set_usize (listoftests[window][testcount[window]].parameterInput[i], 50, 22);
+          gtk_widget_set_size_request (listoftests[window][testcount[window]].parameterInput[i], 50, 22);
 	  gtk_box_pack_start (GTK_BOX (md[window]->hbox),
             listoftests[window][testcount[window]].parameterInput[i], FALSE, FALSE, 0);
           gtk_widget_set_sensitive (
@@ -675,9 +675,9 @@
 	  gtk_widget_show (listoftests[window][testcount[window]].parameterInput[i]);
         }
       g_signal_connect (GTK_OBJECT (listoftests[window][testcount[window]].toggleButton),
-                          "toggled", 
-                          GTK_SIGNAL_FUNC(_toggle_selectedcb),
-                          (gpointer)&(listoftests[window][testcount[window]]));
+                        "toggled",
+                        G_CALLBACK (_toggle_selectedcb),
+                        (gpointer)&(listoftests[window][testcount[window]]));
       gtk_widget_show (listoftests[window][testcount[window]].toggleButton);
       gtk_widget_show (md[window]->hbox);
       gtk_widget_show (md[window]->vbox);

Modified: trunk/modules/other/gail/tests/testmenuitem.c
==============================================================================
--- trunk/modules/other/gail/tests/testmenuitem.c	(original)
+++ trunk/modules/other/gail/tests/testmenuitem.c	Fri Aug 15 11:37:00 2008
@@ -92,9 +92,9 @@
       else
         return;
       if (g_getenv ("TEST_ACCESSIBLE_AUTO"))
-      {
-        gtk_idle_add (_do_menu_item_action, obj);
-      }
+        {
+          g_idle_add (_do_menu_item_action, obj);
+        }
     }
   }
   else

Modified: trunk/modules/other/gail/tests/testnotebook.c
==============================================================================
--- trunk/modules/other/gail/tests/testnotebook.c	(original)
+++ trunk/modules/other/gail/tests/testnotebook.c	Fri Aug 15 11:37:00 2008
@@ -154,7 +154,7 @@
     }
   }
   g_print ("*** End _do_selection ***\n");
-  gtk_timeout_add (5000, _remove_page, selection_obj);
+  g_timeout_add (5000, _remove_page, selection_obj);
 } 
 
 static gint _remove_page (gpointer data)

Modified: trunk/modules/other/gail/tests/testoptionmenu.c
==============================================================================
--- trunk/modules/other/gail/tests/testoptionmenu.c	(original)
+++ trunk/modules/other/gail/tests/testoptionmenu.c	Fri Aug 15 11:37:00 2008
@@ -89,7 +89,7 @@
     
       child = atk_object_ref_accessible_child (parent, 1);
       doing_action = TRUE;
-      gtk_timeout_add (5000, _do_menu_item_action, child);
+      g_timeout_add (5000, _do_menu_item_action, child);
     }
   else
     {

Modified: trunk/modules/other/gail/tests/testpaned.c
==============================================================================
--- trunk/modules/other/gail/tests/testpaned.c	(original)
+++ trunk/modules/other/gail/tests/testpaned.c	Fri Aug 15 11:37:00 2008
@@ -107,7 +107,7 @@
       }
       atk_object_connect_property_change_handler (paned_obj,
                    (AtkPropertyChangeHandler*) _property_change_handler);
-      gtk_timeout_add (2000, _test_paned, paned_obj);
+      g_timeout_add (2000, _test_paned, paned_obj);
     }
 
     return;

Modified: trunk/modules/other/gail/tests/testselection.c
==============================================================================
--- trunk/modules/other/gail/tests/testselection.c	(original)
+++ trunk/modules/other/gail/tests/testselection.c	Fri Aug 15 11:37:00 2008
@@ -138,7 +138,7 @@
     g_print ("Unexpected selection: %d, expected 0\n", i);
   }
   atk_selection_add_selection (ATK_SELECTION (selection_obj), 1);
-  gtk_timeout_add (2000, _finish_selection, selection_obj);
+  g_timeout_add (2000, _finish_selection, selection_obj);
   g_print ("*** End _do_selection ***\n");
 } 
 

Modified: trunk/modules/other/gail/tests/testtable.c
==============================================================================
--- trunk/modules/other/gail/tests/testtable.c	(original)
+++ trunk/modules/other/gail/tests/testtable.c	Fri Aug 15 11:37:00 2008
@@ -760,9 +760,9 @@
   window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title(GTK_WINDOW(window), "Test to run");
 
-  g_signal_connect(GTK_OBJECT(window), "destroy",
-  GTK_SIGNAL_FUNC(destroy), &window);
- 
+  g_signal_connect(GTK_OBJECT (window), "destroy",
+                   G_CALLBACK (destroy), &window);
+
   vbox = gtk_vbox_new(TRUE, 0);
   gtk_box_set_spacing(GTK_BOX(vbox), 10);
 
@@ -818,7 +818,7 @@
     GTK_BUTTONBOX_SPREAD);
   gtk_box_pack_end (GTK_BOX (hbuttonbox), GTK_WIDGET (button), TRUE, TRUE, 0);
   gtk_box_pack_end (GTK_BOX (vbox), hbuttonbox, TRUE, TRUE, 0);
-  g_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(choicecb), obj);
+  g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK (choicecb), obj);
 
   gtk_container_add(GTK_CONTAINER(window), vbox);
   gtk_widget_show(vbox);



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