]> Pileus Git - ~andy/gtk/commitdiff
Use the new GtkComboBoxText API
authorJavier Jardón <jjardon@gnome.org>
Sat, 2 Oct 2010 16:19:46 +0000 (18:19 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 Oct 2010 20:58:27 +0000 (16:58 -0400)
Also remove mentions of the old text convenience API from the docs,
and point to GtkComboBoxText instead.

17 files changed:
demos/gtk-demo/sizegroup.c
demos/gtk-demo/textview.c
demos/testpixbuf-scale.c
docs/tools/widgets.c
gtk/gtkcombobox.c
gtk/gtkfilechooserdefault.c
gtk/gtkprintunixdialog.c
gtk/gtkrecentchooserdefault.c
tests/prop-editor.c
tests/testbbox.c
tests/testellipsise.c
tests/testgtk.c
tests/testoffscreen.c
tests/testsocket_common.c
tests/testtoolbar.c
tests/testtreecolumnsizing.c
tests/testtreeview.c

index 23d18d949a13b4e1f53d3f554cc60fd341826273..d53003960ea687cee8d4420cee67b069bf164ea1 100644 (file)
@@ -25,10 +25,10 @@ create_combo_box (const char **strings)
   GtkWidget *combo_box;
   const char **str;
 
-  combo_box = gtk_combo_box_new_text ();
+  combo_box = gtk_combo_box_text_new ();
   
   for (str = strings; *str; str++)
-    gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), *str);
+    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), *str);
 
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
 
index cfac7fd02368610393a3bc6fa86c908045e0444e..fb339f19efe7a1a0531ae41e7fb143ee5f0320db 100644 (file)
@@ -371,11 +371,11 @@ attach_widgets (GtkTextView *text_view)
         }
       else if (i == 1)
         {
-          widget = gtk_combo_box_new_text ();
+          widget = gtk_combo_box_text_new ();
 
-          gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 1");
-          gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 2");
-          gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 3");
+          gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 1");
+          gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 2");
+          gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 3");
         }
       else if (i == 2)
         {
index 0d89f2e13ea4a879f2b5e240fb7734b7d740a1ac..7b521619072d7915f8dca53534abff6bdb8a854a 100644 (file)
@@ -101,12 +101,12 @@ main(int argc, char **argv)
        vbox = gtk_vbox_new (FALSE, 0);
        gtk_container_add (GTK_CONTAINER (window), vbox);
 
-        combo_box = gtk_combo_box_new_text ();
+        combo_box = gtk_combo_box_text_new ();
 
-        gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "NEAREST");
-        gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "BILINEAR");
-        gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "TILES");
-        gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "HYPER");
+        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "NEAREST");
+        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "BILINEAR");
+        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "TILES");
+        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "HYPER");
 
         gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 1);
 
index d5a9901ae5f1f3d4e300b167215e8878369bd5fd..206c26e32c28419d1361839516456d30b33b3070 100644 (file)
@@ -316,8 +316,8 @@ create_combo_box (void)
                       "}\n"
                       "widget_class \"GtkComboBox\" style \"combo-box-style\"\n" );
 
-  widget = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Combo Box");
+  widget = gtk_combo_box_text_new ();
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Combo Box");
   gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
   align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
   gtk_container_add (GTK_CONTAINER (align), widget);
index e59d4b43c16397c88287d86fa67be3954f7d0839..8f72807c90ce18dcda093983a3546fdba1794375 100644 (file)
  * not restricted to a flat list, it can be a real tree, and the popup will
  * reflect the tree structure.
  *
- * In addition to the model-view API, GtkComboBox offers a simple API which
- * is suitable for text-only combo boxes, and hides the complexity of
- * managing the data in a model. It consists of the functions
- * gtk_combo_box_new_text(), gtk_combo_box_append_text(),
- * gtk_combo_box_insert_text(), gtk_combo_box_prepend_text(),
- * gtk_combo_box_remove_text() and gtk_combo_box_get_active_text().
+ * For a simple list of textual choices, the model-view API of GtkComboBox
+ * can be a bit overwhelming. In this case, #GtkComboBoxText offers a
+ * simple alternative.
  */
 
 
@@ -5439,9 +5436,7 @@ gtk_combo_box_remove_text (GtkComboBox *combo_box,
  * @combo_box: A #GtkComboBox constructed with gtk_combo_box_new_text()
  *
  * Returns the currently active string in @combo_box or %NULL if none
- * is selected.  Note that you can only use this function with combo
- * boxes constructed with gtk_combo_box_new_text() and with
- * #GtkComboBoxEntry<!-- -->s.
+ * is selected.
  *
  * Returns: a newly allocated string containing the currently active text.
  *     Must be freed with g_free().
index 38c26d668deba3fdf997489af9cf127cd830006a..159560115ce209135ed5739429fd34c9a00560ca 100644 (file)
@@ -31,7 +31,7 @@
 #include "gtkcellrenderertext.h"
 #include "gtkcheckmenuitem.h"
 #include "gtkclipboard.h"
-#include "gtkcombobox.h"
+#include "gtkcomboboxtext.h"
 #include "gtkentry.h"
 #include "gtkexpander.h"
 #include "gtkfilechooserprivate.h"
@@ -2409,7 +2409,7 @@ filter_create (GtkFileChooserDefault *impl)
   GtkCellRenderer *cell;
   GList           *cells;
 
-  impl->filter_combo = gtk_combo_box_new_text ();
+  impl->filter_combo = gtk_combo_box_text_new ();
   gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (impl->filter_combo), FALSE);
 
   /* Get the combo's text renderer and set ellipsize parameters */
@@ -7538,7 +7538,7 @@ gtk_file_chooser_default_add_filter (GtkFileChooser *chooser,
   if (!name)
     name = "Untitled filter";  /* Place-holder, doesn't need to be marked for translation */
 
-  gtk_combo_box_append_text (GTK_COMBO_BOX (impl->filter_combo), name);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (impl->filter_combo), name);
 
   if (!g_slist_find (impl->filters, impl->current_filter))
     set_current_filter (impl, filter);
index 1490d0e83fc36920eec200cc8e1b296f7077175e..9a1152ba7907aa5c48b1fcca31236e27e5299a8c 100644 (file)
@@ -3363,7 +3363,7 @@ create_page_setup_page (GtkPrintUnixDialog *dialog)
                     0, 1, 3, 4,  GTK_FILL, 0,
                     0, 0);
 
-  combo = gtk_combo_box_new_text ();
+  combo = gtk_combo_box_text_new ();
   priv->page_set_combo = combo;
   gtk_widget_show (combo);
   gtk_table_attach (GTK_TABLE (table), combo,
@@ -3371,9 +3371,9 @@ create_page_setup_page (GtkPrintUnixDialog *dialog)
                     0, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
   /* In enum order */
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("All sheets"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Even sheets"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Odd sheets"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("All sheets"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Even sheets"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Odd sheets"));
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
 
   label = gtk_label_new_with_mnemonic (_("Sc_ale:"));
@@ -3485,17 +3485,17 @@ create_page_setup_page (GtkPrintUnixDialog *dialog)
                    0, 1, 4, 5,
                    GTK_FILL, 0, 0, 0);
 
-  combo = gtk_combo_box_new_text ();
+  combo = gtk_combo_box_text_new ();
   priv->orientation_combo = GTK_WIDGET (combo);
   gtk_table_attach (GTK_TABLE (table), combo,
                    1, 2, 4, 5,  GTK_FILL, 0,
                    0, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
   /* In enum order */
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Portrait"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Landscape"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Reverse portrait"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Reverse landscape"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Portrait"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Landscape"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Reverse portrait"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Reverse landscape"));
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
   gtk_widget_set_sensitive (combo, FALSE);
   gtk_widget_show (combo);
index a89899b7900caf8489fe0899c9f26d9b58eee3e1..88a891a8585fee48050f9a90c9565d41525942b4 100644 (file)
@@ -41,7 +41,7 @@
 #include "gtkcellrenderertext.h"
 #include "gtkcheckmenuitem.h"
 #include "gtkclipboard.h"
-#include "gtkcombobox.h"
+#include "gtkcomboboxtext.h"
 #include "gtkentry.h"
 #include "gtkeventbox.h"
 #include "gtkexpander.h"
@@ -474,7 +474,7 @@ gtk_recent_chooser_default_constructor (GType                  type,
 
   impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12);
   
-  impl->filter_combo = gtk_combo_box_new_text ();
+  impl->filter_combo = gtk_combo_box_text_new ();
   gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (impl->filter_combo), FALSE);
   g_signal_connect (impl->filter_combo, "changed",
                     G_CALLBACK (filter_combo_changed_cb), impl);
@@ -1300,9 +1300,9 @@ gtk_recent_chooser_default_add_filter (GtkRecentChooser *chooser,
   name = gtk_recent_filter_get_name (filter);
   if (!name)
     name = _("Untitled filter");
-    
-  gtk_combo_box_append_text (GTK_COMBO_BOX (impl->filter_combo), name);
-  
+
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (impl->filter_combo), name);
+
   if (!g_slist_find (impl->filters, impl->current_filter))
     set_current_filter (impl, filter);
   
index bc99f655bac95ca42d5f298e2fd6ec18e385ed36..0a9a3f863eb52fa19b44b1531a71de376ebf569a 100644 (file)
@@ -819,15 +819,15 @@ property_widget (GObject    *object,
        GEnumClass *eclass;
        gint j;
        
-       prop_edit = gtk_combo_box_new_text ();
+       prop_edit = gtk_combo_box_text_new ();
        
        eclass = G_ENUM_CLASS (g_type_class_ref (spec->value_type));
        
        j = 0;
        while (j < eclass->n_values)
          {
-           gtk_combo_box_append_text (GTK_COMBO_BOX (prop_edit),
-                                      eclass->values[j].value_name);
+           gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (prop_edit),
+                                           eclass->values[j].value_name);
            ++j;
          }
        
index e9a5de60028d41235c82ce4420ef2ced2ca6a32f..49a9b8de9777182b292e97bbcf87602eec7234ef 100644 (file)
@@ -38,25 +38,25 @@ static const char* types[] = { "GtkHButtonBox",
                               NULL};
 
 static void
-populate_combo_with (GtkComboBox *combo, const char** elements)
+populate_combo_with (GtkComboBoxText *combo, const char** elements)
 {
   int i;
   
   for (i = 0; elements[i] != NULL; i++) {
-    gtk_combo_box_append_text (combo, elements[i]);
+    gtk_combo_box_text_append_text (combo, elements[i]);
   }
   
-  gtk_combo_box_set_active (combo, 0);
+  gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
 }
 
 static void
-combo_changed_cb (GtkComboBox *combo,
+combo_changed_cb (GtkComboBoxText *combo,
                  gpointer user_data)
 {
   char *text;
   int i;
   
-  text = gtk_combo_box_get_active_text (combo);
+  text = gtk_combo_box_text_get_active_text (combo);
   
   for (i = 0; styles[i]; i++) {
     if (g_str_equal (text, styles[i])) {
@@ -77,7 +77,7 @@ reparent_widget (GtkWidget *widget,
 }
 
 static void
-combo_types_changed_cb (GtkComboBox *combo,
+combo_types_changed_cb (GtkComboBoxText *combo,
                        GtkWidget **buttons)
 {
   int i;
@@ -85,7 +85,7 @@ combo_types_changed_cb (GtkComboBox *combo,
   GtkWidget *old_parent, *new_parent;
   GtkButtonBoxStyle style;
   
-  text = gtk_combo_box_get_active_text (combo);
+  text = gtk_combo_box_text_get_active_text (combo);
   
   if (g_str_equal (text, "GtkHButtonBox")) {
     old_parent = vbbox;
@@ -156,13 +156,13 @@ main (int    argc,
   hbox = gtk_hbox_new (FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
   
-  combo_types = gtk_combo_box_new_text ();
-  populate_combo_with (GTK_COMBO_BOX (combo_types), types);
+  combo_types = gtk_combo_box_text_new ();
+  populate_combo_with (GTK_COMBO_BOX_TEXT (combo_types), types);
   g_signal_connect (G_OBJECT (combo_types), "changed", G_CALLBACK (combo_types_changed_cb), buttons);
   gtk_box_pack_start (GTK_BOX (hbox), combo_types, TRUE, TRUE, 0);
   
-  combo_styles = gtk_combo_box_new_text ();
-  populate_combo_with (GTK_COMBO_BOX (combo_styles), styles);
+  combo_styles = gtk_combo_box_text_new ();
+  populate_combo_with (GTK_COMBO_BOX_TEXT (combo_styles), styles);
   g_signal_connect (G_OBJECT (combo_styles), "changed", G_CALLBACK (combo_changed_cb), NULL);
   gtk_box_pack_start (GTK_BOX (hbox), combo_styles, TRUE, TRUE, 0);
   
index 61240332f2b86bfc78df39e6e45fba47c2707be3..973b955766a94f4667961f446b32096e2bb470d0 100644 (file)
@@ -136,14 +136,14 @@ main (int argc, char *argv[])
   vbox = gtk_vbox_new (FALSE, 6);
   gtk_container_add (GTK_CONTAINER (window), vbox);
 
-  combo = gtk_combo_box_new_text ();
+  combo = gtk_combo_box_text_new ();
   scale = gtk_hscale_new_with_range (0, 360, 1);
   label = gtk_label_new ("This label may be ellipsized\nto make it fit.");
 
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "NONE");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "START");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "MIDDLE");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "END");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "NONE");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "START");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "MIDDLE");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "END");
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
 
   align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
index b741023f5299a22344ab2c42258b738f795f5abc..c77f6dfcd98841b00fcfc38aab5e235b78716bd3 100644 (file)
@@ -109,12 +109,12 @@ build_option_menu (gchar           *items[],
   GtkWidget *omenu;
   gint i;
 
-  omenu = gtk_combo_box_new_text ();
+  omenu = gtk_combo_box_text_new ();
   g_signal_connect (omenu, "changed",
                    G_CALLBACK (func), data);
       
   for (i = 0; i < num_items; i++)
-      gtk_combo_box_append_text (GTK_COMBO_BOX (omenu), items[i]);
+      gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (omenu), items[i]);
 
   gtk_combo_box_set_active (GTK_COMBO_BOX (omenu), history);
   
@@ -3296,8 +3296,8 @@ create_menus (GtkWidget *widget)
                                  GDK_KEY_F3,
                                  0,
                                  GTK_ACCEL_VISIBLE);
-      
-      optionmenu = gtk_combo_box_new_text ();
+
+      optionmenu = gtk_combo_box_text_new ();
       gtk_combo_box_set_active (GTK_COMBO_BOX (optionmenu), 3);
       gtk_box_pack_start (GTK_BOX (box2), optionmenu, TRUE, TRUE, 0);
       gtk_widget_show (optionmenu);
@@ -5646,8 +5646,8 @@ create_display_screen (GtkWidget *widget)
         "only one screen on the current display");
       gtk_widget_set_sensitive (radio_scr, FALSE);
     }
-  combo_dpy = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_dpy), "diabolo:0.0");
+  combo_dpy = gtk_combo_box_text_new ();
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_dpy), "diabolo:0.0");
   gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo_dpy))),
                       "<hostname>:<X Server Num>.<Screen Num>");
 
@@ -8102,8 +8102,8 @@ window_controls (GtkWidget *window)
                            window,
                           G_CONNECT_SWAPPED);
   gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-  
-  om = gtk_combo_box_new_text ();
+
+  om = gtk_combo_box_text_new ();
   i = 0;
   while (i < 10)
     {
@@ -8122,7 +8122,7 @@ window_controls (GtkWidget *window)
       };
 
       g_assert (names[i]);
-      gtk_combo_box_append_text (GTK_COMBO_BOX (om), names[i]);
+      gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (om), names[i]);
 
       ++i;
     }
@@ -8135,7 +8135,7 @@ window_controls (GtkWidget *window)
   gtk_box_pack_end (GTK_BOX (vbox), om, FALSE, FALSE, 0);
 
 
-  om = gtk_combo_box_new_text ();
+  om = gtk_combo_box_text_new ();
   i = 0;
   while (i < 5)
     {
@@ -8149,7 +8149,7 @@ window_controls (GtkWidget *window)
       };
 
       g_assert (names[i]);
-      gtk_combo_box_append_text (GTK_COMBO_BOX (om), names[i]);
+      gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (om), names[i]);
 
       ++i;
     }
index e3f3223eb7d4822e7404c538e5a5d65e45b5238e..e20ea38498cdac85d655e4ecfa2b70fd8977a3c5 100644 (file)
@@ -211,11 +211,11 @@ create_widgets (void)
   label = gtk_label_new ("This label may be ellipsized\nto make it fit.");
   gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
 
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "NONE");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "START");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "MIDDLE");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "END");
+  combo = gtk_combo_box_text_new ();
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "NONE");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "START");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "MIDDLE");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "END");
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
   gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
 
@@ -237,17 +237,17 @@ create_widgets (void)
   button = gtk_check_button_new_with_mnemonic ("_Check button");
   gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
 
-  cb = gtk_combo_box_new_text ();
+  cb = gtk_combo_box_text_new ();
   entry = gtk_entry_new ();
   gtk_widget_show (entry);
   gtk_container_add (GTK_CONTAINER (cb), entry);
 
-  gtk_combo_box_append_text (GTK_COMBO_BOX (cb), "item0");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (cb), "item1");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (cb), "item1");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (cb), "item2");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (cb), "item2");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (cb), "item2");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cb), "item0");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cb), "item1");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cb), "item1");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cb), "item2");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cb), "item2");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cb), "item2");
   gtk_entry_set_text (GTK_ENTRY (entry), "hello world ♥ foo");
   gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
   gtk_box_pack_start (GTK_BOX (vbox), cb, TRUE, TRUE, 0);
index 78eb7d55ca60dcee72202c3e52c823d499df07de..ababbf2b782372f3ec3d9f5a2dc945b10ebfe18c 100644 (file)
@@ -205,12 +205,12 @@ create_menubar (GtkWindow *window)
 static GtkWidget *
 create_combo_box (void)
 {
-  GtkComboBox *combo_box = GTK_COMBO_BOX (gtk_combo_box_new_text ());
+  GtkComboBoxText *combo_box = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
 
-  gtk_combo_box_append_text (combo_box, "This");
-  gtk_combo_box_append_text (combo_box, "Is");
-  gtk_combo_box_append_text (combo_box, "A");
-  gtk_combo_box_append_text (combo_box, "ComboBox");
+  gtk_combo_box_text_append_text (combo_box, "This");
+  gtk_combo_box_text_append_text (combo_box, "Is");
+  gtk_combo_box_text_append_text (combo_box, "A");
+  gtk_combo_box_text_append_text (combo_box, "ComboBox");
   
   return GTK_WIDGET (combo_box);
 }
index 6bdad7abfb669282a7115838d1535f7ca7cc5c7a..1b92d4fb30cd71d28fd9dcbbfdde0f50d263a5c6 100644 (file)
@@ -554,13 +554,13 @@ main (gint argc, gchar **argv)
   checkbox = gtk_check_button_new_with_mnemonic("_Set Toolbar Style:");
   g_signal_connect (checkbox, "toggled", G_CALLBACK (set_toolbar_style_toggled), toolbar);
   gtk_box_pack_start (GTK_BOX (hbox1), checkbox, FALSE, FALSE, 0);
-  
-  option_menu = gtk_combo_box_new_text ();
+
+  option_menu = gtk_combo_box_text_new ();
   gtk_widget_set_sensitive (option_menu, FALSE);  
   g_object_set_data (G_OBJECT (checkbox), "option-menu", option_menu);
   
   for (i = 0; i < G_N_ELEMENTS (toolbar_styles); i++)
-    gtk_combo_box_append_text (GTK_COMBO_BOX (option_menu), toolbar_styles[i]);
+    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (option_menu), toolbar_styles[i]);
   gtk_combo_box_set_active (GTK_COMBO_BOX (option_menu),
                             gtk_toolbar_get_style (GTK_TOOLBAR (toolbar)));
   gtk_box_pack_start (GTK_BOX (hbox2), option_menu, FALSE, FALSE, 0);
@@ -571,11 +571,11 @@ main (gint argc, gchar **argv)
   g_signal_connect (checkbox, "toggled", G_CALLBACK (set_icon_size_toggled), toolbar);
   gtk_box_pack_start (GTK_BOX (hbox2), checkbox, FALSE, FALSE, 0);
 
-  option_menu = gtk_combo_box_new_text ();
+  option_menu = gtk_combo_box_text_new ();
   g_object_set_data (G_OBJECT (checkbox), "option-menu", option_menu);
   gtk_widget_set_sensitive (option_menu, FALSE);
-  gtk_combo_box_append_text (GTK_COMBO_BOX (option_menu), "small toolbar");
-  gtk_combo_box_append_text (GTK_COMBO_BOX (option_menu), "large toolbar");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (option_menu), "small toolbar");
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (option_menu), "large toolbar");
 
   gtk_box_pack_start (GTK_BOX (hbox2), option_menu, FALSE, FALSE, 0);
   g_signal_connect (option_menu, "changed",
index 13c0f47df04a8140c16fbf679dc2054a58ab9c8c..93130fa8a8a3c6d2efbc735bfb820a8abe6c6c24 100644 (file)
@@ -98,7 +98,7 @@ combo_box_changed (GtkComboBox *combo_box,
   GList *list;
   GList *columns;
 
-  str = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo_box));
+  str = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo_box));
   if (!str)
     return;
 
@@ -182,14 +182,14 @@ main (int argc, char **argv)
   gtk_container_add (GTK_CONTAINER (window), vbox);
 
   /* Option menu contents */
-  combo_box = gtk_combo_box_new_text ();
-
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), NO_EXPAND);
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SINGLE_EXPAND);
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), MULTI_EXPAND);
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), LAST_EXPAND);
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), BORDER_EXPAND);
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), ALL_EXPAND);
+  combo_box = gtk_combo_box_text_new ();
+
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), NO_EXPAND);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), SINGLE_EXPAND);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), MULTI_EXPAND);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), LAST_EXPAND);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), BORDER_EXPAND);
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), ALL_EXPAND);
 
   gtk_box_pack_start (GTK_BOX (vbox), combo_box, FALSE, FALSE, 0);
 
index 5115ae4f360b170cc2487868a418a63d0ed1b14f..d28cb3520adaaa64d88df5820fb883dd0c5586fb 100644 (file)
@@ -754,10 +754,10 @@ main (int    argc,
                                        GDK_ACTION_MOVE | GDK_ACTION_COPY);
   
   /* Model menu */
-  combo_box = gtk_combo_box_new_text ();
+  combo_box = gtk_combo_box_text_new ();
   for (i = 0; i < MODEL_LAST; i++)
-      gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), model_names[i]);
-  
+      gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), model_names[i]);
+
   gtk_table_attach (GTK_TABLE (table), combo_box,
                     0, 1, 0, 1,
                     0, 0, 
@@ -769,10 +769,10 @@ main (int    argc,
                    tv);
   
   /* Columns menu */
-  combo_box = gtk_combo_box_new_text ();
+  combo_box = gtk_combo_box_text_new ();
   for (i = 0; i < COLUMNS_LAST; i++)
-      gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), column_type_names[i]);
-  
+      gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), column_type_names[i]);
+
   gtk_table_attach (GTK_TABLE (table), combo_box,
                     0, 1, 1, 2,
                     0, 0,