Commit 72675f1f authored by Tristan Van Berkom's avatar Tristan Van Berkom

Changes to testtoplevelembed

  - Made notebook tabs smaller
  - No need to hide/show toplevels after removing from a parent,
    if it's visible it will be automatically shown after removing
    outside of it's previous parent.
parent 53980aca
......@@ -9,9 +9,6 @@ remove_notebook_page (GtkWidget *button,
GtkWidget *toplevel)
{
gtk_container_remove (GTK_CONTAINER (notebook), toplevel);
gtk_widget_hide (toplevel);
gtk_widget_show (toplevel);
}
GtkWidget *
......@@ -20,7 +17,7 @@ create_tab_label (GtkWidget *toplevel)
GtkWidget *box = gtk_hbox_new (FALSE, 2);
GtkWidget *label = gtk_label_new (G_OBJECT_TYPE_NAME (toplevel));
GtkWidget *button = gtk_button_new ();
GtkWidget *image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_SMALL_TOOLBAR);
GtkWidget *image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
......@@ -66,6 +63,7 @@ main (gint argc, gchar **argv)
g_signal_connect (window, "destroy", gtk_main_quit, NULL);
notebook = gtk_notebook_new ();
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
gtk_container_add (GTK_CONTAINER (window), notebook);
gtk_widget_realize (notebook);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment