From 2a859ce9f2d2b18c1b54fdd2e78701e4dc310868 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Mon, 17 Jan 2011 23:45:28 -0800 Subject: [PATCH] Made MooEditTab a GtkVBox to pack progress dialog into it --- moo/mooedit/mooeditview.c | 5 +++-- moo/mooedit/mooeditwindow-priv.h | 6 ++++-- moo/mooedit/mooeditwindow.c | 12 ++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/moo/mooedit/mooeditview.c b/moo/mooedit/mooeditview.c index 7ab3abda..23b5aafa 100644 --- a/moo/mooedit/mooeditview.c +++ b/moo/mooedit/mooeditview.c @@ -218,8 +218,9 @@ moo_edit_view_get_tab (MooEditView *view) if (GTK_IS_SCROLLED_WINDOW (parent = gtk_widget_get_parent (GTK_WIDGET (view)))) if (GTK_IS_PANED (parent = gtk_widget_get_parent (parent))) - if (MOO_IS_EDIT_TAB (parent = gtk_widget_get_parent (parent))) - return MOO_EDIT_TAB (parent); + if (GTK_IS_PANED (parent = gtk_widget_get_parent (parent))) + if (MOO_IS_EDIT_TAB (parent = gtk_widget_get_parent (parent))) + return MOO_EDIT_TAB (parent); return NULL; } diff --git a/moo/mooedit/mooeditwindow-priv.h b/moo/mooedit/mooeditwindow-priv.h index 1c5fb094..4795d5dd 100644 --- a/moo/mooedit/mooeditwindow-priv.h +++ b/moo/mooedit/mooeditwindow-priv.h @@ -7,7 +7,9 @@ G_BEGIN_DECLS struct MooEditTab { - GtkHPaned base; + GtkVBox base; + + GtkWidget *hpaned; GtkWidget *vpaned1; GtkWidget *vpaned2; @@ -17,7 +19,7 @@ struct MooEditTab struct MooEditTabClass { - GtkHPanedClass base_class; + GtkVBoxClass base_class; }; G_END_DECLS diff --git a/moo/mooedit/mooeditwindow.c b/moo/mooedit/mooeditwindow.c index a99e58a4..e5eb41e8 100644 --- a/moo/mooedit/mooeditwindow.c +++ b/moo/mooedit/mooeditwindow.c @@ -18,7 +18,7 @@ **/ /** - * class:MooEditTab: (parent GtkHPaned) (moo.doc-object-name tab) + * class:MooEditTab: (parent GtkVBox) (moo.doc-object-name tab) **/ #ifdef HAVE_CONFIG_H @@ -302,7 +302,7 @@ static void action_focus_next_split_view (MooEditWindow *window) static void update_split_view_actions (MooEditWindow *window); -G_DEFINE_TYPE (MooEditTab, moo_edit_tab, GTK_TYPE_HPANED) +G_DEFINE_TYPE (MooEditTab, moo_edit_tab, GTK_TYPE_VBOX) G_DEFINE_TYPE (MooEditWindow, moo_edit_window, MOO_TYPE_WINDOW) enum { @@ -4650,10 +4650,14 @@ out: static void moo_edit_tab_init (MooEditTab *tab) { + gtk_box_set_homogeneous (GTK_BOX (tab), FALSE); + tab->hpaned = gtk_hpaned_new (); tab->vpaned1 = gtk_vpaned_new (); tab->vpaned2 = gtk_vpaned_new (); - gtk_paned_pack1 (GTK_PANED (tab), tab->vpaned1, TRUE, FALSE); - gtk_paned_pack2 (GTK_PANED (tab), tab->vpaned2, TRUE, FALSE); + gtk_paned_pack1 (GTK_PANED (tab->hpaned), tab->vpaned1, TRUE, FALSE); + gtk_paned_pack2 (GTK_PANED (tab->hpaned), tab->vpaned2, TRUE, FALSE); + gtk_widget_show (tab->hpaned); + gtk_box_pack_start (GTK_BOX (tab), tab->hpaned, TRUE, TRUE, 0); } static void