summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-04-26 07:59:53 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-04-26 07:59:53 -0400
commit7ae4a06d1f2591a95f521660a587b3d28a756e69 (patch)
tree5c6f977ed810dd6da2563080488dfd0ab46fb924 /gtk/gtkcombobox.h
parent54c3f05848967cc30356d69d4f34b5d112fe8aeb (diff)
downloadgtk+-7ae4a06d1f2591a95f521660a587b3d28a756e69.tar.gz
GtkComboBox: Improve gtk_combo_box_set_active_id
- Passing a NULL ID string should be equivalent to gtk_combo_box_set_active (combo_box, -1). - Use g_strcmp0() instead of strcmp() when comparing ID strings to avoid a crash when an ID is NULL. - Return a boolean indicating if the ID was found or not. https://bugzilla.gnome.org/show_bug.cgi?id=647806
Diffstat (limited to 'gtk/gtkcombobox.h')
-rw-r--r--gtk/gtkcombobox.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h
index 124a9bfb61..6156659c97 100644
--- a/gtk/gtkcombobox.h
+++ b/gtk/gtkcombobox.h
@@ -140,7 +140,7 @@ gint gtk_combo_box_get_id_column (GtkComboBox *combo_box);
void gtk_combo_box_set_id_column (GtkComboBox *combo_box,
gint id_column);
const gchar * gtk_combo_box_get_active_id (GtkComboBox *combo_box);
-void gtk_combo_box_set_active_id (GtkComboBox *combo_box,
+gboolean gtk_combo_box_set_active_id (GtkComboBox *combo_box,
const gchar *active_id);
G_END_DECLS