diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-12-31 21:47:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-12-31 21:47:47 (GMT) |
commit | 36be37f57a66515444ffbfec6242b991f8346c09 (patch) | |
tree | 89fbc849416d59989f4d5569f5fb5e912c99e652 /src/gtkext/easygtk.c | |
parent | 555e12fb47d57f354bcdd7fdd54be7be50eeba4c (diff) |
Added a dialog box to jump to a given address
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@314 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/easygtk.c')
-rw-r--r-- | src/gtkext/easygtk.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gtkext/easygtk.c b/src/gtkext/easygtk.c index 8aea549..29fdec6 100644 --- a/src/gtkext/easygtk.c +++ b/src/gtkext/easygtk.c @@ -510,9 +510,41 @@ GtkWidget *qck_create_combobox(GObject *object, const char *name, GCallback hand } +/****************************************************************************** +* * +* 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_combobox2(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) + { + 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; + +} /****************************************************************************** |