[9886] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Clist/CTree source incompatible changes

daemon@ATHENA.MIT.EDU (Lars Hamann)
Thu Nov 5 10:47:48 1998

Date: Thu, 05 Nov 1998 16:39:30 +0100 (CET)
From: Lars Hamann <lars@gtk.org>
To: gtk-list@redhat.com
Cc: Gtk+ Developers <gtk-devel-list@redhat.com>, gnome-list@gnome.org
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Hi!

I've just committed a patch to gtk+, which removes the scrollbars
from GtkCList/CTree. So all gtk+ code, that uses a CList or CTree
breaks. I.e. it will compile, but the scrollbars are gone. To make a
CList scrollable you have to add it to a GtkScrolledWindow or just
create the scrollbars on your own and set the adjustments in the clist.

Please change code like:

clist = gtk_clist_new (1);
gtk_container_add (GTK_CONTAINER (container), clist);
gtk_clist_set_policy (GTK_CLIST (clist), GTK_POLICY_ALWAYS,
                                 GTK_POLICY_AUTOMATIC);

to :

scrolled_win = gtk_scrolled_window_new (NULL, NULL);
clist = gtk_clist_new (1);
gtk_container_add (GTK_CONTAINER (container), scrolled_win);
gtk_container_add (GTK_CONTAINER (scrolled_win), clist);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
                                GTK_POLICY_AUTOMATIC,
                                GTK_POLICY_ALWAYS,);

gtk_clist_set_policy is now deprecated and completely non-functional.

GtkScrollableWindow can handle any widget, which provides "hadjustment",
"vadjustment" args via the gtk_object_arg_set mechanism.
If a widget does not provide these args, GtkScrolledWindow automatically
creates a viewport for the widget.

Sorry for the inconvenience, but we gain a lot more flexibility through
these source incompatibilities.

bye,
  Lars

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post