summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c15
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.h8
-rwxr-xr-xplugins/spell/pluma-automatic-spell-checker.c4
-rwxr-xr-xplugins/taglist/pluma-taglist-plugin-panel.c20
-rwxr-xr-xplugins/taglist/pluma-taglist-plugin-panel.h8
5 files changed, 53 insertions, 2 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);
diff --git a/plugins/filebrowser/pluma-file-browser-widget.h b/plugins/filebrowser/pluma-file-browser-widget.h
index 79e95c62..d7be9e4d 100644
--- a/plugins/filebrowser/pluma-file-browser-widget.h
+++ b/plugins/filebrowser/pluma-file-browser-widget.h
@@ -48,14 +48,22 @@ gboolean (*PlumaFileBrowserWidgetFilterFunc) (PlumaFileBrowserWidget * obj,
struct _PlumaFileBrowserWidget
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox parent;
+#else
GtkVBox parent;
+#endif
PlumaFileBrowserWidgetPrivate *priv;
};
struct _PlumaFileBrowserWidgetClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
/* Signals */
void (*uri_activated) (PlumaFileBrowserWidget * widget,
diff --git a/plugins/spell/pluma-automatic-spell-checker.c b/plugins/spell/pluma-automatic-spell-checker.c
index d3644445..f4de8835 100755
--- a/plugins/spell/pluma-automatic-spell-checker.c
+++ b/plugins/spell/pluma-automatic-spell-checker.c
@@ -454,7 +454,11 @@ build_suggestion_menu (PlumaAutomaticSpellChecker *spell, const gchar *word)
label = gtk_label_new (label_text);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
mi = gtk_menu_item_new ();
gtk_container_add (GTK_CONTAINER(mi), label);
diff --git a/plugins/taglist/pluma-taglist-plugin-panel.c b/plugins/taglist/pluma-taglist-plugin-panel.c
index 682bedd6..13e5a83a 100755
--- a/plugins/taglist/pluma-taglist-plugin-panel.c
+++ b/plugins/taglist/pluma-taglist-plugin-panel.c
@@ -69,7 +69,11 @@ struct _PlumaTaglistPluginPanelPrivate
gchar *data_dir;
};
+#if GTK_CHECK_VERSION (3, 0, 0)
+PLUMA_PLUGIN_DEFINE_TYPE (PlumaTaglistPluginPanel, pluma_taglist_plugin_panel, GTK_TYPE_BOX)
+#else
PLUMA_PLUGIN_DEFINE_TYPE (PlumaTaglistPluginPanel, pluma_taglist_plugin_panel, GTK_TYPE_VBOX)
+#endif
enum
{
@@ -641,8 +645,17 @@ add_preview_widget (PlumaTaglistPluginPanel *panel)
gtk_label_set_line_wrap (GTK_LABEL (panel->priv->preview), TRUE);
gtk_label_set_use_markup (GTK_LABEL (panel->priv->preview), TRUE);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_halign (panel->priv->preview, GTK_ALIGN_START);
+ gtk_widget_set_valign (panel->priv->preview, GTK_ALIGN_START);
+ gtk_widget_set_margin_start (panel->priv->preview, 6);
+ gtk_widget_set_margin_end (panel->priv->preview, 6);
+ gtk_widget_set_margin_top (panel->priv->preview, 6);
+ gtk_widget_set_margin_bottom (panel->priv->preview, 6);
+#else
gtk_misc_set_alignment (GTK_MISC (panel->priv->preview), 0, 0);
- gtk_misc_set_padding (GTK_MISC (panel->priv->preview), 6, 6);
+ gtk_misc_set_padding (GTK_MISC (panel->priv->preview), 6, 6);
+#endif
gtk_label_set_selectable (GTK_LABEL (panel->priv->preview), TRUE);
gtk_label_set_selectable (GTK_LABEL (panel->priv->preview), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (panel->priv->preview),
@@ -675,6 +688,11 @@ pluma_taglist_plugin_panel_init (PlumaTaglistPluginPanel *panel)
panel->priv = PLUMA_TAGLIST_PLUGIN_PANEL_GET_PRIVATE (panel);
panel->priv->data_dir = NULL;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (panel),
+ GTK_ORIENTATION_VERTICAL);
+#endif
+
/* Build the window content */
panel->priv->tag_groups_combo = gtk_combo_box_text_new ();
gtk_box_pack_start (GTK_BOX (panel),
diff --git a/plugins/taglist/pluma-taglist-plugin-panel.h b/plugins/taglist/pluma-taglist-plugin-panel.h
index bcd42ed4..03738835 100755
--- a/plugins/taglist/pluma-taglist-plugin-panel.h
+++ b/plugins/taglist/pluma-taglist-plugin-panel.h
@@ -58,7 +58,11 @@ typedef struct _PlumaTaglistPluginPanel PlumaTaglistPluginPanel;
struct _PlumaTaglistPluginPanel
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox vbox;
+#else
GtkVBox vbox;
+#endif
/*< private > */
PlumaTaglistPluginPanelPrivate *priv;
@@ -71,7 +75,11 @@ typedef struct _PlumaTaglistPluginPanelClass PlumaTaglistPluginPanelClass;
struct _PlumaTaglistPluginPanelClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
};
/*