summaryrefslogtreecommitdiff
path: root/mate-dictionary
diff options
context:
space:
mode:
Diffstat (limited to 'mate-dictionary')
-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);