Commit 2c175b06 authored by Michael Natterer's avatar Michael Natterer 😴

libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]

and use it all over the place.
parent 19b9bfd1
......@@ -369,7 +369,7 @@ gimp_image_window_constructed (GObject *object)
gtk_widget_show (private->hbox);
/* Create the left pane */
private->left_hpane = gtk_hpaned_new ();
private->left_hpane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (private->hbox), private->left_hpane,
TRUE, TRUE, 0);
gtk_widget_show (private->left_hpane);
......@@ -384,7 +384,7 @@ gimp_image_window_constructed (GObject *object)
gtk_widget_set_visible (private->left_docks, config->single_window_mode);
/* Create the right pane */
private->right_hpane = gtk_hpaned_new ();
private->right_hpane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_pack2 (GTK_PANED (private->left_hpane), private->right_hpane,
TRUE, FALSE);
gtk_widget_show (private->right_hpane);
......
......@@ -123,7 +123,7 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
GTK_ORIENTATION_VERTICAL);
paned = gtk_vpaned_new ();
paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_box_pack_start (GTK_BOX (editor), paned, TRUE, TRUE, 0);
gtk_widget_show (paned);
......
......@@ -573,9 +573,7 @@ gimp_paned_box_add_widget (GimpPanedBox *paned_box,
/* GtkPaned is abstract :( */
orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (paned_box));
paned = (orientation == GTK_ORIENTATION_VERTICAL ?
gtk_vpaned_new () :
gtk_hpaned_new ());
paned = gtk_paned_new (orientation);
if (GTK_IS_PANED (parent))
{
......
......@@ -47,6 +47,15 @@ gtk_button_box_new (GtkOrientation orientation)
return gtk_vbutton_box_new ();
}
GtkWidget *
gtk_paned_new (GtkOrientation orientation)
{
if (orientation == GTK_ORIENTATION_HORIZONTAL)
return gtk_hpaned_new ();
else
return gtk_vpaned_new ();
}
GtkWidget *
gtk_scale_new (GtkOrientation orientation,
GtkAdjustment *adjustment)
......
......@@ -36,6 +36,7 @@
GtkWidget * gtk_box_new (GtkOrientation orientation,
gint spacing);
GtkWidget * gtk_button_box_new (GtkOrientation orientation);
GtkWidget * gtk_paned_new (GtkOrientation orientation);
GtkWidget * gtk_scale_new (GtkOrientation orientation,
GtkAdjustment *adjustment);
GtkWidget * gtk_scrollbar_new (GtkOrientation orientation,
......
......@@ -784,7 +784,7 @@ bumpmap_dialog (void)
gimp_window_set_transient (GTK_WINDOW (dialog));
paned = gtk_hpaned_new ();
paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_container_set_border_width (GTK_CONTAINER (paned), 12);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
paned, TRUE, TRUE, 0);
......
......@@ -1192,7 +1192,7 @@ newsprint_dialog (GimpDrawable *drawable)
gimp_window_set_transient (GTK_WINDOW (dialog));
paned = gtk_hpaned_new ();
paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_container_set_border_width (GTK_CONTAINER (paned), 12);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
paned, TRUE, TRUE, 0);
......
......@@ -235,7 +235,7 @@ browser_dialog_open (const gchar *plug_in_binary)
"/help-browser-toolbar/website");
/* the horizontal paned */
paned = gtk_hpaned_new ();
paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (vbox), paned, TRUE, TRUE, 0);
gtk_widget_show (paned);
......
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