Skip to content

Commit 36bb31d

Browse files
author
Wolfgang Ulbrich
committed
GTK3: another fix for GtkMisc deprecated commit
1 parent 9e3170e commit 36bb31d

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

plugins/taglist/pluma-taglist-plugin-panel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ add_preview_widget (PlumaTaglistPluginPanel *panel)
645645

646646
gtk_label_set_line_wrap (GTK_LABEL (panel->priv->preview), TRUE);
647647
gtk_label_set_use_markup (GTK_LABEL (panel->priv->preview), TRUE);
648-
#if GTK_CHECK_VERSION (3, 14, 0)
648+
#if GTK_CHECK_VERSION (3, 0, 0)
649649
gtk_widget_set_halign (panel->priv->preview, GTK_ALIGN_START);
650650
gtk_widget_set_valign (panel->priv->preview, GTK_ALIGN_START);
651651
gtk_widget_set_margin_start (panel->priv->preview, 6);

pluma/pluma-panel.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,14 +649,17 @@ build_tab_label (PlumaPanel *panel,
649649

650650
/* setup label */
651651
label = gtk_label_new (name);
652-
#if GTK_CHECK_VERSION (3, 0, 0)
652+
#if GTK_CHECK_VERSION (3, 16, 0)
653653
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
654+
#else
655+
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
656+
#endif
657+
#if GTK_CHECK_VERSION (3, 0, 0)
654658
gtk_widget_set_margin_start (label, 0);
655659
gtk_widget_set_margin_end (label, 0);
656660
gtk_widget_set_margin_top (label, 0);
657661
gtk_widget_set_margin_bottom (label, 0);
658662
#else
659-
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
660663
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
661664
#endif
662665
gtk_box_pack_start (GTK_BOX (label_hbox), label, TRUE, TRUE, 0);
@@ -724,8 +727,8 @@ pluma_panel_add_item (PlumaPanel *panel,
724727
tab_label = build_tab_label (panel, item, data->name, data->icon);
725728

726729
menu_label = gtk_label_new (name);
727-
#if GTK_CHECK_VERSION (3, 0, 0)
728-
gtk_widget_set_halign (menu_label, GTK_ALIGN_START);
730+
#if GTK_CHECK_VERSION (3, 16, 0)
731+
gtk_label_set_xalign (GTK_LABEL (menu_label), 0.0);
729732
#else
730733
gtk_misc_set_alignment (GTK_MISC (menu_label), 0.0, 0.5);
731734
#endif

pluma/pluma-tab-label.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,17 @@ pluma_tab_label_init (PlumaTabLabel *tab_label)
301301
tab_label->priv->icon = icon;
302302

303303
label = gtk_label_new ("");
304-
#if GTK_CHECK_VERSION (3, 14, 0)
305-
gtk_widget_set_halign (label, GTK_ALIGN_START);
304+
#if GTK_CHECK_VERSION (3, 16, 0)
305+
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
306+
#else
307+
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
308+
#endif
309+
#if GTK_CHECK_VERSION (3, 0, 0)
306310
gtk_widget_set_margin_start (label, 0);
307311
gtk_widget_set_margin_end (label, 0);
308312
gtk_widget_set_margin_top (label, 0);
309313
gtk_widget_set_margin_bottom (label, 0);
310314
#else
311-
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
312315
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
313316
#endif
314317
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);

0 commit comments

Comments
 (0)