From f5a3b04a4318c31e49a2a4f169e5f172d3f42db4 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 15 Dec 2002 18:25:57 +0000 Subject: [PATCH] Always set default entry when loading new strings in the template_combo. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@215 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/wdgt-media-select.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/glabels2/src/wdgt-media-select.c b/glabels2/src/wdgt-media-select.c index 0238783b..c3e455d4 100644 --- a/glabels2/src/wdgt-media-select.c +++ b/glabels2/src/wdgt-media-select.c @@ -222,7 +222,6 @@ gl_wdgt_media_select_construct (glWdgtMediaSelect * media_select) media_select->template_combo = gtk_combo_new (); gtk_combo_set_popdown_strings (GTK_COMBO (media_select->template_combo), template_names); - gl_template_free_name_list (&template_names); media_select->template_entry = GTK_COMBO (media_select->template_combo)->entry; gtk_entry_set_editable (GTK_ENTRY (media_select->template_entry), @@ -230,8 +229,11 @@ gl_wdgt_media_select_construct (glWdgtMediaSelect * media_select) gtk_combo_set_value_in_list (GTK_COMBO(media_select->template_combo), TRUE, FALSE); gtk_widget_set_size_request (media_select->template_entry, 400, -1); + gtk_entry_set_text (GTK_ENTRY (media_select->template_entry), + template_names->data); gl_hig_hbox_add_widget (GL_HIG_HBOX(whbox), media_select->template_combo); + gl_template_free_name_list (&template_names); whbox = gl_hig_hbox_new (); gl_hig_vbox_add_widget (GL_HIG_VBOX(wvbox), whbox); @@ -339,6 +341,8 @@ page_size_entry_changed_cb (GtkEntry * entry, template_names = gl_template_get_name_list (page_size); gtk_combo_set_popdown_strings (GTK_COMBO (media_select->template_combo), template_names); + gtk_entry_set_text (GTK_ENTRY (media_select->template_entry), + template_names->data); gl_template_free_name_list (&template_names); } g_free (page_size); -- 2.39.5