summaryrefslogtreecommitdiff
path: root/plugins/filebrowser/pluma-file-browser-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/filebrowser/pluma-file-browser-widget.c')
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index 6a5c3891..7cef34cc 100644
--- a/plugins/filebrowser/pluma-file-browser-widget.c
+++ b/plugins/filebrowser/pluma-file-browser-widget.c
@@ -50,6 +50,10 @@
#define XML_UI_FILE "pluma-file-browser-widget-ui.xml"
#define LOCATION_DATA_KEY "pluma-file-browser-widget-location"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
enum
{
BOOKMARKS_ID,
@@ -236,8 +240,13 @@ static void on_action_filter_binary (GtkAction * action,
static void on_action_bookmark_open (GtkAction * action,
PlumaFileBrowserWidget * obj);
+#if GTK_CHECK_VERSION (3, 0, 0)
+PLUMA_PLUGIN_DEFINE_TYPE (PlumaFileBrowserWidget, pluma_file_browser_widget,
+ GTK_TYPE_BOX)
+#else
PLUMA_PLUGIN_DEFINE_TYPE (PlumaFileBrowserWidget, pluma_file_browser_widget,
GTK_TYPE_VBOX)
+#endif
static void
free_name_icon (gpointer data)
@@ -1263,7 +1272,11 @@ pluma_file_browser_widget_init (PlumaFileBrowserWidget * obj)
free_name_icon);
gtk_box_set_spacing (GTK_BOX (obj), 3);
-
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (obj),
+ GTK_ORIENTATION_VERTICAL);
+#endif
+
#if GTK_CHECK_VERSION (3, 16, 0)
display = gtk_widget_get_display (GTK_WIDGET (obj));
obj->priv->busy_cursor = gdk_cursor_new_for_display (display, GDK_WATCH);