From 386f747d82bdd2607896a1c80dff5dfaaec1aa23 Mon Sep 17 00:00:00 2001 From: monsta Date: Fri, 22 Jan 2016 11:39:41 +0300 Subject: [GTK+3] dictionary: fix some deprecations --- mate-dictionary/libgdict/gdict-defbox.c | 4 ++++ mate-dictionary/src/gdict-applet.c | 6 +++++- mate-dictionary/src/gdict-sidebar.c | 5 +++++ mate-dictionary/src/gdict-window.c | 4 ++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c index 48bda738..8abe0c99 100644 --- a/mate-dictionary/libgdict/gdict-defbox.c +++ b/mate-dictionary/libgdict/gdict-defbox.c @@ -1333,7 +1333,11 @@ create_find_pane (GdictDefbox *defbox) gtk_box_pack_start (GTK_BOX (hbox2), priv->find_entry, TRUE, TRUE, 0); gtk_label_set_mnemonic_widget (GTK_LABEL (label), priv->find_entry); +#if GTK_CHECK_VERSION (3, 0, 0) + sep = gtk_separator_new (GTK_ORIENTATION_VERTICAL); +#else sep = gtk_vseparator_new (); +#endif gtk_box_pack_start (GTK_BOX (hbox1), sep, FALSE, FALSE, 0); gtk_widget_show (sep); diff --git a/mate-dictionary/src/gdict-applet.c b/mate-dictionary/src/gdict-applet.c index dc082da2..3e89c272 100644 --- a/mate-dictionary/src/gdict-applet.c +++ b/mate-dictionary/src/gdict-applet.c @@ -347,8 +347,12 @@ gdict_applet_build_window (GdictApplet *applet) gtk_widget_show (priv->defbox); gtk_widget_set_can_focus (priv->defbox, TRUE); gtk_widget_set_can_default (priv->defbox, TRUE); - + +#if GTK_CHECK_VERSION (3, 0, 0) + bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL); +#else bbox = gtk_hbutton_box_new (); +#endif gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END); gtk_box_set_spacing (GTK_BOX (bbox), 6); gtk_box_pack_end (GTK_BOX (vbox), bbox, FALSE, FALSE, 0); diff --git a/mate-dictionary/src/gdict-sidebar.c b/mate-dictionary/src/gdict-sidebar.c index 87658a70..273ac1f6 100644 --- a/mate-dictionary/src/gdict-sidebar.c +++ b/mate-dictionary/src/gdict-sidebar.c @@ -345,7 +345,12 @@ gdict_sidebar_init (GdictSidebar *sidebar) select_hbox = gtk_hbox_new (FALSE, 0); priv->label = gtk_label_new (NULL); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->label), 0.0); + gtk_label_set_yalign (GTK_LABEL (priv->label), 0.5); +#else gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5); +#endif gtk_box_pack_start (GTK_BOX (select_hbox), priv->label, FALSE, FALSE, 0); gtk_widget_show (priv->label); diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c index a935f895..46fd3f27 100644 --- a/mate-dictionary/src/gdict-window.c +++ b/mate-dictionary/src/gdict-window.c @@ -188,7 +188,11 @@ gdict_window_dispose (GObject *gobject) if (window->busy_cursor) { +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (window->busy_cursor); +#else gdk_cursor_unref (window->busy_cursor); +#endif window->busy_cursor = NULL; } -- cgit v1.2.1