summaryrefslogtreecommitdiff
path: root/mate-dictionary
diff options
context:
space:
mode:
Diffstat (limited to 'mate-dictionary')
-rw-r--r--mate-dictionary/libgdict/gdict-database-chooser.c28
-rw-r--r--mate-dictionary/libgdict/gdict-defbox.c168
-rw-r--r--mate-dictionary/libgdict/gdict-source-chooser.c55
-rw-r--r--mate-dictionary/libgdict/gdict-speller.c46
-rw-r--r--mate-dictionary/libgdict/gdict-strategy-chooser.c48
-rw-r--r--mate-dictionary/libgdict/mate-dict.pc.in2
-rw-r--r--mate-dictionary/src/gdict-aligned-window.c8
-rw-r--r--mate-dictionary/src/gdict-applet.c31
-rw-r--r--mate-dictionary/src/gdict-sidebar.c16
-rw-r--r--mate-dictionary/src/gdict-source-dialog.c8
-rw-r--r--mate-dictionary/src/gdict-window.c114
11 files changed, 10 insertions, 514 deletions
diff --git a/mate-dictionary/libgdict/gdict-database-chooser.c b/mate-dictionary/libgdict/gdict-database-chooser.c
index 22c9aadb..37572abe 100644
--- a/mate-dictionary/libgdict/gdict-database-chooser.c
+++ b/mate-dictionary/libgdict/gdict-database-chooser.c
@@ -190,11 +190,7 @@ gdict_database_chooser_dispose (GObject *gobject)
if (priv->busy_cursor)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (priv->busy_cursor);
-#else
- gdk_cursor_unref (priv->busy_cursor);
-#endif
priv->busy_cursor = NULL;
}
@@ -338,17 +334,8 @@ 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);
@@ -364,9 +351,6 @@ 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);
@@ -379,11 +363,7 @@ gdict_database_chooser_constructor (GType type,
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, 0);
-#else
- hbox = gtk_hbox_new (FALSE, 0);
-#endif
priv->buttons_box = hbox;
priv->refresh_button = gtk_button_new ();
@@ -413,10 +393,6 @@ 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;
}
@@ -733,15 +709,11 @@ 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);
diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c
index 7ce0cb57..29c304f9 100644
--- a/mate-dictionary/libgdict/gdict-defbox.c
+++ b/mate-dictionary/libgdict/gdict-defbox.c
@@ -52,10 +52,6 @@
#define QUERY_MARGIN 48
#define ERROR_MARGIN 24
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define gdk_cursor_unref g_object_unref
-#endif
-
typedef struct
{
GdictDefinition *definition;
@@ -63,11 +59,6 @@ typedef struct
gint begin;
} Definition;
-#if !GTK_CHECK_VERSION(3,0,0)
-#define GDICT_DEFBOX_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_DEFBOX, GdictDefboxPrivate))
-#endif
-
struct _GdictDefboxPrivate
{
GtkWidget *text_view;
@@ -131,16 +122,8 @@ enum
};
static guint gdict_defbox_signals[LAST_SIGNAL] = { 0 };
-#if GTK_CHECK_VERSION(3,0,0)
-G_DEFINE_TYPE_WITH_PRIVATE (GdictDefbox, gdict_defbox, GTK_TYPE_BOX)
-#else
-static GdkColor default_link_color = { 0, 0, 0, 0xeeee };
-static GdkColor default_visited_link_color = { 0, 0x5555, 0x1a1a, 0x8b8b };
-
-
-G_DEFINE_TYPE (GdictDefbox, gdict_defbox, GTK_TYPE_BOX);
-#endif
+G_DEFINE_TYPE_WITH_PRIVATE (GdictDefbox, gdict_defbox, GTK_TYPE_BOX)
static Definition *
definition_new (void)
@@ -201,19 +184,19 @@ gdict_defbox_dispose (GObject *gobject)
if (priv->busy_cursor)
{
- gdk_cursor_unref (priv->busy_cursor);
+ g_object_unref (priv->busy_cursor);
priv->busy_cursor = NULL;
}
if (priv->hand_cursor)
{
- gdk_cursor_unref (priv->hand_cursor);
+ g_object_unref (priv->hand_cursor);
priv->hand_cursor = NULL;
}
if (priv->regular_cursor)
{
- gdk_cursor_unref (priv->regular_cursor);
+ g_object_unref (priv->regular_cursor);
priv->regular_cursor = NULL;
}
@@ -1309,18 +1292,10 @@ create_find_pane (GdictDefbox *defbox)
priv = defbox->priv;
-#if GTK_CHECK_VERSION (3, 0, 0)
find_pane = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-#else
- find_pane = gtk_hbox_new (FALSE, 0);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (find_pane), 0);
-#if GTK_CHECK_VERSION (3, 0, 0)
hbox1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-#else
- hbox1 = gtk_hbox_new (FALSE, 6);
-#endif
gtk_box_pack_start (GTK_BOX (find_pane), hbox1, TRUE, TRUE, 0);
gtk_widget_show (hbox1);
@@ -1334,11 +1309,7 @@ create_find_pane (GdictDefbox *defbox)
gtk_box_pack_start (GTK_BOX (hbox1), button, FALSE, FALSE, 0);
gtk_widget_show (button);
-#if GTK_CHECK_VERSION (3, 0, 0)
hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
-#else
- hbox2 = gtk_hbox_new (FALSE, 12);
-#endif
gtk_box_pack_start (GTK_BOX (hbox1), hbox2, TRUE, TRUE, 0);
gtk_widget_show (hbox2);
@@ -1351,11 +1322,7 @@ 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);
@@ -1387,9 +1354,6 @@ static void
gdict_defbox_init_tags (GdictDefbox *defbox)
{
GdictDefboxPrivate *priv = defbox->priv;
-#if !GTK_CHECK_VERSION(3,0,0)
- GdkColor *link_color, *visited_link_color;
-#endif
g_assert (GTK_IS_TEXT_BUFFER (priv->buffer));
@@ -1410,7 +1374,6 @@ gdict_defbox_init_tags (GdictDefbox *defbox)
"scale", PANGO_SCALE_SMALL,
NULL);
-#if GTK_CHECK_VERSION(3,0,0)
{
GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (defbox));
gboolean prefer_dark = FALSE;
@@ -1443,35 +1406,6 @@ gdict_defbox_init_tags (GdictDefbox *defbox)
"foreground-rgba", &rgba,
NULL);
}
-#else
- link_color = visited_link_color = NULL;
- gtk_widget_style_get (GTK_WIDGET (defbox),
- "link-color", &link_color,
- "visited-link-color", &visited_link_color,
- NULL);
- if (!link_color)
- link_color = &default_link_color;
-
- if (!visited_link_color)
- visited_link_color = &default_visited_link_color;
-
- priv->link_tag =
- gtk_text_buffer_create_tag (priv->buffer, "link",
- "underline", PANGO_UNDERLINE_SINGLE,
- "foreground-gdk", link_color,
- NULL);
- priv->visited_link_tag =
- gtk_text_buffer_create_tag (priv->buffer, "visited-link",
- "underline", PANGO_UNDERLINE_SINGLE,
- "foreground-gdk", visited_link_color,
- NULL);
-
- if (link_color != &default_link_color)
- gdk_color_free (link_color);
-
- if (visited_link_color != &default_visited_link_color)
- gdk_color_free (visited_link_color);
-#endif
gtk_text_buffer_create_tag (priv->buffer, "phonetic",
"foreground", "dark gray",
@@ -1594,24 +1528,16 @@ set_cursor_if_appropriate (GdictDefbox *defbox,
priv = defbox->priv;
if (!priv->hand_cursor)
-#if GTK_CHECK_VERSION(3,0,0)
{
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (defbox));
priv->hand_cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
}
-#else
- priv->hand_cursor = gdk_cursor_new (GDK_HAND2);
-#endif
if (!priv->regular_cursor)
-#if GTK_CHECK_VERSION(3,0,0)
{
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (defbox));
priv->regular_cursor = gdk_cursor_new_for_display (display, GDK_XTERM);
}
-#else
- priv->regular_cursor = gdk_cursor_new (GDK_XTERM);
-#endif
gtk_text_view_get_iter_at_location (text_view, &iter, x, y);
@@ -1667,10 +1593,6 @@ defbox_motion_notify_cb (GtkWidget *text_view,
set_cursor_if_appropriate (defbox, GTK_TEXT_VIEW (text_view), bx, by);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gdk_window_get_pointer (gtk_widget_get_window (text_view), NULL, NULL, NULL);
-#endif
-
return FALSE;
}
@@ -1679,22 +1601,16 @@ defbox_visibility_notify_cb (GtkWidget *text_view,
GdkEventVisibility *event,
GdictDefbox *defbox)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
GdkDeviceManager *device_manager;
GdkDevice *pointer;
-#endif
gint wx, wy;
gint bx, by;
-#if GTK_CHECK_VERSION (3, 0, 0)
display = gdk_window_get_display (event->window);
device_manager = gdk_display_get_device_manager (display);
pointer = gdk_device_manager_get_client_pointer (device_manager);
gdk_window_get_device_position (gtk_widget_get_window (text_view), pointer, &wx, &wy, NULL);
-#else
- gdk_window_get_pointer (gtk_widget_get_window (text_view), &wx, &wy, NULL);
-#endif
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
GTK_TEXT_WINDOW_WIDGET,
@@ -1722,17 +1638,8 @@ gdict_defbox_constructor (GType type,
defbox = GDICT_DEFBOX (object);
priv = defbox->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-defbox-scrolled-window");
-#endif
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
@@ -1745,18 +1652,12 @@ gdict_defbox_constructor (GType type,
gdict_defbox_init_tags (defbox);
priv->text_view = gtk_text_view_new_with_buffer (priv->buffer);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_composite_name (priv->text_view, "gdict-defbox-text-view");
-#endif
gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->text_view), FALSE);
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (priv->text_view), 4);
gtk_container_add (GTK_CONTAINER (sw), priv->text_view);
gtk_widget_show (priv->text_view);
priv->find_pane = create_find_pane (defbox);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_composite_name (priv->find_pane, "gdict-defbox-find-pane");
-#endif
gtk_box_pack_end (GTK_BOX (defbox), priv->find_pane, FALSE, FALSE, 0);
/* stuff to make the link machinery work */
@@ -1770,51 +1671,9 @@ gdict_defbox_constructor (GType type,
G_CALLBACK (defbox_visibility_notify_cb),
defbox);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_pop_composite_child ();
-#endif
-
return object;
}
-#if !GTK_CHECK_VERSION(3,0,0)
-static void
-gdict_defbox_style_set (GtkWidget *widget,
- GtkStyle *old_style)
-{
- GdictDefboxPrivate *priv = GDICT_DEFBOX (widget)->priv;
- GdkColor *link_color, *visited_link_color;
-
- if (GTK_WIDGET_CLASS (gdict_defbox_parent_class)->style_set)
- GTK_WIDGET_CLASS (gdict_defbox_parent_class)->style_set (widget, old_style);
-
- link_color = visited_link_color = NULL;
- gtk_widget_style_get (widget,
- "link-color", &link_color,
- "visited-link-color", &visited_link_color,
- NULL);
- if (!link_color)
- link_color = &default_link_color;
-
- if (!visited_link_color)
- visited_link_color = &default_visited_link_color;
-
- g_object_set (G_OBJECT (priv->link_tag),
- "foreground-gdk", link_color,
- NULL);
-
- g_object_set (G_OBJECT (priv->visited_link_tag),
- "foreground-gdk", visited_link_color,
- NULL);
-
- if (link_color != &default_link_color)
- gdk_color_free (link_color);
-
- if (visited_link_color != &default_visited_link_color)
- gdk_color_free (visited_link_color);
-}
-#endif
-
/* we override the GtkWidget::show_all method since we have widgets
* we don't want to show, such as the find pane
*/
@@ -1884,9 +1743,6 @@ gdict_defbox_class_init (GdictDefboxClass *klass)
gobject_class->finalize = gdict_defbox_finalize;
widget_class->show_all = gdict_defbox_show_all;
-#if !GTK_CHECK_VERSION(3,0,0)
- widget_class->style_set = gdict_defbox_style_set;
-#endif
/**
* GdictDefbox:word:
@@ -2011,10 +1867,6 @@ gdict_defbox_class_init (GdictDefboxClass *klass)
GDK_KEY_Escape, 0,
"hide-find",
0);
-
-#if !GTK_CHECK_VERSION(3,0,0)
- g_type_class_add_private (klass, sizeof (GdictDefboxPrivate));
-#endif
}
static void
@@ -2025,11 +1877,7 @@ gdict_defbox_init (GdictDefbox *defbox)
gtk_orientable_set_orientation (GTK_ORIENTABLE (defbox), GTK_ORIENTATION_VERTICAL);
gtk_box_set_spacing (GTK_BOX (defbox), 6);
-#if GTK_CHECK_VERSION(3,0,0)
priv = gdict_defbox_get_instance_private (defbox);
-#else
- priv = GDICT_DEFBOX_GET_PRIVATE (defbox);
-#endif
defbox->priv = priv;
priv->context = NULL;
@@ -2262,14 +2110,10 @@ lookup_start_cb (GdictContext *context,
priv->is_searching = TRUE;
if (!priv->busy_cursor)
-#if GTK_CHECK_VERSION(3,0,0)
{
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (defbox));
priv->busy_cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
}
-#else
- priv->busy_cursor = gdk_cursor_new (GDK_WATCH);
-#endif
window = gtk_text_view_get_window (GTK_TEXT_VIEW (priv->text_view),
GTK_TEXT_WINDOW_WIDGET);
@@ -2975,11 +2819,7 @@ gdict_defbox_set_font_name (GdictDefbox *defbox,
else
font_desc = NULL;
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_override_font (priv->text_view, font_desc);
-#else
- gtk_widget_modify_font (priv->text_view, font_desc);
-#endif
if (font_desc)
pango_font_description_free (font_desc);
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
}
/**
diff --git a/mate-dictionary/libgdict/gdict-speller.c b/mate-dictionary/libgdict/gdict-speller.c
index 1333894c..14bdb0c6 100644
--- a/mate-dictionary/libgdict/gdict-speller.c
+++ b/mate-dictionary/libgdict/gdict-speller.c
@@ -45,11 +45,6 @@
#include "gdict-debug.h"
#include "gdict-private.h"
-#if !GTK_CHECK_VERSION(3,0,0)
-#define GDICT_SPELLER_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_SPELLER, GdictSpellerPrivate))
-#endif
-
struct _GdictSpellerPrivate
{
GdictContext *context;
@@ -110,12 +105,7 @@ enum
static guint speller_signals[LAST_SIGNAL] = { 0 };
-#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE_WITH_PRIVATE (GdictSpeller, gdict_speller, GTK_TYPE_BOX)
-#else
-G_DEFINE_TYPE (GdictSpeller, gdict_speller, GTK_TYPE_BOX);
-#endif
-
static void
set_gdict_context (GdictSpeller *speller,
@@ -179,11 +169,7 @@ gdict_speller_finalize (GObject *gobject)
set_gdict_context (speller, NULL);
if (priv->busy_cursor)
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (priv->busy_cursor);
-#else
- gdk_cursor_unref (priv->busy_cursor);
-#endif
g_free (priv->strategy);
g_free (priv->database);
@@ -320,17 +306,8 @@ gdict_speller_constructor (GType type,
speller = GDICT_SPELLER (object);
priv = speller->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-speller-scrolled-window");
-#endif
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
@@ -346,9 +323,6 @@ gdict_speller_constructor (GType type,
NULL);
priv->treeview = gtk_tree_view_new ();
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_composite_name (priv->treeview, "gdict-speller-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);
@@ -358,11 +332,7 @@ gdict_speller_constructor (GType type,
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, 0);
-#else
- hbox = gtk_hbox_new (FALSE, 0);
-#endif
priv->clear_button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (priv->clear_button),
@@ -379,10 +349,6 @@ gdict_speller_constructor (GType type,
gtk_box_pack_end (GTK_BOX (speller), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_pop_composite_child ();
-#endif
-
return object;
}
@@ -428,10 +394,6 @@ gdict_speller_class_init (GdictSpellerClass *klass)
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_STRING);
-
-#if !GTK_CHECK_VERSION(3,0,0)
- g_type_class_add_private (gobject_class, sizeof (GdictSpellerPrivate));
-#endif
}
static void
@@ -439,11 +401,7 @@ gdict_speller_init (GdictSpeller *speller)
{
GdictSpellerPrivate *priv;
-#if GTK_CHECK_VERSION(3,0,0)
speller->priv = priv = gdict_speller_get_instance_private (speller);
-#else
- speller->priv = priv = GDICT_SPELLER_GET_PRIVATE (speller);
-#endif
gtk_orientable_set_orientation (GTK_ORIENTABLE (speller), GTK_ORIENTATION_VERTICAL);
@@ -664,14 +622,10 @@ lookup_start_cb (GdictContext *context,
GdictSpellerPrivate *priv = speller->priv;
if (!priv->busy_cursor)
-#if GTK_CHECK_VERSION(3,0,0)
{
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (speller));
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 (speller)))
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (speller)), priv->busy_cursor);
diff --git a/mate-dictionary/libgdict/gdict-strategy-chooser.c b/mate-dictionary/libgdict/gdict-strategy-chooser.c
index 9e6d0b1c..4b6f1ecd 100644
--- a/mate-dictionary/libgdict/gdict-strategy-chooser.c
+++ b/mate-dictionary/libgdict/gdict-strategy-chooser.c
@@ -45,11 +45,6 @@
#include "gdict-enum-types.h"
#include "gdict-marshal.h"
-#if !GTK_CHECK_VERSION(3,0,0)
-#define GDICT_STRATEGY_CHOOSER_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_STRATEGY_CHOOSER, GdictStrategyChooserPrivate))
-#endif
-
struct _GdictStrategyChooserPrivate
{
GtkListStore *store;
@@ -108,16 +103,9 @@ enum
static guint db_chooser_signals[LAST_SIGNAL] = { 0 };
-#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE_WITH_PRIVATE (GdictStrategyChooser,
gdict_strategy_chooser,
GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE (GdictStrategyChooser,
- gdict_strategy_chooser,
- GTK_TYPE_BOX);
-#endif
-
static void
set_gdict_context (GdictStrategyChooser *chooser,
@@ -184,11 +172,7 @@ gdict_strategy_chooser_dispose (GObject *gobject)
if (priv->busy_cursor)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (priv->busy_cursor);
-#else
- gdk_cursor_unref (priv->busy_cursor);
-#endif
priv->busy_cursor = NULL;
}
@@ -333,17 +317,8 @@ gdict_strategy_chooser_constructor (GType type,
chooser = GDICT_STRATEGY_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-strategy-chooser-scrolled-window");
-#endif
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
@@ -359,9 +334,6 @@ gdict_strategy_chooser_constructor (GType type,
"weight", STRAT_COLUMN_CURRENT,
NULL);
priv->treeview = gtk_tree_view_new ();
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_composite_name (priv->treeview, "gdict-strategy-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);
@@ -371,11 +343,7 @@ gdict_strategy_chooser_constructor (GType type,
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, 0);
-#else
- hbox = gtk_hbox_new (FALSE, 0);
-#endif
priv->refresh_button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (priv->refresh_button),
@@ -404,10 +372,6 @@ gdict_strategy_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;
}
@@ -455,10 +419,6 @@ gdict_strategy_chooser_class_init (GdictStrategyChooserClass *klass)
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_STRING);
-
-#if !GTK_CHECK_VERSION(3,0,0)
- g_type_class_add_private (gobject_class, sizeof (GdictStrategyChooserPrivate));
-#endif
}
static void
@@ -466,11 +426,7 @@ gdict_strategy_chooser_init (GdictStrategyChooser *chooser)
{
GdictStrategyChooserPrivate *priv;
-#if GTK_CHECK_VERSION(3,0,0)
chooser->priv = priv = gdict_strategy_chooser_get_instance_private (chooser);
-#else
- chooser->priv = priv = GDICT_STRATEGY_CHOOSER_GET_PRIVATE (chooser);
-#endif
gtk_orientable_set_orientation (GTK_ORIENTABLE (chooser), GTK_ORIENTATION_VERTICAL);
@@ -696,14 +652,10 @@ lookup_start_cb (GdictContext *context,
GdictStrategyChooserPrivate *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);
diff --git a/mate-dictionary/libgdict/mate-dict.pc.in b/mate-dictionary/libgdict/mate-dict.pc.in
index 8168de2d..0be2fede 100644
--- a/mate-dictionary/libgdict/mate-dict.pc.in
+++ b/mate-dictionary/libgdict/mate-dict.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
Name: gdict-1.0
Description: MATE Dictionary Protocol client library
-Requires: gtk+-@GTK_API_VERSION@ >= @GTK_REQUIRED@
+Requires: gtk+-3.0 >= @GTK_REQUIRED@
Version: @GDICT_VERSION@
Libs: -L${libdir} -lmatedict
Cflags: -I${includedir}/mate-dict
diff --git a/mate-dictionary/src/gdict-aligned-window.c b/mate-dictionary/src/gdict-aligned-window.c
index c1cb9d53..37c03ca5 100644
--- a/mate-dictionary/src/gdict-aligned-window.c
+++ b/mate-dictionary/src/gdict-aligned-window.c
@@ -173,11 +173,7 @@ gdict_aligned_window_position (GdictAlignedWindow *window)
gdk_flush ();
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (window)), NULL, NULL, &our_width, &our_height);
-#else
- gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (window)), NULL, NULL, &our_width, &our_height, NULL);
-#endif
/* stick, skip taskbar and pager */
gtk_window_stick (GTK_WINDOW (window));
@@ -191,11 +187,7 @@ gdict_aligned_window_position (GdictAlignedWindow *window)
gdk_window_get_origin (gdk_window,
&entry_x,
&entry_y);
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_window_get_geometry (gdk_window, NULL, NULL, &entry_width, &entry_height);
-#else
- gdk_window_get_geometry (gdk_window, NULL, NULL, &entry_width, &entry_height, NULL);
-#endif
if (entry_x + our_width < gdk_screen_width ())
x = entry_x + 1;
diff --git a/mate-dictionary/src/gdict-applet.c b/mate-dictionary/src/gdict-applet.c
index 424a4c75..cd6133ef 100644
--- a/mate-dictionary/src/gdict-applet.c
+++ b/mate-dictionary/src/gdict-applet.c
@@ -38,10 +38,6 @@
#include "gdict-common.h"
#include "gdict-aligned-window.h"
-#if !GTK_CHECK_VERSION(3,0,0)
-#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
-#endif
-
#define GDICT_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDICT_TYPE_APPLET, GdictAppletClass))
#define GDICT_APPLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDICT_TYPE_APPLET, GdictAppletClass))
@@ -338,11 +334,7 @@ gdict_applet_build_window (GdictApplet *applet)
gtk_widget_show (frame);
priv->frame = frame;
-#if GTK_CHECK_VERSION (3, 0, 0)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
-#else
- vbox = gtk_vbox_new (FALSE, 12);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
@@ -356,11 +348,7 @@ gdict_applet_build_window (GdictApplet *applet)
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);
@@ -520,22 +508,7 @@ gdict_applet_draw (GdictApplet *applet)
if (priv->box)
gtk_widget_destroy (priv->box);
-#if GTK_CHECK_VERSION (3, 0, 0)
box = gtk_box_new (priv->orient, 0);
-#else
- switch (priv->orient)
- {
- case GTK_ORIENTATION_VERTICAL:
- box = gtk_vbox_new (FALSE, 0);
- break;
- case GTK_ORIENTATION_HORIZONTAL:
- box = gtk_hbox_new (FALSE, 0);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-#endif
gtk_container_add (GTK_CONTAINER (applet), box);
gtk_widget_show (box);
@@ -558,11 +531,7 @@ gdict_applet_draw (GdictApplet *applet)
gtk_box_pack_start (GTK_BOX (box), priv->toggle, FALSE, FALSE, 0);
gtk_widget_show (priv->toggle);
-#if GTK_CHECK_VERSION (3, 0, 0)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-#else
- hbox = gtk_hbox_new (FALSE, 0);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
gtk_container_add (GTK_CONTAINER (priv->toggle), hbox);
gtk_widget_show (hbox);
diff --git a/mate-dictionary/src/gdict-sidebar.c b/mate-dictionary/src/gdict-sidebar.c
index 7ca99fab..1a6e6d4b 100644
--- a/mate-dictionary/src/gdict-sidebar.c
+++ b/mate-dictionary/src/gdict-sidebar.c
@@ -36,10 +36,6 @@
#include "gdict-sidebar.h"
-#if !GTK_CHECK_VERSION(3,0,0)
-#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
-#endif
-
typedef struct
{
guint index;
@@ -332,11 +328,7 @@ gdict_sidebar_init (GdictSidebar *sidebar)
priv->pages_by_id = g_hash_table_new (g_str_hash, g_str_equal);
/* top option menu */
-#if GTK_CHECK_VERSION (3, 0, 0)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-#else
- hbox = gtk_hbox_new (FALSE, 0);
-#endif
gtk_box_pack_start (GTK_BOX (sidebar), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
priv->hbox = hbox;
@@ -351,11 +343,7 @@ gdict_sidebar_init (GdictSidebar *sidebar)
sidebar);
priv->select_button = select_button;
-#if GTK_CHECK_VERSION (3, 0, 0)
select_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-#else
- select_hbox = gtk_hbox_new (FALSE, 0);
-#endif
priv->label = gtk_label_new (NULL);
#if GTK_CHECK_VERSION (3, 16, 0)
@@ -367,11 +355,7 @@ gdict_sidebar_init (GdictSidebar *sidebar)
gtk_box_pack_start (GTK_BOX (select_hbox), priv->label, FALSE, FALSE, 0);
gtk_widget_show (priv->label);
-#if GTK_CHECK_VERSION (3, 0, 0)
arrow = gtk_image_new_from_icon_name ("go-down-symbolic", GTK_ICON_SIZE_BUTTON);
-#else
- arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
-#endif
gtk_box_pack_end (GTK_BOX (select_hbox), arrow, FALSE, FALSE, 0);
gtk_widget_show (arrow);
diff --git a/mate-dictionary/src/gdict-source-dialog.c b/mate-dictionary/src/gdict-source-dialog.c
index 223f54a1..502f1578 100644
--- a/mate-dictionary/src/gdict-source-dialog.c
+++ b/mate-dictionary/src/gdict-source-dialog.c
@@ -582,10 +582,6 @@ gdict_source_dialog_constructor (GType type,
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_push_composite_child ();
-#endif
-
/* get the UI from the GtkBuilder file */
dialog->builder = gtk_builder_new ();
gtk_builder_add_from_file (dialog->builder, GDICT_SOURCE_UI, &error);
@@ -673,10 +669,6 @@ gdict_source_dialog_constructor (GType type,
*/
update_dialog_ui (dialog);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_pop_composite_child ();
-#endif
-
return object;
}
diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c
index 3c716080..026cb9e9 100644
--- a/mate-dictionary/src/gdict-window.c
+++ b/mate-dictionary/src/gdict-window.c
@@ -56,15 +56,6 @@
#define GDICT_SIDEBAR_STRATEGIES_PAGE "strat-chooser"
#define GDICT_SIDEBAR_SOURCES_PAGE "source-chooser"
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
-#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
-#endif
-
-#if !GTK_CHECK_VERSION(3,0,0)
-#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
-#endif
-
enum
{
COMPLETION_TEXT_COLUMN,
@@ -197,11 +188,7 @@ 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;
}
@@ -1618,82 +1605,6 @@ gdict_window_size_allocate (GtkWidget *widget,
allocation);
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
-static void
-set_window_default_size (GdictWindow *window)
-{
- GtkWidget *widget;
- gboolean is_maximized;
- gint width, height;
- gint font_size;
- GdkScreen *screen;
- gint monitor_num;
- GtkRequisition req;
- GdkRectangle monitor;
-
- g_assert (GDICT_IS_WINDOW (window));
-
- widget = GTK_WIDGET (window);
-
- /* make sure that the widget is realized */
- /*Do this implicitly in GTK3.21 or segfault results */
- gtk_widget_realize (widget);
- /* XXX - the user wants mate-dictionary to resize itself, so
- * we compute the minimum safe geometry needed for displaying
- * the text returned by a dictionary server, which is based
- * on the font size and the ANSI terminal. this is dumb,
- * I know, but dictionary servers return pre-formatted text
- * and we can't reformat it ourselves.
- */
- if (window->default_width == -1 || window->default_height == -1)
- {
- /* Size based on the font size */
- GtkWidget *defbox = window->defbox;
- gint width, height;
-
- font_size = pango_font_description_get_size (gtk_widget_get_style (defbox)->font_desc);
- font_size = PANGO_PIXELS (font_size);
-
- width = font_size * GDICT_WINDOW_COLUMNS;
- height = font_size * GDICT_WINDOW_ROWS;
-
- /* Use at least the requisition size of the window... */
- gtk_widget_get_preferred_size (widget, NULL, &req);
- width = MAX (width, req.width);
- height = MAX (height, req.height);
-
- /* ... but make it no larger than the monitor */
- screen = gtk_widget_get_screen (widget);
- monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
-
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
- width = MIN (width, monitor.width * 3 / 4);
- height = MIN (height, monitor.height * 3 / 4);
-
- window->default_width = width;
- window->default_height = height;
- }
-
- /* Set default size */
- gtk_window_set_default_size (GTK_WINDOW (widget),
- window->default_width,
- window->default_height);
-
- if (window->is_maximized)
- gtk_window_maximize (GTK_WINDOW (widget));
-}
-
-static void
-gdict_window_style_set (GtkWidget *widget,
- GtkStyle *old_style)
-{
-
- if (GTK_WIDGET_CLASS (gdict_window_parent_class)->style_set)
- GTK_WIDGET_CLASS (gdict_window_parent_class)->style_set (widget, old_style);
-
- set_window_default_size (GDICT_WINDOW (widget));
-}
-#endif
static void
gdict_window_handle_notify_position_cb (GtkWidget *widget,
GParamSpec *pspec,
@@ -1740,11 +1651,7 @@ gdict_window_constructor (GType type,
/* recover the state */
gdict_window_load_state (window);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_push_composite_child ();
-#endif
-
- window->main_box = gtk_vbox_new (FALSE, 0);
+ window->main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), window->main_box);
gtk_widget_show (window->main_box);
@@ -1783,12 +1690,12 @@ gdict_window_constructor (GType type,
gdict_window_ensure_menu_state (window);
}
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (window->main_box), vbox);
gtk_widget_show (vbox);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
@@ -1822,16 +1729,12 @@ gdict_window_constructor (GType type,
gtk_box_pack_start (GTK_BOX (hbox), window->entry, TRUE, TRUE, 0);
gtk_widget_show (window->entry);
-#if GTK_CHECK_VERSION (3, 0, 0)
handle = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
-#else
- handle = gtk_hpaned_new ();
-#endif
gtk_box_pack_start (GTK_BOX (vbox), handle, TRUE, TRUE, 0);
gtk_widget_show (handle);
- frame1 = gtk_vbox_new (FALSE, 0);
- frame2 = gtk_vbox_new (FALSE, 0);
+ frame1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ frame2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
window->defbox = gdict_defbox_new ();
if (window->context)
@@ -2016,10 +1919,6 @@ gdict_window_constructor (GType type,
gtk_widget_grab_focus (window->entry);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_pop_composite_child ();
-#endif
-
window->in_construction = FALSE;
return object;
@@ -2120,9 +2019,6 @@ gdict_window_class_init (GdictWindowClass *klass)
LAST_PROP,
gdict_window_properties);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- widget_class->style_set = gdict_window_style_set;
-#endif
widget_class->size_allocate = gdict_window_size_allocate;
}