[gimp/metadata-browser] libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]
- Date: Fri, 2 Dec 2011 02:00:46 +0000 (UTC)
commit 94528d4975707840ca9f649ac442ea1a99cdd91c
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 2 14:29:40 2011 +0200
libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]
and use it all over the place.
app/display/gimpimagewindow.c | 4 ++--
app/widgets/gimpcolordisplayeditor.c | 2 +-
app/widgets/gimppanedbox.c | 4 +---
libgimpwidgets/gimp3migration.c | 9 +++++++++
libgimpwidgets/gimp3migration.h | 1 +
plug-ins/common/bump-map.c | 2 +-
plug-ins/common/newsprint.c | 2 +-
plug-ins/help-browser/dialog.c | 2 +-
8 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 85cf80d..aa5689b 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -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);
diff --git a/app/widgets/gimpcolordisplayeditor.c b/app/widgets/gimpcolordisplayeditor.c
index f8acb9f..183dcd0 100644
--- a/app/widgets/gimpcolordisplayeditor.c
+++ b/app/widgets/gimpcolordisplayeditor.c
@@ -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);
diff --git a/app/widgets/gimppanedbox.c b/app/widgets/gimppanedbox.c
index 532f128..c0aebb9 100644
--- a/app/widgets/gimppanedbox.c
+++ b/app/widgets/gimppanedbox.c
@@ -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))
{
diff --git a/libgimpwidgets/gimp3migration.c b/libgimpwidgets/gimp3migration.c
index 3073caf..05e5a94 100644
--- a/libgimpwidgets/gimp3migration.c
+++ b/libgimpwidgets/gimp3migration.c
@@ -48,6 +48,15 @@ gtk_button_box_new (GtkOrientation orientation)
}
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)
{
diff --git a/libgimpwidgets/gimp3migration.h b/libgimpwidgets/gimp3migration.h
index 049732f..79777c2 100644
--- a/libgimpwidgets/gimp3migration.h
+++ b/libgimpwidgets/gimp3migration.h
@@ -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,
diff --git a/plug-ins/common/bump-map.c b/plug-ins/common/bump-map.c
index 309aedf..2be7fe0 100644
--- a/plug-ins/common/bump-map.c
+++ b/plug-ins/common/bump-map.c
@@ -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);
diff --git a/plug-ins/common/newsprint.c b/plug-ins/common/newsprint.c
index 7dbbe9d..8ad2275 100644
--- a/plug-ins/common/newsprint.c
+++ b/plug-ins/common/newsprint.c
@@ -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);
diff --git a/plug-ins/help-browser/dialog.c b/plug-ins/help-browser/dialog.c
index 76a82eb..20307bd 100644
--- a/plug-ins/help-browser/dialog.c
+++ b/plug-ins/help-browser/dialog.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]