summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-15 12:05:58 +0300
committermonsta <[email protected]>2016-01-15 13:26:42 +0300
commit8e1443b4ad874e55f77e30c92e88da0695c4571f (patch)
treecc807728bcb6ee3613d1bad866a168f1d82a6cf8 /capplets
parent1fe15a165a60dc6d8cd93b7568f110c31b86ae70 (diff)
downloadmate-control-center-8e1443b4ad874e55f77e30c92e88da0695c4571f.tar.bz2
mate-control-center-8e1443b4ad874e55f77e30c92e88da0695c4571f.tar.xz
[GTK+3] about-me: fix deprecated usage of GtkMisc, GtkHBox, GtkVBox
Diffstat (limited to 'capplets')
-rw-r--r--capplets/about-me/eel-alert-dialog.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/capplets/about-me/eel-alert-dialog.c b/capplets/about-me/eel-alert-dialog.c
index 3fe9197d..1da1f7d9 100644
--- a/capplets/about-me/eel-alert-dialog.c
+++ b/capplets/about-me/eel-alert-dialog.c
@@ -159,29 +159,57 @@ eel_alert_dialog_init (EelAlertDialog *dialog)
dialog->details->secondary_label = gtk_label_new (NULL);
dialog->details->details_label = gtk_label_new (NULL);
dialog->details->image = gtk_image_new_from_stock (NULL, GTK_ICON_SIZE_DIALOG);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (dialog->details->image, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (dialog->details->image, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (dialog->details->image), 0.5, 0.0);
+#endif
gtk_label_set_line_wrap (GTK_LABEL (dialog->details->primary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (dialog->details->primary_label), TRUE);
gtk_label_set_use_markup (GTK_LABEL (dialog->details->primary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (dialog->details->primary_label, GTK_ALIGN_START);
+ gtk_widget_set_valign (dialog->details->primary_label, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (dialog->details->primary_label), 0.0, 0.5);
+#endif
gtk_label_set_line_wrap (GTK_LABEL (dialog->details->secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (dialog->details->secondary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (dialog->details->secondary_label, GTK_ALIGN_START);
+ gtk_widget_set_valign (dialog->details->secondary_label, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (dialog->details->secondary_label), 0.0, 0.5);
+#endif
gtk_label_set_line_wrap (GTK_LABEL (dialog->details->details_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (dialog->details->details_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (dialog->details->details_label, GTK_ALIGN_START);
+ gtk_widget_set_valign (dialog->details->details_label, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (dialog->details->details_label), 0.0, 0.5);
+#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+#else
hbox = gtk_hbox_new (FALSE, 12);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (hbox), dialog->details->image,
FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+#else
vbox = gtk_vbox_new (FALSE, 12);
-
+#endif
+
gtk_box_pack_start (GTK_BOX (hbox), vbox,
FALSE, FALSE, 0);