graveman-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Graveman-cvs] Changes to graveman/current/src/tools.c


From: sylvain cresto
Subject: [Graveman-cvs] Changes to graveman/current/src/tools.c
Date: Sun, 27 Feb 2005 10:46:15 -0500

Index: graveman/current/src/tools.c
diff -u graveman/current/src/tools.c:1.16 graveman/current/src/tools.c:1.17
--- graveman/current/src/tools.c:1.16   Mon Feb 21 23:54:28 2005
+++ graveman/current/src/tools.c        Sun Feb 27 15:45:42 2005
@@ -119,6 +119,19 @@
   return Lvalue;
 }
 
+/* retourne la valeur d'un combo */
+gchar *get_combo_value_pos(GtkWidget *Acombo, gint Apos)
+{
+  GtkTreeModel *Lmodel = gtk_combo_box_get_model(GTK_COMBO_BOX(Acombo));
+  GtkTreeIter Liter;
+  gchar *Lvalue = NULL;
+  if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(Acombo), &Liter)) return 
g_strdup("");
+
+  gtk_tree_model_get(Lmodel, &Liter, Apos, &Lvalue, -1);
+
+  return Lvalue;
+}
+
 
 gint make_int(gchar *Abuf)
 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]