From 4ce13708f03884cc231b89f04ace3dadfe4afe2e Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 30 May 2016 12:52:22 +0200 Subject: GTK+3 mdict: Drop deprecated API from DatabaseChooser - deprecated composite-child API - deprecated gdk_cursor_new taken from: https://git.gnome.org/browse/gnome-dictionary/commit/?id=2ab2182 --- mate-dictionary/libgdict/gdict-database-chooser.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/mate-dictionary/libgdict/gdict-database-chooser.c b/mate-dictionary/libgdict/gdict-database-chooser.c index 377efeb2..22c9aadb 100644 --- a/mate-dictionary/libgdict/gdict-database-chooser.c +++ b/mate-dictionary/libgdict/gdict-database-chooser.c @@ -338,13 +338,17 @@ gdict_database_chooser_constructor (GType type, chooser = GDICT_DATABASE_CHOOSER (object); priv = chooser->priv; +#if !GTK_CHECK_VERSION(3,0,0) gtk_widget_push_composite_child (); +#endif sw = gtk_scrolled_window_new (NULL, NULL); #if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_vexpand (sw, TRUE); #endif +#if !GTK_CHECK_VERSION(3,0,0) gtk_widget_set_composite_name (sw, "gdict-database-chooser-scrolled-window"); +#endif gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); @@ -360,7 +364,9 @@ gdict_database_chooser_constructor (GType type, "weight", DB_COLUMN_CURRENT, NULL); priv->treeview = gtk_tree_view_new (); +#if !GTK_CHECK_VERSION(3,0,0) gtk_widget_set_composite_name (priv->treeview, "gdict-database-chooser-treeview"); +#endif gtk_tree_view_set_model (GTK_TREE_VIEW (priv->treeview), GTK_TREE_MODEL (priv->store)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->treeview), FALSE); @@ -406,8 +412,10 @@ gdict_database_chooser_constructor (GType type, gtk_box_pack_end (GTK_BOX (chooser), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); - + +#if !GTK_CHECK_VERSION(3,0,0) gtk_widget_pop_composite_child (); +#endif return object; } @@ -725,7 +733,15 @@ lookup_start_cb (GdictContext *context, GdictDatabaseChooserPrivate *priv = chooser->priv; if (!priv->busy_cursor) +#if GTK_CHECK_VERSION(3,0,0) + { + GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (chooser)); + + priv->busy_cursor = gdk_cursor_new_for_display (display, GDK_WATCH); + } +#else priv->busy_cursor = gdk_cursor_new (GDK_WATCH); +#endif if (gtk_widget_get_window (GTK_WIDGET (chooser))) gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (chooser)), priv->busy_cursor); -- cgit v1.2.1