From 6454339a1a2141ff8d33dce2dfff4fd0fc52b227 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Wed, 18 Nov 2015 21:15:02 +0100 Subject: Gtk+-3.14: don't use deprecated GtkMisc --- plugins/spell/pluma-automatic-spell-checker.c | 4 ++++ plugins/taglist/pluma-taglist-plugin-panel.c | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'plugins') 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 b4880ca0..13e5a83a 100755 --- a/plugins/taglist/pluma-taglist-plugin-panel.c +++ b/plugins/taglist/pluma-taglist-plugin-panel.c @@ -645,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), -- cgit v1.2.1