]> Pileus Git - ~andy/gtk/blobdiff - tests/testgtk.c
Some cleanups after the module cache file change
[~andy/gtk] / tests / testgtk.c
index eedadb3701c7767e1ebad2d3e3a38d7f5656ca01..86ad601173f1ce1c2299503bebc745cf5ca232a9 100644 (file)
@@ -24,7 +24,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#undef GTK_DISABLE_DEPRECATED
 
 #include "config.h"
 
@@ -6700,38 +6699,17 @@ page_switch (GtkWidget *widget, GtkNotebookPage *page, gint page_num)
 static void
 tab_fill (GtkToggleButton *button, GtkWidget *child)
 {
-  gboolean expand;
-  GtkPackType pack_type;
-
-  gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (sample_notebook), child,
-                                       &expand, NULL, &pack_type);
-  gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (sample_notebook), child,
-                                     expand, button->active, pack_type);
+  gtk_container_child_set (GTK_CONTAINER (sample_notebook), child,
+                           "tab-fill", gtk_toggle_button_get_active (button),
+                           NULL);
 }
 
 static void
 tab_expand (GtkToggleButton *button, GtkWidget *child)
 {
-  gboolean fill;
-  GtkPackType pack_type;
-
-  gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (sample_notebook), child,
-                                       NULL, &fill, &pack_type);
-  gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (sample_notebook), child,
-                                     button->active, fill, pack_type);
-}
-
-static void
-tab_pack (GtkToggleButton *button, GtkWidget *child)
-         
-{ 
-  gboolean expand;
-  gboolean fill;
-
-  gtk_notebook_query_tab_label_packing (GTK_NOTEBOOK (sample_notebook), child,
-                                       &expand, &fill, NULL);
-  gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (sample_notebook), child,
-                                     expand, fill, button->active);
+  gtk_container_child_set (GTK_CONTAINER (sample_notebook), child,
+                           "tab-expand", gtk_toggle_button_get_active (button),
+                           NULL);
 }
 
 static void
@@ -6775,11 +6753,6 @@ create_pages (GtkNotebook *notebook, gint start, gint end)
       g_signal_connect (button, "toggled",
                        G_CALLBACK (tab_expand), child);
 
-      button = gtk_check_button_new_with_label ("Pack end");
-      gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
-      g_signal_connect (button, "toggled",
-                       G_CALLBACK (tab_pack), child);
-
       button = gtk_button_new_with_label ("Hide Page");
       gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, FALSE, 5);
       g_signal_connect_swapped (button, "clicked",
@@ -6894,13 +6867,6 @@ notebook_popup (GtkToggleButton *button,
     gtk_notebook_popup_disable (notebook);
 }
 
-static void
-notebook_homogeneous (GtkToggleButton *button,
-                     GtkNotebook     *notebook)
-{
-  g_object_set (notebook, "homogeneous", button->active, NULL);
-}
-
 static void
 create_notebook (GtkWidget *widget)
 {
@@ -6966,12 +6932,6 @@ create_notebook (GtkWidget *widget)
                        G_CALLBACK (notebook_popup),
                        sample_notebook);
 
-      button = gtk_check_button_new_with_label ("homogeneous tabs");
-      gtk_box_pack_start (GTK_BOX (box2), button, TRUE, FALSE, 0);
-      g_signal_connect (button, "clicked",
-                       G_CALLBACK (notebook_homogeneous),
-                       sample_notebook);
-
       box2 = gtk_hbox_new (FALSE, 5);
       gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
       gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
@@ -10767,8 +10727,8 @@ test_init (void)
   if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la",
                   G_FILE_TEST_EXISTS))
     {
-      g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE);
-      g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/gtk.immodules", TRUE);
+      g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE);
+      g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE);
     }
 }