Commit 66217ce8 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

document how to construct an empty GimpIntComboBox using g_object_new().

2005-09-27  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpintcombobox.c: document how to construct an
	empty GimpIntComboBox using g_object_new().

	* plug-ins/common/aa.c
	* plug-ins/common/channel_mixer.c
	* plug-ins/common/compose.c
	* plug-ins/common/decompose.c
	* plug-ins/common/newsprint.c
	* plug-ins/common/spheredesigner.c
	* plug-ins/gflare/gflare.c
	* plug-ins/pagecurl/pagecurl.c: use g_object_new() to construct an
	empty GimpIntComboBox. The old way of doing it caused warnings.
parent ebadf0cc
2005-09-27 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpintcombobox.c: document how to construct an
empty GimpIntComboBox using g_object_new().
* plug-ins/common/aa.c
* plug-ins/common/channel_mixer.c
* plug-ins/common/compose.c
* plug-ins/common/decompose.c
* plug-ins/common/newsprint.c
* plug-ins/common/spheredesigner.c
* plug-ins/gflare/gflare.c
* plug-ins/pagecurl/pagecurl.c: use g_object_new() to construct an
empty GimpIntComboBox. The old way of doing it caused warnings.
2005-09-27 Michael Natterer <mitch@gimp.org>
* app/actions/data-commands.c
......
......@@ -229,6 +229,9 @@ gimp_int_combo_box_init (GimpIntComboBox *combo_box)
* item. The items to fill the combo box with are specified as a %NULL
* terminated list of label/value pairs.
*
* If you need to construct an empty #GimpIntComboBox, it's best to use
* g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL).
*
* Return value: a new #GimpIntComboBox.
*
* Since: GIMP 2.2
......@@ -482,8 +485,8 @@ gimp_int_combo_box_get_active (GimpIntComboBox *combo_box,
*
* This function also calls the @callback once after setting the
* initial @value. This is often convenient when working with combo
* boxes that select a default active item (like for example
* gimp_drawable_combo_box_new). If you pass an invalid initial
* boxes that select a default active item, like for example
* gimp_drawable_combo_box_new(). If you pass an invalid initial
* @value, the @callback will be called with the default item active.
*
* Return value: the signal handler ID as returned by g_signal_connect()
......
......@@ -372,7 +372,7 @@ aa_dialog (gint selected)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
combo = gimp_int_combo_box_new (NULL, 0);
combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
......
......@@ -530,7 +530,7 @@ cm_dialog (GimpDrawable *drawable)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
mix.combo = gimp_int_combo_box_new (NULL, 0);
mix.combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
gimp_int_combo_box_append (GIMP_INT_COMBO_BOX (mix.combo),
GIMP_INT_STORE_VALUE, CM_RED_CHANNEL,
......
......@@ -1461,7 +1461,7 @@ compose_dialog (const gchar *compose_type,
gtk_size_group_add_widget (size_group, label);
g_object_unref (size_group);
combo = gimp_int_combo_box_new (NULL, 0);
combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
for (j = 0; j < G_N_ELEMENTS (compose_dsc); j++)
{
gchar *label = g_strdup (gettext (compose_dsc[j].compose_type));
......
......@@ -1289,7 +1289,7 @@ decompose_dialog (void)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
combo = gimp_int_combo_box_new (NULL, 0);
combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
for (j = 0; j < G_N_ELEMENTS (extract); j++)
{
if (extract[j].dialog)
......
......@@ -1037,7 +1037,7 @@ new_channel (const chan_tmpl *ct, GtkWidget *preview)
gtk_size_group_add_widget (group, label);
chst->combo = gimp_int_combo_box_new (NULL, 0);
chst->combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
for (sf = spotfn_list, i = 0; sf->name; sf++, i++)
gimp_int_combo_box_append (GIMP_INT_COMBO_BOX (chst->combo),
......
......@@ -2677,8 +2677,7 @@ makewindow (void)
_("Type:"), 0.0, 0.5,
typemenu, 2, FALSE);
texturemenu = gimp_int_combo_box_new (NULL, 0);
texturemenu = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
{
struct textures_t *t;
......
......@@ -4375,7 +4375,7 @@ gradient_menu_new (GradientMenuCallback callback,
gtk_widget_set_size_request (gm->preview,
GM_PREVIEW_WIDTH, GM_PREVIEW_HEIGHT);
gm->combo = gimp_int_combo_box_new (NULL, 0);
gm->combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
g_signal_connect (gm->combo, "changed",
G_CALLBACK (gm_gradient_combo_callback),
......
......@@ -574,7 +574,7 @@ dialog (void)
G_CALLBACK (gimp_toggle_button_update),
&curl.shade);
combo = gimp_int_combo_box_new (NULL, -1);
combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL);
gimp_int_combo_box_prepend (GIMP_INT_COMBO_BOX (combo),
GIMP_INT_STORE_VALUE, CURL_COLORS_GRADIENT_REVERSE,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment