GTK 3.10 compatibility
This commit is contained in:
parent
95da1f57da
commit
d1cc738f54
|
@ -645,17 +645,14 @@ add_preview_widget (XedTaglistPluginPanel *panel)
|
||||||
|
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (panel->priv->preview), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (panel->priv->preview), TRUE);
|
||||||
gtk_label_set_use_markup (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_halign (panel->priv->preview, GTK_ALIGN_START);
|
||||||
gtk_widget_set_valign (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_left (panel->priv->preview, 6);
|
||||||
gtk_widget_set_margin_end (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_top (panel->priv->preview, 6);
|
||||||
gtk_widget_set_margin_bottom (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_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),
|
gtk_label_set_ellipsize (GTK_LABEL (panel->priv->preview),
|
||||||
|
|
|
@ -161,15 +161,10 @@ xed_statusbar_init (XedStatusbar *statusbar)
|
||||||
|
|
||||||
error_image = gtk_image_new_from_icon_name ("dialog-error", GTK_ICON_SIZE_MENU);
|
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_left (error_image, 4);
|
||||||
gtk_widget_set_margin_start (error_image, 4);
|
gtk_widget_set_margin_right (error_image, 4);
|
||||||
gtk_widget_set_margin_end (error_image, 4);
|
|
||||||
gtk_widget_set_margin_top (error_image, 0);
|
gtk_widget_set_margin_top (error_image, 0);
|
||||||
gtk_widget_set_margin_bottom (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 ();
|
statusbar->priv->error_event_box = gtk_event_box_new ();
|
||||||
gtk_event_box_set_visible_window (GTK_EVENT_BOX (statusbar->priv->error_event_box),
|
gtk_event_box_set_visible_window (GTK_EVENT_BOX (statusbar->priv->error_event_box),
|
||||||
|
|
|
@ -1105,14 +1105,10 @@ handle_builder_error (const gchar *message, ...)
|
||||||
g_free (msg_plain);
|
g_free (msg_plain);
|
||||||
g_free (msg);
|
g_free (msg);
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION (3, 14, 0)
|
gtk_widget_set_margin_left (label, 5);
|
||||||
gtk_widget_set_margin_start (label, 5);
|
gtk_widget_set_margin_right (label, 5);
|
||||||
gtk_widget_set_margin_end (label, 5);
|
|
||||||
gtk_widget_set_margin_top (label, 5);
|
gtk_widget_set_margin_top (label, 5);
|
||||||
gtk_widget_set_margin_bottom (label, 5);
|
gtk_widget_set_margin_bottom (label, 5);
|
||||||
#else
|
|
||||||
gtk_misc_set_padding (GTK_MISC (label), 5, 5);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue