diff options
author | monsta <[email protected]> | 2016-01-15 11:15:09 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-01-15 13:26:42 +0300 |
commit | 3e1249a7c4236196b87c2ed0bc17ed1c5a635ff5 (patch) | |
tree | e0473c6242771cebcb9c5e770669603a9a97be35 | |
parent | 98e7e5bb2d294a8a5978c42adf47ceff36565603 (diff) | |
download | mate-control-center-3e1249a7c4236196b87c2ed0bc17ed1c5a635ff5.tar.bz2 mate-control-center-3e1249a7c4236196b87c2ed0bc17ed1c5a635ff5.tar.xz |
[GTK+3] typing-break: fix deprecated usage of GtkMisc, GtkHBox, GtkVBox
-rw-r--r-- | typing-break/drw-break-window.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/typing-break/drw-break-window.c b/typing-break/drw-break-window.c index ab5544f0..80f71ef4 100644 --- a/typing-break/drw-break-window.c +++ b/typing-break/drw-break-window.c @@ -167,7 +167,11 @@ drw_break_window_init (DrwBreakWindow *window) align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); gtk_widget_show (align); +#if GTK_CHECK_VERSION (3, 0, 0) + outer_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#else outer_vbox = gtk_vbox_new (FALSE, 0); +#endif gtk_widget_show (outer_vbox); right_padding = gdk_screen_get_width (screen) - monitor.width - monitor.x; @@ -187,7 +191,11 @@ drw_break_window_init (DrwBreakWindow *window) gtk_box_pack_start (GTK_BOX (outer_vbox), align, TRUE, TRUE, 0); if (allow_postpone) { +#if GTK_CHECK_VERSION (3, 0, 0) + button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else button_box = gtk_hbox_new (FALSE, 0); +#endif gtk_widget_show (button_box); gtk_container_set_border_width (GTK_CONTAINER (button_box), 12); @@ -220,17 +228,30 @@ drw_break_window_init (DrwBreakWindow *window) gtk_box_pack_end (GTK_BOX (outer_vbox), button_box, FALSE, TRUE, 0); } +#if GTK_CHECK_VERSION (3, 0, 0) + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#else vbox = gtk_vbox_new (FALSE, 0); +#endif gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (align), vbox); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0); priv->image = gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment (GTK_MISC (priv->image), 1, 0.5); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (priv->image, GTK_ALIGN_END); + gtk_widget_set_valign (priv->image, GTK_ALIGN_CENTER); +#else + gtk_misc_set_alignment (GTK_MISC (priv->image), 1.0, 0.5); +#endif gtk_widget_show (priv->image); gtk_box_pack_start (GTK_BOX (hbox), priv->image, TRUE, TRUE, 8); @@ -261,7 +282,12 @@ drw_break_window_init (DrwBreakWindow *window) priv->clock_label = gtk_label_new (NULL); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (priv->clock_label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (priv->clock_label, GTK_ALIGN_CENTER); +#else gtk_misc_set_alignment (GTK_MISC (priv->clock_label), 0.5, 0.5); +#endif gtk_widget_show (priv->clock_label); gtk_box_pack_start (GTK_BOX (vbox), priv->clock_label, TRUE, TRUE, 8); |