]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkcombobox.c
Use gtk_box_new() instead gtk_[v|h]box_new()
[~andy/gtk] / gtk / gtkcombobox.c
index 69f6078f2146bfb36d37753b8dd0b10d75a2974e..d36990ea8b38e280e08eff85f72dd336f27c33d4 100644 (file)
@@ -125,10 +125,10 @@ struct _GtkComboBoxPrivate
   GtkWidget *popup_window;
   GtkWidget *scrolled_window;
 
-  guint inserted_id;
-  guint deleted_id;
-  guint reordered_id;
-  guint changed_id;
+  gulong inserted_id;
+  gulong deleted_id;
+  gulong reordered_id;
+  gulong changed_id;
   guint popup_idle_id;
   guint activate_button;
   guint32 activate_time;
@@ -3030,10 +3030,10 @@ gtk_combo_box_menu_setup (GtkComboBox *combo_box,
       gtk_widget_set_parent (priv->button,
                              gtk_widget_get_parent (child));
 
-      priv->box = gtk_hbox_new (FALSE, 0);
+      priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
       gtk_container_add (GTK_CONTAINER (priv->button), priv->box);
 
-      priv->separator = gtk_vseparator_new ();
+      priv->separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
       gtk_container_add (GTK_CONTAINER (priv->box), priv->separator);
 
       priv->arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
@@ -4882,6 +4882,23 @@ gtk_combo_box_new_with_model (GtkTreeModel *model)
   return GTK_WIDGET (combo_box);
 }
 
+/**
+ * gtk_combo_box_new_with_model_and_entry:
+ *
+ * Creates a new empty #GtkComboBox with an entry
+ * and with the model initialized to @model.
+ *
+ * Return value: A new #GtkComboBox
+ */
+GtkWidget *
+gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model)
+{
+  return g_object_new (GTK_TYPE_COMBO_BOX,
+                       "has-entry", TRUE,
+                       "model", model,
+                       NULL);
+}
+
 /**
  * gtk_combo_box_get_wrap_width:
  * @combo_box: A #GtkComboBox
@@ -5871,14 +5888,14 @@ gtk_combo_box_set_title (GtkComboBox *combo_box,
  * @combo_box: a #GtkComboBox
  * @fixed: whether to use a fixed popup width
  *
- * Specifies whether the popup's width should be a fixed width matching 
- * the allocated width of the combo box.
+ * Specifies whether the popup's width should be a fixed width
+ * matching the allocated width of the combo box.
  *
  * Since: 3.0
  **/
 void
 gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,
-                                    gboolean     fixed)
+                                     gboolean     fixed)
 {
   g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
 
@@ -5894,9 +5911,11 @@ gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,
  * gtk_combo_box_get_popup_fixed_width:
  * @combo_box: a #GtkComboBox
  *
- * Gets whether the popup uses a fixed width matching 
+ * Gets whether the popup uses a fixed width matching
  * the allocated width of the combo box.
  *
+ * Returns: %TRUE if the popup uses a fixed width
+ *
  * Since: 3.0
  **/
 gboolean
@@ -6551,7 +6570,7 @@ gtk_combo_box_get_preferred_height_for_width (GtkWidget *widget,
       size -= xpad;
 
       gtk_combo_box_measure_height_for_width (combo_box, size, &min_height, &nat_height);
-         
+
       min_height = MAX (min_height, but_height);
       nat_height = MAX (nat_height, but_height);