From d1cc738f54f7f4ca8d6993e1fa58ce844a4e0b77 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Wed, 10 Feb 2016 15:30:31 +0000 Subject: [PATCH] GTK 3.10 compatibility --- plugins/taglist/xed-taglist-plugin-panel.c | 11 ++++------- xed/xed-statusbar.c | 9 ++------- xed/xed-utils.c | 8 ++------ 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/plugins/taglist/xed-taglist-plugin-panel.c b/plugins/taglist/xed-taglist-plugin-panel.c index 35bb853..ade6586 100644 --- a/plugins/taglist/xed-taglist-plugin-panel.c +++ b/plugins/taglist/xed-taglist-plugin-panel.c @@ -645,17 +645,14 @@ add_preview_widget (XedTaglistPluginPanel *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, 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); - gtk_widget_set_margin_end (panel->priv->preview, 6); + gtk_widget_set_margin_left (panel->priv->preview, 6); + gtk_widget_set_margin_right (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); -#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), diff --git a/xed/xed-statusbar.c b/xed/xed-statusbar.c index bcb45c8..b287acc 100644 --- a/xed/xed-statusbar.c +++ b/xed/xed-statusbar.c @@ -161,15 +161,10 @@ xed_statusbar_init (XedStatusbar *statusbar) error_image = gtk_image_new_from_icon_name ("dialog-error", GTK_ICON_SIZE_MENU); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_margin_start (error_image, 4); - gtk_widget_set_margin_end (error_image, 4); + gtk_widget_set_margin_left (error_image, 4); + gtk_widget_set_margin_right (error_image, 4); gtk_widget_set_margin_top (error_image, 0); gtk_widget_set_margin_bottom (error_image, 0); -#else - gtk_misc_set_padding (GTK_MISC (error_image), 4, 0); - gtk_widget_show (error_image); -#endif statusbar->priv->error_event_box = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (statusbar->priv->error_event_box), diff --git a/xed/xed-utils.c b/xed/xed-utils.c index ce28ef1..1941690 100644 --- a/xed/xed-utils.c +++ b/xed/xed-utils.c @@ -1105,14 +1105,10 @@ handle_builder_error (const gchar *message, ...) g_free (msg_plain); g_free (msg); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_margin_start (label, 5); - gtk_widget_set_margin_end (label, 5); + gtk_widget_set_margin_left (label, 5); + gtk_widget_set_margin_right (label, 5); gtk_widget_set_margin_top (label, 5); gtk_widget_set_margin_bottom (label, 5); -#else - gtk_misc_set_padding (GTK_MISC (label), 5, 5); -#endif return label; }