GTK3: another fix for GtkMisc deprecated commit

This commit is contained in:
Wolfgang Ulbrich 2016-01-25 10:39:17 +01:00
parent 9e3170e4b8
commit 36bb31d799
3 changed files with 14 additions and 8 deletions

View File

@ -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);

View File

@ -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

View File

@ -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);