paned: Redo the api

This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.

Update all users.

See #2719
This commit is contained in:
Matthias Clasen 2020-05-07 08:30:39 -04:00
parent fc9873e9ef
commit bc6643f3c2
20 changed files with 2161 additions and 2052 deletions

View File

@ -19,32 +19,14 @@ toggle_resize (GtkWidget *widget,
{
GtkWidget *parent;
GtkPaned *paned;
gboolean is_child1;
gboolean resize, shrink;
parent = gtk_widget_get_parent (child);
paned = GTK_PANED (parent);
is_child1 = (child == gtk_paned_get_child1 (paned));
if (is_child1)
g_object_get (paned,
"resize-child1", &resize,
"shrink-child1", &shrink,
NULL);
if (child == gtk_paned_get_start_child (paned))
gtk_paned_set_resize_start_child (paned, !gtk_paned_get_resize_start_child (paned));
else
g_object_get (paned,
"resize-child2", &resize,
"shrink-child2", &shrink,
NULL);
g_object_ref (child);
gtk_container_remove (GTK_CONTAINER (parent), child);
if (is_child1)
gtk_paned_pack1 (paned, child, !resize, shrink);
else
gtk_paned_pack2 (paned, child, !resize, shrink);
g_object_unref (child);
gtk_paned_set_resize_end_child (paned, !gtk_paned_get_resize_end_child (paned));
}
static void
@ -53,32 +35,14 @@ toggle_shrink (GtkWidget *widget,
{
GtkWidget *parent;
GtkPaned *paned;
gboolean is_child1;
gboolean resize, shrink;
parent = gtk_widget_get_parent (child);
paned = GTK_PANED (parent);
is_child1 = (child == gtk_paned_get_child1 (paned));
if (is_child1)
g_object_get (paned,
"resize-child1", &resize,
"shrink-child1", &shrink,
NULL);
if (child == gtk_paned_get_start_child (paned))
gtk_paned_set_shrink_start_child (paned, !gtk_paned_get_shrink_start_child (paned));
else
g_object_get (paned,
"resize-child2", &resize,
"shrink-child2", &shrink,
NULL);
g_object_ref (child);
gtk_container_remove (GTK_CONTAINER (parent), child);
if (is_child1)
gtk_paned_pack1 (paned, child, resize, !shrink);
else
gtk_paned_pack2 (paned, child, resize, !shrink);
g_object_unref (child);
gtk_paned_set_shrink_end_child (paned, !gtk_paned_get_shrink_end_child (paned));
}
static GtkWidget *
@ -93,8 +57,8 @@ create_pane_options (GtkPaned *paned,
GtkWidget *label;
GtkWidget *check_button;
child1 = gtk_paned_get_child1 (paned);
child2 = gtk_paned_get_child2 (paned);
child1 = gtk_paned_get_start_child (paned);
child2 = gtk_paned_get_end_child (paned);
frame = gtk_frame_new (frame_label);
gtk_widget_set_margin_start (frame, 4);
@ -167,22 +131,22 @@ do_panes (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (vbox), vpaned);
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
gtk_paned_set_start_child (GTK_PANED (vpaned), hpaned);
frame = gtk_frame_new (NULL);
gtk_widget_set_size_request (frame, 60, 60);
gtk_paned_add1 (GTK_PANED (hpaned), frame);
gtk_paned_set_start_child (GTK_PANED (hpaned), frame);
button = gtk_button_new_with_mnemonic ("_Hi there");
gtk_frame_set_child (GTK_FRAME (frame), button);
frame = gtk_frame_new (NULL);
gtk_widget_set_size_request (frame, 80, 60);
gtk_paned_add2 (GTK_PANED (hpaned), frame);
gtk_paned_set_end_child (GTK_PANED (hpaned), frame);
frame = gtk_frame_new (NULL);
gtk_widget_set_size_request (frame, 60, 80);
gtk_paned_add2 (GTK_PANED (vpaned), frame);
gtk_paned_set_end_child (GTK_PANED (vpaned), frame);
/* Now create toggle buttons to control sizing */

View File

@ -498,7 +498,9 @@ do_textview (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_paned_add1 (GTK_PANED (vpaned), sw);
gtk_paned_set_start_child (GTK_PANED (vpaned), sw);
gtk_paned_set_resize_start_child (GTK_PANED (vpaned), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (vpaned), TRUE);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), view1);
@ -506,7 +508,9 @@ do_textview (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_paned_add2 (GTK_PANED (vpaned), sw);
gtk_paned_set_end_child (GTK_PANED (vpaned), sw);
gtk_paned_set_resize_end_child (GTK_PANED (vpaned), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (vpaned), TRUE);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), view2);

View File

@ -123,7 +123,7 @@
</child>
<child>
<object class="GtkPaned">
<property name="shrink-child2">false</property>
<property name="shrink-end-child">false</property>
<property name="position">400</property>
<child>
<object class="GtkScrolledWindow">

View File

@ -656,28 +656,38 @@ create_panes (void)
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *pane;
GtkWidget *frame;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_pack1 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME, NULL),
FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME, NULL),
FALSE, FALSE);
gtk_container_add (GTK_CONTAINER (hbox),
pane);
frame = gtk_frame_new ("");
gtk_paned_set_start_child (GTK_PANED (pane), frame);
gtk_paned_set_resize_start_child (GTK_PANED (pane), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (pane), FALSE);
frame = gtk_frame_new ("");
gtk_paned_set_end_child (GTK_PANED (pane), frame);
gtk_paned_set_resize_end_child (GTK_PANED (pane), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (pane), FALSE);
gtk_container_add (GTK_CONTAINER (hbox), pane);
pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_paned_pack1 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME, NULL),
FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME, NULL),
FALSE, FALSE);
gtk_container_add (GTK_CONTAINER (hbox),
pane);
frame = gtk_frame_new ("");
gtk_paned_set_start_child (GTK_PANED (pane), frame);
gtk_paned_set_resize_start_child (GTK_PANED (pane), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (pane), FALSE);
frame = gtk_frame_new ("");
gtk_paned_set_end_child (GTK_PANED (pane), frame);
gtk_paned_set_resize_end_child (GTK_PANED (pane), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (pane), FALSE);
gtk_container_add (GTK_CONTAINER (hbox), pane);
gtk_container_add (GTK_CONTAINER (vbox), hbox);
gtk_container_add (GTK_CONTAINER (vbox),
g_object_new (GTK_TYPE_LABEL,

View File

@ -23,7 +23,7 @@
static void atk_value_interface_init (AtkValueIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkPanedAccessible, gtk_paned_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
G_DEFINE_TYPE_WITH_CODE (GtkPanedAccessible, gtk_paned_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
static void

View File

@ -22,7 +22,7 @@
#error "Only <gtk/gtk-a11y.h> can be included directly."
#endif
#include <gtk/a11y/gtkcontaineraccessible.h>
#include <gtk/a11y/gtkwidgetaccessible.h>
G_BEGIN_DECLS
@ -39,14 +39,14 @@ typedef struct _GtkPanedAccessiblePrivate GtkPanedAccessiblePrivate;
struct _GtkPanedAccessible
{
GtkContainerAccessible parent;
GtkWidgetAccessible parent;
GtkPanedAccessiblePrivate *priv;
};
struct _GtkPanedAccessibleClass
{
GtkContainerAccessibleClass parent_class;
GtkWidgetAccessibleClass parent_class;
};
GDK_AVAILABLE_IN_ALL

View File

@ -3300,7 +3300,7 @@ settings_load (GtkFileChooserWidget *impl)
update_time_renderer_visible (impl);
if (sidebar_width < 0)
{
GtkWidget *sidebar = gtk_paned_get_child1 (GTK_PANED (impl->browse_widgets_hpaned));
GtkWidget *sidebar = gtk_paned_get_start_child (GTK_PANED (impl->browse_widgets_hpaned));
gtk_widget_measure (sidebar, GTK_ORIENTATION_HORIZONTAL, -1,
NULL, &sidebar_width, NULL, NULL);

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkcontainer.h>
#include <gtk/gtkwidget.h>
G_BEGIN_DECLS
@ -44,21 +44,39 @@ GType gtk_paned_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_paned_new (GtkOrientation orientation);
GDK_AVAILABLE_IN_ALL
void gtk_paned_add1 (GtkPaned *paned,
GtkWidget *child);
void gtk_paned_set_start_child (GtkPaned *paned,
GtkWidget *child);
GDK_AVAILABLE_IN_ALL
void gtk_paned_add2 (GtkPaned *paned,
GtkWidget *child);
GtkWidget * gtk_paned_get_start_child (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
void gtk_paned_pack1 (GtkPaned *paned,
GtkWidget *child,
gboolean resize,
gboolean shrink);
void gtk_paned_set_resize_start_child (GtkPaned *paned,
gboolean resize);
GDK_AVAILABLE_IN_ALL
void gtk_paned_pack2 (GtkPaned *paned,
GtkWidget *child,
gboolean resize,
gboolean shrink);
gboolean gtk_paned_get_resize_start_child (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
void gtk_paned_set_end_child (GtkPaned *paned,
GtkWidget *child);
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_paned_get_end_child (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
void gtk_paned_set_shrink_start_child (GtkPaned *paned,
gboolean resize);
GDK_AVAILABLE_IN_ALL
gboolean gtk_paned_get_shrink_start_child (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
void gtk_paned_set_resize_end_child (GtkPaned *paned,
gboolean resize);
GDK_AVAILABLE_IN_ALL
gboolean gtk_paned_get_resize_end_child (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
void gtk_paned_set_shrink_end_child (GtkPaned *paned,
gboolean resize);
GDK_AVAILABLE_IN_ALL
gboolean gtk_paned_get_shrink_end_child (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
gint gtk_paned_get_position (GtkPaned *paned);
@ -66,11 +84,6 @@ GDK_AVAILABLE_IN_ALL
void gtk_paned_set_position (GtkPaned *paned,
gint position);
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_paned_get_child1 (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_paned_get_child2 (GtkPaned *paned);
GDK_AVAILABLE_IN_ALL
void gtk_paned_set_wide_handle (GtkPaned *paned,
gboolean wide);

View File

@ -10,9 +10,9 @@
<property name="vexpand">1</property>
<child>
<object class="GtkPaned" id="browse_widgets_hpaned">
<property name="shrink-child2">0</property>
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-end-child">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="vexpand">1</property>
<child>
<object class="GtkPlacesSidebar" id="places_sidebar">

View File

@ -206,7 +206,9 @@ create_calendar(void)
calendar_data.calendar_widget = calendar;
frame = create_frame ("<b>Calendar</b>", calendar, GTK_ALIGN_CENTER, GTK_ALIGN_CENTER);
gtk_paned_pack1 (GTK_PANED (hpaned), frame, TRUE, FALSE);
gtk_paned_set_start_child (GTK_PANED (hpaned), frame);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned), TRUE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned), FALSE);
gtk_calendar_mark_day (GTK_CALENDAR (calendar), 19);
@ -227,7 +229,9 @@ create_calendar(void)
&calendar_data);
rpane = gtk_box_new (GTK_ORIENTATION_VERTICAL, DEF_PAD_SMALL);
gtk_paned_pack2 (GTK_PANED (hpaned), rpane, FALSE, FALSE);
gtk_paned_set_end_child (GTK_PANED (hpaned), rpane);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned), FALSE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned), FALSE);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, DEF_PAD_SMALL);
frame = create_frame ("<b>Options</b>", vbox, GTK_ALIGN_FILL, GTK_ALIGN_CENTER);

View File

@ -101,8 +101,12 @@ text_grid (void)
gtk_window_set_child (GTK_WINDOW (window), paned1);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_paned_pack1 (GTK_PANED (paned1), box, TRUE, FALSE);
gtk_paned_pack2 (GTK_PANED (paned1), gtk_label_new ("Space"), TRUE, FALSE);
gtk_paned_set_start_child (GTK_PANED (paned1), box);
gtk_paned_set_resize_start_child (GTK_PANED (paned1), TRUE);
gtk_paned_set_shrink_start_child (GTK_PANED (paned1), FALSE);
gtk_paned_set_end_child (GTK_PANED (paned1), gtk_label_new ("Space"));
gtk_paned_set_resize_end_child (GTK_PANED (paned1), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (paned1), FALSE);
grid = gtk_grid_new ();
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);

View File

@ -4076,28 +4076,22 @@ static void
toggle_resize (GtkWidget *widget, GtkWidget *child)
{
GtkPaned *paned = GTK_PANED (gtk_widget_get_parent (child));
gboolean is_child1;
gboolean resize;
const char *prop;
is_child1 = (child == gtk_paned_get_child1 (paned));
prop = is_child1 ? "resize-child1" : "resize-child2";
g_object_get (paned, prop, &resize, NULL);
g_object_set (paned, prop, !resize, NULL);
if (child == gtk_paned_get_start_child (paned))
gtk_paned_set_resize_start_child (paned, !gtk_paned_get_resize_start_child (paned));
else
gtk_paned_set_resize_end_child (paned, !gtk_paned_get_resize_end_child (paned));
}
static void
toggle_shrink (GtkWidget *widget, GtkWidget *child)
{
GtkPaned *paned = GTK_PANED (gtk_widget_get_parent (child));
gboolean is_child1;
gboolean resize;
const char *prop;
is_child1 = (child == gtk_paned_get_child1 (paned));
prop = is_child1 ? "shrink-child1" : "shrink-child2";
g_object_get (paned, prop, &resize, NULL);
g_object_set (paned, prop, !resize, NULL);
if (child == gtk_paned_get_start_child (paned))
gtk_paned_set_shrink_start_child (paned, !gtk_paned_get_shrink_start_child (paned));
else
gtk_paned_set_shrink_end_child (paned, !gtk_paned_get_shrink_end_child (paned));
}
static GtkWidget *
@ -4112,8 +4106,8 @@ create_pane_options (GtkPaned *paned,
GtkWidget *label;
GtkWidget *check_button;
child1 = gtk_paned_get_child1 (paned);
child2 = gtk_paned_get_child2 (paned);
child1 = gtk_paned_get_start_child (paned);
child2 = gtk_paned_get_end_child (paned);
frame = gtk_frame_new (frame_label);
@ -4186,22 +4180,22 @@ create_panes (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (vbox), vpaned);
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
gtk_paned_set_start_child (GTK_PANED (vpaned), hpaned);
frame = gtk_frame_new (NULL);
gtk_widget_set_size_request (frame, 60, 60);
gtk_paned_add1 (GTK_PANED (hpaned), frame);
gtk_paned_set_start_child (GTK_PANED (hpaned), frame);
button = gtk_button_new_with_label ("Hi there");
gtk_frame_set_child (GTK_FRAME (frame), button);
frame = gtk_frame_new (NULL);
gtk_widget_set_size_request (frame, 80, 60);
gtk_paned_add2 (GTK_PANED (hpaned), frame);
gtk_paned_set_end_child (GTK_PANED (hpaned), frame);
frame = gtk_frame_new (NULL);
gtk_widget_set_size_request (frame, 60, 80);
gtk_paned_add2 (GTK_PANED (vpaned), frame);
gtk_paned_set_end_child (GTK_PANED (vpaned), frame);
/* Now create toggle buttons to control sizing */
@ -4261,7 +4255,9 @@ paned_keyboard_window1 (GtkWidget *widget)
gtk_window_set_child (GTK_WINDOW (window1), hpaned1);
frame1 = gtk_frame_new (NULL);
gtk_paned_pack1 (GTK_PANED (hpaned1), frame1, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (hpaned1), frame1);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned1), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned1), TRUE);
vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (frame1), vbox1);
@ -4276,10 +4272,14 @@ paned_keyboard_window1 (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (vbox1), button9);
vpaned1 = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_paned_pack2 (GTK_PANED (hpaned1), vpaned1, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (hpaned1), vpaned1);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned1), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned1), TRUE);
frame2 = gtk_frame_new (NULL);
gtk_paned_pack1 (GTK_PANED (vpaned1), frame2, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (vpaned1), frame2);
gtk_paned_set_resize_start_child (GTK_PANED (vpaned1), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (vpaned1), TRUE);
frame5 = gtk_frame_new (NULL);
gtk_frame_set_child (GTK_FRAME (frame2), frame5);
@ -4294,7 +4294,9 @@ paned_keyboard_window1 (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (hbox1), button6);
frame3 = gtk_frame_new (NULL);
gtk_paned_pack2 (GTK_PANED (vpaned1), frame3, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (vpaned1), frame3);
gtk_paned_set_resize_end_child (GTK_PANED (vpaned1), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (vpaned1), TRUE);
frame4 = gtk_frame_new ("Buttons");
gtk_frame_set_child (GTK_FRAME (frame3), frame4);
@ -4342,25 +4344,33 @@ paned_keyboard_window2 (GtkWidget *widget)
gtk_window_set_child (GTK_WINDOW (window2), hpaned2);
frame6 = gtk_frame_new (NULL);
gtk_paned_pack1 (GTK_PANED (hpaned2), frame6, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (hpaned2), frame6);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned2), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned2), TRUE);
button13 = gtk_button_new_with_label ("button13");
gtk_frame_set_child (GTK_FRAME (frame6), button13);
hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_paned_pack2 (GTK_PANED (hpaned2), hbox2, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (hpaned2), hbox2);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned2), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned2), TRUE);
vpaned2 = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_container_add (GTK_CONTAINER (hbox2), vpaned2);
frame7 = gtk_frame_new (NULL);
gtk_paned_pack1 (GTK_PANED (vpaned2), frame7, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (vpaned2), frame7);
gtk_paned_set_resize_start_child (GTK_PANED (vpaned2), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (vpaned2), TRUE);
button12 = gtk_button_new_with_label ("button12");
gtk_frame_set_child (GTK_FRAME (frame7), button12);
frame8 = gtk_frame_new (NULL);
gtk_paned_pack2 (GTK_PANED (vpaned2), frame8, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (vpaned2), frame8);
gtk_paned_set_resize_end_child (GTK_PANED (vpaned2), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (vpaned2), TRUE);
button11 = gtk_button_new_with_label ("button11");
gtk_frame_set_child (GTK_FRAME (frame8), button11);
@ -4407,31 +4417,43 @@ paned_keyboard_window3 (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (vbox2), hpaned3);
frame9 = gtk_frame_new (NULL);
gtk_paned_pack1 (GTK_PANED (hpaned3), frame9, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (hpaned3), frame9);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned3), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned3), TRUE);
button14 = gtk_button_new_with_label ("button14");
gtk_frame_set_child (GTK_FRAME (frame9), button14);
hpaned4 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_pack2 (GTK_PANED (hpaned3), hpaned4, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (hpaned3), hpaned4);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned3), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned3), TRUE);
frame10 = gtk_frame_new (NULL);
gtk_paned_pack1 (GTK_PANED (hpaned4), frame10, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (hpaned4), frame10);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned4), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned4), TRUE);
button15 = gtk_button_new_with_label ("button15");
gtk_frame_set_child (GTK_FRAME (frame10), button15);
hpaned5 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_pack2 (GTK_PANED (hpaned4), hpaned5, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (hpaned4), hpaned5);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned4), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned4), TRUE);
frame11 = gtk_frame_new (NULL);
gtk_paned_pack1 (GTK_PANED (hpaned5), frame11, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (hpaned5), frame11);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned5), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned5), TRUE);
button16 = gtk_button_new_with_label ("button16");
gtk_frame_set_child (GTK_FRAME (frame11), button16);
frame12 = gtk_frame_new (NULL);
gtk_paned_pack2 (GTK_PANED (hpaned5), frame12, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (hpaned5), frame12);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned5), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned5), TRUE);
button17 = gtk_button_new_with_label ("button17");
gtk_frame_set_child (GTK_FRAME (frame12), button17);
@ -4465,7 +4487,7 @@ paned_keyboard_window4 (GtkWidget *widget)
gtk_window_set_title (GTK_WINDOW (window4), "window4");
gtk_window_set_display (GTK_WINDOW (window4),
gtk_widget_get_display (widget));
gtk_widget_get_display (widget));
vbox3 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_window_set_child (GTK_WINDOW (window4), vbox3);
@ -4478,43 +4500,63 @@ paned_keyboard_window4 (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (vbox3), hpaned6);
vpaned3 = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_paned_pack1 (GTK_PANED (hpaned6), vpaned3, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (hpaned6), vpaned3);
gtk_paned_set_resize_start_child (GTK_PANED (hpaned6), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (hpaned6), TRUE);
button19 = gtk_button_new_with_label ("button19");
gtk_paned_pack1 (GTK_PANED (vpaned3), button19, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (vpaned3), button19);
gtk_paned_set_resize_start_child (GTK_PANED (vpaned3), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (vpaned3), TRUE);
button18 = gtk_button_new_with_label ("button18");
gtk_paned_pack2 (GTK_PANED (vpaned3), button18, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (vpaned3), button18);
gtk_paned_set_resize_end_child (GTK_PANED (vpaned3), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (vpaned3), TRUE);
hbox3 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_paned_pack2 (GTK_PANED (hpaned6), hbox3, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (hpaned6), hbox3);
gtk_paned_set_resize_end_child (GTK_PANED (hpaned6), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (hpaned6), TRUE);
vpaned4 = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_container_add (GTK_CONTAINER (hbox3), vpaned4);
button21 = gtk_button_new_with_label ("button21");
gtk_paned_pack1 (GTK_PANED (vpaned4), button21, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (vpaned4), button21);
gtk_paned_set_resize_start_child (GTK_PANED (vpaned4), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (vpaned4), TRUE);
button20 = gtk_button_new_with_label ("button20");
gtk_paned_pack2 (GTK_PANED (vpaned4), button20, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (vpaned4), button20);
gtk_paned_set_resize_end_child (GTK_PANED (vpaned4), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (vpaned4), TRUE);
vpaned5 = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_container_add (GTK_CONTAINER (hbox3), vpaned5);
button23 = gtk_button_new_with_label ("button23");
gtk_paned_pack1 (GTK_PANED (vpaned5), button23, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (vpaned5), button23);
gtk_paned_set_resize_start_child (GTK_PANED (vpaned5), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (vpaned5), TRUE);
button22 = gtk_button_new_with_label ("button22");
gtk_paned_pack2 (GTK_PANED (vpaned5), button22, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (vpaned5), button22);
gtk_paned_set_resize_end_child (GTK_PANED (vpaned5), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (vpaned5), TRUE);
vpaned6 = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_container_add (GTK_CONTAINER (hbox3), vpaned6);
button25 = gtk_button_new_with_label ("button25");
gtk_paned_pack1 (GTK_PANED (vpaned6), button25, FALSE, TRUE);
gtk_paned_set_start_child (GTK_PANED (vpaned6), button25);
gtk_paned_set_resize_start_child (GTK_PANED (vpaned6), FALSE);
gtk_paned_set_shrink_start_child (GTK_PANED (vpaned6), TRUE);
button24 = gtk_button_new_with_label ("button24");
gtk_paned_pack2 (GTK_PANED (vpaned6), button24, TRUE, TRUE);
gtk_paned_set_end_child (GTK_PANED (vpaned6), button24);
gtk_paned_set_resize_end_child (GTK_PANED (vpaned6), TRUE);
gtk_paned_set_shrink_end_child (GTK_PANED (vpaned6), TRUE);
return window4;
}

View File

@ -526,14 +526,14 @@ main (gint argc, gchar **argv)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_paned_add1 (GTK_PANED (paned), scrolled_window);
gtk_paned_set_start_child (GTK_PANED (paned), scrolled_window);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), tv);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_paned_add2 (GTK_PANED (paned), scrolled_window);
gtk_paned_set_end_child (GTK_PANED (paned), scrolled_window);
bbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_halign (bbox, GTK_ALIGN_START);
@ -581,7 +581,7 @@ main (gint argc, gchar **argv)
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), icon_list);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_paned_add2 (GTK_PANED (paned), scrolled_window);
gtk_paned_set_end_child (GTK_PANED (paned), scrolled_window);
gtk_widget_show (window);

View File

@ -9,8 +9,8 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkCheckButton" id="checkbutton1">
@ -34,8 +34,8 @@ World</property>
</child>
<child>
<object class="GtkPaned" id="paned2">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkRadioButton" id="radiobutton1">
@ -60,8 +60,8 @@ World</property>
</child>
<child>
<object class="GtkPaned" id="paned3">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkToggleButton" id="togglebutton1">
@ -86,8 +86,8 @@ World</property>
</child>
<child>
<object class="GtkPaned" id="paned4">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkButton" id="button1">

View File

@ -9,8 +9,8 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkCheckButton" id="checkbutton1">
@ -34,8 +34,8 @@
</child>
<child>
<object class="GtkPaned" id="paned2">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkRadioButton" id="radiobutton1">
@ -60,8 +60,8 @@
</child>
<child>
<object class="GtkPaned" id="paned3">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkToggleButton" id="togglebutton1">
@ -86,8 +86,8 @@
</child>
<child>
<object class="GtkPaned" id="paned4">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="position_set">1</property>
<child>
<object class="GtkButton" id="button1">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,8 @@
<property name="height_request">120</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="shrink-child1">0</property>
<property name="resize-child1">0</property>
<property name="shrink-start-child">0</property>
<property name="resize-start-child">0</property>
<property name="orientation">vertical</property>
<property name="position">10</property>
<child>

View File

@ -5,7 +5,7 @@
<property name="decorated">0</property>
<child>
<object class="GtkPaned" id="paned1">
<property name="resize-child1">0</property>
<property name="resize-start-child">0</property>
<property name="orientation">vertical</property>
<property name="position">10</property>
<child>