summaryrefslogtreecommitdiff
path: root/src/gtkext/easygtk.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-01-27 22:44:06 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-01-27 22:44:06 (GMT)
commit24013fb80fc02d8918aea51ee169d6521c74ee42 (patch)
treea3b645be6a97abcd6c327c79b07bfde4a7db5dd2 /src/gtkext/easygtk.c
parent5c7ea8e2137e4e5bb2887de0d1ffd8a0b277636e (diff)
Updated code and removed some GCC warnings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@333 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/easygtk.c')
-rw-r--r--src/gtkext/easygtk.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/gtkext/easygtk.c b/src/gtkext/easygtk.c
index 29fdec6..2d000e7 100644
--- a/src/gtkext/easygtk.c
+++ b/src/gtkext/easygtk.c
@@ -529,6 +529,43 @@ GtkWidget *qck_create_combobox2(GObject *object, const char *name, GCallback han
{
GtkWidget *result; /* Résultat à renvoyer */
+ result = gtk_combo_box_text_new();
+
+ if (G_IS_OBJECT(object) && name != NULL)
+ {
+ g_object_ref(G_OBJECT(result));
+ g_object_set_data_full(object, name, result, (GDestroyNotify)g_object_unref);
+ }
+
+ gtk_widget_show(result);
+
+ if (handler != NULL)
+ g_signal_connect(result, "changed", handler, data);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : object = espace dédié à l'inscription de références. *
+* name = nom à donner au nouveau composant. *
+* handler = éventuelle fonction de sélection associée. *
+* data = données à transmettre avec l'événement si besoin. *
+* *
+* Description : Crée et enregistre un composant 'GtkComboBox'. *
+* *
+* Retour : Composant mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GtkWidget *qck_create_combobox_with_entry(GObject *object, const char *name, GCallback handler, gpointer data)
+{
+ GtkWidget *result; /* Résultat à renvoyer */
+
result = gtk_combo_box_text_new_with_entry();
if (G_IS_OBJECT(object) && name != NULL)