Two questions about GTK 1.2.10



Guys

I'm currently stumped with a couple of GTK 1.x problems - can somone
give me a hint (got no help from the docs I'm afraid):

1. How do I get the accelerator of a menu item ? To elaborate, I have
this tools thing (like in XChat) where the user adds a menu item and
associates a command with it. Since this is a GNOME app (anjuta), he can
obviously hover over the menu item and press the shortcut he wants to
associate with the menu item. So far, so good. But after restart, the
shortcuts are gone, probably because these menu items were not created
using GnomeUIInfo like the rest. So, I need a function call like
gtk_widget_set_accelerator, only the reverse, so that I can get the
current shortcut, store it somewhere and restore it at startup with
gtk_widget_set_accelerator.

2. gtk_combo_set_popdown_strings() is great for setting a list of
strings quickly, but what about the reverse ? I need a way to get the
current list of strings in a combo box, prepend a string to it and put
it back again. I tried this:
        Get the GtkList of the combo using combo->list
        Create a GtkListItem with the string
        Create a one member GList with the above list item
        Use gtk_list_prepend_items() to add the item to the list
Sadly, this does not work. So, basically, I need
gtk_combo_get_popdown_strings() - any hints ?

Thanks in advance.

-- 
Rgds,
Biswa.




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