Re: Problems with GtkComboBoxEntry



On Thu, 2004-09-30 at 17:27, Carlo Agrusti wrote:
Hi all,

I'm trying to use GtkComboBoxEntry widgets and I'm facing the following 
issue (gtk-2.4.10):

If I (using Glade) create a GtkComboBoxEntry with 
gtk_combo_box_entry_new () and then try to set a model for the combo 
with the following code:

   list = gtk_list_store_new (1, G_TYPE_STRING);
   gtk_list_store_append (list, & iter);
   gtk_list_store_set    (list, & iter, 0, "pippo", -1);
      
   gtk_list_store_append (list, & iter);
   gtk_list_store_set    (list, & iter, 0, "pipino", -1);
      
   gtk_list_store_append (list, & iter);
   gtk_list_store_set    (list, & iter, 0, "peppuccio", -1);
      
   gtk_combo_box_set_model (GTK_COMBO_BOX (cbox), GTK_TREE_MODEL (list));

I have my combo with three *empty* entries; setting a model for a 
GtkComboBoxEntry only works with combos generated with 
gtk_combo_box_entry_new_with_model. Am I missing something or there is a 
typo in gtk_combo_box_entry_new documentation?

Are you using glade to set up the GtkComboBoxEntry in the first place?

I recently reported a bug
(http://bugzilla.gnome.org/show_bug.cgi?id=154191) that might be related
to your problem.

-- 
Regards,
Martyn



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