From 36bb31d79905271ca0fc853eeddf5d23ecd10de3 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Mon, 25 Jan 2016 10:39:17 +0100 Subject: [PATCH] GTK3: another fix for GtkMisc deprecated commit --- plugins/taglist/pluma-taglist-plugin-panel.c | 2 +- pluma/pluma-panel.c | 11 +++++++---- pluma/pluma-tab-label.c | 9 ++++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/plugins/taglist/pluma-taglist-plugin-panel.c b/plugins/taglist/pluma-taglist-plugin-panel.c index 13e5a83..f19f6b9 100644 --- a/plugins/taglist/pluma-taglist-plugin-panel.c +++ b/plugins/taglist/pluma-taglist-plugin-panel.c @@ -645,7 +645,7 @@ 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) +#if GTK_CHECK_VERSION (3, 0, 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); diff --git a/pluma/pluma-panel.c b/pluma/pluma-panel.c index c8b0cc5..0fa999b 100644 --- a/pluma/pluma-panel.c +++ b/pluma/pluma-panel.c @@ -649,14 +649,17 @@ build_tab_label (PlumaPanel *panel, /* setup label */ label = gtk_label_new (name); -#if GTK_CHECK_VERSION (3, 0, 0) +#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (label), 0.0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_margin_start (label, 0); gtk_widget_set_margin_end (label, 0); gtk_widget_set_margin_top (label, 0); gtk_widget_set_margin_bottom (label, 0); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (label), 0, 0); #endif gtk_box_pack_start (GTK_BOX (label_hbox), label, TRUE, TRUE, 0); @@ -724,8 +727,8 @@ pluma_panel_add_item (PlumaPanel *panel, tab_label = build_tab_label (panel, item, data->name, data->icon); menu_label = gtk_label_new (name); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (menu_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (menu_label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (menu_label), 0.0, 0.5); #endif diff --git a/pluma/pluma-tab-label.c b/pluma/pluma-tab-label.c index 06f72c4..1e72ec1 100644 --- a/pluma/pluma-tab-label.c +++ b/pluma/pluma-tab-label.c @@ -301,14 +301,17 @@ pluma_tab_label_init (PlumaTabLabel *tab_label) tab_label->priv->icon = icon; label = gtk_label_new (""); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_margin_start (label, 0); gtk_widget_set_margin_end (label, 0); gtk_widget_set_margin_top (label, 0); gtk_widget_set_margin_bottom (label, 0); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (label), 0, 0); #endif gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);