box: Remove fill child property

GtkWidget:halign and GtkWidget:valign are sufficient
This commit is contained in:
Timm Bäder 2017-04-21 22:34:36 +02:00
parent 5729ea7744
commit c92b7d4224
190 changed files with 1117 additions and 2800 deletions

View File

@ -96,12 +96,12 @@ create_page1 (GtkWidget *assistant)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
label = gtk_label_new ("You must fill out this entry to continue:");
gtk_box_pack_start (GTK_BOX (box), label, FALSE);
gtk_box_pack_start (GTK_BOX (box), label);
entry = gtk_entry_new ();
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (box), entry, TRUE);
gtk_box_pack_start (GTK_BOX (box), entry);
g_signal_connect (G_OBJECT (entry), "changed",
G_CALLBACK (on_entry_changed), assistant);
@ -119,7 +119,7 @@ create_page2 (GtkWidget *assistant)
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
"even if you do not check this");
gtk_box_pack_start (GTK_BOX (box), checkbutton, FALSE);
gtk_box_pack_start (GTK_BOX (box), checkbutton);
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);

View File

@ -70,64 +70,52 @@ do_button_box (GtkWidget *do_widget)
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
gtk_widget_set_margin_top (frame_horz, 10);
gtk_widget_set_margin_bottom (frame_horz, 10);
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE);
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
g_object_set (vbox, "margin", 10, NULL);
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
gtk_box_pack_start (GTK_BOX (vbox),
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
TRUE);
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD));
gtk_box_pack_start (GTK_BOX (vbox),
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
TRUE);
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE));
gtk_box_pack_start (GTK_BOX (vbox),
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
TRUE);
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START));
gtk_box_pack_start (GTK_BOX (vbox),
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
TRUE);
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END));
gtk_box_pack_start (GTK_BOX (vbox),
create_bbox (TRUE, "Center", 40, GTK_BUTTONBOX_CENTER),
TRUE);
create_bbox (TRUE, "Center", 40, GTK_BUTTONBOX_CENTER));
gtk_box_pack_start (GTK_BOX (vbox),
create_bbox (TRUE, "Expand", 0, GTK_BUTTONBOX_EXPAND),
TRUE);
create_bbox (TRUE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
frame_vert = gtk_frame_new ("Vertical Button Boxes");
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE);
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
g_object_set (hbox, "margin", 10, NULL);
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
gtk_box_pack_start (GTK_BOX (hbox),
create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD),
TRUE);
create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD));
gtk_box_pack_start (GTK_BOX (hbox),
create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE),
TRUE);
create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE));
gtk_box_pack_start (GTK_BOX (hbox),
create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START),
TRUE);
create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START));
gtk_box_pack_start (GTK_BOX (hbox),
create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END),
TRUE);
create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END));
gtk_box_pack_start (GTK_BOX (hbox),
create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER),
TRUE);
create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER));
gtk_box_pack_start (GTK_BOX (hbox),
create_bbox (FALSE, "Expand", 0, GTK_BUTTONBOX_EXPAND),
TRUE);
create_bbox (FALSE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
}
if (!gtk_widget_get_visible (window))

View File

@ -312,7 +312,7 @@ create_frame (ChangeDisplayInfo *info,
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (hbox), scrollwin, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), scrollwin);
*tree_view = gtk_tree_view_new ();
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
@ -322,7 +322,7 @@ create_frame (ChangeDisplayInfo *info,
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox);
if (!info->size_group)
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@ -362,11 +362,11 @@ create_display_frame (ChangeDisplayInfo *info)
button = left_align_button_new ("_Open...");
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (button_vbox), button);
button = left_align_button_new ("_Close");
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (button_vbox), button);
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
G_TYPE_STRING,
@ -539,10 +539,10 @@ do_changedisplay (GtkWidget *do_widget)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
g_object_set (vbox, "margin", 8, NULL);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE);
gtk_box_pack_start (GTK_BOX (content_area), vbox);
frame = create_display_frame (info);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
initialize_displays (info);

View File

@ -225,45 +225,45 @@ do_clipboard (GtkWidget *do_widget)
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
g_object_set (hbox, "margin", 8, NULL);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
/* Create the first entry */
entry = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), entry);
/* Create the button */
button = gtk_button_new_with_mnemonic (_("_Copy"));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), button);
g_signal_connect (button, "clicked",
G_CALLBACK (copy_button_clicked), entry);
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
g_object_set (hbox, "margin", 8, NULL);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
/* Create the second entry */
entry = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), entry);
/* Create the button */
button = gtk_button_new_with_mnemonic (_("_Paste"));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), button);
g_signal_connect (button, "clicked",
G_CALLBACK (paste_button_clicked), entry);
label = gtk_label_new ("Images can be transferred via the clipboard, too");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
g_object_set (hbox, "margin", 8, NULL);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
/* Create the first image */
image = gtk_image_new_from_icon_name ("dialog-warning",

View File

@ -87,7 +87,7 @@ do_colorsel (GtkWidget *do_widget)
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
da = gtk_drawing_area_new ();
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 200);
@ -100,7 +100,7 @@ do_colorsel (GtkWidget *do_widget)
gtk_widget_set_halign (button, GTK_ALIGN_END);
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), button);
g_signal_connect (button, "clicked",
G_CALLBACK (change_color_callback), NULL);

View File

@ -326,7 +326,7 @@ do_combobox (GtkWidget *do_widget)
* insensitive rows
*/
frame = gtk_frame_new ("Items with icons");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
g_object_set (box, "margin", 5, NULL);
@ -367,7 +367,7 @@ do_combobox (GtkWidget *do_widget)
/* A combobox demonstrating trees.
*/
frame = gtk_frame_new ("Where are we ?");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
g_object_set (box, "margin", 5, NULL);
@ -395,7 +395,7 @@ do_combobox (GtkWidget *do_widget)
/* A GtkComboBoxEntry with validation */
frame = gtk_frame_new ("Editable");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
g_object_set (box, "margin", 5, NULL);
@ -413,7 +413,7 @@ do_combobox (GtkWidget *do_widget)
/* A combobox with string IDs */
frame = gtk_frame_new ("String IDs");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
g_object_set (box, "margin", 5, NULL);

View File

@ -27,13 +27,13 @@ add_section (GtkWidget *box,
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_widget_set_margin_top (label, 10);
gtk_widget_set_margin_bottom (label, 10);
gtk_box_pack_start (GTK_BOX (box), label, TRUE);
gtk_box_pack_start (GTK_BOX (box), label);
section = gtk_flow_box_new ();
gtk_widget_set_halign (section, GTK_ALIGN_START);
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (section), GTK_SELECTION_NONE);
gtk_flow_box_set_min_children_per_line (GTK_FLOW_BOX (section), 2);
gtk_flow_box_set_max_children_per_line (GTK_FLOW_BOX (section), 20);
gtk_box_pack_start (GTK_BOX (box), section, TRUE);
gtk_box_pack_start (GTK_BOX (box), section);
return section;
}

View File

@ -56,15 +56,15 @@ interactive_dialog_clicked (GtkButton *button,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (content_area), hbox);
image = gtk_image_new_from_icon_name ("dialog-question", GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), image);
table = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
gtk_box_pack_start (GTK_BOX (hbox), table, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), table);
label = gtk_label_new_with_mnemonic ("_Entry 1");
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
local_entry1 = gtk_entry_new ();
@ -122,30 +122,29 @@ do_dialog (GtkWidget *do_widget)
/* Standard message dialog */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
button = gtk_button_new_with_mnemonic ("_Message Dialog");
g_signal_connect (button, "clicked",
G_CALLBACK (message_dialog_clicked), NULL);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), button);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
FALSE);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
/* Interactive dialog*/
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
g_signal_connect (button, "clicked",
G_CALLBACK (interactive_dialog_clicked), NULL);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), vbox2);
gtk_box_pack_start (GTK_BOX (vbox2), button);
table = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), table);
label = gtk_label_new_with_mnemonic ("_Entry 1");
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);

View File

@ -221,11 +221,11 @@ do_drawingarea (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
"<u>Checkerboard pattern</u>");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
da = gtk_drawing_area_new ();
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
@ -240,11 +240,11 @@ do_drawingarea (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
"<u>Scribble area</u>");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
da = gtk_drawing_area_new ();
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);

View File

@ -357,8 +357,7 @@ do_editable_cells (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Shopping list (you can edit the cells!)"),
FALSE);
gtk_label_new ("Shopping list (you can edit the cells!)"));
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
@ -366,7 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), sw);
/* create models */
items_model = create_items_model ();
@ -387,17 +386,17 @@ do_editable_cells (GtkWidget *do_widget)
/* some buttons */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
button = gtk_button_new_with_label ("Add item");
g_signal_connect (button, "clicked",
G_CALLBACK (add_item), treeview);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button);
button = gtk_button_new_with_label ("Remove item");
g_signal_connect (button, "clicked",
G_CALLBACK (remove_item), treeview);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button);
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
}

View File

@ -34,19 +34,19 @@ do_entry_buffer (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
"Entries share a buffer. Typing in one is reflected in the other.");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
/* Create a buffer */
buffer = gtk_entry_buffer_new (NULL, 0);
/* Create our first entry */
entry = gtk_entry_new_with_buffer (buffer);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), entry);
/* Create the second entry */
entry = gtk_entry_new_with_buffer (buffer);
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), entry);
g_object_unref (buffer);
}

View File

@ -60,11 +60,11 @@ do_entry_completion (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
/* Create our entry */
entry = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), entry);
/* Create the completion object */
completion = gtk_entry_completion_new ();

View File

@ -25,19 +25,11 @@ expander_cb (GtkExpander *expander, GParamSpec *pspec, GtkWindow *dialog)
gtk_window_set_resizable (dialog, gtk_expander_get_expanded (expander));
}
static void
do_not_expand (GtkWidget *child, gpointer data)
{
gtk_container_child_set (GTK_CONTAINER (gtk_widget_get_parent (child)), child,
"fill", FALSE, NULL);
}
GtkWidget *
do_expander (GtkWidget *do_widget)
{
GtkWidget *toplevel;
GtkWidget *area;
GtkWidget *box;
GtkWidget *expander;
GtkWidget *sw;
GtkWidget *tv;
@ -57,10 +49,6 @@ do_expander (GtkWidget *do_widget)
"but not the full story.");
area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (window));
box = gtk_widget_get_parent (area);
gtk_container_child_set (GTK_CONTAINER (gtk_widget_get_parent (box)), box,
"fill", TRUE, NULL);
gtk_container_foreach (GTK_CONTAINER (area), do_not_expand, NULL);
expander = gtk_expander_new ("Details:");
sw = gtk_scrolled_window_new (NULL, NULL);
@ -85,7 +73,7 @@ do_expander (GtkWidget *do_widget)
"resize the window. Do it already !", -1);
gtk_container_add (GTK_CONTAINER (sw), tv);
gtk_container_add (GTK_CONTAINER (expander), sw);
gtk_box_pack_end (GTK_BOX (area), expander, TRUE);
gtk_box_pack_end (GTK_BOX (area), expander);
g_signal_connect (expander, "notify::expanded",
G_CALLBACK (expander_cb), window);

View File

@ -266,7 +266,7 @@ do_iconview (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), vbox);
tool_bar = gtk_toolbar_new ();
gtk_box_pack_start (GTK_BOX (vbox), tool_bar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), tool_bar);
up_button = gtk_tool_button_new (NULL, NULL);
gtk_tool_button_set_label (GTK_TOOL_BUTTON (up_button), _("_Up"));
@ -292,7 +292,7 @@ do_iconview (GtkWidget *do_widget)
GTK_POLICY_AUTOMATIC);
gtk_widget_set_vexpand (sw, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), sw);
/* Create the store and fill it with the contents of '/' */
parent = g_strdup ("/");

View File

@ -354,13 +354,13 @@ do_images (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
"<u>Image loaded from a file</u>");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
image = gtk_image_new_from_icon_name ("gtk3-demo", GTK_ICON_SIZE_DIALOG);
@ -372,13 +372,13 @@ do_images (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
"<u>Animation loaded from a file</u>");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
image = gtk_image_new_from_resource ("/images/floppybuddy.gif");
@ -389,13 +389,13 @@ do_images (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
"<u>Symbolic themed icon</u>");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
image = gtk_image_new_from_gicon (gicon, GTK_ICON_SIZE_DIALOG);
@ -408,13 +408,13 @@ do_images (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
"<u>Progressive image loading</u>");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
/* Create an empty image for now; the progressive loader
* will create the pixbuf and fill it in.
@ -426,7 +426,7 @@ do_images (GtkWidget *do_widget)
/* Sensitivity control */
button = gtk_toggle_button_new_with_mnemonic ("_Insensitive");
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), button);
g_signal_connect (button, "toggled",
G_CALLBACK (toggle_sensitivity_callback),

View File

@ -65,24 +65,24 @@ do_infobar (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), vbox);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), bar);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
button = gtk_toggle_button_new_with_label ("Message");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
gtk_container_add (GTK_CONTAINER (actions), button);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), bar);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
button = gtk_toggle_button_new_with_label ("Warning");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
@ -91,24 +91,24 @@ do_infobar (GtkWidget *do_widget)
bar = gtk_info_bar_new_with_buttons (_("_OK"), GTK_RESPONSE_OK, NULL);
gtk_info_bar_set_show_close_button (GTK_INFO_BAR (bar), TRUE);
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), bar);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
button = gtk_toggle_button_new_with_label ("Question");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
gtk_container_add (GTK_CONTAINER (actions), button);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), bar);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
button = gtk_toggle_button_new_with_label ("Error");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
@ -116,12 +116,12 @@ do_infobar (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (actions), button);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), bar);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
button = gtk_toggle_button_new_with_label ("Other");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
@ -130,7 +130,7 @@ do_infobar (GtkWidget *do_widget)
frame = gtk_frame_new ("Info bars");
gtk_widget_set_margin_top (frame, 8);
gtk_widget_set_margin_bottom (frame, 8);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
g_object_set (vbox2, "margin", 8, NULL);
@ -138,9 +138,9 @@ do_infobar (GtkWidget *do_widget)
/* Standard message dialog */
label = gtk_label_new ("An example of different info bars");
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), label);
gtk_box_pack_start (GTK_BOX (vbox2), actions, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), actions);
}
if (!gtk_widget_get_visible (window))

View File

@ -268,7 +268,7 @@ do_list_store (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
@ -276,7 +276,7 @@ do_list_store (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), sw);
/* create tree model */
model = create_model ();

View File

@ -359,11 +359,11 @@ do_listbox (GtkWidget *do_widget)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("Messages from Gtk+ and friends");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
scrolled = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_widget_set_vexpand (scrolled, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scrolled);
listbox = gtk_list_box_new ();
gtk_container_add (GTK_CONTAINER (scrolled), listbox);

View File

@ -90,7 +90,6 @@
</style>
</object>
<packing>
<property name="fill">0</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>

View File

@ -115,7 +115,7 @@ do_menus (GtkWidget *do_widget)
menubar = gtk_menu_bar_new ();
gtk_widget_set_hexpand (menubar, TRUE);
gtk_box_pack_start (GTK_BOX (box1), menubar, TRUE);
gtk_box_pack_start (GTK_BOX (box1), menubar);
gtk_widget_show (menubar);
menu = create_menu (2);
@ -136,19 +136,19 @@ do_menus (GtkWidget *do_widget)
gtk_widget_show (menuitem);
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE);
gtk_box_pack_start (GTK_BOX (box1), box2);
gtk_widget_show (box2);
button = gtk_button_new_with_label ("Flip");
g_signal_connect (button, "clicked",
G_CALLBACK (change_orientation), menubar);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE);
gtk_box_pack_start (GTK_BOX (box2), button);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Close");
g_signal_connect_swapped (button, "clicked",
G_CALLBACK(gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE);
gtk_box_pack_start (GTK_BOX (box2), button);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);

View File

@ -65,12 +65,12 @@ do_overlay (GtkWidget *do_widget)
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_widget_set_margin_top (label, 8);
gtk_widget_set_margin_bottom (label, 8);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "Your Lucky Number");
gtk_widget_set_margin_top (entry, 8);
gtk_widget_set_margin_bottom (entry, 8);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), entry);
gtk_container_add (GTK_CONTAINER (window), overlay);

View File

@ -148,7 +148,7 @@ do_panes (GtkWidget *do_widget)
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
g_object_set (vpaned, "margin", 5, NULL);
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), vpaned);
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
@ -177,15 +177,13 @@ do_panes (GtkWidget *do_widget)
create_pane_options (GTK_PANED (hpaned),
"Horizontal",
"Left",
"Right"),
FALSE);
"Right"));
gtk_box_pack_start (GTK_BOX (vbox),
create_pane_options (GTK_PANED (vpaned),
"Vertical",
"Top",
"Bottom"),
FALSE);
"Bottom"));
}
if (!gtk_widget_get_visible (window))

View File

@ -241,20 +241,20 @@ do_search_entry (GtkWidget *do_widget)
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
/* Create our entry */
entry = gtk_search_entry_new ();
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), entry);
/* Create the find and cancel buttons */
notebook = gtk_notebook_new ();
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
gtk_box_pack_start (GTK_BOX (hbox), notebook, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), notebook);
find_button = gtk_button_new_with_label ("Find");
g_signal_connect (find_button, "clicked",

View File

@ -91,12 +91,12 @@ do_search_entry2 (GtkWidget *do_widget)
entry = gtk_search_entry_new ();
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_widget_set_halign (container, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (container), entry, FALSE);
gtk_box_pack_start (GTK_BOX (container), entry);
searchbar = gtk_search_bar_new ();
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_ENTRY (entry));
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (searchbar), FALSE);
gtk_container_add (GTK_CONTAINER (searchbar), container);
gtk_box_pack_start (GTK_BOX (vbox), searchbar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), searchbar);
/* Hook the search bar to key presses */
g_signal_connect (window, "key-press-event",
@ -104,26 +104,26 @@ do_search_entry2 (GtkWidget *do_widget)
/* Help */
label = gtk_label_new ("Start Typing to search");
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), label);
/* Toggle button */
button = gtk_toggle_button_new_with_label ("Search");
g_object_bind_property (button, "active",
searchbar, "search-mode-enabled",
G_BINDING_BIDIRECTIONAL);
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), button);
/* Result */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
label = gtk_label_new ("Result:");
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_widget_set_margin_start (label, 6);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
g_signal_connect (entry, "search-changed",
G_CALLBACK (search_changed_cb), label);
@ -131,15 +131,15 @@ do_search_entry2 (GtkWidget *do_widget)
G_CALLBACK (changed_cb), label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
label = gtk_label_new ("Signal:");
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_widget_set_margin_start (label, 6);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
g_signal_connect (entry, "search-changed",
G_CALLBACK (search_changed), label);

View File

@ -49,7 +49,7 @@ do_sidebar (GtkWidget *do_widget)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
sidebar = gtk_stack_sidebar_new ();
gtk_box_pack_start (GTK_BOX (box), sidebar, FALSE);
gtk_box_pack_start (GTK_BOX (box), sidebar);
stack = gtk_stack_new ();
gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
@ -57,9 +57,9 @@ do_sidebar (GtkWidget *do_widget)
/* Separator between sidebar and stack */
widget = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
gtk_box_pack_start (GTK_BOX(box), widget, FALSE);
gtk_box_pack_start (GTK_BOX(box), widget);
gtk_box_pack_start (GTK_BOX (box), stack, TRUE);
gtk_box_pack_start (GTK_BOX (box), stack);
for (i=0; (c = *(pages+i)) != NULL; i++ )
{

View File

@ -116,7 +116,7 @@ do_sizegroup (GtkWidget *do_widget)
/* Create one frame holding color options */
frame = gtk_frame_new ("Color Options");
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
table = gtk_grid_new ();
g_object_set (table, "margin", 5, NULL);
@ -129,7 +129,7 @@ do_sizegroup (GtkWidget *do_widget)
/* And another frame holding line style options */
frame = gtk_frame_new ("Line Options");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
table = gtk_grid_new ();
g_object_set (table, "margin", 5, NULL);
@ -142,7 +142,7 @@ do_sizegroup (GtkWidget *do_widget)
/* And a check button to turn grouping on and off */
check_button = gtk_check_button_new_with_mnemonic ("_Enable grouping");
gtk_box_pack_start (GTK_BOX (vbox), check_button, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), check_button);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), TRUE);
g_signal_connect (check_button, "toggled",

View File

@ -53,7 +53,7 @@ do_spinner (GtkWidget *do_widget)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
g_object_set (vbox, "margin", 5, NULL);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE);
gtk_box_pack_start (GTK_BOX (content_area), vbox);
/* Sensitive */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);

View File

@ -157,7 +157,7 @@ create_text_view (GtkWidget *hbox,
guint timeout;
swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_box_pack_start (GTK_BOX (hbox), swindow, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), swindow);
textview = gtk_text_view_new ();
gtk_container_add (GTK_CONTAINER (swindow), textview);

View File

@ -124,13 +124,11 @@ palette_drop_item (GtkToolItem *drag_item,
if (GTK_TOOL_ITEM_GROUP (drag_group) != drop_group)
{
gboolean homogeneous, expand, fill, new_row;
gboolean homogeneous, new_row;
g_object_ref (drag_item);
gtk_container_child_get (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item),
"homogeneous", &homogeneous,
"expand", &expand,
"fill", &fill,
"new-row", &new_row,
NULL);
gtk_container_remove (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item));
@ -138,8 +136,6 @@ palette_drop_item (GtkToolItem *drag_item,
drag_item, drop_position);
gtk_container_child_set (GTK_CONTAINER (drop_group), GTK_WIDGET (drag_item),
"homogeneous", homogeneous,
"expand", expand,
"fill", fill,
"new-row", new_row,
NULL);
g_object_unref (drag_item);
@ -473,7 +469,7 @@ do_toolpalette (GtkWidget *do_widget)
"text", 0,
NULL);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_orientation), &iter);
gtk_box_pack_start (GTK_BOX (box), combo_orientation, FALSE);
gtk_box_pack_start (GTK_BOX (box), combo_orientation);
/* Style combo box: */
style_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
@ -512,11 +508,11 @@ do_toolpalette (GtkWidget *do_widget)
"text", 0,
NULL);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_style), &iter);
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE);
gtk_box_pack_start (GTK_BOX (box), combo_style);
/* Add hbox */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (box), hbox);
/* Add and fill the ToolPalette: */
palette = gtk_tool_palette_new ();
@ -549,7 +545,7 @@ do_toolpalette (GtkWidget *do_widget)
notebook = gtk_notebook_new ();
g_object_set (notebook, "margin", 6, NULL);
gtk_box_pack_end (GTK_BOX(hbox), notebook, FALSE);
gtk_box_pack_end (GTK_BOX(hbox), notebook);
/* ===== DnD for tool items ===== */
@ -751,19 +747,19 @@ load_special_items (GtkToolPalette *palette)
item = create_entry_item ("homogeneous=FALSE, expand=TRUE");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE, "expand", TRUE,
"homogeneous", FALSE,
NULL);
item = create_entry_item ("homogeneous=FALSE, expand=TRUE, fill=FALSE");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE, "expand", TRUE,
"fill", FALSE, NULL);
"homogeneous", FALSE,
NULL);
item = create_entry_item ("homogeneous=FALSE, expand=TRUE, new-row=TRUE");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE, "expand", TRUE,
"homogeneous", FALSE,
"new-row", TRUE, NULL);
item = gtk_tool_button_new (NULL, NULL);

View File

@ -402,8 +402,7 @@ do_tree_store (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Jonathan's Holiday Card Planning Sheet"),
FALSE);
gtk_label_new ("Jonathan's Holiday Card Planning Sheet"));
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
@ -411,7 +410,7 @@ do_tree_store (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), sw);
/* create model */
model = create_model ();

View File

@ -804,7 +804,7 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
"margin", 6,
"xalign", 0.0,
NULL);
gtk_box_pack_start (GTK_BOX (row), label, TRUE);
gtk_box_pack_start (GTK_BOX (row), label);
gdk_rgba_parse (&rgba, color);
swatch = g_object_new (g_type_from_name ("GtkColorSwatch"),
"rgba", &rgba,
@ -816,7 +816,7 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
NULL);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (box), swatch);
gtk_box_pack_start (GTK_BOX (row), box, FALSE);
gtk_box_pack_start (GTK_BOX (row), box);
gtk_list_box_insert (GTK_LIST_BOX (widget), row, -1);
row = gtk_widget_get_parent (row);
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
@ -915,7 +915,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
"hexpand", TRUE,
"xalign", 0.0,
NULL);
gtk_box_pack_start (GTK_BOX (row), label, TRUE);
gtk_box_pack_start (GTK_BOX (row), label);
gdk_rgba_parse (&rgba, colors[i].color);
swatch = g_object_new (g_type_from_name ("GtkColorSwatch"),
"rgba", &rgba,
@ -927,7 +927,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
NULL);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (box), swatch);
gtk_box_pack_start (GTK_BOX (row), box, FALSE);
gtk_box_pack_start (GTK_BOX (row), box);
gtk_list_box_insert (GTK_LIST_BOX (widget), row, -1);
row = gtk_widget_get_parent (row);
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);

View File

@ -450,9 +450,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<item>Jet McQuack</item>
</items>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="comboboxtext2">
@ -466,7 +463,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -479,7 +475,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<signal name="icon-release" handler="on_entry_icon_release" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="position">2</property>
</packing>
</child>
@ -491,7 +486,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="text" translatable="yes">entry</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">3</property>
</packing>
</child>
@ -515,7 +509,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="icon-name">window-close-symbolic</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -597,7 +590,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="adjustment">adjustment2</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">2</property>
</packing>
</child>
@ -610,14 +602,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="max-width-chars">2</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
@ -803,14 +791,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator1">
@ -830,9 +812,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="togglebutton2">
@ -842,7 +821,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="receives_default">1</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -854,7 +832,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="active">1</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">2</property>
</packing>
</child>
@ -867,7 +844,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="active">1</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">3</property>
</packing>
</child>
@ -899,7 +875,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
<packing>
<property name="fill">0</property>
<property name="position">6</property>
</packing>
</child>
@ -909,7 +884,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="receives_default">1</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">6</property>
</packing>
</child>
@ -964,7 +938,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
<packing>
<property name="fill">0</property>
<property name="position">2</property>
</packing>
</child>
@ -989,9 +962,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<object class="GtkProgressBar" id="progressbar1">
<property name="fraction">0.5</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="progressbar2">
@ -999,7 +969,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="inverted">1</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -1009,7 +978,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="show_text">1</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">2</property>
</packing>
</child>
@ -1037,9 +1005,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box27">
@ -1074,7 +1039,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -1105,10 +1069,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<object class="GtkBox" id="box28">
<property name="vexpand">1</property>
<property name="spacing">6</property>
<property name="homogeneous">1</property>
<child>
<object class="GtkProgressBar" id="progressbar5">
<property name="orientation">vertical</property>
<property name="fraction">0.5</property>
<property name="halign">end</property>
</object>
</child>
<child>
@ -1116,20 +1082,19 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="orientation">vertical</property>
<property name="fraction">0.5</property>
<property name="inverted">1</property>
<property name="halign">start</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box23">
<property name="vexpand">1</property>
<property name="spacing">6</property>
<property name="homogeneous">1</property>
<child>
<object class="GtkScale" id="scale3">
<property name="height_request">100</property>
@ -1140,6 +1105,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="fill_level">75</property>
<property name="draw_value">1</property>
<property name="digits">-1</property>
<property name="halign">end</property>
<signal name="format-value" handler="scale_format_value"/>
</object>
</child>
@ -1154,6 +1120,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="fill_level">75</property>
<property name="draw_value">1</property>
<property name="digits">-1</property>
<property name="halign">start</property>
<signal name="format-value" handler="scale_format_value_blank"/>
</object>
<packing>
@ -1162,7 +1129,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>

View File

@ -154,7 +154,7 @@ create_menu_button (void)
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Menu Button"), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Menu Button"));
return new_widget_info ("menu-button", vbox, SMALL);
}
@ -203,10 +203,9 @@ create_lockbutton (void)
widget = gtk_lock_button_new (g_object_new (G_TYPE_TEST_PERMISSION, NULL));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Lock Button"),
FALSE);
gtk_label_new ("Lock Button"));
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
@ -248,11 +247,11 @@ create_radio (void)
widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
radio = gtk_radio_button_new_with_mnemonic (NULL, "Radio Button _One");
gtk_box_pack_start (GTK_BOX (widget), radio, FALSE);
gtk_box_pack_start (GTK_BOX (widget), radio);
radio = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (radio), "Radio Button _Two");
gtk_box_pack_start (GTK_BOX (widget), radio, FALSE);
gtk_box_pack_start (GTK_BOX (widget), radio);
radio = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (radio), "Radio Button T_hree");
gtk_box_pack_start (GTK_BOX (widget), radio, FALSE);
gtk_box_pack_start (GTK_BOX (widget), radio);
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
@ -404,7 +403,7 @@ create_search_bar (void)
gtk_container_add (GTK_CONTAINER (box), widget);
view = gtk_text_view_new ();
gtk_box_pack_start (GTK_BOX (box), view, TRUE);
gtk_box_pack_start (GTK_BOX (box), view);
info = new_widget_info ("search-bar", box, SMALL);
@ -422,7 +421,7 @@ create_action_bar (void)
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
view = gtk_text_view_new ();
gtk_box_pack_start (GTK_BOX (box), view, TRUE);
gtk_box_pack_start (GTK_BOX (box), view);
widget = gtk_action_bar_new ();
@ -552,10 +551,9 @@ create_icon_view (void)
gtk_container_add (GTK_CONTAINER (widget), icon_view);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Icon View"),
FALSE);
gtk_label_new ("Icon View"));
info = new_widget_info ("icon-view", vbox, MEDIUM);
info->no_focus = FALSE;
@ -577,10 +575,9 @@ create_color_button (void)
picker = gtk_color_button_new_with_rgba (&color);
gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), picker, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), picker);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Color Button"),
FALSE);
gtk_label_new ("Color Button"));
return new_widget_info ("color-button", vbox, SMALL);
}
@ -595,10 +592,9 @@ create_font_button (void)
picker = gtk_font_button_new_with_font ("Sans Serif 10");
gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), picker, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), picker);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Font Button"),
FALSE);
gtk_label_new ("Font Button"));
return new_widget_info ("font-button", vbox, SMALL);
}
@ -618,16 +614,14 @@ create_file_button (void)
gtk_widget_set_size_request (picker, 150, -1);
gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox2), picker, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), picker);
gtk_box_pack_start (GTK_BOX (vbox2),
gtk_label_new ("File Button (Files)"),
FALSE);
gtk_label_new ("File Button (Files)"));
gtk_box_pack_start (GTK_BOX (vbox),
vbox2, TRUE);
vbox2);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
FALSE);
gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
picker = gtk_file_chooser_button_new ("File Chooser Button",
@ -638,12 +632,11 @@ create_file_button (void)
g_free (path);
gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox2), picker, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), picker);
gtk_box_pack_start (GTK_BOX (vbox2),
gtk_label_new ("File Button (Select Folder)"),
FALSE);
gtk_label_new ("File Button (Select Folder)"));
gtk_box_pack_start (GTK_BOX (vbox),
vbox2, TRUE);
vbox2);
return new_widget_info ("file-button", vbox, MEDIUM);
}
@ -658,18 +651,15 @@ create_separator (void)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
gtk_box_pack_start (GTK_BOX (hbox),
gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
TRUE);
gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
gtk_box_pack_start (GTK_BOX (hbox),
gtk_separator_new (GTK_ORIENTATION_VERTICAL),
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_separator_new (GTK_ORIENTATION_VERTICAL));
gtk_box_pack_start (GTK_BOX (vbox), hbox);
gtk_box_pack_start (GTK_BOX (vbox),
g_object_new (GTK_TYPE_LABEL,
"label", "Horizontal and Vertical\nSeparators",
"justify", GTK_JUSTIFY_CENTER,
NULL),
FALSE);
NULL));
return new_widget_info ("separator", vbox, MEDIUM);
}
@ -695,8 +685,7 @@ create_panes (void)
NULL),
FALSE, FALSE);
gtk_box_pack_start (GTK_BOX (hbox),
pane,
TRUE);
pane);
pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_paned_pack1 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME,
@ -709,15 +698,13 @@ create_panes (void)
NULL),
FALSE, FALSE);
gtk_box_pack_start (GTK_BOX (hbox),
pane,
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
pane);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
gtk_box_pack_start (GTK_BOX (vbox),
g_object_new (GTK_TYPE_LABEL,
"label", "Horizontal and Vertical\nPanes",
"justify", GTK_JUSTIFY_CENTER,
NULL),
FALSE);
NULL));
return new_widget_info ("panes", vbox, MEDIUM);
}
@ -879,10 +866,9 @@ create_menubar (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Menu Bar"),
FALSE);
gtk_label_new ("Menu Bar"));
return new_widget_info ("menubar", vbox, SMALL);
}
@ -958,10 +944,9 @@ create_progressbar (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Progress Bar"),
FALSE);
gtk_label_new ("Progress Bar"));
return new_widget_info ("progressbar", vbox, SMALL);
}
@ -976,10 +961,9 @@ create_level_bar (void)
gtk_level_bar_set_value (GTK_LEVEL_BAR (widget), 0.333);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Level Bar"),
FALSE);
gtk_label_new ("Level Bar"));
return new_widget_info ("levelbar", vbox, SMALL);
}
@ -1011,10 +995,9 @@ create_scrollbar (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Scrollbar"),
FALSE);
gtk_label_new ("Scrollbar"));
return new_widget_info ("scrollbar", vbox, SMALL);
}
@ -1030,10 +1013,9 @@ create_spinbutton (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Spin Button"),
FALSE);
gtk_label_new ("Spin Button"));
return new_widget_info ("spinbutton", vbox, SMALL);
}
@ -1047,13 +1029,12 @@ create_statusbar (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Status Bar"),
FALSE);
gtk_label_new ("Status Bar"));
widget = gtk_statusbar_new ();
gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
gtk_statusbar_push (GTK_STATUSBAR (widget), 0, "Hold on...");
gtk_box_pack_end (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_end (GTK_BOX (vbox), widget);
info = new_widget_info ("statusbar", vbox, SMALL);
@ -1071,19 +1052,16 @@ create_scales (void)
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
gtk_box_pack_start (GTK_BOX (hbox),
gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
0.0, 100.0, 1.0),
TRUE);
0.0, 100.0, 1.0));
gtk_box_pack_start (GTK_BOX (hbox),
gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
0.0, 100.0, 1.0),
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
0.0, 100.0, 1.0));
gtk_box_pack_start (GTK_BOX (vbox), hbox);
gtk_box_pack_start (GTK_BOX (vbox),
g_object_new (GTK_TYPE_LABEL,
"label", "Horizontal and Vertical\nScales",
"justify", GTK_JUSTIFY_CENTER,
NULL),
FALSE);
NULL));
return new_widget_info ("scales", vbox, MEDIUM);}
static WidgetInfo *
@ -1098,10 +1076,9 @@ create_image (void)
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Image"),
FALSE);
gtk_label_new ("Image"));
return new_widget_info ("image", vbox, SMALL);
}
@ -1119,10 +1096,9 @@ create_spinner (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Spinner"),
FALSE);
gtk_label_new ("Spinner"));
return new_widget_info ("spinner", vbox, SMALL);
}
@ -1141,7 +1117,7 @@ create_volume_button (void)
gtk_container_add (GTK_CONTAINER (widget), box);
button = gtk_volume_button_new ();
gtk_box_pack_end (GTK_BOX (box), button, FALSE);
gtk_box_pack_end (GTK_BOX (box), button);
gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), 33);
popup = gtk_scale_button_get_popup (GTK_SCALE_BUTTON (button));
@ -1190,10 +1166,9 @@ create_appchooserbutton (void)
picker = gtk_app_chooser_button_new ("text/plain");
gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), picker, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), picker);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Application Button"),
FALSE);
gtk_label_new ("Application Button"));
return new_widget_info ("appchooserbutton", vbox, SMALL);
}
@ -1276,10 +1251,9 @@ create_placessidebar (void)
gtk_widget_set_halign (bar, GTK_ALIGN_CENTER);
gtk_widget_set_valign (bar, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), bar);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Places Sidebar"),
FALSE);
gtk_label_new ("Places Sidebar"));
return new_widget_info ("placessidebar", vbox, ASIS);
}
@ -1309,11 +1283,10 @@ create_stack (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), switcher, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), stack, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), switcher);
gtk_box_pack_start (GTK_BOX (vbox), stack);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Stack"),
FALSE);
gtk_label_new ("Stack"));
return new_widget_info ("stack", vbox, ASIS);
}
@ -1343,11 +1316,10 @@ create_stack_switcher (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), switcher, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), stack, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), switcher);
gtk_box_pack_start (GTK_BOX (vbox), stack);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Stack Switcher"),
FALSE);
gtk_label_new ("Stack Switcher"));
return new_widget_info ("stackswitcher", vbox, ASIS);
}
@ -1379,9 +1351,9 @@ create_sidebar (void)
frame = gtk_frame_new (NULL);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (hbox), sidebar, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), gtk_separator_new (GTK_ORIENTATION_VERTICAL), FALSE);
gtk_box_pack_start (GTK_BOX (hbox), stack, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), sidebar);
gtk_box_pack_start (GTK_BOX (hbox), gtk_separator_new (GTK_ORIENTATION_VERTICAL));
gtk_box_pack_start (GTK_BOX (hbox), stack);
gtk_container_add (GTK_CONTAINER (frame), hbox);
return new_widget_info ("sidebar", frame, ASIS);
@ -1473,9 +1445,8 @@ create_flow_box (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Flow Box"),
FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Flow Box"));
info = new_widget_info ("flow-box", vbox, ASIS);
info->no_focus = FALSE;

View File

@ -30,10 +30,10 @@ activate_cb (GtkApplication *app,
entry = gtk_search_entry_new ();
gtk_widget_set_hexpand (entry, TRUE);
gtk_box_pack_start (GTK_BOX (box), entry, TRUE);
gtk_box_pack_start (GTK_BOX (box), entry);
menu_button = gtk_menu_button_new ();
gtk_box_pack_start (GTK_BOX (box), menu_button, FALSE);
gtk_box_pack_start (GTK_BOX (box), menu_button);
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (search_bar), GTK_ENTRY (entry));

View File

@ -412,7 +412,7 @@ gtk_action_bar_pack_start (GtkActionBar *action_bar,
{
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar);
gtk_box_pack_start (GTK_BOX (priv->box), child, TRUE);
gtk_box_pack_start (GTK_BOX (priv->box), child);
}
/**
@ -431,7 +431,7 @@ gtk_action_bar_pack_end (GtkActionBar *action_bar,
{
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar);
gtk_box_pack_end (GTK_BOX (priv->box), child, TRUE);
gtk_box_pack_end (GTK_BOX (priv->box), child);
}
/**

View File

@ -348,7 +348,7 @@ construct_appchooser_widget (GtkAppChooserDialog *self)
/* Need to build the appchooser widget after, because of the content-type construct-only property */
self->priv->app_chooser_widget = gtk_app_chooser_widget_new (self->priv->content_type);
gtk_widget_set_vexpand (self->priv->app_chooser_widget, TRUE);
gtk_box_pack_start (GTK_BOX (self->priv->inner_box), self->priv->app_chooser_widget, TRUE);
gtk_box_pack_start (GTK_BOX (self->priv->inner_box), self->priv->app_chooser_widget);
g_signal_connect (self->priv->app_chooser_widget, "application-selected",
@ -362,10 +362,10 @@ construct_appchooser_widget (GtkAppChooserDialog *self)
/* Add the custom button to the new appchooser */
gtk_box_pack_start (GTK_BOX (self->priv->inner_box),
self->priv->show_more_button, FALSE);
self->priv->show_more_button);
gtk_box_pack_start (GTK_BOX (self->priv->inner_box),
self->priv->software_button, FALSE);
self->priv->software_button);
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (self->priv->app_chooser_widget));
gtk_dialog_set_response_sensitive (GTK_DIALOG (self), GTK_RESPONSE_OK, info != NULL);

View File

@ -1727,14 +1727,14 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
priv->pages = g_list_insert (priv->pages, page_info, position);
gtk_box_pack_start (GTK_BOX (priv->sidebar), page_info->regular_title, FALSE);
gtk_box_pack_start (GTK_BOX (priv->sidebar), page_info->current_title, FALSE);
gtk_box_pack_start (GTK_BOX (priv->sidebar), page_info->regular_title);
gtk_box_pack_start (GTK_BOX (priv->sidebar), page_info->current_title);
gtk_box_reorder_child (GTK_BOX (priv->sidebar), page_info->regular_title, 2 * position);
gtk_box_reorder_child (GTK_BOX (priv->sidebar), page_info->current_title, 2 * position + 1);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show (box);
gtk_box_pack_start (GTK_BOX (box), page, TRUE);
gtk_box_pack_start (GTK_BOX (box), page);
g_object_set (box, "margin", 12, NULL);
g_signal_connect (box, "remove", G_CALLBACK (assistant_remove_page_cb), assistant);
@ -1837,7 +1837,7 @@ add_to_action_area (GtkAssistant *assistant,
gtk_widget_set_valign (child, GTK_ALIGN_BASELINE);
gtk_box_pack_end (GTK_BOX (priv->action_area), child, FALSE);
gtk_box_pack_end (GTK_BOX (priv->action_area), child);
}
/**

View File

@ -145,7 +145,7 @@ static void
gtk_button_box_add (GtkContainer *container,
GtkWidget *widget)
{
gtk_box_pack_start (GTK_BOX (container), widget, TRUE);
gtk_box_pack_start (GTK_BOX (container), widget);
}
static void

View File

@ -49,8 +49,7 @@
* both ends of the same GtkBox.
*
* Because GtkBox is a #GtkContainer, you may also use gtk_container_add()
* to insert widgets into the box, and they will be packed with the default
* values for expand and fill child properties. Use gtk_container_remove()
* to insert widgets into the box. Use gtk_container_remove()
* to remove widgets from the GtkBox.
*
* Use gtk_box_set_homogeneous() to specify whether or not all children
@ -63,10 +62,6 @@
* Use gtk_box_reorder_child() to move a GtkBox child to a different
* place in the box.
*
* Use gtk_box_set_child_packing() to reset the expand and
* fill child properties.
* Use gtk_box_query_child_packing() to query these fields.
*
* Note that a single-row or single-column #GtkGrid provides exactly
* the same functionality as #GtkBox.
*
@ -112,7 +107,6 @@ enum {
enum {
CHILD_PROP_0,
CHILD_PROP_FILL,
CHILD_PROP_PACK_TYPE,
CHILD_PROP_POSITION,
LAST_CHILD_PROP
@ -140,9 +134,6 @@ static GParamSpec *child_props[LAST_CHILD_PROP] = { NULL, };
* GtkBoxChild:
* @widget: the child widget, packed into the GtkBox.
* neighbors, set when packed, zero by default.
* @fill: flag indicates whether any extra space given to this child due to its
* @expand attribute being set is actually allocated to the child, rather than
* being used as padding around the widget; set when packed, %TRUE by default.
* @pack: one of #GtkPackType indicating whether the child is packed with
* reference to the start (top/left) or end (bottom/right) of the GtkBox.
*/
@ -150,7 +141,6 @@ struct _GtkBoxChild
{
GtkWidget *widget;
guint fill : 1;
guint pack : 1;
};
@ -270,22 +260,6 @@ gtk_box_class_init (GtkBoxClass *class)
g_object_class_install_properties (object_class, LAST_PROP, props);
/**
* GtkBox:fill:
*
* Whether the child should receive extra space when the parent grows.
*
* Note that the #GtkWidget:halign, #GtkWidget:valign, #GtkWidget:hexpand
* and #GtkWidget:vexpand properties are the preferred way to influence
* child size allocation in containers.
*/
child_props[CHILD_PROP_FILL] =
g_param_spec_boolean ("fill",
P_("Fill"),
P_("Whether extra space given to the child should be allocated to the child or used as padding"),
TRUE,
GTK_PARAM_READWRITE);
child_props[CHILD_PROP_PACK_TYPE] =
g_param_spec_enum ("pack-type",
P_("Pack type"),
@ -612,10 +586,7 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
int child_allocation_width;
int child_minimum_height, child_natural_height;
if (child->fill)
child_allocation_width = MAX (1, child_size);
else
child_allocation_width = sizes[i].minimum_size;
child_allocation_width = MAX (1, child_size);
child_minimum_baseline = -1;
child_natural_baseline = -1;
@ -706,16 +677,8 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
/* Assign the child's position. */
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
{
if (child->fill)
{
child_allocation.width = MAX (1, child_size);
child_allocation.x = x;
}
else
{
child_allocation.width = sizes[i].minimum_size;
child_allocation.x = x + (child_size - child_allocation.width) / 2;
}
child_allocation.width = MAX (1, child_size);
child_allocation.x = x;
if (packing == GTK_PACK_START)
{
@ -734,16 +697,8 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
}
else /* (private->orientation == GTK_ORIENTATION_VERTICAL) */
{
if (child->fill)
{
child_allocation.height = MAX (1, child_size);
child_allocation.y = y;
}
else
{
child_allocation.height = sizes[i].minimum_size;
child_allocation.y = y + (child_size - child_allocation.height) / 2;
}
child_allocation.height = MAX (1, child_size);
child_allocation.y = y;
if (packing == GTK_PACK_START)
{
@ -957,10 +912,7 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
gint child_allocation_width;
gint child_minimum_height, child_natural_height;
if (child->fill)
child_allocation_width = MAX (1, child_size);
else
child_allocation_width = sizes[packing][i].minimum_size;
child_allocation_width = MAX (1, child_size);
child_minimum_baseline = -1;
child_natural_baseline = -1;
@ -1050,16 +1002,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
/* Assign the child's position. */
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
if (child->fill)
{
child_allocation.width = MAX (1, child_size);
child_allocation.x = x;
}
else
{
child_allocation.width = sizes[packing][i].minimum_size;
child_allocation.x = x + (child_size - child_allocation.width) / 2;
}
child_allocation.width = MAX (1, child_size);
child_allocation.x = x;
if ((packing == GTK_PACK_START && direction == GTK_TEXT_DIR_LTR) ||
(packing == GTK_PACK_END && direction == GTK_TEXT_DIR_RTL))
@ -1074,16 +1018,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
}
else /* (private->orientation == GTK_ORIENTATION_VERTICAL) */
{
if (child->fill)
{
child_allocation.height = MAX (1, child_size);
child_allocation.y = y;
}
else
{
child_allocation.height = sizes[packing][i].minimum_size;
child_allocation.y = y + (child_size - child_allocation.height) / 2;
}
child_allocation.height = MAX (1, child_size);
child_allocation.y = y;
if (packing == GTK_PACK_START)
{
@ -1187,26 +1123,11 @@ gtk_box_set_child_property (GtkContainer *container,
const GValue *value,
GParamSpec *pspec)
{
gboolean fill = 0;
GtkPackType pack_type = 0;
if (property_id != CHILD_PROP_POSITION)
gtk_box_query_child_packing (GTK_BOX (container),
child,
&fill,
&pack_type);
switch (property_id)
{
case CHILD_PROP_FILL:
gtk_box_set_child_packing (GTK_BOX (container),
child,
g_value_get_boolean (value),
pack_type);
break;
case CHILD_PROP_PACK_TYPE:
gtk_box_set_child_packing (GTK_BOX (container),
child,
fill,
g_value_get_enum (value));
break;
case CHILD_PROP_POSITION:
@ -1227,22 +1148,16 @@ gtk_box_get_child_property (GtkContainer *container,
GValue *value,
GParamSpec *pspec)
{
gboolean fill = FALSE;
GtkPackType pack_type = 0;
GList *list;
if (property_id != CHILD_PROP_POSITION)
gtk_box_query_child_packing (GTK_BOX (container),
child,
&fill,
&pack_type);
switch (property_id)
{
guint i;
case CHILD_PROP_FILL:
g_value_set_boolean (value, fill);
break;
case CHILD_PROP_PACK_TYPE:
gtk_box_query_child_packing (GTK_BOX (container),
child,
&pack_type);
g_value_set_enum (value, pack_type);
break;
case CHILD_PROP_POSITION:
@ -1431,7 +1346,6 @@ gtk_box_direction_changed (GtkWidget *widget,
static GtkBoxChild *
gtk_box_pack (GtkBox *box,
GtkWidget *child,
gboolean fill,
GtkPackType pack_type)
{
GtkContainer *container = GTK_CONTAINER (box);
@ -1444,7 +1358,6 @@ gtk_box_pack (GtkBox *box,
child_info = g_new (GtkBoxChild, 1);
child_info->widget = child;
child_info->fill = fill ? TRUE : FALSE;
child_info->pack = pack_type;
private->children = g_list_append (private->children, child_info);
@ -1454,8 +1367,6 @@ gtk_box_pack (GtkBox *box,
gtk_widget_set_parent (child, GTK_WIDGET (box));
if (!fill)
gtk_container_child_notify_by_pspec (container, child, child_props[CHILD_PROP_FILL]);
if (pack_type != GTK_PACK_START)
gtk_container_child_notify_by_pspec (container, child, child_props[CHILD_PROP_PACK_TYPE]);
gtk_container_child_notify_by_pspec (container, child, child_props[CHILD_PROP_POSITION]);
@ -1785,10 +1696,7 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
}
}
if (child->fill)
child_size = MAX (1, child_size);
else
child_size = sizes[i].minimum_size;
child_size = MAX (1, child_size);
child_minimum_baseline = child_natural_baseline = -1;
@ -1999,11 +1907,6 @@ gtk_box_new (GtkOrientation orientation,
* gtk_box_pack_start:
* @box: a #GtkBox
* @child: the #GtkWidget to be added to @box
* @fill: %TRUE if space given to @child by the @expand option is
* actually allocated to @child, rather than just padding it. This
* parameter has no effect if @expand is set to %FALSE. A child is
* always allocated the full height of a horizontal #GtkBox and the full width
* of a vertical #GtkBox. This option affects the other dimension
*
* Adds @child to @box, packed with reference to the start of @box.
* The @child is packed after any other child packed with reference
@ -2011,21 +1914,15 @@ gtk_box_new (GtkOrientation orientation,
*/
void
gtk_box_pack_start (GtkBox *box,
GtkWidget *child,
gboolean fill)
GtkWidget *child)
{
gtk_box_pack (box, child, fill, GTK_PACK_START);
gtk_box_pack (box, child, GTK_PACK_START);
}
/**
* gtk_box_pack_end:
* @box: a #GtkBox
* @child: the #GtkWidget to be added to @box
* @fill: %TRUE if space given to @child by the @expand option is
* actually allocated to @child, rather than just padding it. This
* parameter has no effect if @expand is set to %FALSE. A child is
* always allocated the full height of a horizontal #GtkBox and the full width
* of a vertical #GtkBox. This option affects the other dimension
*
* Adds @child to @box, packed with reference to the end of @box.
* The @child is packed after (away from end of) any other child
@ -2033,10 +1930,9 @@ gtk_box_pack_start (GtkBox *box,
*/
void
gtk_box_pack_end (GtkBox *box,
GtkWidget *child,
gboolean fill)
GtkWidget *child)
{
gtk_box_pack (box, child, fill, GTK_PACK_END);
gtk_box_pack (box, child, GTK_PACK_END);
}
/**
@ -2255,8 +2151,6 @@ gtk_box_reorder_child (GtkBox *box,
* gtk_box_query_child_packing:
* @box: a #GtkBox
* @child: the #GtkWidget of the child to query
* @fill: (out) (optional): pointer to return location for fill child
* property
* @pack_type: (out) (optional): pointer to return location for pack-type
* child property
*
@ -2265,7 +2159,6 @@ gtk_box_reorder_child (GtkBox *box,
void
gtk_box_query_child_packing (GtkBox *box,
GtkWidget *child,
gboolean *fill,
GtkPackType *pack_type)
{
GtkBoxPrivate *private;
@ -2289,8 +2182,6 @@ gtk_box_query_child_packing (GtkBox *box,
if (list)
{
if (fill)
*fill = child_info->fill;
if (pack_type)
*pack_type = child_info->pack;
}
@ -2300,7 +2191,6 @@ gtk_box_query_child_packing (GtkBox *box,
* gtk_box_set_child_packing:
* @box: a #GtkBox
* @child: the #GtkWidget of the child to set
* @fill: the new value of the fill child property
* @pack_type: the new value of the pack-type child property
*
* Sets the way @child is packed into @box.
@ -2308,7 +2198,6 @@ gtk_box_query_child_packing (GtkBox *box,
void
gtk_box_set_child_packing (GtkBox *box,
GtkWidget *child,
gboolean fill,
GtkPackType pack_type)
{
GtkBoxPrivate *private;
@ -2333,14 +2222,6 @@ gtk_box_set_child_packing (GtkBox *box,
gtk_widget_freeze_child_notify (child);
if (list)
{
fill = fill != FALSE;
if (child_info->fill != fill)
{
child_info->fill = fill;
gtk_container_child_notify_by_pspec (GTK_CONTAINER (box), child, child_props[CHILD_PROP_FILL]);
}
if (pack_type != GTK_PACK_END)
pack_type = GTK_PACK_START;
if (child_info->pack != pack_type)
@ -2361,8 +2242,7 @@ static void
gtk_box_add (GtkContainer *container,
GtkWidget *widget)
{
gtk_box_pack_start (GTK_BOX (container), widget,
TRUE);
gtk_box_pack_start (GTK_BOX (container), widget);
}
static void
@ -2502,7 +2382,7 @@ gtk_box_set_center_widget (GtkBox *box,
}
if (widget)
priv->center = gtk_box_pack (box, widget, TRUE, GTK_PACK_START);
priv->center = gtk_box_pack (box, widget, GTK_PACK_START);
if (old_center)
g_object_unref (old_center);

View File

@ -82,12 +82,10 @@ GtkWidget* gtk_box_new (GtkOrientation orientation,
GDK_AVAILABLE_IN_ALL
void gtk_box_pack_start (GtkBox *box,
GtkWidget *child,
gboolean fill);
GtkWidget *child);
GDK_AVAILABLE_IN_ALL
void gtk_box_pack_end (GtkBox *box,
GtkWidget *child,
gboolean fill);
GtkWidget *child);
GDK_AVAILABLE_IN_ALL
void gtk_box_set_homogeneous (GtkBox *box,
@ -113,12 +111,10 @@ void gtk_box_reorder_child (GtkBox *box,
GDK_AVAILABLE_IN_ALL
void gtk_box_query_child_packing (GtkBox *box,
GtkWidget *child,
gboolean *fill,
GtkPackType *pack_type);
GDK_AVAILABLE_IN_ALL
void gtk_box_set_child_packing (GtkBox *box,
GtkWidget *child,
gboolean fill,
GtkPackType pack_type);
GDK_AVAILABLE_IN_3_12

View File

@ -535,12 +535,12 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
cc->priv->custom = box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
g_object_set (box, "margin-top", 12, NULL);
gtk_box_pack_end (GTK_BOX (cc->priv->palette), box, FALSE);
gtk_box_pack_end (GTK_BOX (cc->priv->palette), box);
/* translators: label for the custom section in the color chooser */
cc->priv->custom_label = label = gtk_label_new (_("Custom"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_end (GTK_BOX (cc->priv->palette), label, FALSE);
gtk_box_pack_end (GTK_BOX (cc->priv->palette), label);
cc->priv->button = button = gtk_color_swatch_new ();
gtk_widget_set_name (button, "add-color-button");

View File

@ -555,7 +555,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog,
else
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (button), 1);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button);
gtk_widget_show (button);
data->spin_button = button;
@ -569,7 +569,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog,
label = gtk_label_new (_("mm"));
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_widget_show (label);
gtk_label_set_mnemonic_widget (GTK_LABEL (mnemonic_label), button);
@ -979,13 +979,13 @@ wrap_in_frame (const gchar *label,
g_free (bold_text);
frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (frame), label_widget, FALSE);
gtk_box_pack_start (GTK_BOX (frame), label_widget);
gtk_widget_set_margin_start (child, 12);
gtk_widget_set_halign (child, GTK_ALIGN_FILL);
gtk_widget_set_valign (child, GTK_ALIGN_FILL);
gtk_box_pack_start (GTK_BOX (frame), child, FALSE);
gtk_box_pack_start (GTK_BOX (frame), child);
gtk_widget_show (frame);
@ -1036,11 +1036,11 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 18);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (content_area), hbox);
gtk_widget_show (hbox);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), vbox);
gtk_widget_show (vbox);
scrolled = gtk_scrolled_window_new (NULL, NULL);
@ -1048,7 +1048,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled),
GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scrolled);
gtk_widget_show (scrolled);
treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->custom_paper_list));
@ -1079,7 +1079,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
context = gtk_widget_get_style_context (toolbar);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_INLINE_TOOLBAR);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), toolbar);
gtk_widget_show (toolbar);
icon = g_themed_icon_new_with_default_fallbacks ("list-add-symbolic");
@ -1098,7 +1098,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
priv->values_box = vbox;
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), vbox);
gtk_widget_show (vbox);
grid = gtk_grid_new ();
@ -1130,7 +1130,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
frame = wrap_in_frame (_("Paper Size"), grid);
gtk_widget_show (grid);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
gtk_widget_show (frame);
grid = gtk_grid_new ();
@ -1203,7 +1203,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
NULL, NULL);
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), combo);
gtk_widget_show (combo);
g_signal_connect_swapped (combo, "changed",
@ -1211,7 +1211,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
frame = wrap_in_frame (_("Paper Margins"), grid);
gtk_widget_show (grid);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
gtk_widget_show (frame);
update_custom_widgets_from_list (dialog);

View File

@ -1324,7 +1324,7 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
gtk_tree_path_free (path);
gtk_box_pack_start (GTK_BOX (completion->priv->vbox),
completion->priv->action_view, FALSE);
completion->priv->action_view);
gtk_widget_show (completion->priv->action_view);
}
}

View File

@ -926,7 +926,7 @@ update_preview_widget_visibility (GtkFileChooserWidget *impl)
if (!priv->preview_label)
{
priv->preview_label = gtk_label_new (priv->preview_display_name);
gtk_box_pack_start (GTK_BOX (priv->preview_box), priv->preview_label, FALSE);
gtk_box_pack_start (GTK_BOX (priv->preview_box), priv->preview_label);
gtk_box_reorder_child (GTK_BOX (priv->preview_box), priv->preview_label, 0);
gtk_label_set_ellipsize (GTK_LABEL (priv->preview_label), PANGO_ELLIPSIZE_MIDDLE);
gtk_widget_show (priv->preview_label);
@ -967,7 +967,7 @@ set_preview_widget (GtkFileChooserWidget *impl,
if (priv->preview_widget)
{
gtk_widget_show (priv->preview_widget);
gtk_box_pack_start (GTK_BOX (priv->preview_box), priv->preview_widget, TRUE);
gtk_box_pack_start (GTK_BOX (priv->preview_box), priv->preview_widget);
gtk_box_reorder_child (GTK_BOX (priv->preview_box),
priv->preview_widget,
(priv->use_preview_label && priv->preview_label) ? 1 : 0);
@ -2687,7 +2687,7 @@ save_widgets_create (GtkFileChooserWidget *impl)
gtk_style_context_add_class (gtk_widget_get_style_context (vbox), "search-bar");
priv->save_widgets_table = gtk_grid_new ();
gtk_box_pack_start (GTK_BOX (vbox), priv->save_widgets_table, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), priv->save_widgets_table);
gtk_grid_set_row_spacing (GTK_GRID (priv->save_widgets_table), 12);
gtk_grid_set_column_spacing (GTK_GRID (priv->save_widgets_table), 12);
@ -2707,7 +2707,7 @@ save_widgets_create (GtkFileChooserWidget *impl)
gtk_label_set_mnemonic_widget (GTK_LABEL (widget), priv->location_entry);
priv->save_widgets = vbox;
gtk_box_pack_start (GTK_BOX (impl), priv->save_widgets, FALSE);
gtk_box_pack_start (GTK_BOX (impl), priv->save_widgets);
gtk_box_reorder_child (GTK_BOX (impl), priv->save_widgets, 0);
gtk_widget_show (priv->save_widgets);
}
@ -2774,7 +2774,7 @@ location_switch_to_filename_entry (GtkFileChooserWidget *impl)
if (!priv->location_entry)
{
location_entry_create (impl);
gtk_box_pack_start (GTK_BOX (priv->location_entry_box), priv->location_entry, TRUE);
gtk_box_pack_start (GTK_BOX (priv->location_entry_box), priv->location_entry);
}
_gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), priv->current_folder);

View File

@ -140,7 +140,7 @@ init_sizing_box (GtkHeaderBar *bar)
w = gtk_label_new (NULL);
context = gtk_widget_get_style_context (w);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TITLE);
gtk_box_pack_start (GTK_BOX (priv->label_sizing_box), w, FALSE);
gtk_box_pack_start (GTK_BOX (priv->label_sizing_box), w);
gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (w), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
@ -149,7 +149,7 @@ init_sizing_box (GtkHeaderBar *bar)
w = gtk_label_new (NULL);
context = gtk_widget_get_style_context (w);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SUBTITLE);
gtk_box_pack_start (GTK_BOX (priv->label_sizing_box), w, FALSE);
gtk_box_pack_start (GTK_BOX (priv->label_sizing_box), w);
gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (w), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
@ -177,7 +177,7 @@ create_title_box (const char *title,
gtk_label_set_line_wrap (GTK_LABEL (title_label), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (title_label), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (title_label), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (label_box), title_label, FALSE);
gtk_box_pack_start (GTK_BOX (label_box), title_label);
gtk_label_set_width_chars (GTK_LABEL (title_label), MIN_TITLE_CHARS);
subtitle_label = gtk_label_new (subtitle);
@ -186,7 +186,7 @@ create_title_box (const char *title,
gtk_label_set_line_wrap (GTK_LABEL (subtitle_label), FALSE);
gtk_label_set_single_line_mode (GTK_LABEL (subtitle_label), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (subtitle_label), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (label_box), subtitle_label, FALSE);
gtk_box_pack_start (GTK_BOX (label_box), subtitle_label);
gtk_widget_set_visible (subtitle_label, subtitle && subtitle[0]);
if (ret_title_label)
@ -441,7 +441,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
if (button)
{
gtk_box_pack_start (GTK_BOX (box), button, FALSE);
gtk_box_pack_start (GTK_BOX (box), button);
n_children ++;
}
}
@ -456,7 +456,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
continue;
}
gtk_box_pack_start (GTK_BOX (box), separator, FALSE);
gtk_box_pack_start (GTK_BOX (box), separator);
if (i == 1)
gtk_box_reorder_child (GTK_BOX (box), separator, 0);

View File

@ -518,8 +518,7 @@ gtk_info_bar_add_action_widget (GtkInfoBar *info_bar,
else
g_warning ("Only 'activatable' widgets can be packed into the action area of a GtkInfoBar");
gtk_box_pack_end (GTK_BOX (info_bar->priv->action_area),
child, FALSE);
gtk_box_pack_end (GTK_BOX (info_bar->priv->action_area), child);
if (response_id == GTK_RESPONSE_HELP)
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (info_bar->priv->action_area),
child, TRUE);

View File

@ -134,7 +134,7 @@ gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box,
return;
if (should_have_separator)
gtk_box_pack_start (GTK_BOX (box), box->separator, FALSE);
gtk_box_pack_start (GTK_BOX (box), box->separator);
else
gtk_container_remove (GTK_CONTAINER (box), box->separator);
}
@ -343,7 +343,7 @@ gtk_menu_section_box_init (GtkMenuSectionBox *box)
item_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box->item_box = GTK_BOX (item_box);
gtk_box_pack_end (GTK_BOX (box), item_box, FALSE);
gtk_box_pack_end (GTK_BOX (box), item_box);
gtk_widget_set_halign (GTK_WIDGET (item_box), GTK_ALIGN_FILL);
gtk_widget_set_halign (GTK_WIDGET (box), GTK_ALIGN_FILL);
@ -451,7 +451,7 @@ gtk_menu_section_box_new_submenu (GtkMenuTrackerItem *item,
g_object_set_data (G_OBJECT (button), "focus", focus);
g_object_set_data (G_OBJECT (focus), "focus", button);
gtk_box_pack_start (GTK_BOX (box), button, FALSE);
gtk_box_pack_start (GTK_BOX (box), button);
g_signal_connect (focus, "clicked", G_CALLBACK (open_submenu), item);
g_signal_connect (button, "clicked", G_CALLBACK (close_submenu), item);
@ -512,17 +512,17 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item,
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_valign (separator, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (box->separator), separator, TRUE);
gtk_box_pack_start (GTK_BOX (box->separator), separator);
title = gtk_label_new (label);
g_object_bind_property (item, "label", title, "label", G_BINDING_SYNC_CREATE);
gtk_style_context_add_class (gtk_widget_get_style_context (title), GTK_STYLE_CLASS_SEPARATOR);
gtk_widget_set_halign (title, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (box->separator), title, FALSE);
gtk_box_pack_start (GTK_BOX (box->separator), title);
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_valign (separator, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (box->separator), separator, TRUE);
gtk_box_pack_start (GTK_BOX (box->separator), separator);
}
else
{

View File

@ -140,8 +140,7 @@ gtk_menu_tool_button_construct_contents (GtkMenuToolButton *button)
g_object_ref (priv->arrow_button);
gtk_container_remove (GTK_CONTAINER (parent),
priv->arrow_button);
gtk_box_pack_end (GTK_BOX (box), priv->arrow_button,
FALSE);
gtk_box_pack_end (GTK_BOX (box), priv->arrow_button);
g_object_unref (priv->arrow_button);
}
@ -285,8 +284,7 @@ gtk_menu_tool_button_init (GtkMenuToolButton *button)
g_object_unref (real_button);
arrow_button = gtk_menu_button_new ();
gtk_box_pack_end (GTK_BOX (box), arrow_button,
FALSE);
gtk_box_pack_end (GTK_BOX (box), arrow_button);
/* the arrow button is insentive until we set a menu */
gtk_widget_set_sensitive (arrow_button, FALSE);

View File

@ -180,7 +180,7 @@ gtk_model_menu_item_set_icon (GtkModelMenuItem *item,
/* Reparent the child without destroying it */
g_object_ref (child);
gtk_container_remove (GTK_CONTAINER (item), child);
gtk_box_pack_end (GTK_BOX (box), child, TRUE);
gtk_box_pack_end (GTK_BOX (box), child);
g_object_unref (child);
gtk_container_add (GTK_CONTAINER (item), box);
@ -200,7 +200,7 @@ gtk_model_menu_item_set_icon (GtkModelMenuItem *item,
image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_MENU);
gtk_image_set_pixel_size (GTK_IMAGE (image), 16);
gtk_box_pack_start (GTK_BOX (child), image, FALSE);
gtk_box_pack_start (GTK_BOX (child), image);
}
g_object_notify (G_OBJECT (item), "icon");

View File

@ -547,17 +547,17 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
/* Build contents */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (content_area), hbox);
icon = gtk_image_new_from_icon_name ("dialog-password",
GTK_ICON_SIZE_DIALOG);
gtk_widget_set_halign (icon, GTK_ALIGN_CENTER);
gtk_widget_set_valign (icon, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), icon);
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), main_vbox);
secondary = strstr (message, "\n");
if (secondary != NULL)
@ -573,8 +573,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (label),
TRUE);
gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (label));
g_free (primary);
attrs = pango_attr_list_new ();
pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
@ -587,8 +586,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (label),
FALSE);
gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (label));
}
grid = gtk_grid_new ();
@ -596,7 +594,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
gtk_grid_set_row_spacing (GTK_GRID (grid), 12);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
gtk_widget_set_margin_bottom (grid, 12);
gtk_box_pack_start (GTK_BOX (main_vbox), grid, FALSE);
gtk_box_pack_start (GTK_BOX (main_vbox), grid);
can_anonymous = priv->ask_flags & G_ASK_PASSWORD_ANONYMOUS_SUPPORTED;
@ -620,8 +618,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
choice = gtk_radio_button_new_with_mnemonic (NULL, _("_Anonymous"));
gtk_box_pack_start (GTK_BOX (anon_box),
choice,
FALSE);
choice);
g_signal_connect (choice, "toggled",
G_CALLBACK (pw_dialog_anonymous_toggled), operation);
priv->anonymous_toggle = choice;
@ -629,8 +626,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (choice));
choice = gtk_radio_button_new_with_mnemonic (group, _("Registered U_ser"));
gtk_box_pack_start (GTK_BOX (anon_box),
choice,
FALSE);
choice);
g_signal_connect (choice, "toggled",
G_CALLBACK (pw_dialog_anonymous_toggled), operation);
}
@ -678,7 +674,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
GINT_TO_POINTER (G_PASSWORD_SAVE_NEVER));
g_signal_connect (choice, "toggled",
G_CALLBACK (remember_button_toggled), operation);
gtk_box_pack_start (GTK_BOX (remember_box), choice, FALSE);
gtk_box_pack_start (GTK_BOX (remember_box), choice);
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (choice));
choice = gtk_radio_button_new_with_mnemonic (group, _("Remember password until you _logout"));
@ -688,7 +684,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
GINT_TO_POINTER (G_PASSWORD_SAVE_FOR_SESSION));
g_signal_connect (choice, "toggled",
G_CALLBACK (remember_button_toggled), operation);
gtk_box_pack_start (GTK_BOX (remember_box), choice, FALSE);
gtk_box_pack_start (GTK_BOX (remember_box), choice);
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (choice));
choice = gtk_radio_button_new_with_mnemonic (group, _("Remember _forever"));
@ -698,7 +694,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
GINT_TO_POINTER (G_PASSWORD_SAVE_PERMANENTLY));
g_signal_connect (choice, "toggled",
G_CALLBACK (remember_button_toggled), operation);
gtk_box_pack_start (GTK_BOX (remember_box), choice, FALSE);
gtk_box_pack_start (GTK_BOX (remember_box), choice);
}
g_signal_connect (G_OBJECT (dialog), "response",
@ -1403,7 +1399,7 @@ create_show_processes_dialog (GtkMountOperation *op,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE);
gtk_box_pack_start (GTK_BOX (content_area), vbox);
if (secondary != NULL)
s = g_strdup_printf ("<big><b>%s</b></big>\n\n%s", primary, secondary);
@ -1414,7 +1410,7 @@ create_show_processes_dialog (GtkMountOperation *op,
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), label);
/* First count the items in the list then
* add the buttons in reverse order */
@ -1466,7 +1462,7 @@ create_show_processes_dialog (GtkMountOperation *op,
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view);
gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scrolled_window);
g_signal_connect (tree_view, "popup-menu",
G_CALLBACK (on_popup_menu_for_process_tree_view),

View File

@ -1486,8 +1486,8 @@ make_directory_button (GtkPathBar *path_bar,
button_data->image = gtk_image_new ();
button_data->label = gtk_label_new (NULL);
child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE);
gtk_box_pack_start (GTK_BOX (child), button_data->label, FALSE);
gtk_box_pack_start (GTK_BOX (child), button_data->image);
gtk_box_pack_start (GTK_BOX (child), button_data->label);
break;
case NORMAL_BUTTON:
default:

View File

@ -789,12 +789,12 @@ request_password (GtkPrintBackend *backend,
/* Packing */
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_box_pack_start (GTK_BOX (content_area), main_box, FALSE);
gtk_box_pack_start (GTK_BOX (content_area), main_box);
gtk_box_pack_start (GTK_BOX (main_box), icon, FALSE);
gtk_box_pack_start (GTK_BOX (main_box), vbox, FALSE);
gtk_box_pack_start (GTK_BOX (main_box), icon);
gtk_box_pack_start (GTK_BOX (main_box), vbox);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), label);
/* Right - 2. */
for (i = 0; i < length; i++)
@ -820,10 +820,10 @@ request_password (GtkPrintBackend *backend,
gtk_entry_set_visibility (GTK_ENTRY (entry), ai_visible[i]);
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), box, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), box);
gtk_box_pack_start (GTK_BOX (box), label, TRUE);
gtk_box_pack_start (GTK_BOX (box), entry, TRUE);
gtk_box_pack_start (GTK_BOX (box), label);
gtk_box_pack_start (GTK_BOX (box), entry);
g_signal_connect (entry, "changed",
G_CALLBACK (store_entry), &(priv->auth_info[i]));
@ -836,7 +836,7 @@ request_password (GtkPrintBackend *backend,
gtk_widget_set_margin_top (chkbtn, 6);
gtk_widget_set_margin_bottom (chkbtn, 6);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chkbtn), FALSE);
gtk_box_pack_start (GTK_BOX (vbox), chkbtn, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), chkbtn);
g_signal_connect (chkbtn, "toggled",
G_CALLBACK (store_auth_info_toggled),
&(priv->store_auth_info));

View File

@ -737,7 +737,7 @@ alternative_append (GtkWidget *box,
button = gtk_radio_button_new_with_label (group, label);
gtk_widget_show (button);
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
gtk_box_pack_start (GTK_BOX (box), button, FALSE);
gtk_box_pack_start (GTK_BOX (box), button);
g_object_set_data (G_OBJECT (button), "value", (gpointer)value);
g_signal_connect (button, "toggled",
@ -768,7 +768,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->combo), 0);
gtk_widget_set_sensitive (GTK_WIDGET (widget), FALSE);
gtk_widget_show (priv->combo);
gtk_box_pack_start (GTK_BOX (widget), priv->combo, TRUE);
gtk_box_pack_start (GTK_BOX (widget), priv->combo);
}
else switch (source->type)
{
@ -776,7 +776,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
priv->check = gtk_check_button_new_with_mnemonic (source->display_text);
g_signal_connect (priv->check, "toggled", G_CALLBACK (check_toggled_cb), widget);
gtk_widget_show (priv->check);
gtk_box_pack_start (GTK_BOX (widget), priv->check, TRUE);
gtk_box_pack_start (GTK_BOX (widget), priv->check);
break;
case GTK_PRINTER_OPTION_TYPE_PICKONE:
case GTK_PRINTER_OPTION_TYPE_PICKONE_PASSWORD:
@ -808,7 +808,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
source->choices_display[i],
source->choices[i]);
gtk_widget_show (priv->combo);
gtk_box_pack_start (GTK_BOX (widget), priv->combo, TRUE);
gtk_box_pack_start (GTK_BOX (widget), priv->combo);
g_signal_connect (priv->combo, "changed", G_CALLBACK (combo_changed_cb), widget);
text = g_strdup_printf ("%s:", source->display_text);
@ -822,7 +822,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_widget_set_valign (priv->box, GTK_ALIGN_BASELINE);
gtk_widget_show (priv->box);
gtk_box_pack_start (GTK_BOX (widget), priv->box, TRUE);
gtk_box_pack_start (GTK_BOX (widget), priv->box);
for (i = 0; i < source->num_choices; i++)
{
group = alternative_append (priv->box,
@ -850,7 +850,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
gtk_entry_set_activates_default (GTK_ENTRY (priv->entry),
gtk_printer_option_get_activates_default (source));
gtk_widget_show (priv->entry);
gtk_box_pack_start (GTK_BOX (widget), priv->entry, TRUE);
gtk_box_pack_start (GTK_BOX (widget), priv->entry);
g_signal_connect (priv->entry, "changed", G_CALLBACK (entry_changed_cb), widget);
text = g_strdup_printf ("%s:", source->display_text);
@ -863,7 +863,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
case GTK_PRINTER_OPTION_TYPE_FILESAVE:
priv->button = gtk_button_new ();
gtk_widget_show (priv->button);
gtk_box_pack_start (GTK_BOX (widget), priv->button, TRUE);
gtk_box_pack_start (GTK_BOX (widget), priv->button);
g_signal_connect (priv->button, "clicked", G_CALLBACK (filesave_choose_cb), widget);
text = g_strdup_printf ("%s:", source->display_text);
@ -876,13 +876,11 @@ construct_widgets (GtkPrinterOptionWidget *widget)
case GTK_PRINTER_OPTION_TYPE_INFO:
priv->info_label = gtk_label_new (NULL);
gtk_label_set_selectable (GTK_LABEL (priv->info_label), TRUE);
gtk_widget_show (priv->info_label);
gtk_box_pack_start (GTK_BOX (widget), priv->info_label, TRUE);
gtk_box_pack_start (GTK_BOX (widget), priv->info_label);
text = g_strdup_printf ("%s:", source->display_text);
priv->label = gtk_label_new_with_mnemonic (text);
g_free (text);
gtk_widget_show (priv->label);
break;
@ -891,7 +889,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
}
priv->image = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_MENU);
gtk_box_pack_start (GTK_BOX (widget), priv->image, FALSE);
gtk_box_pack_start (GTK_BOX (widget), priv->image);
}
/*

View File

@ -1306,13 +1306,13 @@ wrap_in_frame (const gchar *label,
g_free (bold_text);
frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (frame), label_widget, FALSE);
gtk_box_pack_start (GTK_BOX (frame), label_widget);
gtk_widget_set_margin_start (child, 12);
gtk_widget_set_halign (child, GTK_ALIGN_FILL);
gtk_widget_set_valign (child, GTK_ALIGN_FILL);
gtk_box_pack_start (GTK_BOX (frame), child, FALSE);
gtk_box_pack_start (GTK_BOX (frame), child);
gtk_widget_show (frame);
@ -1357,14 +1357,14 @@ add_option_to_extension_point (GtkPrinterOption *option,
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_widget_set_valign (hbox, GTK_ALIGN_BASELINE);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_box_pack_start (GTK_BOX (hbox), widget);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (extension_point), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (extension_point), hbox);
}
else
gtk_box_pack_start (GTK_BOX (extension_point), widget, TRUE);
gtk_box_pack_start (GTK_BOX (extension_point), widget);
}
static gint
@ -1643,7 +1643,7 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog)
gtk_widget_show (frame);
gtk_box_pack_start (GTK_BOX (priv->advanced_vbox),
frame, FALSE);
frame);
}
}

View File

@ -206,7 +206,7 @@ gtk_recent_chooser_dialog_constructed (GObject *object)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (object));
gtk_box_pack_start (GTK_BOX (content_area),
priv->chooser, TRUE);
priv->chooser);
_gtk_recent_chooser_set_delegate (GTK_RECENT_CHOOSER (object),
GTK_RECENT_CHOOSER (priv->chooser));

View File

@ -458,7 +458,7 @@ gtk_shortcuts_section_init (GtkShortcutsSection *self)
gtk_widget_set_hexpand (GTK_WIDGET (self->switcher), TRUE);
gtk_widget_set_halign (GTK_WIDGET (self->switcher), GTK_ALIGN_CENTER);
gtk_container_add (GTK_CONTAINER (self->footer), GTK_WIDGET (self->switcher));
gtk_box_pack_end (GTK_BOX (self->footer), self->show_all, TRUE);
gtk_box_pack_end (GTK_BOX (self->footer), self->show_all);
gtk_widget_set_halign (self->show_all, GTK_ALIGN_END);
self->pan_gesture = gtk_gesture_pan_new (GTK_WIDGET (self->stack), GTK_ORIENTATION_HORIZONTAL);

View File

@ -518,8 +518,8 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
else
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,0);
if (icon)
gtk_box_pack_start (GTK_BOX (box), icon, TRUE);
gtk_box_pack_end (GTK_BOX (box), label, TRUE);
gtk_box_pack_start (GTK_BOX (box), icon);
gtk_box_pack_end (GTK_BOX (box), label);
gtk_container_add (GTK_CONTAINER (button->priv->button), box);
gtk_style_context_add_class (gtk_widget_get_style_context (button->priv->button), "image-button");
gtk_style_context_add_class (gtk_widget_get_style_context (button->priv->button), "text-button");
@ -530,17 +530,17 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
{
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
if (icon)
gtk_box_pack_start (GTK_BOX (box), icon, TRUE);
gtk_box_pack_start (GTK_BOX (box), icon);
if (label)
gtk_box_pack_end (GTK_BOX (box), label, TRUE);
gtk_box_pack_end (GTK_BOX (box), label);
}
else
{
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
if (icon)
gtk_box_pack_end (GTK_BOX (box), icon, TRUE);
gtk_box_pack_end (GTK_BOX (box), icon);
if (label)
gtk_box_pack_start (GTK_BOX (box), label, TRUE);
gtk_box_pack_start (GTK_BOX (box), label);
}
gtk_container_add (GTK_CONTAINER (button->priv->button), box);
gtk_style_context_add_class (gtk_widget_get_style_context (button->priv->button), "image-button");

View File

@ -849,13 +849,13 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column)
if (priv->xalign <= 0.5)
{
gtk_box_pack_start (GTK_BOX (hbox), priv->frame, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), priv->arrow, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), priv->frame);
gtk_box_pack_start (GTK_BOX (hbox), priv->arrow);
}
else
{
gtk_box_pack_start (GTK_BOX (hbox), priv->arrow, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), priv->frame, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), priv->arrow);
gtk_box_pack_start (GTK_BOX (hbox), priv->frame);
}
gtk_container_add (GTK_CONTAINER (priv->frame), child);

View File

@ -138,13 +138,13 @@ add_check_row (GtkInspectorGeneral *gen,
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_box_pack_start (GTK_BOX (box), label, FALSE);
gtk_box_pack_start (GTK_BOX (box), label);
check = gtk_image_new_from_icon_name ("object-select-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_set_halign (check, GTK_ALIGN_END);
gtk_widget_set_valign (check, GTK_ALIGN_BASELINE);
gtk_widget_set_opacity (check, value ? 1.0 : 0.0);
gtk_box_pack_start (GTK_BOX (box), check, TRUE);
gtk_box_pack_start (GTK_BOX (box), check);
row = gtk_list_box_row_new ();
gtk_container_add (GTK_CONTAINER (row), box);
@ -176,14 +176,14 @@ add_label_row (GtkInspectorGeneral *gen,
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_box_pack_start (GTK_BOX (box), label, FALSE);
gtk_box_pack_start (GTK_BOX (box), label);
label = gtk_label_new (value);
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
gtk_widget_set_halign (label, GTK_ALIGN_END);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_label_set_xalign (GTK_LABEL (label), 1.0);
gtk_box_pack_start (GTK_BOX (box), label, TRUE);
gtk_box_pack_start (GTK_BOX (box), label);
row = gtk_list_box_row_new ();
gtk_container_add (GTK_CONTAINER (row), box);

View File

@ -938,7 +938,7 @@ property_editor (GObject *object,
first = b;
g_object_set_data (G_OBJECT (b), "index", GINT_TO_POINTER (j));
gtk_widget_show (b);
gtk_box_pack_start (GTK_BOX (box), b, FALSE);
gtk_box_pack_start (GTK_BOX (box), b);
connect_controller (G_OBJECT (b), "toggled",
object, spec, G_CALLBACK (enum_modified));
++j;
@ -980,7 +980,7 @@ property_editor (GObject *object,
b = gtk_check_button_new_with_label (fclass->values[j].value_name);
g_object_set_data (G_OBJECT (b), "index", GINT_TO_POINTER (j));
gtk_widget_show (b);
gtk_box_pack_start (GTK_BOX (box), b, FALSE);
gtk_box_pack_start (GTK_BOX (box), b);
connect_controller (G_OBJECT (b), "toggled",
object, spec, G_CALLBACK (flags_modified));
}
@ -1605,7 +1605,7 @@ add_gtk_settings_info (GtkInspectorPropEditor *editor)
gtk_widget_set_halign (button, GTK_ALIGN_END);
gtk_widget_show (button);
gtk_widget_set_sensitive (button, FALSE);
gtk_box_pack_end (GTK_BOX (row), button, FALSE);
gtk_box_pack_end (GTK_BOX (row), button);
switch (_gtk_settings_get_setting_source (GTK_SETTINGS (object), name))
{

View File

@ -348,7 +348,7 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (widget), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (widget), hbox);
for (i = 0; i < g_list_model_get_n_items (priv->recordings); i++)
{
@ -387,17 +387,17 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
label = gtk_label_new (str);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
g_free (str);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
button = gtk_toggle_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_button_set_icon_name (GTK_BUTTON (button), "view-more-symbolic");
gtk_box_pack_end (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_end (GTK_BOX (hbox), button);
label = gtk_label_new (gtk_inspector_render_recording_get_profiler_info (GTK_INSPECTOR_RENDER_RECORDING (recording)));
gtk_widget_hide (label);
gtk_box_pack_end (GTK_BOX (widget), label, FALSE);
gtk_box_pack_end (GTK_BOX (widget), label);
g_object_bind_property (button, "active", label, "visible", 0);
}
else

View File

@ -225,7 +225,7 @@ add_size_group (GtkInspectorSizeGroups *sl,
g_object_set (label, "margin", 10, NULL);
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
gtk_box_pack_start (GTK_BOX (box2), label, TRUE);
gtk_box_pack_start (GTK_BOX (box2), label);
combo = gtk_combo_box_text_new ();
g_object_set (combo, "margin", 10, NULL);
@ -238,7 +238,7 @@ add_size_group (GtkInspectorSizeGroups *sl,
g_object_bind_property (group, "mode",
combo, "active",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
gtk_box_pack_start (GTK_BOX (box2), combo, FALSE);
gtk_box_pack_start (GTK_BOX (box2), combo);
listbox = gtk_list_box_new ();
gtk_container_add (GTK_CONTAINER (box), listbox);

View File

@ -68,17 +68,17 @@ add_string (GtkInspectorStrvEditor *editor,
entry = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (entry), str);
gtk_widget_show (entry);
gtk_box_pack_start (GTK_BOX (box), entry, TRUE);
gtk_box_pack_start (GTK_BOX (box), entry);
g_object_set_data (G_OBJECT (box), "entry", entry);
g_signal_connect_swapped (entry, "notify::text", G_CALLBACK (emit_changed), editor);
button = gtk_button_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
gtk_style_context_add_class (gtk_widget_get_style_context (button), "image-button");
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (box), button, FALSE);
gtk_box_pack_start (GTK_BOX (box), button);
g_signal_connect (button, "clicked", G_CALLBACK (remove_string), editor);
gtk_box_pack_start (GTK_BOX (editor->box), box, FALSE);
gtk_box_pack_start (GTK_BOX (editor->box), box);
gtk_widget_grab_focus (entry);
@ -107,8 +107,8 @@ gtk_inspector_strv_editor_init (GtkInspectorStrvEditor *editor)
gtk_widget_show (editor->button);
g_signal_connect (editor->button, "clicked", G_CALLBACK (add_cb), editor);
gtk_box_pack_start (GTK_BOX (editor), editor->box, TRUE);
gtk_box_pack_start (GTK_BOX (editor), editor->button, FALSE);
gtk_box_pack_start (GTK_BOX (editor), editor->box);
gtk_box_pack_start (GTK_BOX (editor), editor->button);
}
static void

View File

@ -37,9 +37,6 @@
<property name="visible">1</property>
<property name="icon-name">image-missing</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="name_label">
@ -49,7 +46,6 @@
<property name="selectable">1</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -74,9 +70,6 @@
<property name="justify">center</property>
<property name="selectable">1</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="comments_label">
@ -87,9 +80,6 @@
<property name="selectable">1</property>
<property name="max-width-chars">60</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="website_label">
@ -98,9 +88,6 @@
<property name="selectable">1</property>
<signal name="activate-link" handler="emit_activate_link" object="GtkAboutDialog" swapped="yes"/>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="copyright_label">
@ -111,9 +98,6 @@
<property name="selectable">1</property>
<property name="max-width-chars">60</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="license_label">
@ -125,9 +109,6 @@
<property name="selectable">1</property>
<property name="max-width-chars">60</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
</object>
<packing>

View File

@ -18,9 +18,6 @@
<class name="sidebar"/>
</style>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="content_box">
@ -58,7 +55,6 @@
<signal name="clicked" handler="on_assistant_apply" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
</packing>
</child>
@ -76,7 +72,6 @@
<signal name="clicked" handler="on_assistant_forward" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
@ -94,7 +89,6 @@
<signal name="clicked" handler="on_assistant_back" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
@ -112,7 +106,6 @@
<signal name="clicked" handler="on_assistant_last" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
<property name="position">3</property>
</packing>
@ -131,7 +124,6 @@
<signal name="clicked" handler="on_assistant_cancel" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
<property name="position">4</property>
</packing>
@ -150,7 +142,6 @@
<signal name="clicked" handler="on_assistant_close" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
<property name="position">5</property>
</packing>

View File

@ -120,7 +120,6 @@
</child>
</object>
<packing>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>

View File

@ -66,7 +66,6 @@
<signal name="notify::active" handler="new_folder_popover_active"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
@ -111,16 +110,10 @@
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="list_and_preview_box">
@ -319,7 +312,6 @@
<property name="spacing">12</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -361,7 +353,6 @@
<signal name="changed" handler="filter_combo_changed" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
</packing>
</child>

View File

@ -13,9 +13,6 @@
<object class="GtkImage" id="image">
<property name="icon-name">image-missing</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkStack" id="stack">

View File

@ -35,9 +35,6 @@
<property name="wrap">1</property>
<property name="max-width-chars">60</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="secondary_label">
@ -59,9 +56,6 @@
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
</object>
</child>

View File

@ -381,7 +381,6 @@
</child>
</object>
<packing>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@ -459,7 +458,6 @@
</child>
</object>
<packing>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>

View File

@ -153,7 +153,6 @@
<property name="spacing">18</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -182,9 +181,6 @@
<relation type="label-for" target="range_table"/>
</accessibility>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="range_table">
@ -284,7 +280,6 @@
</accessibility>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -309,9 +304,6 @@
<relation type="label-for" target="grid1"/>
</accessibility>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
@ -393,7 +385,6 @@
</accessibility>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -404,7 +395,6 @@
</child>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -415,9 +405,6 @@
<property name="visible">1</property>
<property name="label" translatable="yes">General</property>
</object>
<packing>
<property name="tab-fill">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="page_setup_main_box">
@ -448,9 +435,6 @@
<relation type="label-for" target="grid2"/>
</accessibility>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid2">
@ -617,7 +601,6 @@
</accessibility>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -642,9 +625,6 @@
<relation type="label-for" target="grid3"/>
</accessibility>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid3">
@ -795,7 +775,6 @@
</accessibility>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -805,9 +784,6 @@
</packing>
</child>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box6">
@ -863,9 +839,6 @@
<relation type="label-for" target="grid5"/>
</accessibility>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid5">
@ -926,7 +899,6 @@
</accessibility>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -954,9 +926,6 @@
<relation type="label-for" target="grid6"/>
</accessibility>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid6">
@ -1049,7 +1018,6 @@
</accessibility>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -1077,9 +1045,6 @@
<relation type="label-for" target="grid7"/>
</accessibility>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid7">
@ -1140,7 +1105,6 @@
</accessibility>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
@ -1317,7 +1281,6 @@
</child>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>

View File

@ -66,7 +66,6 @@
</child>
</object>
<packing>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@ -83,13 +82,11 @@
<signal name="changed" handler="filter_combo_changed_cb" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="pack-type">end</property>
</packing>
</child>
</object>
<packing>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>

View File

@ -36,9 +36,6 @@
<signal name="button-release-event" handler="cb_button_release" swapped="no"/>
<signal name="clicked" handler="cb_button_clicked" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkScale" id="scale">
@ -67,7 +64,6 @@
<signal name="clicked" handler="cb_button_clicked" swapped="no"/>
</object>
<packing>
<property name="fill">0</property>
<property name="position">2</property>
</packing>
</child>

View File

@ -16,9 +16,6 @@
<object class="GtkImage" id="image">
<property name="icon-name">image-missing</property>
</object>
<packing>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label">
@ -26,7 +23,6 @@
<property name="max-width-chars">70</property>
</object>
<packing>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>

View File

@ -75,12 +75,12 @@ create_flicker (void)
spinbutton7_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton7 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton7_adj), 1, 0);
gtk_widget_show (spinbutton7);
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton7, TRUE);
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton7);
spinbutton8_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton8 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton8_adj), 1, 0);
gtk_widget_show (spinbutton8);
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton8, TRUE);
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton8);
vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (vbox1);
@ -89,42 +89,42 @@ create_flicker (void)
spinbutton9_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton9 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton9_adj), 1, 0);
gtk_widget_show (spinbutton9);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton9, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton9);
spinbutton10_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton10 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton10_adj), 1, 0);
gtk_widget_show (spinbutton10);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton10, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton10);
spinbutton11_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton11 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton11_adj), 1, 0);
gtk_widget_show (spinbutton11);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton11, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton11);
spinbutton12_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton12 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton12_adj), 1, 0);
gtk_widget_show (spinbutton12);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton12, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton12);
spinbutton13_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton13 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton13_adj), 1, 0);
gtk_widget_show (spinbutton13);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton13, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton13);
spinbutton14_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton14 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton14_adj), 1, 0);
gtk_widget_show (spinbutton14);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton14, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton14);
spinbutton15_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton15 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton15_adj), 1, 0);
gtk_widget_show (spinbutton15);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton15, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton15);
spinbutton16_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton16 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton16_adj), 1, 0);
gtk_widget_show (spinbutton16);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton16, FALSE);
gtk_box_pack_start (GTK_BOX (vbox1), spinbutton16);
vpaned1 = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_widget_show (vpaned1);
@ -138,17 +138,17 @@ create_flicker (void)
spinbutton17_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton17 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton17_adj), 1, 0);
gtk_widget_show (spinbutton17);
gtk_box_pack_start (GTK_BOX (hbox1), spinbutton17, TRUE);
gtk_box_pack_start (GTK_BOX (hbox1), spinbutton17);
spinbutton18_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton18 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton18_adj), 1, 0);
gtk_widget_show (spinbutton18);
gtk_box_pack_start (GTK_BOX (hbox1), spinbutton18, TRUE);
gtk_box_pack_start (GTK_BOX (hbox1), spinbutton18);
spinbutton19_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton19 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton19_adj), 1, 0);
gtk_widget_show (spinbutton19);
gtk_box_pack_start (GTK_BOX (hbox1), spinbutton19, TRUE);
gtk_box_pack_start (GTK_BOX (hbox1), spinbutton19);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (vbox2);
@ -157,42 +157,42 @@ create_flicker (void)
spinbutton20_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton20 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton20_adj), 1, 0);
gtk_widget_show (spinbutton20);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton20, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton20);
spinbutton21_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton21 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton21_adj), 1, 0);
gtk_widget_show (spinbutton21);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton21, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton21);
spinbutton22_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton22 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton22_adj), 1, 0);
gtk_widget_show (spinbutton22);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton22, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton22);
spinbutton23_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton23 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton23_adj), 1, 0);
gtk_widget_show (spinbutton23);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton23, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton23);
spinbutton24_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton24 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton24_adj), 1, 0);
gtk_widget_show (spinbutton24);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton24, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton24);
spinbutton25_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton25 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton25_adj), 1, 0);
gtk_widget_show (spinbutton25);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton25, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton25);
spinbutton26_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton26 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton26_adj), 1, 0);
gtk_widget_show (spinbutton26);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton26, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), spinbutton26);
spinbutton27_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
spinbutton27 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton27_adj), 1, 0);
gtk_widget_show (spinbutton27);
gtk_box_pack_end (GTK_BOX (vbox2), spinbutton27, FALSE);
gtk_box_pack_end (GTK_BOX (vbox2), spinbutton27);
return window1;
}

View File

@ -175,26 +175,26 @@ main (int argc, char *argv[])
gtk_gears_set_fps_label (GTK_GEARS (gears), GTK_LABEL (fps_label));
spinner = gtk_spinner_new ();
gtk_box_pack_end (GTK_BOX (hbox), spinner, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), spinner);
gtk_widget_show (spinner);
gtk_spinner_start (GTK_SPINNER (spinner));
check = gtk_check_button_new_with_label ("Animate spinner");
gtk_box_pack_end (GTK_BOX (hbox), check, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), check);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
gtk_widget_show (check);
g_signal_connect (check, "toggled",
G_CALLBACK (toggle_spin), spinner);
check = gtk_check_button_new_with_label ("Alpha");
gtk_box_pack_end (GTK_BOX (hbox), check, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), check);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
gtk_widget_show (check);
g_signal_connect (check, "toggled",
G_CALLBACK (toggle_alpha), gears);
check = gtk_check_button_new_with_label ("Overlay");
gtk_box_pack_end (GTK_BOX (hbox), check, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), check);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
gtk_widget_show (check);
g_signal_connect (check, "toggled",
@ -207,7 +207,7 @@ main (int argc, char *argv[])
gtk_container_add (GTK_CONTAINER (popover), label);
gtk_menu_button_set_popover (GTK_MENU_BUTTON (button), popover);
gtk_widget_show (button);
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), button);
scrolled = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),

View File

@ -54,16 +54,16 @@ main (int argc, char **argv)
adjustment = gtk_adjustment_new (20, 0, 200, 1, 10, 0);
scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
gtk_box_pack_end (GTK_BOX (vbox), scale, FALSE);
gtk_box_pack_end (GTK_BOX (vbox), scale);
label = gtk_label_new ("Event processing time (ms):");
gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
gtk_box_pack_end (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_end (GTK_BOX (vbox), label);
da = gtk_drawing_area_new ();
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), on_draw, NULL, NULL);
gtk_widget_set_vexpand (da, TRUE);
gtk_box_pack_end (GTK_BOX (vbox), da, TRUE);
gtk_box_pack_end (GTK_BOX (vbox), da);
g_signal_connect (window, "motion-notify-event",
G_CALLBACK (on_motion_notify), NULL);

View File

@ -65,7 +65,7 @@ main (int argc, char *argv[])
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (box), sw, TRUE);
gtk_box_pack_start (GTK_BOX (box), sw);
content = get_content ();

View File

@ -321,15 +321,15 @@ create_custom_widget (GtkPrintOperation *operation,
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
gtk_widget_show (hbox);
label = gtk_label_new ("Font:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_widget_show (label);
font = gtk_font_button_new_with_font (data->font);
gtk_box_pack_start (GTK_BOX (hbox), font, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), font);
gtk_widget_show (font);
data->font_button = font;

View File

@ -32,7 +32,7 @@ main (int argc, char *argv[])
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_EXTERNAL);
gtk_box_pack_start (GTK_BOX (box), sw, TRUE);
gtk_box_pack_start (GTK_BOX (box), sw);
tv = gtk_text_view_new ();
fill_text_view (tv, "Left");
gtk_container_add (GTK_CONTAINER (sw), tv);
@ -43,7 +43,7 @@ main (int argc, char *argv[])
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_EXTERNAL);
gtk_box_pack_start (GTK_BOX (box), sw, TRUE);
gtk_box_pack_start (GTK_BOX (box), sw);
tv = gtk_text_view_new ();
fill_text_view (tv, "Middle");
gtk_container_add (GTK_CONTAINER (sw), tv);
@ -52,7 +52,7 @@ main (int argc, char *argv[])
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_EXTERNAL);
gtk_box_pack_start (GTK_BOX (box), sw, TRUE);
gtk_box_pack_start (GTK_BOX (box), sw);
tv = gtk_text_view_new ();
fill_text_view (tv, "Right");
gtk_container_add (GTK_CONTAINER (sw), tv);

View File

@ -75,7 +75,7 @@ key_test (void)
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
gtk_widget_show (box);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_box_pack_start (GTK_BOX (box), sw, TRUE);
gtk_box_pack_start (GTK_BOX (box), sw);
store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_UINT, G_TYPE_UINT);
tv = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));

View File

@ -113,7 +113,7 @@ activate (GApplication *gapp)
"row-spacing", 12,
"column-spacing", 12,
NULL);
gtk_box_pack_start (GTK_BOX (box), grid, FALSE);
gtk_box_pack_start (GTK_BOX (box), grid);
label = gtk_label_new ("Start");
gtk_widget_set_halign (label, GTK_ALIGN_END);
@ -147,7 +147,7 @@ activate (GApplication *gapp)
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
gtk_grid_attach (GTK_GRID (grid), check, 1, 3, 1, 1);
gtk_box_pack_end (GTK_BOX (box), bar, FALSE);
gtk_box_pack_end (GTK_BOX (box), bar);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_widget_show (window);
}

View File

@ -337,7 +337,7 @@ open_valigned_label_window (void)
label = gtk_label_new ("Both labels expand");
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (box), label, TRUE);
gtk_box_pack_start (GTK_BOX (box), label);
label = gtk_label_new ("Some wrapping text with width-chars = 15 and max-width-chars = 35");
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
@ -353,7 +353,7 @@ open_valigned_label_window (void)
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (box), frame, TRUE);
gtk_box_pack_start (GTK_BOX (box), frame);
gtk_window_present (GTK_WINDOW (window));
}

View File

@ -330,13 +330,13 @@ do_image (const char *filename)
g_free (escaped);
g_free (str);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
image = gtk_image_new_from_pixbuf (NULL);
gtk_container_add (GTK_CONTAINER (frame), image);
@ -384,13 +384,13 @@ do_nonprogressive (const gchar *filename)
g_free (escaped);
g_free (str);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), frame);
image = gtk_image_new_from_file (filename);
gtk_container_add (GTK_CONTAINER (frame), image);

View File

@ -76,22 +76,22 @@ main (int argc,
gtk_container_add (GTK_CONTAINER (toplevel), box);
combobox = gtk_app_chooser_button_new ("image/jpeg");
gtk_box_pack_start (GTK_BOX (box), combobox, TRUE);
gtk_box_pack_start (GTK_BOX (box), combobox);
g_signal_connect (combobox, "changed",
G_CALLBACK (combo_changed_cb), NULL);
w = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (w), "<b>Selected app info</b>");
gtk_box_pack_start (GTK_BOX (box), w, TRUE);
gtk_box_pack_start (GTK_BOX (box), w);
w = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (box), w, TRUE);
gtk_box_pack_start (GTK_BOX (box), w);
sel_image = gtk_image_new ();
gtk_box_pack_start (GTK_BOX (w), sel_image, TRUE);
gtk_box_pack_start (GTK_BOX (w), sel_image);
sel_name = gtk_label_new (NULL);
gtk_box_pack_start (GTK_BOX (w), sel_name, TRUE);
gtk_box_pack_start (GTK_BOX (w), sel_name);
gtk_app_chooser_button_set_heading (GTK_APP_CHOOSER_BUTTON (combobox), "Choose one, <i>not</i> two");
gtk_app_chooser_button_append_separator (GTK_APP_CHOOSER_BUTTON (combobox));

View File

@ -377,13 +377,13 @@ create_nonlinear_assistant (GtkWidget *widget)
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
button = gtk_radio_button_new_with_label (NULL, "branch A");
gtk_box_pack_start (GTK_BOX (page), button, FALSE);
gtk_box_pack_start (GTK_BOX (page), button);
g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (select_branch), GINT_TO_POINTER ('A'));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)),
"branch B");
gtk_box_pack_start (GTK_BOX (page), button, FALSE);
gtk_box_pack_start (GTK_BOX (page), button);
g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (select_branch), GINT_TO_POINTER ('B'));
gtk_assistant_append_page (GTK_ASSISTANT (assistant), page);
@ -649,8 +649,7 @@ create_page_flipping_assistant (GtkWidget *widget)
page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (page),
get_test_page ("Page 2"),
TRUE);
get_test_page ("Page 2"));
gtk_assistant_append_page (GTK_ASSISTANT (assistant), page);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Page 2");
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE);
@ -721,7 +720,7 @@ main (int argc, gchar *argv[])
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (buttons[i].func), NULL);
gtk_box_pack_start (GTK_BOX (box), button, TRUE);
gtk_box_pack_start (GTK_BOX (box), button);
}
gtk_widget_show (window);

View File

@ -100,7 +100,7 @@ main (int argc,
for (j = 0; j < 2; j++)
{
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
char *aligns_names[] = { "FILL", "BASELINE" };
GtkAlign aligns[] = { GTK_ALIGN_FILL, GTK_ALIGN_BASELINE};
@ -136,7 +136,7 @@ main (int argc,
}
grid_hbox = hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), baseline_pos_str[0]);
@ -148,7 +148,7 @@ main (int argc,
for (j = 0; j < 2; j++)
{
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
g_signal_connect (G_OBJECT (combo), "changed",
G_CALLBACK (baseline_position_changed), hbox);
@ -227,7 +227,7 @@ main (int argc,
vbox, gtk_label_new ("grid"));
grid_hbox = hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
label = gtk_label_new ("Align me:");
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
@ -295,7 +295,7 @@ main (int argc,
gtk_container_add (GTK_CONTAINER (hbox), grid);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
adjustment = gtk_adjustment_new (0.0, -1.0, 5.0, 1.0, 1.0, 0.0);
spin = gtk_spin_button_new (adjustment, 1.0, 0);
@ -320,7 +320,7 @@ main (int argc,
vbox, gtk_label_new ("button box"));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
adjustment = gtk_adjustment_new (34.0, 1.0, 64.0, 1.0, 1.0, 0.0);
spin = gtk_spin_button_new (adjustment, 1.0, 0);
@ -333,7 +333,7 @@ main (int argc,
for (j = 0; j < 3; j++)
{
hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
gtk_box_set_baseline_position (GTK_BOX (hbox), j);

View File

@ -129,7 +129,7 @@ main (int argc,
/* GtkHButtonBox */
hbbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (vbox), hbbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbbox);
for (i = 0; i < N_BUTTONS; i++) {
buttons[i] = gtk_button_new_with_label (strings[i]);
@ -142,27 +142,27 @@ main (int argc,
/* GtkVButtonBox */
vbbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
gtk_box_pack_start (GTK_BOX (vbox), vbbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), vbbox);
/* Options */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
combo_types = gtk_combo_box_text_new ();
populate_combo_with (GTK_COMBO_BOX_TEXT (combo_types), types);
g_signal_connect (G_OBJECT (combo_types), "changed", G_CALLBACK (combo_types_changed_cb), buttons);
gtk_box_pack_start (GTK_BOX (hbox), combo_types, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), combo_types);
combo_styles = gtk_combo_box_text_new ();
populate_combo_with (GTK_COMBO_BOX_TEXT (combo_styles), styles);
g_signal_connect (G_OBJECT (combo_styles), "changed", G_CALLBACK (combo_changed_cb), NULL);
gtk_box_pack_start (GTK_BOX (hbox), combo_styles, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), combo_styles);
option = gtk_check_button_new_with_label ("Help is secondary");
g_signal_connect (G_OBJECT (option), "toggled", G_CALLBACK (option_cb), buttons[N_BUTTONS - 1]);
gtk_box_pack_start (GTK_BOX (hbox), option, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), option);
gtk_widget_show (window);
gtk_widget_hide (vbbox);

View File

@ -1,18 +1,5 @@
#include <gtk/gtk.h>
static void
fill_toggled (GtkToggleButton *b, GtkWidget *w)
{
gboolean active;
GtkWidget *parent;
active = gtk_toggle_button_get_active (b);
parent = gtk_widget_get_parent (w);
gtk_container_child_set (GTK_CONTAINER (parent), w,
"fill", active,
NULL);
}
static void
edit_widget (GtkWidget *button)
{
@ -21,7 +8,6 @@ edit_widget (GtkWidget *button)
GtkWidget *label;
GtkWidget *entry;
GtkWidget *check;
gboolean fill;
dialog = GTK_WIDGET (g_object_get_data (G_OBJECT (button), "dialog"));
@ -58,17 +44,6 @@ edit_widget (GtkWidget *button)
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
gtk_grid_attach (GTK_GRID (grid), check, 1, 1, 1, 1);
label = gtk_label_new ("Fill:");
gtk_widget_set_halign (label, GTK_ALIGN_END);
check = gtk_check_button_new ();
gtk_box_query_child_packing (GTK_BOX (gtk_widget_get_parent (button)),
button, &fill, NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), fill);
g_signal_connect (check, "toggled",
G_CALLBACK (fill_toggled), button);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
gtk_grid_attach (GTK_GRID (grid), check, 1, 3, 1, 1);
g_object_set_data (G_OBJECT (button), "dialog", dialog);
}
@ -114,12 +89,12 @@ main (int argc, char *argv[])
gtk_container_add (GTK_CONTAINER (window), vbox);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (box), test_widget ("1"), TRUE);
gtk_box_pack_start (GTK_BOX (box), test_widget ("2"), TRUE);
gtk_box_pack_start (GTK_BOX (box), test_widget ("3"), TRUE);
gtk_box_pack_start (GTK_BOX (box), test_widget ("4"), TRUE);
gtk_box_pack_end (GTK_BOX (box), test_widget ("5"), TRUE);
gtk_box_pack_end (GTK_BOX (box), test_widget ("6"), TRUE);
gtk_box_pack_start (GTK_BOX (box), test_widget ("1"));
gtk_box_pack_start (GTK_BOX (box), test_widget ("2"));
gtk_box_pack_start (GTK_BOX (box), test_widget ("3"));
gtk_box_pack_start (GTK_BOX (box), test_widget ("4"));
gtk_box_pack_end (GTK_BOX (box), test_widget ("5"));
gtk_box_pack_end (GTK_BOX (box), test_widget ("6"));
gtk_box_set_center_widget (GTK_BOX (box), test_widget ("center"));
gtk_container_add (GTK_CONTAINER (vbox), box);
@ -138,14 +113,14 @@ main (int argc, char *argv[])
gtk_widget_set_halign (b, GTK_ALIGN_CENTER);
label = gtk_label_new ("Spacing:");
gtk_widget_set_halign (label, GTK_ALIGN_END);
gtk_box_pack_start (GTK_BOX (b), label, TRUE);
gtk_box_pack_start (GTK_BOX (b), label);
spin = gtk_spin_button_new_with_range (0, 10, 1);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
gtk_widget_set_halign (spin, GTK_ALIGN_START);
g_signal_connect (spin, "value-changed",
G_CALLBACK (spacing_changed), box);
gtk_box_pack_start (GTK_BOX (b), spin, TRUE);
gtk_box_pack_start (GTK_BOX (b), spin);
gtk_container_add (GTK_CONTAINER (vbox), b);
gtk_widget_show (window);

View File

@ -172,10 +172,10 @@ main (gint argc, gchar **argv)
toolbar = gtk_toolbar_new ();
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_TEXT);
gtk_box_pack_start (GTK_BOX (main_box), toolbar, TRUE);
gtk_box_pack_start (GTK_BOX (main_box), toolbar);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (main_box), box, TRUE);
gtk_box_pack_start (GTK_BOX (main_box), box);
container = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW (container), 200);
@ -197,28 +197,28 @@ main (gint argc, gchar **argv)
gtk_text_view_get_buffer (GTK_TEXT_VIEW (child)));
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (main_box), container, TRUE);
gtk_box_pack_start (GTK_BOX (main_box), container);
child = gtk_switch_new ();
gtk_switch_set_active (GTK_SWITCH (child), gtk_widget_get_default_direction () == GTK_TEXT_DIR_LTR);
g_signal_connect (child,
"notify::active",
G_CALLBACK (set_orientation),
NULL);
gtk_box_pack_start (GTK_BOX (container), child, FALSE);
gtk_box_pack_start (GTK_BOX (container), child);
child = gtk_label_new ("left-to-right");
gtk_box_pack_start (GTK_BOX (container), child, FALSE);
gtk_box_pack_start (GTK_BOX (container), child);
child = gtk_button_new_with_label ("Add button");
g_signal_connect_swapped (child,
"clicked",
G_CALLBACK (add_button),
box);
gtk_box_pack_end (GTK_BOX (container), child, FALSE);
gtk_box_pack_end (GTK_BOX (container), child);
child = gtk_button_new_with_label ("Add toolbutton");
g_signal_connect_swapped (child,
"clicked",
G_CALLBACK (add_toolbutton),
toolbar);
gtk_box_pack_end (GTK_BOX (container), child, FALSE);
gtk_box_pack_end (GTK_BOX (container), child);
add_toolbutton (GTK_TOOLBAR (toolbar));
add_toolbutton (GTK_TOOLBAR (toolbar));

View File

@ -495,7 +495,7 @@ create_calendar(void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, DEF_PAD_SMALL);
frame = create_frame ("<b>Options</b>", vbox, GTK_ALIGN_FILL, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (rpane), frame, TRUE);
gtk_box_pack_start (GTK_BOX (rpane), frame);
size = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
context = gtk_widget_get_style_context (calendar);
@ -517,9 +517,9 @@ create_calendar(void)
gtk_size_group_add_widget (size, label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, DEF_PAD_SMALL);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_box_pack_start (GTK_BOX (hbox), button);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
/* Build the width entry */
@ -538,9 +538,9 @@ create_calendar(void)
gtk_size_group_add_widget (size, label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, DEF_PAD_SMALL);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_box_pack_start (GTK_BOX (hbox), button);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
/* Build the height entry */
@ -559,15 +559,15 @@ create_calendar(void)
gtk_size_group_add_widget (size, label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, DEF_PAD_SMALL);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_box_pack_start (GTK_BOX (hbox), button);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
/* Build the right details frame */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, DEF_PAD_SMALL);
frame = create_frame ("<b>Details</b>", vbox, GTK_ALIGN_FILL, GTK_ALIGN_FILL);
gtk_box_pack_start (GTK_BOX (rpane), frame, TRUE);
gtk_box_pack_start (GTK_BOX (rpane), frame);
details = gtk_text_view_new();
calendar_data.details_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (details));
@ -585,12 +585,12 @@ create_calendar(void)
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox), scroller, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scroller);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, DEF_PAD_SMALL);
gtk_widget_set_halign (hbox, GTK_ALIGN_START);
gtk_widget_set_valign (hbox, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
button = gtk_button_new_with_mnemonic ("Demonstrate _Details");
@ -599,7 +599,7 @@ create_calendar(void)
G_CALLBACK (demonstrate_details),
&calendar_data);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button);
button = gtk_button_new_with_mnemonic ("_Reset Details");
@ -608,24 +608,24 @@ create_calendar(void)
G_CALLBACK (reset_details),
&calendar_data);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button);
toggle = gtk_check_button_new_with_mnemonic ("_Use Details");
g_signal_connect (toggle, "toggled",
G_CALLBACK(calendar_toggle_details),
&calendar_data);
gtk_box_pack_start (GTK_BOX (vbox), toggle, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), toggle);
/* Build the Right frame with the flags in */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
frame = create_expander ("<b>Flags</b>", vbox, GTK_ALIGN_FILL, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (rpane), frame, TRUE);
gtk_box_pack_start (GTK_BOX (rpane), frame);
for (i = 0; i < G_N_ELEMENTS (calendar_data.settings); i++)
{
toggle = gtk_check_button_new_with_mnemonic(flags[i].label);
gtk_box_pack_start (GTK_BOX (vbox), toggle, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), toggle);
calendar_data.flag_checkboxes[i] = toggle;
g_signal_connect (toggle, "toggled",
@ -644,25 +644,25 @@ create_calendar(void)
frame = create_frame ("<b>Signal Events</b>", vbox, GTK_ALIGN_FILL, GTK_ALIGN_CENTER);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
label = gtk_label_new ("Signal:");
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
calendar_data.last_sig = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.last_sig, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.last_sig);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
label = gtk_label_new ("Previous signal:");
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
calendar_data.prev_sig = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.prev_sig, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.prev_sig);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
label = gtk_label_new ("Second previous signal:");
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label);
calendar_data.prev2_sig = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.prev2_sig, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.prev2_sig);
/*
* Glue everything together
@ -677,16 +677,11 @@ create_calendar(void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, DEF_PAD_SMALL);
gtk_box_pack_start (GTK_BOX (vbox), hpaned,
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), frame,
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), bbox,
TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hpaned);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
gtk_box_pack_start (GTK_BOX (vbox), frame);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
gtk_box_pack_start (GTK_BOX (vbox), bbox);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@ -196,19 +196,19 @@ simple_cell_area (void)
gtk_container_add (GTK_CONTAINER (frame), iconview);
gtk_box_pack_end (GTK_BOX (hbox), frame, TRUE);
gtk_box_pack_end (GTK_BOX (hbox), frame);
/* Now add some controls */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show (vbox);
gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), vbox);
widget = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Horizontal");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Vertical");
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (orientation_changed), iconview);
@ -216,7 +216,7 @@ simple_cell_area (void)
widget = gtk_check_button_new_with_label ("Align 2nd Cell");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (align_cell_2_toggled), iconview);
@ -224,7 +224,7 @@ simple_cell_area (void)
widget = gtk_check_button_new_with_label ("Align 3rd Cell");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (align_cell_3_toggled), iconview);
@ -233,7 +233,7 @@ simple_cell_area (void)
widget = gtk_check_button_new_with_label ("Expand 1st Cell");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (expand_cell_1_toggled), iconview);
@ -241,7 +241,7 @@ simple_cell_area (void)
widget = gtk_check_button_new_with_label ("Expand 2nd Cell");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (expand_cell_2_toggled), iconview);
@ -249,7 +249,7 @@ simple_cell_area (void)
widget = gtk_check_button_new_with_label ("Expand 3rd Cell");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (expand_cell_3_toggled), iconview);
@ -441,19 +441,19 @@ focus_cell_area (void)
gtk_container_add (GTK_CONTAINER (frame), iconview);
gtk_box_pack_end (GTK_BOX (hbox), frame, TRUE);
gtk_box_pack_end (GTK_BOX (hbox), frame);
/* Now add some controls */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show (vbox);
gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), vbox);
widget = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Horizontal");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Vertical");
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (orientation_changed), iconview);
@ -461,7 +461,7 @@ focus_cell_area (void)
widget = gtk_check_button_new_with_label ("Focus Sibling");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (focus_sibling_toggled), iconview);
@ -531,7 +531,7 @@ background_area (void)
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_width_chars (GTK_LABEL (label), 40);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (main_vbox), label);
iconview = focus_iconview (TRUE, NULL, NULL);
@ -543,20 +543,20 @@ background_area (void)
gtk_container_add (GTK_CONTAINER (frame), iconview);
gtk_box_pack_end (GTK_BOX (hbox), frame, TRUE);
gtk_box_pack_end (GTK_BOX (hbox), frame);
/* Now add some controls */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show (vbox);
gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE);
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE);
gtk_box_pack_end (GTK_BOX (hbox), vbox);
gtk_box_pack_start (GTK_BOX (main_vbox), hbox);
widget = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Horizontal");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Vertical");
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
gtk_widget_show (widget);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), widget);
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (orientation_changed), iconview);
@ -565,9 +565,9 @@ background_area (void)
label = gtk_label_new ("Cell spacing");
gtk_widget_set_hexpand (label, TRUE);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_box_pack_start (GTK_BOX (hbox), widget);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
g_signal_connect (G_OBJECT (widget), "value-changed",
G_CALLBACK (cell_spacing_changed), iconview);
@ -578,9 +578,9 @@ background_area (void)
label = gtk_label_new ("Row spacing");
gtk_widget_set_hexpand (label, TRUE);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_box_pack_start (GTK_BOX (hbox), widget);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
g_signal_connect (G_OBJECT (widget), "value-changed",
G_CALLBACK (row_spacing_changed), iconview);
@ -590,9 +590,9 @@ background_area (void)
gtk_widget_set_hexpand (label, TRUE);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), gtk_icon_view_get_item_padding (GTK_ICON_VIEW (iconview)));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), label);
gtk_box_pack_start (GTK_BOX (hbox), widget);
gtk_box_pack_start (GTK_BOX (vbox), hbox);
g_signal_connect (G_OBJECT (widget), "value-changed",
G_CALLBACK (item_padding_changed), iconview);

View File

@ -266,20 +266,20 @@ main (int argc, char **argv)
/* LTR */
label = gtk_label_new ("Left to right");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
tree = create_tree (FALSE);
gtk_widget_set_vexpand (tree, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), tree, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), tree);
/* RTL */
label = gtk_label_new ("Right to left");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
tree = create_tree (TRUE);
gtk_widget_set_vexpand (tree, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), tree, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), tree);
gtk_widget_show (window);
gtk_main ();

View File

@ -120,9 +120,9 @@ main (int argc, char **argv)
NULL);
image = gtk_image_new ();
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), image, FALSE);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), image);
label = gtk_label_new ("No data found");
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), label, FALSE);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), label);
g_signal_connect (window, "response", G_CALLBACK (on_response), NULL);

View File

@ -1071,7 +1071,7 @@ main (int argc, char **argv)
/* GtkCellView */
tmp = gtk_frame_new ("GtkCellView");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1092,7 +1092,7 @@ main (int argc, char **argv)
/* GtkComboBox list */
tmp = gtk_frame_new ("GtkComboBox (list)");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1132,7 +1132,7 @@ main (int argc, char **argv)
/* GtkComboBox dynamic list */
tmp = gtk_frame_new ("GtkComboBox (dynamic list)");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1175,7 +1175,7 @@ main (int argc, char **argv)
/* GtkComboBox custom entry */
tmp = gtk_frame_new ("GtkComboBox (custom)");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1229,7 +1229,7 @@ main (int argc, char **argv)
/* GtkComboBox tree */
tmp = gtk_frame_new ("GtkComboBox (tree)");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1272,18 +1272,18 @@ main (int argc, char **argv)
/* GtkComboBox (grid mode) */
tmp = gtk_frame_new ("GtkComboBox (grid mode)");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
comboboxgrid = create_combo_box_grid_demo ();
gtk_box_pack_start (GTK_BOX (boom), comboboxgrid, FALSE);
gtk_box_pack_start (GTK_BOX (boom), comboboxgrid);
/* GtkComboBoxEntry */
tmp = gtk_frame_new ("GtkComboBox with entry");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1295,7 +1295,7 @@ main (int argc, char **argv)
/* Phylogenetic tree */
tmp = gtk_frame_new ("What are you ?");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1317,7 +1317,7 @@ main (int argc, char **argv)
/* Capitals */
tmp = gtk_frame_new ("Where are you ?");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1348,7 +1348,7 @@ main (int argc, char **argv)
/* Aligned Food */
tmp = gtk_frame_new ("Hungry ?");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1382,7 +1382,7 @@ main (int argc, char **argv)
/* Ellipsizing growing combos */
tmp = gtk_frame_new ("Unconstrained Menu");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (tmp), boom);
@ -1401,7 +1401,7 @@ main (int argc, char **argv)
gtk_combo_box_set_popup_fixed_width (GTK_COMBO_BOX (combobox), FALSE);
tmp = gtk_frame_new ("Looong");
gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE);
gtk_box_pack_start (GTK_BOX (mainbox), tmp);
combobox = gtk_combo_box_text_new ();
for (i = 0; i < 200; i++)
{

View File

@ -247,30 +247,30 @@ main (int argc, char **argv)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE);
gtk_box_pack_start (GTK_BOX (content_area), hbox);
combo_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_pack_start (GTK_BOX (hbox), combo_vbox, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), combo_vbox);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "<b>Menu mode</b>");
gtk_box_pack_start (GTK_BOX (combo_vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (combo_vbox), label);
menu_combo = create_combo ("menu-combo", FALSE);
gtk_widget_set_margin_start (menu_combo, 12);
gtk_box_pack_start (GTK_BOX (combo_vbox), menu_combo, FALSE);
gtk_box_pack_start (GTK_BOX (combo_vbox), menu_combo);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "<b>List mode</b>");
gtk_box_pack_start (GTK_BOX (combo_vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (combo_vbox), label);
list_combo = create_combo ("list-combo", TRUE);
gtk_widget_set_margin_start (list_combo, 12);
gtk_box_pack_start (GTK_BOX (combo_vbox), list_combo, FALSE);
gtk_box_pack_start (GTK_BOX (combo_vbox), list_combo);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_hexpand (scrolled_window, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), scrolled_window, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), scrolled_window);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@ -281,24 +281,24 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_pack_start (GTK_BOX (hbox), button_vbox, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), button_vbox);
gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 300);
button = gtk_button_new_with_label ("Insert");
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (button_vbox), button);
g_signal_connect (button, "clicked", G_CALLBACK (on_insert), NULL);
button = gtk_button_new_with_label ("Delete");
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (button_vbox), button);
g_signal_connect (button, "clicked", G_CALLBACK (on_delete), NULL);
button = gtk_button_new_with_label ("Reorder");
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (button_vbox), button);
g_signal_connect (button, "clicked", G_CALLBACK (on_reorder), NULL);
button = gtk_button_new_with_label ("Animate");
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE);
gtk_box_pack_start (GTK_BOX (button_vbox), button);
g_signal_connect (button, "clicked", G_CALLBACK (on_animate), NULL);
gtk_widget_show (dialog);

View File

@ -158,9 +158,9 @@ main (int argc, char *argv[])
gtk_widget_set_vexpand (overlay, TRUE);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), overlay, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), combo);
gtk_box_pack_start (GTK_BOX (vbox), scale);
gtk_box_pack_start (GTK_BOX (vbox), overlay);
g_object_set_data (G_OBJECT (label), "combo", combo);

View File

@ -307,7 +307,7 @@ main (int argc, char *argv[])
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), label);
/* Create our first entry */
entry = gtk_entry_new ();
@ -392,7 +392,7 @@ main (int argc, char *argv[])
gdk_threads_add_timeout (1000, (GSourceFunc) animation_timer, completion);
/* Fourth entry */
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Model-less entry completion"), FALSE);
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Model-less entry completion"));
entry = gtk_entry_new ();

View File

@ -54,31 +54,23 @@ create_box_window (void)
box3 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (box1),
gtk_label_new ("VBox 1 Top"),
FALSE);
gtk_label_new ("VBox 1 Top"));
gtk_box_pack_start (GTK_BOX (box1),
box2,
TRUE);
box2);
gtk_box_pack_end (GTK_BOX (box1),
gtk_label_new ("VBox 1 Bottom"),
FALSE);
gtk_label_new ("VBox 1 Bottom"));
gtk_box_pack_start (GTK_BOX (box2),
gtk_label_new ("HBox 2 Left"),
FALSE);
gtk_label_new ("HBox 2 Left"));
gtk_box_pack_start (GTK_BOX (box2),
box3,
TRUE);
box3);
gtk_box_pack_end (GTK_BOX (box2),
gtk_label_new ("HBox 2 Right"),
FALSE);
gtk_label_new ("HBox 2 Right"));
gtk_box_pack_start (GTK_BOX (box3),
gtk_label_new ("VBox 3 Top"),
FALSE);
gtk_label_new ("VBox 3 Top"));
gtk_box_pack_end (GTK_BOX (box3),
gtk_label_new ("VBox 3 Bottom"),
FALSE);
gtk_label_new ("VBox 3 Bottom"));
colorbox = gtk_frame_new (NULL);
@ -90,7 +82,7 @@ create_box_window (void)
G_CALLBACK (on_toggle_hexpand), NULL);
gtk_container_add (GTK_CONTAINER (colorbox), toggle);
gtk_box_pack_start (GTK_BOX (box3), colorbox, TRUE);
gtk_box_pack_start (GTK_BOX (box3), colorbox);
colorbox = gtk_frame_new (NULL);
@ -101,7 +93,7 @@ create_box_window (void)
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (on_toggle_vexpand), NULL);
gtk_container_add (GTK_CONTAINER (colorbox), toggle);
gtk_box_pack_start (GTK_BOX (box3), colorbox, TRUE);
gtk_box_pack_start (GTK_BOX (box3), colorbox);
gtk_container_add (GTK_CONTAINER (window), box1);
gtk_widget_show (window);

View File

@ -74,7 +74,7 @@ main (int argc, char *argv[])
gtk_container_add (GTK_CONTAINER (expander), sw);
gtk_widget_set_hexpand (expander, TRUE);
gtk_widget_set_vexpand (expander, TRUE);
gtk_box_pack_end (GTK_BOX (area), expander, TRUE);
gtk_box_pack_end (GTK_BOX (area), expander);
g_signal_connect (expander, "notify::expanded",
G_CALLBACK (expander_cb), dialog);

Some files were not shown because too many files have changed in this diff Show More