g_value_get_enum (value));
break;
+ case PROP_EDITING_CANCELED:
+ combo_box->priv->editing_canceled = g_value_get_boolean (value);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
sx = sy = 0;
- if (GTK_WIDGET_NO_WINDOW (child))
+ if (!gtk_widget_get_has_window (child))
{
sx += child->allocation.x;
sy += child->allocation.y;
*x = *y = 0;
- if (GTK_WIDGET_NO_WINDOW (sample))
+ if (!gtk_widget_get_has_window (sample))
{
*x += sample->allocation.x;
*y += sample->allocation.y;
gtk_tree_path_free (path);
- combo_box->priv->editing_canceled = FALSE;
+ g_object_set (combo_box,
+ "editing-canceled", FALSE,
+ NULL);
}
static void
/**
* gtk_combo_box_set_model:
* @combo_box: A #GtkComboBox
- * @model: A #GtkTreeModel
+ * @model: (allow-none): A #GtkTreeModel
*
- * Sets the model used by @combo_box to be @model. Will unset a previously set
+ * Sets the model used by @combo_box to be @model. Will unset a previously set
* model (if applicable). If model is %NULL, then it will unset the model.
*
* Note that this function does not clear the cell renderers, you have to
*
* Returns the #GtkTreeModel which is acting as data source for @combo_box.
*
- * Return value: A #GtkTreeModel which was passed during construction.
+ * Return value: (transfer none): A #GtkTreeModel which was passed during construction.
*
* Since: 2.4
*/
* gtk_combo_box_insert_text(), gtk_combo_box_prepend_text() and
* gtk_combo_box_remove_text().
*
- * Return value: A new text combo box.
+ * Return value: (transfer none): A new text combo box.
*
* Since: 2.4
*/
if (event->keyval == GDK_Escape)
{
- combo_box->priv->editing_canceled = TRUE;
-
+ g_object_set (combo_box,
+ "editing-canceled", TRUE,
+ NULL);
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
combo_box, 0);
/* we unset this if a menu item is activated */
- combo_box->priv->editing_canceled = TRUE;
+ g_object_set (combo_box,
+ "editing-canceled", TRUE,
+ NULL);
gtk_combo_box_popup (combo_box);
combo_box->priv->popup_idle_id = 0;
}
}
-gboolean
-_gtk_combo_box_editing_canceled (GtkComboBox *combo_box)
-{
- g_return_val_if_fail (GTK_IS_COMBO_BOX (combo_box), TRUE);
-
- return combo_box->priv->editing_canceled;
-}
-
/**
* gtk_combo_box_get_popup_accessible:
* @combo_box: a #GtkComboBox