summaryrefslogtreecommitdiff
path: root/mate-dictionary/libgdict
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-05-30 12:52:22 +0200
committerraveit65 <[email protected]>2016-05-30 17:33:02 +0200
commit4ce13708f03884cc231b89f04ace3dadfe4afe2e (patch)
tree111fad3680ebfa4c740c68b8d318b8390d65917b /mate-dictionary/libgdict
parent49821e9824babbd8719898db610a4fbf7a396b2e (diff)
downloadmate-utils-4ce13708f03884cc231b89f04ace3dadfe4afe2e.tar.bz2
mate-utils-4ce13708f03884cc231b89f04ace3dadfe4afe2e.tar.xz
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
Diffstat (limited to 'mate-dictionary/libgdict')
-rw-r--r--mate-dictionary/libgdict/gdict-database-chooser.c18
1 files changed, 17 insertions, 1 deletions
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);