summaryrefslogtreecommitdiff
path: root/src/easygtk.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-04-12 19:15:35 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-04-12 19:15:35 (GMT)
commit216a3d0121fabd678e50ea6b4fa2447ae9b921f0 (patch)
tree395fcd91b674ff5652e34b46207ba08cc9e7af68 /src/easygtk.c
parentedac614a164d9cac345d914f4320d71bdb16ab79 (diff)
Created a debugging layout and introduced a heavier use of GLib.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@58 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/easygtk.c')
-rw-r--r--src/easygtk.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/easygtk.c b/src/easygtk.c
index bcca8e4..d6f8dc4 100644
--- a/src/easygtk.c
+++ b/src/easygtk.c
@@ -192,6 +192,43 @@ GtkWidget *qck_create_label(GObject *object, const char *name, const char *capti
}
gtk_widget_show(result);
+ gtk_misc_set_alignment(GTK_MISC(result), 0, 0.5);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : object = espace dédié à l'inscription de références. *
+* name = nom à donner au nouveau composant. *
+* text = éventuel contenu initial du champ de saisie. *
+* *
+* Description : Crée et enregistre un composant 'GtkEntry'. *
+* *
+* Retour : Champ de saisie mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GtkWidget *qck_create_entry(GObject *object, const char *name, const char *text)
+{
+ GtkWidget *result; /* Résultat à renvoyer */
+
+ result = gtk_entry_new();
+
+ if (G_IS_OBJECT(object) && name != NULL)
+ {
+ gtk_widget_ref(result);
+ g_object_set_data_full(object, name, result, (GtkDestroyNotify)gtk_widget_unref);
+ }
+
+ gtk_widget_show(result);
+
+ if (text != NULL)
+ gtk_entry_set_text(GTK_ENTRY(result), text);
return result;