forked from AuroraMiddleware/gtk
mention in the docs that -1 is a valid value and what it means.
Wed Oct 15 22:04:59 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtkcombobox.c (gtk_combo_box_get_active), (gtk_combo_box_set_active): mention in the docs that -1 is a valid value and what it means. * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_init): set the active item to -1 (default), (gtk_combo_box_entry_active_changed): do nothing when the index is < 0.
This commit is contained in:
parent
5a51188b8b
commit
8b34c308d0
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
Wed Oct 15 22:04:59 2003 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_get_active),
|
||||||
|
(gtk_combo_box_set_active): mention in the docs that -1 is a valid
|
||||||
|
value and what it means.
|
||||||
|
|
||||||
|
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_init): set the active
|
||||||
|
item to -1 (default),
|
||||||
|
(gtk_combo_box_entry_active_changed): do nothing when the index is
|
||||||
|
< 0.
|
||||||
|
|
||||||
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
Wed Oct 15 22:04:59 2003 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_get_active),
|
||||||
|
(gtk_combo_box_set_active): mention in the docs that -1 is a valid
|
||||||
|
value and what it means.
|
||||||
|
|
||||||
|
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_init): set the active
|
||||||
|
item to -1 (default),
|
||||||
|
(gtk_combo_box_entry_active_changed): do nothing when the index is
|
||||||
|
< 0.
|
||||||
|
|
||||||
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
Wed Oct 15 22:04:59 2003 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_get_active),
|
||||||
|
(gtk_combo_box_set_active): mention in the docs that -1 is a valid
|
||||||
|
value and what it means.
|
||||||
|
|
||||||
|
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_init): set the active
|
||||||
|
item to -1 (default),
|
||||||
|
(gtk_combo_box_entry_active_changed): do nothing when the index is
|
||||||
|
< 0.
|
||||||
|
|
||||||
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
Wed Oct 15 22:04:59 2003 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_get_active),
|
||||||
|
(gtk_combo_box_set_active): mention in the docs that -1 is a valid
|
||||||
|
value and what it means.
|
||||||
|
|
||||||
|
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_init): set the active
|
||||||
|
item to -1 (default),
|
||||||
|
(gtk_combo_box_entry_active_changed): do nothing when the index is
|
||||||
|
< 0.
|
||||||
|
|
||||||
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
Wed Oct 15 22:04:59 2003 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_get_active),
|
||||||
|
(gtk_combo_box_set_active): mention in the docs that -1 is a valid
|
||||||
|
value and what it means.
|
||||||
|
|
||||||
|
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_init): set the active
|
||||||
|
item to -1 (default),
|
||||||
|
(gtk_combo_box_entry_active_changed): do nothing when the index is
|
||||||
|
< 0.
|
||||||
|
|
||||||
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
Tue Oct 14 16:10:21 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
* gtk/gtkcombobox.c (gtk_combo_box_set_active_iter): New function
|
||||||
|
@ -2316,9 +2316,11 @@ gtk_combo_box_set_column_span_column (GtkComboBox *combo_box,
|
|||||||
* gtk_combo_box_get_active:
|
* gtk_combo_box_get_active:
|
||||||
* @combo_box: A #GtkComboBox.
|
* @combo_box: A #GtkComboBox.
|
||||||
*
|
*
|
||||||
* Returns the index of the currently active item.
|
* Returns the index of the currently active item, or -1 if there's no
|
||||||
|
* active item.
|
||||||
*
|
*
|
||||||
* Return value: An integer which is the index of the currently active item.
|
* Return value: An integer which is the index of the currently active item, or
|
||||||
|
* -1 if there's no active item.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
@ -2333,7 +2335,8 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
|
|||||||
/**
|
/**
|
||||||
* gtk_combo_box_set_active:
|
* gtk_combo_box_set_active:
|
||||||
* @combo_box: A #GtkComboBox.
|
* @combo_box: A #GtkComboBox.
|
||||||
* @index: An index in the model passed during construction.
|
* @index: An index in the model passed during construction, or -1 to have
|
||||||
|
* no active item.
|
||||||
*
|
*
|
||||||
* Sets the active item of @combo_box to be the item at @index.
|
* Sets the active item of @combo_box to be the item at @index.
|
||||||
*
|
*
|
||||||
|
@ -128,6 +128,8 @@ gtk_combo_box_entry_init (GtkComboBoxEntry *entry_box)
|
|||||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (entry_box),
|
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (entry_box),
|
||||||
entry_box->priv->text_renderer, TRUE);
|
entry_box->priv->text_renderer, TRUE);
|
||||||
|
|
||||||
|
gtk_combo_box_set_active_item (GTK_COMBO_BOX (entry_box), -1);
|
||||||
|
|
||||||
g_signal_connect (entry_box->priv->entry, "changed",
|
g_signal_connect (entry_box->priv->entry, "changed",
|
||||||
G_CALLBACK (gtk_combo_box_entry_contents_changed),
|
G_CALLBACK (gtk_combo_box_entry_contents_changed),
|
||||||
entry_box);
|
entry_box);
|
||||||
@ -188,9 +190,7 @@ gtk_combo_box_entry_active_changed (GtkComboBox *combo_box,
|
|||||||
gtk_combo_box_entry_contents_changed,
|
gtk_combo_box_entry_contents_changed,
|
||||||
combo_box);
|
combo_box);
|
||||||
|
|
||||||
if (index < 0)
|
if (index >= 0)
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry_box->priv->entry), "");
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
gchar *str = NULL;
|
gchar *str = NULL;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
Loading…
Reference in New Issue
Block a user