diff options
Diffstat (limited to 'pluma/pluma-documents-panel.c')
-rw-r--r-- | pluma/pluma-documents-panel.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pluma/pluma-documents-panel.c b/pluma/pluma-documents-panel.c index 66d3405f..97308efe 100644 --- a/pluma/pluma-documents-panel.c +++ b/pluma/pluma-documents-panel.c @@ -53,7 +53,11 @@ struct _PlumaDocumentsPanelPrivate guint is_reodering : 1; }; +#if GTK_CHECK_VERSION (3, 0, 0) +G_DEFINE_TYPE(PlumaDocumentsPanel, pluma_documents_panel, GTK_TYPE_BOX) +#else G_DEFINE_TYPE(PlumaDocumentsPanel, pluma_documents_panel, GTK_TYPE_VBOX) +#endif enum { @@ -535,8 +539,12 @@ menu_position (GtkMenu *menu, wy = rect.y; gdk_window_get_origin (gtk_widget_get_window (w), x, y); - + +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &requisition); +#else gtk_widget_size_request (GTK_WIDGET (menu), &requisition); +#endif if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL) { @@ -749,6 +757,11 @@ pluma_documents_panel_init (PlumaDocumentsPanel *panel) panel->priv->adding_tab = FALSE; panel->priv->is_reodering = FALSE; + +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_orientable_set_orientation (GTK_ORIENTABLE (panel), + GTK_ORIENTATION_VERTICAL); +#endif /* Create the scrolled window */ sw = gtk_scrolled_window_new (NULL, NULL); |