mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-23 04:51:44 +00:00
use accessors instead of scrolled_window->vscrollbar.
2009-03-23 Michael Natterer <mitch@gimp.org> * app/widgets/gimpcontainerbox.c: use accessors instead of scrolled_window->vscrollbar. svn path=/trunk/; revision=28206
This commit is contained in:
parent
b11b678d2d
commit
0251d98b64
|
@ -1,3 +1,8 @@
|
||||||
|
2009-03-23 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/widgets/gimpcontainerbox.c: use accessors instead of
|
||||||
|
scrolled_window->vscrollbar.
|
||||||
|
|
||||||
2009-03-23 Michael Natterer <mitch@gimp.org>
|
2009-03-23 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/widgets/gimpcombotagentry.c: use accessors instead of
|
* app/widgets/gimpcombotagentry.c: use accessors instead of
|
||||||
|
|
|
@ -75,13 +75,15 @@ static void
|
||||||
gimp_container_box_init (GimpContainerBox *box)
|
gimp_container_box_init (GimpContainerBox *box)
|
||||||
{
|
{
|
||||||
GimpContainerView *view = GIMP_CONTAINER_VIEW (box);
|
GimpContainerView *view = GIMP_CONTAINER_VIEW (box);
|
||||||
|
GtkWidget *sb;
|
||||||
|
|
||||||
box->scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
box->scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (box), box->scrolled_win, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (box), box->scrolled_win, TRUE, TRUE, 0);
|
||||||
gtk_widget_show (box->scrolled_win);
|
gtk_widget_show (box->scrolled_win);
|
||||||
|
|
||||||
GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (box->scrolled_win)->vscrollbar,
|
sb = gtk_scrolled_window_get_vscrollbar (GTK_SCROLLED_WINDOW (box->scrolled_win));
|
||||||
GTK_CAN_FOCUS);
|
|
||||||
|
GTK_WIDGET_UNSET_FLAGS (sb, GTK_CAN_FOCUS);
|
||||||
|
|
||||||
gimp_container_view_set_dnd_widget (view, box->scrolled_win);
|
gimp_container_view_set_dnd_widget (view, box->scrolled_win);
|
||||||
}
|
}
|
||||||
|
@ -106,6 +108,7 @@ gimp_container_box_set_size_request (GimpContainerBox *box,
|
||||||
GimpContainerView *view;
|
GimpContainerView *view;
|
||||||
GtkScrolledWindowClass *sw_class;
|
GtkScrolledWindowClass *sw_class;
|
||||||
GtkStyle *sw_style;
|
GtkStyle *sw_style;
|
||||||
|
GtkWidget *sb;
|
||||||
GtkRequisition req;
|
GtkRequisition req;
|
||||||
gint view_size;
|
gint view_size;
|
||||||
gint scrollbar_width;
|
gint scrollbar_width;
|
||||||
|
@ -130,8 +133,9 @@ gimp_container_box_set_size_request (GimpContainerBox *box,
|
||||||
"scrollbar-spacing", &scrollbar_width,
|
"scrollbar-spacing", &scrollbar_width,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_widget_size_request (GTK_SCROLLED_WINDOW (box->scrolled_win)->vscrollbar,
|
sb = gtk_scrolled_window_get_vscrollbar (GTK_SCROLLED_WINDOW (box->scrolled_win));
|
||||||
&req);
|
|
||||||
|
gtk_widget_size_request (sb, &req);
|
||||||
scrollbar_width += req.width;
|
scrollbar_width += req.width;
|
||||||
|
|
||||||
border_x = border_y = gtk_container_get_border_width (GTK_CONTAINER (box));
|
border_x = border_y = gtk_container_get_border_width (GTK_CONTAINER (box));
|
||||||
|
|
Loading…
Reference in a new issue