Re: toolbar api?




Artūras ?lajus said:
Gtk-WARNING **: mixing deprecated and non-deprecated GtkToolbar API is
not allowed at ./gtkchat line 341.
wtf? :/

my $toolChannels = $gladexml->get_widget('toolChannels');
$toolChannels->insert(Gtk2::ToggleToolButton->new, -1);

in gtk+ 2.4, the new GtkUIManager adds action-based menus and toolbars.  part
of this is a redesign of the toolbar, with new API.  for compatibility, the
old API is still supported, but for various technical reasons, you cannot use
the new APIs and the old APIs on the same toolbar.

glade and libglade predate gtk+ 2.4, obviously, and it appears that they are
still using the old toolbar APIs.  since glade has started using the old
toolbar API for you, you are stuck having to use the old toolbar API in your
app code.  you'll need to use insert_item() instead of insert() (yes, despite
the fact that  it says "this method is deprecated").

http://developer.gnome.org/doc/API/2.0/gtk/GtkToolbar.html#gtk-toolbar-insert



-- 
muppet <scott at asofyet dot org>



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