summaryrefslogtreecommitdiff
path: root/plugins/housekeeping
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-21 15:35:49 +0300
committermonsta <[email protected]>2016-01-21 15:52:37 +0300
commitedd22f8fbd84efd0310554c235fde137010faab1 (patch)
treed9dc126b3a47805b3fe595771b43c2457723a540 /plugins/housekeeping
parentb5182fc63f8d928249d6f4cda8efb0cb316ed6f9 (diff)
downloadmate-settings-daemon-edd22f8fbd84efd0310554c235fde137010faab1.tar.bz2
mate-settings-daemon-edd22f8fbd84efd0310554c235fde137010faab1.tar.xz
[GTK+3] use x/y alignment functions for GtkLabel
Diffstat (limited to 'plugins/housekeeping')
-rw-r--r--plugins/housekeeping/msd-ldsm-dialog.c14
-rw-r--r--plugins/housekeeping/msd-ldsm-trash-empty.c20
2 files changed, 19 insertions, 15 deletions
diff --git a/plugins/housekeeping/msd-ldsm-dialog.c b/plugins/housekeeping/msd-ldsm-dialog.c
index dc6e70f..7f8efb4 100644
--- a/plugins/housekeeping/msd-ldsm-dialog.c
+++ b/plugins/housekeeping/msd-ldsm-dialog.c
@@ -220,7 +220,7 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog)
/* Create the image */
image = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG);
-#if GTK_CHECK_VERSION (3, 14, 0)
+#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
@@ -230,9 +230,9 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog)
dialog->priv->primary_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (dialog->priv->primary_label), TRUE);
gtk_label_set_single_line_mode (GTK_LABEL (dialog->priv->primary_label), FALSE);
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (dialog->priv->primary_label, GTK_ALIGN_START);
- gtk_widget_set_valign (dialog->priv->primary_label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (dialog->priv->primary_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (dialog->priv->primary_label), 0.0);
#else
gtk_misc_set_alignment (GTK_MISC (dialog->priv->primary_label), 0.0, 0.0);
#endif
@@ -240,9 +240,9 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog)
dialog->priv->secondary_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (dialog->priv->secondary_label), TRUE);
gtk_label_set_single_line_mode (GTK_LABEL (dialog->priv->secondary_label), FALSE);
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (dialog->priv->secondary_label, GTK_ALIGN_START);
- gtk_widget_set_valign (dialog->priv->secondary_label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (dialog->priv->secondary_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (dialog->priv->secondary_label), 0.0);
#else
gtk_misc_set_alignment (GTK_MISC (dialog->priv->secondary_label), 0.0, 0.0);
#endif
diff --git a/plugins/housekeeping/msd-ldsm-trash-empty.c b/plugins/housekeeping/msd-ldsm-trash-empty.c
index 132c9b7..6a708d0 100644
--- a/plugins/housekeeping/msd-ldsm-trash-empty.c
+++ b/plugins/housekeeping/msd-ldsm-trash-empty.c
@@ -257,16 +257,18 @@ trash_empty_start ()
label1 = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (label1), TRUE);
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (label1, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label1), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label1), 0.5);
#else
gtk_misc_set_alignment (GTK_MISC (label1), 0.0, 0.5);
#endif
label3 = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (label3), TRUE);
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (label3, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label3), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label3), 0.5);
#else
gtk_misc_set_alignment (GTK_MISC (label3), 0.0, 0.5);
#endif
@@ -274,16 +276,18 @@ trash_empty_start ()
location_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (location_label), TRUE);
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (location_label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (location_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (location_label), 0.5);
#else
gtk_misc_set_alignment (GTK_MISC (location_label), 0.0, 0.5);
#endif
file_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (file_label), TRUE);
-#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (file_label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (file_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (file_label), 0.5);
#else
gtk_misc_set_alignment (GTK_MISC (file_label), 0.0, 0.5);
#endif