[Gpa-commits] r850 - trunk/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 18 18:50:43 CET 2008


Author: marcus
Date: 2008-03-18 18:50:43 +0100 (Tue, 18 Mar 2008)
New Revision: 850

Modified:
   trunk/src/ChangeLog
   trunk/src/gpawidgets.c
Log:
2008-03-18  Marcus Brinkmann  <marcus at g10code.de>

	* gpawidgets.c (gpa_expiry_frame_new): Replace editable GtkCombo
	by uneditable GtkComboBox.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-03-18 17:40:27 UTC (rev 849)
+++ trunk/src/ChangeLog	2008-03-18 17:50:43 UTC (rev 850)
@@ -1,5 +1,8 @@
 2008-03-18  Marcus Brinkmann  <marcus at g10code.de>
 
+	* gpawidgets.c (gpa_expiry_frame_new): Replace editable GtkCombo
+	by uneditable GtkComboBox.
+
 	* gpawidgets.c (gpa_expiry_frame_new): Use
 	gtk_entry_set_width_chars instead of gtk_widget_set_size_request.
 

Modified: trunk/src/gpawidgets.c
===================================================================
--- trunk/src/gpawidgets.c	2008-03-18 17:40:27 UTC (rev 849)
+++ trunk/src/gpawidgets.c	2008-03-18 17:50:43 UTC (rev 850)
@@ -173,9 +173,7 @@
 GtkWidget *
 gpa_expiry_frame_new (GtkAccelGroup * accelGroup, GDate * expiryDate)
 {
-  GList *contentsAfter = NULL;
   gint i;
-
   GtkWidget *expiry_frame;
   GtkWidget *vboxExpire;
   GtkWidget *radioDont;
@@ -215,13 +213,12 @@
   gtk_entry_set_width_chars (GTK_ENTRY (entryAfter), strlen (" 00000 "));
   gtk_box_pack_start (GTK_BOX (hboxAfter), entryAfter, FALSE, FALSE, 0);
 
-  comboAfter = gtk_combo_new ();
+  comboAfter = gtk_combo_box_new_text ();
   frame->comboAfter = comboAfter;
-  gtk_combo_set_value_in_list (GTK_COMBO (comboAfter), TRUE, FALSE);
-  for (i = 0; i < 4; i++)
-    contentsAfter = g_list_append (contentsAfter,
-				   gpa_unit_expiry_time_string(i));
-  gtk_combo_set_popdown_strings (GTK_COMBO (comboAfter), contentsAfter);
+  for (i = 3; i >= 0; i--)
+    gtk_combo_box_prepend_text (GTK_COMBO_BOX (comboAfter), 
+				gpa_unit_expiry_time_string (i));
+  gtk_combo_box_set_active (GTK_COMBO_BOX (comboAfter), 0);
   gtk_box_pack_start (GTK_BOX (hboxAfter), comboAfter, FALSE, FALSE, 0);
 
   radioAt = gpa_radio_button_new_from_widget (GTK_RADIO_BUTTON (radioDont),



More information about the Gpa-commits mailing list