summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-14 17:23:35 +0300
committermonsta <[email protected]>2016-01-15 13:26:42 +0300
commit7865afb847c54c76adfb190cdedf11540f6614e7 (patch)
tree8253cd4c31d062aa580879a9ec7135af24a91d79
parenta8899801fa1d25346f4d7da783be758763f760c8 (diff)
downloadmate-control-center-7865afb847c54c76adfb190cdedf11540f6614e7.tar.bz2
mate-control-center-7865afb847c54c76adfb190cdedf11540f6614e7.tar.xz
[GTK+3] windows: fix deprecated usage of GtkMisc
-rw-r--r--capplets/windows/mate-metacity-support.c7
-rw-r--r--capplets/windows/mate-window-properties.c14
2 files changed, 18 insertions, 3 deletions
diff --git a/capplets/windows/mate-metacity-support.c b/capplets/windows/mate-metacity-support.c
index 554f5860..2a30cd05 100644
--- a/capplets/windows/mate-metacity-support.c
+++ b/capplets/windows/mate-metacity-support.c
@@ -52,7 +52,12 @@ mate_metacity_config_tool ()
widget = gtk_label_new (str);
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
- gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (widget, GTK_ALIGN_START);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+#else
+ gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
widget = gtk_check_button_new_with_label (_("Enable software _compositing window manager"));
diff --git a/capplets/windows/mate-window-properties.c b/capplets/windows/mate-window-properties.c
index edb0848b..2af1569e 100644
--- a/capplets/windows/mate-window-properties.c
+++ b/capplets/windows/mate-window-properties.c
@@ -303,7 +303,12 @@ title_label_new (const char* title)
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
- gtk_misc_set_alignment (GTK_MISC (widget), 0, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (widget, GTK_ALIGN_START);
+ gtk_widget_set_valign (widget, GTK_ALIGN_START);
+#else
+ gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
+#endif
return widget;
}
@@ -480,7 +485,12 @@ main (int argc, char **argv)
vbox = gtk_vbox_new (FALSE, 0);
hbox = gtk_hbox_new (FALSE, 0);
widget = gtk_label_new_with_mnemonic (_("To move a window, press-and-hold this key then grab the window:"));
- gtk_misc_set_alignment (GTK_MISC (widget), 0, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (widget, GTK_ALIGN_START);
+ gtk_widget_set_valign (widget, GTK_ALIGN_START);
+#else
+ gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 6);
alt_click_hbox = gtk_vbox_new (FALSE, 6);
gtk_label_set_mnemonic_widget (GTK_LABEL (widget), alt_click_hbox);