summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcaja-private/caja-column-chooser.c8
-rw-r--r--libcaja-private/caja-column-chooser.h8
-rw-r--r--libcaja-private/caja-mime-application-chooser.h8
-rw-r--r--src/caja-image-properties-page.c8
-rw-r--r--src/caja-image-properties-page.h8
-rw-r--r--src/caja-window-slot.c9
-rw-r--r--src/file-manager/fm-properties-window.c14
7 files changed, 60 insertions, 3 deletions
diff --git a/libcaja-private/caja-column-chooser.c b/libcaja-private/caja-column-chooser.c
index 33410720..42bd904e 100644
--- a/libcaja-private/caja-column-chooser.c
+++ b/libcaja-private/caja-column-chooser.c
@@ -69,8 +69,11 @@ enum
};
static guint signals[LAST_SIGNAL] = { 0 };
-
+#if GTK_CHECK_VERSION (3, 0, 0)
+G_DEFINE_TYPE(CajaColumnChooser, caja_column_chooser, GTK_TYPE_BOX);
+#else
G_DEFINE_TYPE(CajaColumnChooser, caja_column_chooser, GTK_TYPE_HBOX);
+#endif
static void caja_column_chooser_constructed (GObject *object);
@@ -471,6 +474,9 @@ caja_column_chooser_init (CajaColumnChooser *chooser)
g_object_set (G_OBJECT (chooser),
"homogeneous", FALSE,
"spacing", 8,
+#if GTK_CHECK_VERSION (3, 0, 0)
+ "orientation", GTK_ORIENTATION_HORIZONTAL,
+#endif
NULL);
add_tree_view (chooser);
diff --git a/libcaja-private/caja-column-chooser.h b/libcaja-private/caja-column-chooser.h
index e54eb00a..87612d44 100644
--- a/libcaja-private/caja-column-chooser.h
+++ b/libcaja-private/caja-column-chooser.h
@@ -44,14 +44,22 @@ typedef struct _CajaColumnChooserDetails CajaColumnChooserDetails;
typedef struct
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox parent;
+#else
GtkHBox parent;
+#endif
CajaColumnChooserDetails *details;
} CajaColumnChooser;
typedef struct
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_slot;
+#else
GtkHBoxClass parent_slot;
+#endif
void (*changed) (CajaColumnChooser *chooser);
void (*use_default) (CajaColumnChooser *chooser);
diff --git a/libcaja-private/caja-mime-application-chooser.h b/libcaja-private/caja-mime-application-chooser.h
index 3446024e..65d455a9 100644
--- a/libcaja-private/caja-mime-application-chooser.h
+++ b/libcaja-private/caja-mime-application-chooser.h
@@ -39,13 +39,21 @@ typedef struct _CajaMimeApplicationChooserDetails CajaMimeApplicationChooserDeta
struct _CajaMimeApplicationChooser
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox parent;
+#else
GtkVBox parent;
+#endif
CajaMimeApplicationChooserDetails *details;
};
struct _CajaMimeApplicationChooserClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
};
GType caja_mime_application_chooser_get_type (void);
diff --git a/src/caja-image-properties-page.c b/src/caja-image-properties-page.c
index b07d129c..c2faa25d 100644
--- a/src/caja-image-properties-page.c
+++ b/src/caja-image-properties-page.c
@@ -97,8 +97,11 @@ typedef struct
static GType caja_image_properties_page_provider_get_type (void);
static void property_page_provider_iface_init (CajaPropertyPageProviderIface *iface);
-
+#if GTK_CHECK_VERSION (3, 0, 0)
+G_DEFINE_TYPE (CajaImagePropertiesPage, caja_image_properties_page, GTK_TYPE_BOX);
+#else
G_DEFINE_TYPE (CajaImagePropertiesPage, caja_image_properties_page, GTK_TYPE_VBOX);
+#endif
G_DEFINE_TYPE_WITH_CODE (CajaImagePropertiesPageProvider, caja_image_properties_page_provider, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (CAJA_TYPE_PROPERTY_PAGE_PROVIDER,
@@ -655,6 +658,9 @@ caja_image_properties_page_init (CajaImagePropertiesPage *page)
CAJA_TYPE_IMAGE_PROPERTIES_PAGE,
CajaImagePropertiesPageDetails);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (page), GTK_ORIENTATION_VERTICAL);
+#endif
gtk_box_set_homogeneous (GTK_BOX (page), FALSE);
gtk_box_set_spacing (GTK_BOX (page), 2);
gtk_container_set_border_width (GTK_CONTAINER (page), 6);
diff --git a/src/caja-image-properties-page.h b/src/caja-image-properties-page.h
index 70cde795..6e07bab8 100644
--- a/src/caja-image-properties-page.h
+++ b/src/caja-image-properties-page.h
@@ -42,13 +42,21 @@ typedef struct CajaImagePropertiesPageDetails CajaImagePropertiesPageDetails;
typedef struct
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox parent;
+#else
GtkVBox parent;
+#endif
CajaImagePropertiesPageDetails *details;
} CajaImagePropertiesPage;
typedef struct
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent;
+#else
GtkVBoxClass parent;
+#endif
} CajaImagePropertiesPageClass;
GType caja_image_properties_page_get_type (void);
diff --git a/src/caja-window-slot.c b/src/caja-window-slot.c
index 128b52f7..51847293 100644
--- a/src/caja-window-slot.c
+++ b/src/caja-window-slot.c
@@ -33,6 +33,10 @@
#include <eel/eel-gtk-macros.h>
#include <eel/eel-string.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
static void caja_window_slot_init (CajaWindowSlot *slot);
static void caja_window_slot_class_init (CajaWindowSlotClass *class);
static void caja_window_slot_dispose (GObject *object);
@@ -479,8 +483,13 @@ caja_window_slot_set_content_view_widget (CajaWindowSlot *slot,
if (new_view != NULL)
{
widget = caja_view_get_widget (new_view);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_box_pack_start (GTK_BOX (slot->view_box), widget,
+ TRUE, TRUE, 0);
+#else
gtk_container_add (GTK_CONTAINER (slot->view_box),
GTK_WIDGET (new_view));
+#endif
gtk_widget_show (widget);
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 4f5d3bf0..f977555b 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -380,7 +380,11 @@ get_target_file (FMPropertiesWindow *window)
}
static void
+#if GTK_CHECK_VERSION (3, 0, 0)
+add_prompt (GtkWidget *vbox, const char *prompt_text, gboolean pack_at_start)
+#else
add_prompt (GtkVBox *vbox, const char *prompt_text, gboolean pack_at_start)
+#endif
{
GtkWidget *prompt;
@@ -396,7 +400,11 @@ add_prompt (GtkVBox *vbox, const char *prompt_text, gboolean pack_at_start)
}
static void
+#if GTK_CHECK_VERSION (3, 0, 0)
+add_prompt_and_separator (GtkWidget *vbox, const char *prompt_text)
+#else
add_prompt_and_separator (GtkVBox *vbox, const char *prompt_text)
+#endif
{
GtkWidget *separator_line;
@@ -5747,7 +5755,7 @@ create_permissions_page (FMPropertiesWindow *window)
if (!all_can_set_permissions (file_list)) {
add_prompt_and_separator (
- GTK_VBOX (vbox),
+ vbox,
_("You are not the owner, so you cannot change these permissions."));
}
@@ -5865,7 +5873,11 @@ create_permissions_page (FMPropertiesWindow *window)
prompt_text = g_strdup (_("The permissions of the selected file could not be determined."));
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ add_prompt (vbox, prompt_text, TRUE);
+#else
add_prompt (GTK_VBOX (vbox), prompt_text, TRUE);
+#endif
g_free (prompt_text);
}
}