From cc6a1d11d8903c3051d0af400559679cc5b4aed6 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Thu, 21 Jan 2016 20:35:13 +0100 Subject: GTK3 query-editor: fix deprecated GTK_TYPE_VBOX usage --- src/caja-query-editor.c | 10 ++++++++++ src/caja-query-editor.h | 8 ++++++++ 2 files changed, 18 insertions(+) (limited to 'src') diff --git a/src/caja-query-editor.c b/src/caja-query-editor.c index 67556ddc..205f18ee 100644 --- a/src/caja-query-editor.c +++ b/src/caja-query-editor.c @@ -143,7 +143,11 @@ static CajaQueryEditorRowOps row_type[] = EEL_CLASS_BOILERPLATE (CajaQueryEditor, caja_query_editor, +#if GTK_CHECK_VERSION (3, 0, 0) + GTK_TYPE_BOX) +#else GTK_TYPE_VBOX) +#endif static void caja_query_editor_finalize (GObject *object) @@ -1027,9 +1031,15 @@ caja_query_editor_init (CajaQueryEditor *editor) editor->details->is_visible = TRUE; editor->details->invisible_vbox = gtk_vbox_new (FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_orientable_set_orientation (GTK_ORIENTABLE (editor), GTK_ORIENTATION_VERTICAL); +#endif gtk_box_pack_start (GTK_BOX (editor), editor->details->invisible_vbox, FALSE, FALSE, 0); editor->details->visible_vbox = gtk_vbox_new (FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_orientable_set_orientation (GTK_ORIENTABLE (editor), GTK_ORIENTATION_VERTICAL); +#endif gtk_box_pack_start (GTK_BOX (editor), editor->details->visible_vbox, FALSE, FALSE, 0); /* Only show visible vbox */ diff --git a/src/caja-query-editor.h b/src/caja-query-editor.h index 8a7f71b9..2a443624 100644 --- a/src/caja-query-editor.h +++ b/src/caja-query-editor.h @@ -45,13 +45,21 @@ typedef struct CajaQueryEditorDetails CajaQueryEditorDetails; typedef struct CajaQueryEditor { +#if GTK_CHECK_VERSION (3, 0, 0) + GtkBox parent; +#else GtkVBox parent; +#endif CajaQueryEditorDetails *details; } CajaQueryEditor; typedef struct { +#if GTK_CHECK_VERSION (3, 0, 0) + GtkBoxClass parent_class; +#else GtkVBoxClass parent_class; +#endif void (* changed) (CajaQueryEditor *editor, CajaQuery *query, -- cgit v1.2.1