summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-11-19 21:13:51 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-01 22:31:33 +0100
commitdc6b2065db9aa22aac346adaf337fb868b959f11 (patch)
tree13ac577af60397bbff08819cc5ad2041f4da9397
parent9994dd399ab569d547e18cb5f01900f8db953312 (diff)
downloadpluma-dc6b2065db9aa22aac346adaf337fb868b959f11.tar.bz2
pluma-dc6b2065db9aa22aac346adaf337fb868b959f11.tar.xz
GTk3: don't use deprecated GTK_TYPE_{V/H}BOX
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c9
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.h8
-rwxr-xr-xplugins/taglist/pluma-taglist-plugin-panel.c9
-rwxr-xr-xplugins/taglist/pluma-taglist-plugin-panel.h8
-rw-r--r--pluma/pluma-documents-panel.c9
-rw-r--r--pluma/pluma-documents-panel.h8
-rw-r--r--pluma/pluma-panel.c14
-rw-r--r--pluma/pluma-panel.h8
-rw-r--r--pluma/pluma-plugin-manager.c13
-rw-r--r--pluma/pluma-plugin-manager.h8
-rw-r--r--pluma/pluma-print-preview.c9
-rw-r--r--pluma/pluma-print-preview.h8
-rw-r--r--pluma/pluma-tab-label.c8
-rw-r--r--pluma/pluma-tab-label.h8
-rw-r--r--pluma/pluma-tab.c9
-rw-r--r--pluma/pluma-tab.h8
16 files changed, 144 insertions, 0 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index cc2575ca..9dca7c99 100644
--- a/plugins/filebrowser/pluma-file-browser-widget.c
+++ b/plugins/filebrowser/pluma-file-browser-widget.c
@@ -240,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)
@@ -1260,6 +1265,10 @@ 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
obj->priv->busy_cursor = gdk_cursor_new (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/taglist/pluma-taglist-plugin-panel.c b/plugins/taglist/pluma-taglist-plugin-panel.c
index 682bedd6..b4880ca0 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
{
@@ -675,6 +679,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
};
/*
diff --git a/pluma/pluma-documents-panel.c b/pluma/pluma-documents-panel.c
index 66d3405f..1ba7a5c0 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
{
@@ -749,6 +753,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);
diff --git a/pluma/pluma-documents-panel.h b/pluma/pluma-documents-panel.h
index 614e234f..4c546f81 100644
--- a/pluma/pluma-documents-panel.h
+++ b/pluma/pluma-documents-panel.h
@@ -57,7 +57,11 @@ typedef struct _PlumaDocumentsPanel PlumaDocumentsPanel;
struct _PlumaDocumentsPanel
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox vbox;
+#else
GtkVBox vbox;
+#endif
/*< private > */
PlumaDocumentsPanelPrivate *priv;
@@ -70,7 +74,11 @@ typedef struct _PlumaDocumentsPanelClass PlumaDocumentsPanelClass;
struct _PlumaDocumentsPanelClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
};
/*
diff --git a/pluma/pluma-panel.c b/pluma/pluma-panel.c
index 235d2de3..62b2ab24 100644
--- a/pluma/pluma-panel.c
+++ b/pluma/pluma-panel.c
@@ -90,7 +90,11 @@ static GObject *pluma_panel_constructor (GType type,
GObjectConstructParam *construct_properties);
+#if GTK_CHECK_VERSION (3, 0, 0)
+G_DEFINE_TYPE(PlumaPanel, pluma_panel, GTK_TYPE_BOX)
+#else
G_DEFINE_TYPE(PlumaPanel, pluma_panel, GTK_TYPE_VBOX)
+#endif
static void
pluma_panel_finalize (GObject *obj)
@@ -191,8 +195,13 @@ pluma_panel_class_init (PlumaPanelClass *klass)
g_object_class_install_property (object_class,
PROP_ORIENTATION,
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_param_spec_enum ("panel-orientation",
+ "Panel Orientation",
+#else
g_param_spec_enum ("orientation",
"Orientation",
+#endif
"The panel's orientation",
GTK_TYPE_ORIENTATION,
GTK_ORIENTATION_VERTICAL,
@@ -406,6 +415,11 @@ static void
pluma_panel_init (PlumaPanel *panel)
{
panel->priv = PLUMA_PANEL_GET_PRIVATE (panel);
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (panel),
+ GTK_ORIENTATION_VERTICAL);
+#endif
}
static void
diff --git a/pluma/pluma-panel.h b/pluma/pluma-panel.h
index be13fb1e..1e3b3059 100644
--- a/pluma/pluma-panel.h
+++ b/pluma/pluma-panel.h
@@ -55,7 +55,11 @@ typedef struct _PlumaPanel PlumaPanel;
struct _PlumaPanel
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox vbox;
+#else
GtkVBox vbox;
+#endif
/*< private > */
PlumaPanelPrivate *priv;
@@ -68,7 +72,11 @@ typedef struct _PlumaPanelClass PlumaPanelClass;
struct _PlumaPanelClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
void (* item_added) (PlumaPanel *panel,
GtkWidget *item);
diff --git a/pluma/pluma-plugin-manager.c b/pluma/pluma-plugin-manager.c
index ae30ff8e..26e098bb 100644
--- a/pluma/pluma-plugin-manager.c
+++ b/pluma/pluma-plugin-manager.c
@@ -70,7 +70,11 @@ struct _PlumaPluginManagerPrivate
GtkWidget *popup_menu;
};
+#if GTK_CHECK_VERSION (3, 0, 0)
+G_DEFINE_TYPE(PlumaPluginManager, pluma_plugin_manager, GTK_TYPE_BOX)
+#else
G_DEFINE_TYPE(PlumaPluginManager, pluma_plugin_manager, GTK_TYPE_VBOX)
+#endif
static PlumaPluginInfo *plugin_manager_get_selected_plugin (PlumaPluginManager *pm);
static void plugin_manager_toggle_active (PlumaPluginManager *pm, GtkTreeIter *iter, GtkTreeModel *model);
@@ -790,6 +794,11 @@ pluma_plugin_manager_init (PlumaPluginManager *pm)
pm->priv = PLUMA_PLUGIN_MANAGER_GET_PRIVATE (pm);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (pm),
+ GTK_ORIENTATION_VERTICAL);
+#endif
+
/*
* Always we create the manager, firstly we rescan the plugins directory
*/
@@ -817,7 +826,11 @@ pluma_plugin_manager_init (PlumaPluginManager *pm)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), pm->priv->tree);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ hbuttonbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
+#else
hbuttonbox = gtk_hbutton_box_new ();
+#endif
gtk_box_pack_start (GTK_BOX (pm), hbuttonbox, FALSE, FALSE, 0);
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox), GTK_BUTTONBOX_END);
gtk_box_set_spacing (GTK_BOX (hbuttonbox), 8);
diff --git a/pluma/pluma-plugin-manager.h b/pluma/pluma-plugin-manager.h
index d271e748..be8a6dc8 100644
--- a/pluma/pluma-plugin-manager.h
+++ b/pluma/pluma-plugin-manager.h
@@ -55,7 +55,11 @@ typedef struct _PlumaPluginManager PlumaPluginManager;
struct _PlumaPluginManager
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox vbox;
+#else
GtkVBox vbox;
+#endif
/*< private > */
PlumaPluginManagerPrivate *priv;
@@ -68,7 +72,11 @@ typedef struct _PlumaPluginManagerClass PlumaPluginManagerClass;
struct _PlumaPluginManagerClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
};
/*
diff --git a/pluma/pluma-print-preview.c b/pluma/pluma-print-preview.c
index e06145bf..ab111b6f 100644
--- a/pluma/pluma-print-preview.c
+++ b/pluma/pluma-print-preview.c
@@ -87,7 +87,11 @@ struct _PlumaPrintPreviewPrivate
guint cur_page;
};
+#if GTK_CHECK_VERSION (3, 0, 0)
+G_DEFINE_TYPE (PlumaPrintPreview, pluma_print_preview, GTK_TYPE_BOX)
+#else
G_DEFINE_TYPE (PlumaPrintPreview, pluma_print_preview, GTK_TYPE_VBOX)
+#endif
static void
pluma_print_preview_get_property (GObject *object,
@@ -1001,6 +1005,11 @@ pluma_print_preview_init (PlumaPrintPreview *preview)
priv->context = NULL;
priv->gtk_preview = NULL;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (preview),
+ GTK_ORIENTATION_VERTICAL);
+#endif
+
create_bar (preview);
create_preview_layout (preview);
diff --git a/pluma/pluma-print-preview.h b/pluma/pluma-print-preview.h
index ebb5fbdc..f0a1de99 100644
--- a/pluma/pluma-print-preview.h
+++ b/pluma/pluma-print-preview.h
@@ -48,13 +48,21 @@ typedef struct _PlumaPrintPreviewClass PlumaPrintPreviewClass;
struct _PlumaPrintPreview
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox parent;
+#else
GtkVBox parent;
+#endif
PlumaPrintPreviewPrivate *priv;
};
struct _PlumaPrintPreviewClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
void (* close) (PlumaPrintPreview *preview);
};
diff --git a/pluma/pluma-tab-label.c b/pluma/pluma-tab-label.c
index b14403bc..d372f7c0 100644
--- a/pluma/pluma-tab-label.c
+++ b/pluma/pluma-tab-label.c
@@ -63,7 +63,11 @@ struct _PlumaTabLabelPrivate
static guint signals[LAST_SIGNAL] = { 0 };
+#if GTK_CHECK_VERSION (3, 0, 0)
+G_DEFINE_TYPE (PlumaTabLabel, pluma_tab_label, GTK_TYPE_BOX)
+#else
G_DEFINE_TYPE (PlumaTabLabel, pluma_tab_label, GTK_TYPE_HBOX)
+#endif
static void
pluma_tab_label_finalize (GObject *object)
@@ -265,6 +269,10 @@ pluma_tab_label_init (PlumaTabLabel *tab_label)
tab_label->priv->close_button_sensitive = TRUE;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (tab_label),
+ GTK_ORIENTATION_HORIZONTAL);
+#endif
ebox = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
gtk_box_pack_start (GTK_BOX (tab_label), ebox, TRUE, TRUE, 0);
diff --git a/pluma/pluma-tab-label.h b/pluma/pluma-tab-label.h
index 7d8247e7..172ff766 100644
--- a/pluma/pluma-tab-label.h
+++ b/pluma/pluma-tab-label.h
@@ -41,13 +41,21 @@ typedef struct _PlumaTabLabelClass PlumaTabLabelClass;
typedef struct _PlumaTabLabelPrivate PlumaTabLabelPrivate;
struct _PlumaTabLabel {
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox parent;
+#else
GtkHBox parent;
+#endif
PlumaTabLabelPrivate *priv;
};
struct _PlumaTabLabelClass {
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkHBoxClass parent_class;
+#endif
void (* close_clicked) (PlumaTabLabel *tab_label);
};
diff --git a/pluma/pluma-tab.c b/pluma/pluma-tab.c
index 86e1b184..d06aa215 100644
--- a/pluma/pluma-tab.c
+++ b/pluma/pluma-tab.c
@@ -82,7 +82,11 @@ struct _PlumaTabPrivate
gint ask_if_externally_modified : 1;
};
+#if GTK_CHECK_VERSION (3, 0, 0)
+G_DEFINE_TYPE(PlumaTab, pluma_tab, GTK_TYPE_BOX)
+#else
G_DEFINE_TYPE(PlumaTab, pluma_tab, GTK_TYPE_VBOX)
+#endif
enum
{
@@ -1481,6 +1485,11 @@ pluma_tab_init (PlumaTab *tab)
tab->priv->save_flags = 0;
tab->priv->ask_if_externally_modified = TRUE;
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (tab),
+ GTK_ORIENTATION_VERTICAL);
+#endif
/* Create the scrolled window */
sw = gtk_scrolled_window_new (NULL, NULL);
diff --git a/pluma/pluma-tab.h b/pluma/pluma-tab.h
index 209db62f..62d46521 100644
--- a/pluma/pluma-tab.h
+++ b/pluma/pluma-tab.h
@@ -77,7 +77,11 @@ typedef struct _PlumaTab PlumaTab;
struct _PlumaTab
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBox vbox;
+#else
GtkVBox vbox;
+#endif
/*< private > */
PlumaTabPrivate *priv;
@@ -90,7 +94,11 @@ typedef struct _PlumaTabClass PlumaTabClass;
struct _PlumaTabClass
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkBoxClass parent_class;
+#else
GtkVBoxClass parent_class;
+#endif
};
/*