diff options
author | monsta <[email protected]> | 2016-11-22 15:49:16 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-11-22 15:49:16 +0300 |
commit | ea481767c4e3ec19136a5b61ad46f244a9a5ffa7 (patch) | |
tree | bbcceb1d2a0be587e7127109f57e41e9e9b43f98 /mate-dictionary/libgdict/gdict-source-chooser.c | |
parent | 8f9a34f003061d7c5e6cfe8a8cb64ec6e98d7c4a (diff) | |
download | mate-utils-ea481767c4e3ec19136a5b61ad46f244a9a5ffa7.tar.bz2 mate-utils-ea481767c4e3ec19136a5b61ad46f244a9a5ffa7.tar.xz |
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require mate-panel >= 1.17
Diffstat (limited to 'mate-dictionary/libgdict/gdict-source-chooser.c')
-rw-r--r-- | mate-dictionary/libgdict/gdict-source-chooser.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/mate-dictionary/libgdict/gdict-source-chooser.c b/mate-dictionary/libgdict/gdict-source-chooser.c index 217bf412..54b77f4e 100644 --- a/mate-dictionary/libgdict/gdict-source-chooser.c +++ b/mate-dictionary/libgdict/gdict-source-chooser.c @@ -47,13 +47,6 @@ #include "gdict-enum-types.h" #include "gdict-marshal.h" -#if !GTK_CHECK_VERSION(3,0,0) -#define GDICT_SOURCE_CHOOSER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - GDICT_TYPE_SOURCE_CHOOSER, \ - GdictSourceChooserPrivate)) -#endif - struct _GdictSourceChooserPrivate { GtkListStore *store; @@ -65,10 +58,6 @@ struct _GdictSourceChooserPrivate GdictSourceLoader *loader; gint n_sources; -#if !GTK_CHECK_VERSION(3,0,0) - GdkCursor *busy_cursor; -#endif - gchar *current_source; }; @@ -100,11 +89,7 @@ enum static guint source_chooser_signals[LAST_SIGNAL] = { 0, }; -#if GTK_CHECK_VERSION(3,0,0) G_DEFINE_TYPE_WITH_PRIVATE (GdictSourceChooser, gdict_source_chooser, GTK_TYPE_BOX) -#else -G_DEFINE_TYPE (GdictSourceChooser, gdict_source_chooser, GTK_TYPE_BOX); -#endif static void gdict_source_chooser_finalize (GObject *gobject) @@ -135,14 +120,6 @@ gdict_source_chooser_dispose (GObject *gobject) priv->loader = NULL; } -#if !GTK_CHECK_VERSION(3,0,0) - if (priv->busy_cursor) - { - gdk_cursor_unref (priv->busy_cursor); - priv->busy_cursor = NULL; - } -#endif - G_OBJECT_CLASS (gdict_source_chooser_parent_class)->dispose (gobject); } @@ -260,17 +237,8 @@ gdict_source_chooser_constructor (GType gtype, chooser = GDICT_SOURCE_CHOOSER (retval); 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-source-chooser-scrolled-window"); -#endif gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); @@ -286,9 +254,6 @@ gdict_source_chooser_constructor (GType gtype, "weight", SOURCE_CURRENT, NULL); priv->treeview = gtk_tree_view_new (); -#if !GTK_CHECK_VERSION(3,0,0) - gtk_widget_set_composite_name (priv->treeview, "gdict-source-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); @@ -302,11 +267,7 @@ gdict_source_chooser_constructor (GType gtype, gtk_container_add (GTK_CONTAINER (sw), priv->treeview); gtk_widget_show (priv->treeview); -#if GTK_CHECK_VERSION (3, 0, 0) hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); -#else - hbox = gtk_hbox_new (FALSE, 6); -#endif priv->buttons_box = hbox; priv->refresh_button = gtk_button_new (); @@ -324,10 +285,6 @@ gdict_source_chooser_constructor (GType gtype, 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 retval; } @@ -336,10 +293,6 @@ gdict_source_chooser_class_init (GdictSourceChooserClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); -#if !GTK_CHECK_VERSION(3,0,0) - g_type_class_add_private (klass, sizeof (GdictSourceChooserPrivate)); -#endif - gobject_class->finalize = gdict_source_chooser_finalize; gobject_class->dispose = gdict_source_chooser_dispose; gobject_class->set_property = gdict_source_chooser_set_property; @@ -423,11 +376,7 @@ gdict_source_chooser_init (GdictSourceChooser *chooser) { GdictSourceChooserPrivate *priv; -#if GTK_CHECK_VERSION(3,0,0) chooser->priv = priv = gdict_source_chooser_get_instance_private (chooser); -#else - chooser->priv = priv = GDICT_SOURCE_CHOOSER_GET_PRIVATE (chooser); -#endif gtk_orientable_set_orientation (GTK_ORIENTABLE (chooser), GTK_ORIENTATION_VERTICAL); @@ -439,10 +388,6 @@ gdict_source_chooser_init (GdictSourceChooser *chooser) priv->loader = NULL; priv->n_sources = -1; - -#if !GTK_CHECK_VERSION(3,0,0) - priv->busy_cursor = gdk_cursor_new (GDK_WATCH); -#endif } /** |