[gimp/metadata-browser] libgimpwidgets: add gtk_button_box_new() to gimp3migration.[ch]
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] libgimpwidgets: add gtk_button_box_new() to gimp3migration.[ch]
- Date: Fri, 2 Dec 2011 01:59:31 +0000 (UTC)
commit 5fd7602290d10f89b78bdf37b55e3b59d2bf07c9
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 30 15:43:02 2011 +0200
libgimpwidgets: add gtk_button_box_new() to gimp3migration.[ch]
and use it all over the place.
app/widgets/gimpoverlaydialog.c | 2 +-
libgimpwidgets/gimp3migration.c | 9 +++++++++
libgimpwidgets/gimp3migration.h | 5 +++--
libgimpwidgets/gimppageselector.c | 3 ++-
libgimpwidgets/gimpwidgets.def | 1 +
plug-ins/common/cml-explorer.c | 4 ++--
plug-ins/common/file-pdf-save.c | 2 +-
plug-ins/common/newsprint.c | 2 +-
plug-ins/common/qbist.c | 2 +-
plug-ins/flame/flame.c | 2 +-
10 files changed, 22 insertions(+), 10 deletions(-)
---
diff --git a/app/widgets/gimpoverlaydialog.c b/app/widgets/gimpoverlaydialog.c
index e34bdff..5c9404b 100644
--- a/app/widgets/gimpoverlaydialog.c
+++ b/app/widgets/gimpoverlaydialog.c
@@ -117,7 +117,7 @@ gimp_overlay_dialog_class_init (GimpOverlayDialogClass *klass)
static void
gimp_overlay_dialog_init (GimpOverlayDialog *dialog)
{
- dialog->action_area = gtk_hbutton_box_new ();
+ dialog->action_area = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog->action_area),
GTK_BUTTONBOX_END);
gtk_widget_set_parent (dialog->action_area, GTK_WIDGET (dialog));
diff --git a/libgimpwidgets/gimp3migration.c b/libgimpwidgets/gimp3migration.c
index 1e6c91a..4b81626 100644
--- a/libgimpwidgets/gimp3migration.c
+++ b/libgimpwidgets/gimp3migration.c
@@ -37,3 +37,12 @@ gtk_box_new (GtkOrientation orientation,
else
return gtk_vbox_new (FALSE, spacing);
}
+
+GtkWidget *
+gtk_button_box_new (GtkOrientation orientation)
+{
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
+ return gtk_hbutton_box_new ();
+ else
+ return gtk_vbutton_box_new ();
+}
diff --git a/libgimpwidgets/gimp3migration.h b/libgimpwidgets/gimp3migration.h
index 733e890..2ecc8db 100644
--- a/libgimpwidgets/gimp3migration.h
+++ b/libgimpwidgets/gimp3migration.h
@@ -33,8 +33,9 @@
* along. This file will be removed in GIMP 3.
*/
-GtkWidget * gtk_box_new (GtkOrientation orientation,
- gint spacing);
+GtkWidget * gtk_box_new (GtkOrientation orientation,
+ gint spacing);
+GtkWidget * gtk_button_box_new (GtkOrientation orientation);
#endif /* __GIMP_3_MIGRATION_H__ */
diff --git a/libgimpwidgets/gimppageselector.c b/libgimpwidgets/gimppageselector.c
index c595d39..6c6b99a 100644
--- a/libgimpwidgets/gimppageselector.c
+++ b/libgimpwidgets/gimppageselector.c
@@ -32,6 +32,7 @@
#include "gimppropwidgets.h"
#include "gimpstock.h"
#include "gimpwidgets.h"
+#include "gimp3migration.h"
#include "libgimp/libgimp-intl.h"
@@ -292,7 +293,7 @@ gimp_page_selector_init (GimpPageSelector *selector)
gtk_box_pack_start (GTK_BOX (selector), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
- hbbox = gtk_hbutton_box_new ();
+ hbbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (hbox), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
diff --git a/libgimpwidgets/gimpwidgets.def b/libgimpwidgets/gimpwidgets.def
index c07eea1..1da5fbf 100644
--- a/libgimpwidgets/gimpwidgets.def
+++ b/libgimpwidgets/gimpwidgets.def
@@ -390,3 +390,4 @@ EXPORTS
gimp_zoom_model_zoom_step
gimp_zoom_type_get_type
gtk_box_new
+ gtk_button_box_new
diff --git a/plug-ins/common/cml-explorer.c b/plug-ins/common/cml-explorer.c
index 6d2e7b2..653ad47 100644
--- a/plug-ins/common/cml-explorer.c
+++ b/plug-ins/common/cml-explorer.c
@@ -1222,7 +1222,7 @@ CML_explorer_dialog (void)
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);
- bbox = gtk_vbutton_box_new ();
+ bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show (bbox);
@@ -1259,7 +1259,7 @@ CML_explorer_dialog (void)
random_sensitives[2].widget = button;
random_sensitives[2].logic = FALSE;
- bbox = gtk_vbutton_box_new ();
+ bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show (bbox);
diff --git a/plug-ins/common/file-pdf-save.c b/plug-ins/common/file-pdf-save.c
index 2671778..2bb6414 100644
--- a/plug-ins/common/file-pdf-save.c
+++ b/plug-ins/common/file-pdf-save.c
@@ -805,7 +805,7 @@ gui_multi (void)
gtk_box_pack_start (GTK_BOX (vbox), scroll, TRUE, TRUE, 0);
- h_but_box = gtk_hbutton_box_new ();
+ h_but_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_button_box_set_layout (GTK_BUTTON_BOX (h_but_box), GTK_BUTTONBOX_START);
del = gtk_button_new_with_label ("Remove the selected pages");
diff --git a/plug-ins/common/newsprint.c b/plug-ins/common/newsprint.c
index 5b69c50..7dbbe9d 100644
--- a/plug-ins/common/newsprint.c
+++ b/plug-ins/common/newsprint.c
@@ -1387,7 +1387,7 @@ newsprint_dialog (GimpDrawable *drawable)
gtk_widget_show (hbox);
/* channel lock & factory defaults button */
- hbox = gtk_hbutton_box_new ();
+ hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing (GTK_BOX (hbox), 6);
gtk_box_pack_start (GTK_BOX (st.vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
diff --git a/plug-ins/common/qbist.c b/plug-ins/common/qbist.c
index 5c4380e..c0cd35f 100644
--- a/plug-ins/common/qbist.c
+++ b/plug-ins/common/qbist.c
@@ -867,7 +867,7 @@ dialog_run (void)
G_CALLBACK (dialog_toggle_antialaising),
NULL);
- bbox = gtk_hbutton_box_new ();
+ bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_START);
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show (bbox);
diff --git a/plug-ins/flame/flame.c b/plug-ins/flame/flame.c
index 6610b98..80054dd 100644
--- a/plug-ins/flame/flame.c
+++ b/plug-ins/flame/flame.c
@@ -1028,7 +1028,7 @@ flame_dialog (void)
gtk_box_pack_start (GTK_BOX (box), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
- vbbox= gtk_vbutton_box_new ();
+ vbbox= gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
gtk_box_set_homogeneous (GTK_BOX (vbbox), FALSE);
gtk_box_set_spacing (GTK_BOX (vbbox), 6);
gtk_box_pack_start (GTK_BOX (vbox), vbbox, FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]