GTk3: don't use deprecated GTK_TYPE_{V/H}BOX
This commit is contained in:
@@ -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);
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
};
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
};
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user