[gimp] app: derive GimpDisplayShell from GtkBox instead of GtkVBox
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: derive GimpDisplayShell from GtkBox instead of GtkVBox
- Date: Sat, 30 Oct 2010 13:13:16 +0000 (UTC)
commit b2a2e3200e39ebf7196668a0383d3e16fbebb162
Author: Michael Natterer <mitch gimp org>
Date: Sat Oct 30 15:12:20 2010 +0200
app: derive GimpDisplayShell from GtkBox instead of GtkVBox
and avoid gtk_container_add() on boxes in some more plavces.
app/display/gimpdisplayshell-filter-dialog.c | 4 ++--
app/display/gimpdisplayshell-scale-dialog.c | 4 ++--
app/display/gimpdisplayshell.c | 5 ++++-
app/display/gimpdisplayshell.h | 4 ++--
4 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-filter-dialog.c b/app/display/gimpdisplayshell-filter-dialog.c
index b78363e..b181d1b 100644
--- a/app/display/gimpdisplayshell-filter-dialog.c
+++ b/app/display/gimpdisplayshell-filter-dialog.c
@@ -119,8 +119,8 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
editor = gimp_color_display_editor_new (shell->filter_stack);
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (cdd->dialog))),
- editor);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (cdd->dialog))),
+ editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
return cdd->dialog;
diff --git a/app/display/gimpdisplayshell-scale-dialog.c b/app/display/gimpdisplayshell-scale-dialog.c
index d4be3c1..b2da8df 100644
--- a/app/display/gimpdisplayshell-scale-dialog.c
+++ b/app/display/gimpdisplayshell-scale-dialog.c
@@ -150,8 +150,8 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (shell->scale_dialog))),
- table);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (shell->scale_dialog))),
+ table, TRUE, TRUE, 0);
gtk_widget_show (table);
row = 0;
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 8820cee..2c3ed1d 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -160,7 +160,7 @@ static void gimp_display_shell_transform_overlay (GimpDisplayShell *shell,
G_DEFINE_TYPE_WITH_CODE (GimpDisplayShell, gimp_display_shell,
- GTK_TYPE_VBOX,
+ GTK_TYPE_BOX,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PROGRESS,
gimp_display_shell_progress_iface_init)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_COLOR_MANAGED,
@@ -274,6 +274,9 @@ gimp_color_managed_iface_init (GimpColorManagedInterface *iface)
static void
gimp_display_shell_init (GimpDisplayShell *shell)
{
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (shell),
+ GTK_ORIENTATION_VERTICAL);
+
shell->options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS, NULL);
shell->fullscreen_options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN, NULL);
shell->no_image_options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_NO_IMAGE, NULL);
diff --git a/app/display/gimpdisplayshell.h b/app/display/gimpdisplayshell.h
index 1547038..7cdb565 100644
--- a/app/display/gimpdisplayshell.h
+++ b/app/display/gimpdisplayshell.h
@@ -47,7 +47,7 @@ typedef struct _GimpDisplayShellClass GimpDisplayShellClass;
struct _GimpDisplayShell
{
- GtkVBox parent_instance;
+ GtkBox parent_instance;
/* --- cacheline 2 boundary (128 bytes) was 20 bytes ago --- */
@@ -211,7 +211,7 @@ struct _GimpDisplayShell
struct _GimpDisplayShellClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* scaled) (GimpDisplayShell *shell);
void (* scrolled) (GimpDisplayShell *shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]