summaryrefslogtreecommitdiff
path: root/applets/notification_area
diff options
context:
space:
mode:
authorRoy Zhang <[email protected]>2016-01-04 14:05:03 +0800
committerWolfgang Ulbrich <[email protected]>2016-01-23 22:33:21 +0100
commit067dbe7b68fa625ea87ef6e259539fff2baaeaf7 (patch)
tree0dd7b2c62af9ee70409cc1c36111635274656e5c /applets/notification_area
parent0f7314ea3db7411ae7827ec9bb89a2b485227f1a (diff)
downloadmate-panel-067dbe7b68fa625ea87ef6e259539fff2baaeaf7.tar.bz2
mate-panel-067dbe7b68fa625ea87ef6e259539fff2baaeaf7.tar.xz
Gtk3: Don't use deprecated gtk_misc_set_alignment
Diffstat (limited to 'applets/notification_area')
-rw-r--r--applets/notification_area/fixedtip.c5
-rw-r--r--applets/notification_area/testtray.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/applets/notification_area/fixedtip.c b/applets/notification_area/fixedtip.c
index ded3dbb6..ce4852c9 100644
--- a/applets/notification_area/fixedtip.c
+++ b/applets/notification_area/fixedtip.c
@@ -136,7 +136,12 @@ na_fixed_tip_init (NaFixedTip *fixedtip)
label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.5);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
+#endif
gtk_widget_show (label);
gtk_container_add (GTK_CONTAINER (fixedtip), label);
fixedtip->priv->label = label;
diff --git a/applets/notification_area/testtray.c b/applets/notification_area/testtray.c
index f19663cd..4a2d0108 100644
--- a/applets/notification_area/testtray.c
+++ b/applets/notification_area/testtray.c
@@ -160,7 +160,12 @@ create_tray_on_screen (GdkScreen *screen,
hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic ("_Orientation:");
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Horizontal");
@@ -171,7 +176,12 @@ create_tray_on_screen (GdkScreen *screen,
label = gtk_label_new (NULL);
data->count_label = GTK_LABEL (label);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
data->tray = na_tray_new_for_screen (screen, GTK_ORIENTATION_HORIZONTAL);