diff options
author | monsta <[email protected]> | 2016-01-21 14:23:18 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-01-21 14:32:19 +0300 |
commit | 7caecbc3b5ef05280d72d67f212ff918a13b220b (patch) | |
tree | 2773adbdd796c5f991e533c5ec7cf947eb0640cd | |
parent | 6b337edf80447dacfc7e05bb120c9eff30d05e3a (diff) | |
download | mate-control-center-7caecbc3b5ef05280d72d67f212ff918a13b220b.tar.bz2 mate-control-center-7caecbc3b5ef05280d72d67f212ff918a13b220b.tar.xz |
[GTK+3] windows: fix deprecated usage of Gtk{H,V}{Box,Scale}
-rw-r--r-- | capplets/windows/mate-metacity-support.c | 4 | ||||
-rw-r--r-- | capplets/windows/mate-window-properties.c | 70 |
2 files changed, 74 insertions, 0 deletions
diff --git a/capplets/windows/mate-metacity-support.c b/capplets/windows/mate-metacity-support.c index 2a30cd05..43518759 100644 --- a/capplets/windows/mate-metacity-support.c +++ b/capplets/windows/mate-metacity-support.c @@ -46,7 +46,11 @@ mate_metacity_config_tool () gtk_window_set_icon_name (GTK_WINDOW (dialog), "preferences-system-windows"); gtk_window_set_default_size (GTK_WINDOW (dialog), 350, 150); +#if GTK_CHECK_VERSION (3, 0, 0) + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); +#else vbox = gtk_vbox_new (FALSE, 6); +#endif str = g_strdup_printf ("<b>%s</b>", _("Compositing Manager")); widget = gtk_label_new (str); diff --git a/capplets/windows/mate-window-properties.c b/capplets/windows/mate-window-properties.c index 2af1569e..742a57cb 100644 --- a/capplets/windows/mate-window-properties.c +++ b/capplets/windows/mate-window-properties.c @@ -368,19 +368,41 @@ main (int argc, char **argv) gtk_container_set_border_width (GTK_CONTAINER (dialog_win), 10); nb = gtk_notebook_new (); + +#if GTK_CHECK_VERSION (3, 0, 0) + general_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + behaviour_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + placement_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#else general_vbox = gtk_vbox_new (FALSE, 0); behaviour_vbox = gtk_vbox_new (FALSE, 0); placement_vbox = gtk_vbox_new (FALSE, 0); +#endif + widget = gtk_label_new (_("General")); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif gtk_box_pack_start (GTK_BOX (hbox), general_vbox, FALSE, FALSE, 6); gtk_notebook_append_page (GTK_NOTEBOOK (nb), hbox, widget); + widget = gtk_label_new (_("Behaviour")); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif gtk_box_pack_start (GTK_BOX (hbox), behaviour_vbox, FALSE, FALSE, 6); gtk_notebook_append_page (GTK_NOTEBOOK (nb), hbox, widget); + widget = gtk_label_new (_("Placement")); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif gtk_box_pack_start (GTK_BOX (hbox), placement_vbox, FALSE, FALSE, 6); gtk_notebook_append_page (GTK_NOTEBOOK (nb), hbox, widget); @@ -388,9 +410,15 @@ main (int argc, char **argv) widget = title_label_new (N_("Compositing Manager")); gtk_box_pack_start (GTK_BOX (general_vbox), widget, FALSE, FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + hbox1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else vbox = gtk_vbox_new (FALSE, 0); hbox = gtk_hbox_new (FALSE, 0); hbox1 = gtk_hbox_new (FALSE, 0); +#endif compositing_checkbutton = gtk_check_button_new_with_mnemonic (_("Enable software _compositing window manager")); compositing_fast_alt_tab_checkbutton = gtk_check_button_new_with_mnemonic (_("Disable _thumbnails in Alt-Tab")); gtk_box_pack_start (GTK_BOX (vbox), compositing_checkbutton, FALSE, FALSE, 6); @@ -403,7 +431,11 @@ main (int argc, char **argv) widget = title_label_new (N_("Titlebar Buttons")); gtk_box_pack_start (GTK_BOX (general_vbox), widget, FALSE, FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif widget = gtk_label_new (_("Position:")); gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 6); titlebar_layout_optionmenu = gtk_combo_box_text_new (); @@ -414,7 +446,11 @@ main (int argc, char **argv) widget = title_label_new (N_("New Windows")); gtk_box_pack_start (GTK_BOX (placement_vbox), widget, FALSE, FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif center_new_windows_checkbutton = gtk_check_button_new_with_mnemonic (_("Center _new windows")); gtk_box_pack_start (GTK_BOX (hbox), center_new_windows_checkbutton, FALSE, FALSE, 6); gtk_box_pack_start (GTK_BOX (placement_vbox), hbox, FALSE, FALSE, 6); @@ -423,7 +459,11 @@ main (int argc, char **argv) widget = title_label_new (N_("Window Snapping")); gtk_box_pack_start (GTK_BOX (placement_vbox), widget, FALSE, FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif side_by_side_tiling_checkbutton = gtk_check_button_new_with_mnemonic (_("Enable side by side _tiling")); gtk_box_pack_start (GTK_BOX (hbox), side_by_side_tiling_checkbutton, FALSE, FALSE, 6); gtk_box_pack_start (GTK_BOX (placement_vbox), hbox, FALSE, FALSE, 6); @@ -432,12 +472,22 @@ main (int argc, char **argv) widget = title_label_new (N_("Window Selection")); gtk_box_pack_start (GTK_BOX (behaviour_vbox), widget, FALSE, FALSE, 6); + +#if GTK_CHECK_VERSION (3, 0, 0) + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + hbox1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + hbox3 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else vbox = gtk_vbox_new (FALSE, 0); vbox1 = gtk_vbox_new (FALSE, 0); hbox = gtk_hbox_new (FALSE, 0); hbox1 = gtk_hbox_new (FALSE, 0); hbox2 = gtk_hbox_new (FALSE, 0); hbox3 = gtk_hbox_new (FALSE, 0); +#endif focus_mode_checkbutton = gtk_check_button_new_with_mnemonic (_("_Select windows when the mouse moves over them")); gtk_box_pack_start (GTK_BOX (vbox), focus_mode_checkbutton, FALSE, FALSE, 6); @@ -450,8 +500,13 @@ main (int argc, char **argv) gtk_box_pack_start (GTK_BOX (hbox2), autoraise_checkbutton, FALSE, FALSE, 6); gtk_box_pack_start (GTK_BOX (vbox1), hbox2, FALSE, FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + autoraise_delay_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + autoraise_delay_slider = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, 0, 10, 0.2); +#else autoraise_delay_hbox = gtk_hbox_new (FALSE, 0); autoraise_delay_slider = gtk_hscale_new_with_range (0, 10, 0.2); +#endif widget = gtk_label_new_with_mnemonic (_("_Interval before raising:")); gtk_box_pack_start (GTK_BOX (autoraise_delay_hbox), widget, FALSE, FALSE, 6); gtk_box_pack_start (GTK_BOX (autoraise_delay_hbox), autoraise_delay_slider, TRUE, TRUE, 6); @@ -470,7 +525,11 @@ main (int argc, char **argv) widget = title_label_new (N_("Titlebar Action")); gtk_box_pack_start (GTK_BOX (behaviour_vbox), widget, FALSE, FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif widget = gtk_label_new_with_mnemonic (_("_Double-click titlebar to perform this action:")); gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 6); double_click_titlebar_optionmenu = gtk_combo_box_text_new (); @@ -482,8 +541,14 @@ main (int argc, char **argv) widget = title_label_new (N_("Movement Key")); gtk_box_pack_start (GTK_BOX (behaviour_vbox), widget, FALSE, FALSE, 6); +#if GTK_CHECK_VERSION (3, 0, 0) + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else vbox = gtk_vbox_new (FALSE, 0); hbox = gtk_hbox_new (FALSE, 0); +#endif + widget = gtk_label_new_with_mnemonic (_("To move a window, press-and-hold this key then grab the window:")); #if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_halign (widget, GTK_ALIGN_START); @@ -492,7 +557,12 @@ main (int argc, char **argv) gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0); #endif gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 6); + +#if GTK_CHECK_VERSION (3, 0, 0) + alt_click_hbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); +#else alt_click_hbox = gtk_vbox_new (FALSE, 6); +#endif gtk_label_set_mnemonic_widget (GTK_LABEL (widget), alt_click_hbox); gtk_box_pack_start (GTK_BOX (vbox), alt_click_hbox, FALSE, FALSE, 6); gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 6); |