Re: gtk-list digest, Vol 1 #1921 - 6 msgs

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

 





I tried a button_pressed event on the GtkCombo then
change the list of strings but
it looks like this event is never generated, and of course
never processed. This is with GTK 2.

Any clue to achieve this?



i use the map_event for the combo popwin.


Hi,

thank's for your help. Now I can see the map_event being triggered...
But I still have problems with the following event handler ( see below).

If I use the

gtk_combo_set_popdown_strings (my_combo, type_list)

operations, the popup opens and closes immediately and I have
no chance to select or see anything in it. It just flash.

If I try instead gtk_list_insert_items           (gtk_list,
                                            type_list,
                                            0);

it crashes immediately.

Any help is appreciated :-)

Thank's

Pascal


----------------------------------------------------------------------------------------------------------- gboolean populate_type_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { GList *my_list ; GtkCombo *my_combo = GTK_COMBO(user_data); GList *type_list = get_global_types (); GtkList *gtk_list = (GtkList *) my_combo->list; gtk_list_clear_items (gtk_list, 0, -1);//works okay

   //gtk_combo_set_popdown_strings (my_combo, type_list);//flash
   //gtk_list_append_items (gtk_list, type_list); //crash
    gtk_list_insert_items           (gtk_list,//crash
                                            type_list,
                                            0);

   //commented out because with gtk_list_insert_items
   //I should not free it
   /*
   my_list = type_list;
     while (my_list)
       {
             g_free (my_list->data);
             my_list = my_list->next;
       }
     g_list_free (type_list);
   */
   return FALSE;
}

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux