summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-14 16:24:27 +0300
committermonsta <[email protected]>2016-01-15 13:26:42 +0300
commit337b331a8f2d75b0ba91d4cf1bc2235a8e771df5 (patch)
tree636338bfd81bc66d627018a4adfbec86911d58df /capplets
parente155641d454e11c9667f0c299158e509b702f984 (diff)
downloadmate-control-center-337b331a8f2d75b0ba91d4cf1bc2235a8e771df5.tar.bz2
mate-control-center-337b331a8f2d75b0ba91d4cf1bc2235a8e771df5.tar.xz
[GTK+3] appearance: fix deprecated usage of GtkMisc and GtkHBox
Diffstat (limited to 'capplets')
-rw-r--r--capplets/appearance/appearance-style.c16
-rw-r--r--capplets/appearance/appearance-themes.c20
2 files changed, 33 insertions, 3 deletions
diff --git a/capplets/appearance/appearance-style.c b/capplets/appearance/appearance-style.c
index 9c4cedc8..39a5b8ab 100644
--- a/capplets/appearance/appearance-style.c
+++ b/capplets/appearance/appearance-style.c
@@ -234,11 +234,25 @@ static void update_message_area(AppearanceData* data)
data->style_message_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (data->style_message_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (data->style_message_label, GTK_ALIGN_START);
+ gtk_widget_set_valign (data->style_message_label, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (data->style_message_label), 0.0, 0.5);
+#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 9);
+#else
hbox = gtk_hbox_new (FALSE, 9);
+#endif
icon = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (icon, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (icon, GTK_ALIGN_START);
+#else
+ gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
+#endif
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), data->style_message_label, TRUE, TRUE, 0);
content = gtk_info_bar_get_content_area (GTK_INFO_BAR (data->style_message_area));
diff --git a/capplets/appearance/appearance-themes.c b/capplets/appearance/appearance-themes.c
index 61f97dd9..0fe20ef9 100644
--- a/capplets/appearance/appearance-themes.c
+++ b/capplets/appearance/appearance-themes.c
@@ -664,14 +664,30 @@ theme_message_area_update (AppearanceData *data)
data->theme_message_label = gtk_label_new (NULL);
gtk_widget_show (data->theme_message_label);
gtk_label_set_line_wrap (GTK_LABEL (data->theme_message_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (data->theme_message_label, GTK_ALIGN_START);
+ gtk_widget_set_valign (data->theme_message_label, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (data->theme_message_label), 0.0, 0.5);
+#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 9);
+#else
hbox = gtk_hbox_new (FALSE, 9);
+#endif
gtk_widget_show (hbox);
data->theme_info_icon = gtk_image_new_from_icon_name ("dialog-information", GTK_ICON_SIZE_DIALOG);
data->theme_error_icon = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (data->theme_info_icon), 0.5, 0);
- gtk_misc_set_alignment (GTK_MISC (data->theme_error_icon), 0.5, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (data->theme_info_icon, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (data->theme_info_icon, GTK_ALIGN_START);
+ gtk_widget_set_halign (data->theme_error_icon, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (data->theme_error_icon, GTK_ALIGN_START);
+#else
+ gtk_misc_set_alignment (GTK_MISC (data->theme_info_icon), 0.5, 0.0);
+ gtk_misc_set_alignment (GTK_MISC (data->theme_error_icon), 0.5, 0.0);
+#endif
gtk_box_pack_start (GTK_BOX (hbox), data->theme_info_icon, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), data->theme_error_icon, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), data->theme_message_label, TRUE, TRUE, 0);