summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--NEWS3
-rw-r--r--configure.ac38
-rw-r--r--cut-n-paste/toolbar-editor/egg-editable-toolbar.c39
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.c109
-rw-r--r--data/eom.pc.in2
-rw-r--r--plugins/statusbar-date/eom-statusbar-date-plugin.c2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/eom-close-confirmation-dialog.c23
-rw-r--r--src/eom-dialog.h1
-rw-r--r--src/eom-error-message-area.c13
-rw-r--r--src/eom-exif-details.c4
-rw-r--r--src/eom-file-chooser.c7
-rw-r--r--src/eom-plugin-manager.c21
-rw-r--r--src/eom-print-image-setup.c120
-rw-r--r--src/eom-print-image-setup.h8
-rw-r--r--src/eom-print-preview.c49
-rw-r--r--src/eom-scroll-view.c88
-rw-r--r--src/eom-scroll-view.h8
-rw-r--r--src/eom-sidebar.c43
-rw-r--r--src/eom-sidebar.h8
-rw-r--r--src/eom-statusbar.c9
-rw-r--r--src/eom-thumb-nav.c33
-rw-r--r--src/eom-thumb-nav.h8
-rw-r--r--src/eom-thumb-view.c54
-rw-r--r--src/eom-window.c77
-rw-r--r--src/main.c18
-rw-r--r--src/zoom.c2
28 files changed, 35 insertions, 757 deletions
diff --git a/Makefile.am b/Makefile.am
index aaabc08..5272576 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,8 +21,7 @@ DISTCLEANFILES = \
DISTCHECK_CONFIGURE_FLAGS = \
--disable-schemas-install \
- --enable-gtk-doc \
- --with-gtk=$(GTK_API_VERSION)
+ --enable-gtk-doc
distuninstallcheck_listfiles = find . -type f -print | grep -v /share/mate/help/ | grep -v \.omf
diff --git a/NEWS b/NEWS
index 9026c00..f586cc4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+eom 1.17.0
+==========
+
eom 1.16.0
==========
diff --git a/configure.ac b/configure.ac
index 6bf5540..90f53c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ(2.59)
AC_CONFIG_MACRO_DIR([m4])
m4_define(eom_major_version, 1)
-m4_define(eom_minor_version, 16)
+m4_define(eom_minor_version, 17)
m4_define(eom_micro_version, 0)
m4_define(eom_version, eom_major_version.eom_minor_version.eom_micro_version)
@@ -90,37 +90,16 @@ YELP_HELP_INIT
# MATE Libs
# **********
-AC_MSG_CHECKING([which gtk+ version to compile against])
-AC_ARG_WITH([gtk],
- [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
- [case "$with_gtk" in
- 2.0|3.0) ;;
- *) AC_MSG_ERROR([invalid gtk version specified]) ;;
- esac],
- [with_gtk=2.0])
-AC_MSG_RESULT([$with_gtk])
-
-case "$with_gtk" in
- 2.0) GTK_API_VERSION=2.0
- GTK_REQUIRED=2.18.0
- GTK_PRINT_REQUIRED=2.10.0
- ;;
- 3.0) GTK_API_VERSION=3.0
- GTK_REQUIRED=3.0.0
- GTK_PRINT_REQUIRED=3.0.0
- ;;
-esac
-AC_SUBST(GTK_API_VERSION)
-
GLIB_REQUIRED=2.36.0
GIO_REQUIRED=2.36.0
-MATE_DESKTOP_REQUIRED=1.9.1
+GTK_REQUIRED=3.14.0
+MATE_DESKTOP_REQUIRED=1.17.0
GDKPIXBUF_REQUIRED=2.30.0
SHARED_MIME_INFO_REQUIRED=0.20
EXEMPI_REQUIRED=1.99.5
PKG_CHECK_MODULES(GMODULE, gmodule-2.0, [GMODULE_ADD="gmodule-2.0"],[GMODULE_ADD=""])
-EOM_MODULES="gtk+-$GTK_API_VERSION >= $GTK_REQUIRED \
+EOM_MODULES="gtk+-3.0 >= $GTK_REQUIRED \
glib-2.0 >= $GLIB_REQUIRED \
$GMODULE_ADD \
gio-2.0 >= $GLIB_REQUIRED \
@@ -129,7 +108,7 @@ EOM_MODULES="gtk+-$GTK_API_VERSION >= $GTK_REQUIRED \
mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED \
gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED \
gio-2.0 >= $GIO_REQUIRED \
- gtk+-unix-print-$GTK_API_VERSION >= $GTK_PRINT_REQUIRED \
+ gtk+-unix-print-3.0 >= $GTK_REQUIRED \
shared-mime-info >= $SHARED_MIME_INFO_REQUIRED"
# Introspection
@@ -345,11 +324,7 @@ AC_SUBST(EOM_LIBS)
# *******************************************************
# Check GDK rendering target
-if test "${GTK_API_VERSION}" = "2.0" ; then
- gdk_target_has_x11=`$PKG_CONFIG --variable=target gdk-${GTK_API_VERSION} | grep x11`
-else
- gdk_target_has_x11=`$PKG_CONFIG --variable=targets gdk-${GTK_API_VERSION} | grep x11`
-fi
+gdk_target_has_x11=`$PKG_CONFIG --variable=targets gdk-3.0 | grep x11`
if test "x$have_lcms" = "xyes" || test "$gdk_target_has_x11" != ""; then
PKG_CHECK_MODULES(X11, [x11], have_x11=yes, have_x11=no)
@@ -413,7 +388,6 @@ Configure summary:
Compiler ...................: ${CC}
Extra Compiler Warnings ....: ${WARN_CFLAGS}
- GTK version ................: ${GTK_API_VERSION}
EXIF support ...............: ${have_exif}
XMP support ................: ${have_exempi}
JPEG support ...............: ${have_jpeg}
diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
index bcc3cfb..66e40cd 100644
--- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
+++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
@@ -35,11 +35,6 @@ static GdkPixbuf * new_separator_pixbuf (void);
#define EGG_ITEM_NAME "egg-item-name"
#define STOCK_DRAG_MODE "stock_drag-mode"
-#if GTK_CHECK_VERSION (3, 2, 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
-
static const GtkTargetEntry dest_drag_types[] = {
{EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
};
@@ -86,11 +81,7 @@ struct _EggEditableToolbarPrivate
GtkToolItem *dnd_toolitem;
};
-#if GTK_CHECK_VERSION (3, 0, 0)
G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_BOX)
-#else
-G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_VBOX);
-#endif
static int
get_dock_position (EggEditableToolbar *etoolbar,
@@ -434,11 +425,7 @@ configure_item_cursor (GtkToolItem *item,
cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen),
GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);
-#else
- gdk_cursor_unref (cursor);
-#endif
gtk_drag_source_set (widget, GDK_BUTTON1_MASK, dest_drag_types,
G_N_ELEMENTS (dest_drag_types), GDK_ACTION_MOVE);
@@ -467,24 +454,13 @@ configure_item_cursor (GtkToolItem *item,
{
GdkScreen *screen;
GtkIconTheme *icon_theme;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GtkSettings *settings;
-#endif
gint width, height;
screen = gtk_widget_get_screen (widget);
icon_theme = gtk_icon_theme_get_for_screen (screen);
-#if GTK_CHECK_VERSION (3, 0, 0)
if (!gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR,
&width, &height))
-#else
- settings = gtk_settings_get_for_screen (screen);
-
- if (!gtk_icon_size_lookup_for_settings (settings,
- GTK_ICON_SIZE_LARGE_TOOLBAR,
- &width, &height))
-#endif
{
width = height = 24;
}
@@ -997,7 +973,7 @@ create_dock (EggEditableToolbar *etoolbar)
{
GtkWidget *toolbar, *hbox;
- hbox = gtk_hbox_new (0, FALSE);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
toolbar = gtk_toolbar_new ();
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
@@ -1347,10 +1323,8 @@ egg_editable_toolbar_set_model (EggEditableToolbar *etoolbar,
static void
egg_editable_toolbar_init (EggEditableToolbar *etoolbar)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_orientable_set_orientation (GTK_ORIENTABLE (etoolbar),
GTK_ORIENTATION_VERTICAL);
-#endif
EggEditableToolbarPrivate *priv;
@@ -1760,16 +1734,9 @@ new_pixbuf_from_widget (GtkWidget *widget)
screen = gtk_widget_get_screen (widget);
-#if GTK_CHECK_VERSION (3, 0, 0)
if (!gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR,
NULL,
&icon_height))
-#else
- if (!gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
- GTK_ICON_SIZE_LARGE_TOOLBAR,
- NULL,
- &icon_height))
-#endif
{
icon_height = DEFAULT_ICON_HEIGHT;
}
@@ -1794,11 +1761,7 @@ new_separator_pixbuf (void)
GtkWidget *separator;
GdkPixbuf *pixbuf;
-#if GTK_CHECK_VERSION(3, 0, 0)
separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
-#else
- separator = gtk_vseparator_new ();
-#endif
pixbuf = new_pixbuf_from_widget (separator);
return pixbuf;
}
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
index 407738d..a9b58d9 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
@@ -28,11 +28,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#if GTK_CHECK_VERSION (3, 2, 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
-
static const GtkTargetEntry dest_drag_types[] = {
{EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
};
@@ -67,11 +62,7 @@ struct EggToolbarEditorPrivate
GtkUIManager *manager;
EggToolbarsModel *model;
-#if GTK_CHECK_VERSION (3, 4, 0)
GtkWidget *grid;
-#else
- GtkWidget *table;
-#endif
GtkWidget *scrolled_window;
GList *actions_list;
GList *factory_list;
@@ -80,11 +71,7 @@ struct EggToolbarEditorPrivate
gulong sig_handlers[SIGNAL_HANDLER_LIST_SIZE];
};
-#if GTK_CHECK_VERSION (3, 0, 0)
G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_BOX)
-#else
-G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_VBOX);
-#endif
static gint
compare_items (gconstpointer a,
@@ -381,11 +368,7 @@ set_drag_cursor (GtkWidget *widget)
cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen),
GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);
-#else
- gdk_cursor_unref (cursor);
-#endif
}
static void
@@ -412,26 +395,15 @@ event_box_realize_cb (GtkWidget *widget, GtkImage *icon)
const gchar *icon_name;
GdkScreen *screen;
GtkIconTheme *icon_theme;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GtkSettings *settings;
-#endif
gint width, height;
GdkPixbuf *pixbuf;
gtk_image_get_icon_name (icon, &icon_name, NULL);
screen = gtk_widget_get_screen (widget);
icon_theme = gtk_icon_theme_get_for_screen (screen);
-#if GTK_CHECK_VERSION (3, 0, 0)
if (!gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR,
&width, &height))
-#else
- settings = gtk_settings_get_for_screen (screen);
-
- if (!gtk_icon_size_lookup_for_settings (settings,
- GTK_ICON_SIZE_LARGE_TOOLBAR,
- &width, &height))
-#endif
{
width = height = 24;
}
@@ -482,7 +454,7 @@ editor_create_item (EggToolbarEditor *editor,
G_CALLBACK (drag_end_cb), NULL);
}
- vbox = gtk_vbox_new (0, FALSE);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (event_box), vbox);
@@ -560,7 +532,6 @@ editor_create_item_from_name (EggToolbarEditor *editor,
}
static gint
-#if GTK_CHECK_VERSION (3, 4, 0)
append_grid (GtkGrid *grid, GList *items, gint y, gint width)
{
if (items != NULL)
@@ -571,11 +542,7 @@ append_grid (GtkGrid *grid, GList *items, gint y, gint width)
if (y > 0)
{
-#if GTK_CHECK_VERSION(3, 0, 0)
item = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
-#else
- item = gtk_hseparator_new ();
-#endif
alignment = gtk_alignment_new (0.5, 0.5, 1.0, 0.0);
g_object_set (G_OBJECT (alignment), "expand", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (alignment), item);
@@ -608,51 +575,6 @@ append_grid (GtkGrid *grid, GList *items, gint y, gint width)
}
return y;
}
-#else
-append_table (GtkTable *table, GList *items, gint y, gint width)
-{
- if (items != NULL)
- {
- gint x = 0, height;
- GtkWidget *alignment;
- GtkWidget *item;
-
- height = g_list_length (items) / width + 1;
- gtk_table_resize (table, height, width);
-
- if (y > 0)
- {
- item = gtk_hseparator_new ();
- alignment = gtk_alignment_new (0.5, 0.5, 1.0, 0.0);
- gtk_container_add (GTK_CONTAINER (alignment), item);
- gtk_widget_show (alignment);
- gtk_widget_show (item);
-
- gtk_table_attach_defaults (table, alignment, 0, width, y-1, y+1);
- }
-
- for (; items != NULL; items = items->next)
- {
- item = items->data;
- alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (alignment), item);
- gtk_widget_show (alignment);
- gtk_widget_show (item);
-
- if (x >= width)
- {
- x = 0;
- y++;
- }
- gtk_table_attach_defaults (table, alignment, x, x+1, y, y+1);
- x++;
- }
-
- y++;
- }
- return y;
-}
-#endif
static void
update_editor_sheet (EggToolbarEditor *editor)
@@ -660,7 +582,6 @@ update_editor_sheet (EggToolbarEditor *editor)
gint y;
GPtrArray *items;
GList *to_move = NULL, *to_copy = NULL;
-#if GTK_CHECK_VERSION (3, 4, 0)
GtkWidget *grid;
GtkWidget *viewport;
@@ -673,20 +594,6 @@ update_editor_sheet (EggToolbarEditor *editor)
gtk_grid_set_row_spacing (GTK_GRID (grid), 24);
gtk_widget_show (grid);
gtk_drag_dest_set (grid, GTK_DEST_DEFAULT_ALL,
-#else
- GtkWidget *table;
- GtkWidget *viewport;
-
- g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (editor));
-
- /* Create new table. */
- table = gtk_table_new (0, 0, TRUE);
- editor->priv->table = table;
- gtk_container_set_border_width (GTK_CONTAINER (table), 12);
- gtk_table_set_row_spacings (GTK_TABLE (table), 24);
- gtk_widget_show (table);
- gtk_drag_dest_set (table, GTK_DEST_DEFAULT_ALL,
-#endif
dest_drag_types, G_N_ELEMENTS (dest_drag_types),
GDK_ACTION_MOVE | GDK_ACTION_COPY);
@@ -718,13 +625,8 @@ update_editor_sheet (EggToolbarEditor *editor)
/* Add them to the sheet. */
y = 0;
-#if GTK_CHECK_VERSION (3, 4, 0)
y = append_grid (GTK_GRID (grid), to_move, y, 4);
y = append_grid (GTK_GRID (grid), to_copy, y, 4);
-#else
- y = append_table (GTK_TABLE (table), to_move, y, 4);
- y = append_table (GTK_TABLE (table), to_copy, y, 4);
-#endif
g_list_free (to_move);
g_list_free (to_copy);
@@ -738,16 +640,9 @@ update_editor_sheet (EggToolbarEditor *editor)
gtk_bin_get_child (GTK_BIN (viewport)));
}
-#if GTK_CHECK_VERSION (3, 0, 0)
/* Add grid to window. */
gtk_container_add
(GTK_CONTAINER (editor->priv->scrolled_window), grid);
-#else
- /* Add table to window. */
- gtk_scrolled_window_add_with_viewport
- (GTK_SCROLLED_WINDOW (editor->priv->scrolled_window), table);
-#endif
-
}
static void
@@ -755,10 +650,8 @@ setup_editor (EggToolbarEditor *editor)
{
GtkWidget *scrolled_window;
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
GTK_ORIENTATION_VERTICAL);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
diff --git a/data/eom.pc.in b/data/eom.pc.in
index 0ffa8f2..ad40ec4 100644
--- a/data/eom.pc.in
+++ b/data/eom.pc.in
@@ -6,6 +6,6 @@ pluginsdir=@libdir@/eom/plugins
Name: Eye of MATE
Description: The MATE Image Viewer
-Requires: gtk+-@GTK_API_VERSION@, gio-2.0
+Requires: gtk+-3.0, gio-2.0
Version: @VERSION@
Cflags: -I${includedir}
diff --git a/plugins/statusbar-date/eom-statusbar-date-plugin.c b/plugins/statusbar-date/eom-statusbar-date-plugin.c
index 7862adb..ee0e648 100644
--- a/plugins/statusbar-date/eom-statusbar-date-plugin.c
+++ b/plugins/statusbar-date/eom-statusbar-date-plugin.c
@@ -125,10 +125,8 @@ static void impl_activate(EomPlugin* plugin, EomWindow* window)
data = g_new(WindowData, 1);
data->statusbar_date = gtk_statusbar_new();
gtk_widget_set_size_request(data->statusbar_date, 200, 10);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_margin_top (GTK_WIDGET (data->statusbar_date), 0);
gtk_widget_set_margin_bottom (GTK_WIDGET (data->statusbar_date), 0);
-#endif
gtk_box_pack_end(GTK_BOX(statusbar), data->statusbar_date, FALSE, FALSE, 0);
data->signal_id = g_signal_connect_after(G_OBJECT(thumbview), "selection_changed", G_CALLBACK(selection_changed_cb), data);
diff --git a/src/Makefile.am b/src/Makefile.am
index 884b955..1a09b57 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -215,7 +215,7 @@ INTROSPECTION_GIRS = Eom-1.0.gir
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all $(libeom_la_CPPFLAGS)
Eom-1.0.gir: eom
-Eom_1_0_gir_INCLUDES = Gtk-${GTK_API_VERSION}
+Eom_1_0_gir_INCLUDES = Gtk-3.0
Eom_1_0_gir_FILES = $(INST_H_FILES) $(libeom_c_files) $(BUILT_SOURCES)
Eom_1_0_gir_VERSION = 1.0
Eom_1_0_gir_PROGRAM = $(builddir)/eom
diff --git a/src/eom-close-confirmation-dialog.c b/src/eom-close-confirmation-dialog.c
index 2251fee..322e805 100644
--- a/src/eom-close-confirmation-dialog.c
+++ b/src/eom-close-confirmation-dialog.c
@@ -33,11 +33,6 @@
#include "eom-close-confirmation-dialog.h"
#include <eom-window.h>
-#if GTK_CHECK_VERSION (3, 2, 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
-
/* Properties */
enum
{
@@ -399,11 +394,7 @@ build_single_img_dialog (EomCloseConfirmationDialog *dlg)
/* Image */
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
-#else
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-#endif
/* Primary label */
primary_label = gtk_label_new (NULL);
@@ -439,12 +430,12 @@ build_single_img_dialog (EomCloseConfirmationDialog *dlg)
#endif
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 12);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
@@ -595,7 +586,7 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg)
priv = dlg->priv;
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
hbox, TRUE, TRUE, 0);
@@ -603,14 +594,10 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg)
/* Image */
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
-#else
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-#endif
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 12);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
/* Primary label */
@@ -639,7 +626,7 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg)
g_free (markup_str);
gtk_box_pack_start (GTK_BOX (vbox), primary_label, FALSE, FALSE, 0);
- vbox2 = gtk_vbox_new (FALSE, 8);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
select_label = gtk_label_new_with_mnemonic (_("S_elect the images you want to save:"));
diff --git a/src/eom-dialog.h b/src/eom-dialog.h
index b9f7a52..d2b92ac 100644
--- a/src/eom-dialog.h
+++ b/src/eom-dialog.h
@@ -24,7 +24,6 @@
#include <glib.h>
#include <glib-object.h>
-#include <gtk/gtk.h>
G_BEGIN_DECLS
diff --git a/src/eom-error-message-area.c b/src/eom-error-message-area.c
index 5602702..d1ecf65 100644
--- a/src/eom-error-message-area.c
+++ b/src/eom-error-message-area.c
@@ -35,11 +35,6 @@
#include <glib-object.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION (3, 2, 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
-
static void
set_message_area_text_and_icon (GtkInfoBar *message_area,
const gchar *icon_stock_id,
@@ -54,19 +49,15 @@ set_message_area_text_and_icon (GtkInfoBar *message_area,
GtkWidget *primary_label;
GtkWidget *secondary_label;
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (hbox_content);
image = gtk_image_new_from_stock (icon_stock_id, GTK_ICON_SIZE_DIALOG);
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
-#else
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
-#endif
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_show (vbox);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
diff --git a/src/eom-exif-details.c b/src/eom-exif-details.c
index 5a9aff7..bbc9aca 100644
--- a/src/eom-exif-details.c
+++ b/src/eom-exif-details.c
@@ -260,10 +260,6 @@ eom_exif_details_init (EomExifDetails *exif_details)
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (exif_details), column);
-#if !GTK_CHECK_VERSION (3, 14, 0)
- gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (exif_details), TRUE);
-#endif
-
eom_exif_details_reset (exif_details);
gtk_tree_view_set_model (GTK_TREE_VIEW (exif_details),
diff --git a/src/eom-file-chooser.c b/src/eom-file-chooser.c
index 62e7ea9..e14df54 100644
--- a/src/eom-file-chooser.c
+++ b/src/eom-file-chooser.c
@@ -45,11 +45,6 @@ static char *last_dir[] = { NULL, NULL, NULL, NULL };
EOM_TYPE_FILE_CHOOSER, \
EomFileChooserPrivate))
-#if GTK_CHECK_VERSION (3, 2, 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
-
struct _EomFileChooserPrivate
{
MateDesktopThumbnailFactory *thumb_factory;
@@ -395,7 +390,7 @@ eom_file_chooser_add_preview (GtkWidget *widget)
priv = EOM_FILE_CHOOSER (widget)->priv;
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
priv->image = gtk_image_new ();
diff --git a/src/eom-plugin-manager.c b/src/eom-plugin-manager.c
index 2394a5f..5828e3a 100644
--- a/src/eom-plugin-manager.c
+++ b/src/eom-plugin-manager.c
@@ -46,11 +46,7 @@ enum {
#define EOM_PLUGIN_MANAGER_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_PLUGIN_MANAGER, EomPluginManagerPrivate))
-#if GTK_CHECK_VERSION (3, 0, 0)
G_DEFINE_TYPE (EomPluginManager, eom_plugin_manager, GTK_TYPE_BOX)
-#else
-G_DEFINE_TYPE (EomPluginManager, eom_plugin_manager, GTK_TYPE_VBOX)
-#endif
#define PLUGIN_MANAGER_NAME_TITLE _("Plugin")
#define PLUGIN_MANAGER_ACTIVE_TITLE _("Enabled")
@@ -570,11 +566,7 @@ menu_position_under_widget (GtkMenu *menu,
GtkAllocation allocation;
gdk_window_get_origin (gtk_widget_get_window (w), x, y);
-#if GTK_CHECK_VERSION(3, 0, 0)
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL);
-#else
- gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
-#endif
gtk_widget_get_allocation (w, &allocation);
if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL) {
@@ -629,11 +621,7 @@ menu_position_under_tree_view (GtkMenu *menu,
if (gtk_widget_get_direction (GTK_WIDGET (tree)) == GTK_TEXT_DIR_RTL) {
GtkRequisition requisition;
-#if GTK_CHECK_VERSION(3, 0, 0)
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL);
-#else
- gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
-#endif
*x += rect.width - requisition.width;
}
@@ -750,9 +738,6 @@ plugin_manager_construct_tree (EomPluginManager *pm)
g_object_unref (model);
-#if !GTK_CHECK_VERSION (3, 14, 0)
- gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (pm->priv->tree), TRUE);
-#endif
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (pm->priv->tree), FALSE);
/* First column */
@@ -841,10 +826,8 @@ eom_plugin_manager_init (EomPluginManager *pm)
eom_debug (DEBUG_PLUGINS);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_orientable_set_orientation (GTK_ORIENTABLE (pm),
GTK_ORIENTATION_VERTICAL);
-#endif
pm->priv = EOM_PLUGIN_MANAGER_GET_PRIVATE (pm);
@@ -876,11 +859,7 @@ eom_plugin_manager_init (EomPluginManager *pm)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), pm->priv->tree);
-#if GTK_CHECK_VERSION(3, 0, 0)
hbuttonbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
-#else
- hbuttonbox = gtk_hbutton_box_new ();
-#endif
gtk_box_pack_start (GTK_BOX (pm), hbuttonbox, FALSE, FALSE, 0);
diff --git a/src/eom-print-image-setup.c b/src/eom-print-image-setup.c
index 59f075a..0e7b43d 100644
--- a/src/eom-print-image-setup.c
+++ b/src/eom-print-image-setup.c
@@ -51,16 +51,7 @@
#define EOM_PRINT_IMAGE_SETUP_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_PRINT_IMAGE_SETUP, EomPrintImageSetupPrivate))
-#if GTK_CHECK_VERSION (3, 2, 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, 4, 0)
G_DEFINE_TYPE (EomPrintImageSetup, eom_print_image_setup, GTK_TYPE_GRID);
-#else
-G_DEFINE_TYPE (EomPrintImageSetup, eom_print_image_setup, GTK_TYPE_TABLE);
-#endif
struct _EomPrintImageSetupPrivate {
GtkWidget *left;
@@ -648,55 +639,30 @@ static GtkWidget *
wrap_in_frame (const gchar *label,
GtkWidget *child)
{
-#if GTK_CHECK_VERSION (3, 14, 0)
GtkWidget *frame, *label_widget;
-#else
- GtkWidget *frame, *alignment, *label_widget;
-#endif
gchar *bold_text;
label_widget = gtk_label_new ("");
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (label_widget, GTK_ALIGN_START);
-#else
- gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
-#endif
gtk_widget_show (label_widget);
bold_text = g_markup_printf_escaped ("<b>%s</b>", label);
gtk_label_set_markup (GTK_LABEL (label_widget), bold_text);
g_free (bold_text);
- frame = gtk_vbox_new (FALSE, 6);
+ frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (frame), label_widget, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION (3, 14, 0)
gtk_box_pack_start (GTK_BOX (frame), child, FALSE, FALSE, 0);
gtk_widget_set_margin_start (child, 12);
gtk_widget_show (frame);
-#else
-
- alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
- 0, 0, 12, 0);
- gtk_box_pack_start (GTK_BOX (frame), alignment, FALSE, FALSE, 0);
-
- gtk_container_add (GTK_CONTAINER (alignment), child);
-
- gtk_widget_show (frame);
- gtk_widget_show (alignment);
-#endif
return frame;
}
static GtkWidget *
-#if GTK_CHECK_VERSION (3, 4, 0)
grid_attach_spin_button_with_label (GtkWidget *grid,
-#else
-table_attach_spin_button_with_label (GtkWidget *table,
-#endif
const gchar* text_label,
gint left, gint top)
{
@@ -711,16 +677,9 @@ table_attach_spin_button_with_label (GtkWidget *table,
spin_button = gtk_spin_button_new_with_range (0, 100, 0.01);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (spin_button), 2);
gtk_entry_set_width_chars (GTK_ENTRY (spin_button), 6);
-#if GTK_CHECK_VERSION (3, 4, 0)
gtk_grid_attach (GTK_GRID (grid), label, left, top, 1, 1);
gtk_grid_attach_next_to (GTK_GRID (grid), spin_button, label,
GTK_POS_RIGHT, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), label, left, left + 1,
- top, top + 1, GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach (GTK_TABLE (table), spin_button, left + 1, left + 2,
- top, top + 1, GTK_FILL, GTK_FILL, 0, 0);
-#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin_button);
return spin_button;
@@ -889,11 +848,7 @@ static void
eom_print_image_setup_init (EomPrintImageSetup *setup)
{
GtkWidget *frame;
-#if GTK_CHECK_VERSION (3, 4, 0)
GtkWidget *grid;
-#else
- GtkWidget *table;
-#endif
GtkWidget *label;
GtkWidget *hscale;
GtkWidget *combobox;
@@ -907,7 +862,6 @@ eom_print_image_setup_init (EomPrintImageSetup *setup)
priv->image = NULL;
-#if GTK_CHECK_VERSION (3, 4, 0)
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
@@ -921,20 +875,6 @@ eom_print_image_setup_init (EomPrintImageSetup *setup)
priv->top = grid_attach_spin_button_with_label (grid, _("_Top:"), 2, 0);
priv->bottom = grid_attach_spin_button_with_label (grid, _("_Bottom:"),
2, 1);
-#else
- table = gtk_table_new (3, 4, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 6);
- gtk_table_set_col_spacings (GTK_TABLE (table), 12);
- frame = wrap_in_frame (_("Position"), table);
- gtk_table_attach (GTK_TABLE (setup), frame,
- 0, 1, 0, 1, GTK_FILL, 0,
- 0, 0);
-
- priv->left = table_attach_spin_button_with_label (table, _("_Left:"), 0, 0);
- priv->right = table_attach_spin_button_with_label (table, _("_Right:"), 0, 1);
- priv->top = table_attach_spin_button_with_label (table, _("_Top:"), 2, 0);
- priv->bottom = table_attach_spin_button_with_label (table, _("_Bottom:"), 2, 1);
-#endif
label = gtk_label_new_with_mnemonic (_("C_enter:"));
#if GTK_CHECK_VERSION (3, 16, 0)
@@ -953,27 +893,17 @@ eom_print_image_setup_init (EomPrintImageSetup *setup)
gtk_combo_box_text_insert_text (GTK_COMBO_BOX_TEXT (combobox),
CENTER_BOTH, _("Both"));
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), CENTER_NONE);
-#if GTK_CHECK_VERSION (3, 4, 0)
/* Attach combobox below right margin spinbutton and span until end */
gtk_grid_attach_next_to (GTK_GRID (grid), combobox, priv->right,
GTK_POS_BOTTOM, 3, 1);
/* Attach the label to the left of the combobox */
gtk_grid_attach_next_to (GTK_GRID (grid), label, combobox, GTK_POS_LEFT,
1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 2, 3, GTK_FILL, GTK_FILL,
- 0, 0);
- gtk_table_attach (GTK_TABLE (table), combobox,
- 1, 4, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL,
- 0, 0);
-#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox);
priv->center = combobox;
g_signal_connect (G_OBJECT (combobox), "changed",
G_CALLBACK (on_center_changed), setup);
-#if GTK_CHECK_VERSION (3, 4, 0)
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
@@ -984,42 +914,15 @@ eom_print_image_setup_init (EomPrintImageSetup *setup)
0, 0);
priv->height = grid_attach_spin_button_with_label (grid, _("_Height:"),
2, 0);
-#else
- table = gtk_table_new (3, 4, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 6);
- gtk_table_set_col_spacings (GTK_TABLE (table), 12);
- frame = wrap_in_frame (_("Size"), table);
- gtk_table_attach (GTK_TABLE (setup), frame,
- 0, 1, 1, 2, GTK_FILL, 0,
- 0, 0);
-
- priv->width = table_attach_spin_button_with_label (table, _("_Width:"),
- 0, 0);
- priv->height = table_attach_spin_button_with_label (table, _("_Height:"),
- 2, 0);
-#endif
label = gtk_label_new_with_mnemonic (_("_Scaling:"));
-#if GTK_CHECK_VERSION (3, 0, 0)
hscale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, 1, 100, 1);
-#else
- hscale = gtk_hscale_new_with_range (1, 100, 1);
-#endif
gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_RIGHT);
gtk_range_set_value (GTK_RANGE (hscale), 100);
-#if GTK_CHECK_VERSION (3, 4, 0)
gtk_grid_attach_next_to (GTK_GRID (grid), hscale, priv->width,
GTK_POS_BOTTOM, 3, 1);
gtk_grid_attach_next_to (GTK_GRID (grid), label, hscale, GTK_POS_LEFT,
1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 1, 2, GTK_FILL, GTK_FILL,
- 0, 0);
- gtk_table_attach (GTK_TABLE (table), hscale,
- 1, 4, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL,
- 0, 0);
-#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), hscale);
priv->scaling = hscale;
@@ -1048,19 +951,10 @@ eom_print_image_setup_init (EomPrintImageSetup *setup)
set_scale_unit (setup, GTK_UNIT_MM);
}
-#if GTK_CHECK_VERSION (3, 4, 0)
gtk_grid_attach_next_to (GTK_GRID (grid), combobox, hscale,
GTK_POS_BOTTOM, 3, 1);
gtk_grid_attach_next_to (GTK_GRID (grid), label, combobox, GTK_POS_LEFT,
1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 2, 3, GTK_FILL, GTK_FILL,
- 0, 0);
- gtk_table_attach (GTK_TABLE (table), combobox,
- 1, 4, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL,
- 0, 0);
-#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox);
priv->unit = combobox;
g_signal_connect (G_OBJECT (combobox), "changed",
@@ -1072,14 +966,8 @@ eom_print_image_setup_init (EomPrintImageSetup *setup)
gtk_widget_set_size_request (priv->preview, 250, 250);
frame = wrap_in_frame (_("Preview"), priv->preview);
-#if GTK_CHECK_VERSION (3, 4, 0)
/* The preview widget needs to span the whole grid height */
gtk_grid_attach (GTK_GRID (setup), frame, 1, 0, 1, 2);
-#else
- gtk_table_attach (GTK_TABLE (setup), frame,
- 1, 2, 0, 2, GTK_FILL, GTK_FILL,
- 0, 0);
-#endif
gtk_widget_show_all (GTK_WIDGET (setup));
}
@@ -1104,13 +992,7 @@ eom_print_image_setup_new (EomImage *image, GtkPageSetup *page_setup)
GtkWidget *preview;
setup = g_object_new (EOM_TYPE_PRINT_IMAGE_SETUP,
-#if GTK_CHECK_VERSION (3, 4, 0)
"orientation", GTK_ORIENTATION_VERTICAL,
-#else
- "n-rows", 2,
- "n-columns", 2,
- "homogeneous", FALSE,
-#endif
"row-spacing", 18,
"column-spacing", 18,
"border-width", 12,
diff --git a/src/eom-print-image-setup.h b/src/eom-print-image-setup.h
index 6915fcf..e7803b0 100644
--- a/src/eom-print-image-setup.h
+++ b/src/eom-print-image-setup.h
@@ -38,21 +38,13 @@ typedef struct _EomPrintImageSetupPrivate EomPrintImageSetupPrivate;
#define EOM_PRINT_IMAGE_SETUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EOM_TYPE_PRINT_IMAGE_SETUP, EomPrintImageSetupClass))
struct _EomPrintImageSetup {
-#if GTK_CHECK_VERSION (3, 4, 0)
GtkGrid parent_instance;
-#else
- GtkTable parent_instance;
-#endif
EomPrintImageSetupPrivate *priv;
};
struct _EomPrintImageSetupClass {
-#if GTK_CHECK_VERSION (3, 4, 0)
GtkGridClass parent_class;
-#else
- GtkTableClass parent_class;
-#endif
};
G_GNUC_INTERNAL
diff --git a/src/eom-print-preview.c b/src/eom-print-preview.c
index 7dc2a8a..4ede318 100644
--- a/src/eom-print-preview.c
+++ b/src/eom-print-preview.c
@@ -466,11 +466,7 @@ static gboolean button_release_event_cb (GtkWidget *widget, GdkEventButton *bev,
static gboolean motion_notify_event_cb (GtkWidget *widget, GdkEventMotion *mev, gpointer user_data);
static gboolean key_press_event_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_data);
-#if GTK_CHECK_VERSION (3, 0, 0)
static gboolean draw_cb (GtkDrawingArea *drawing_area, cairo_t *cr, gpointer user_data);
-#else
-static gboolean expose_event_cb (GtkDrawingArea *drawing_area, GdkEventExpose *eev, gpointer user_data);
-#endif
static void size_allocate_cb (GtkWidget *widget, GtkAllocation *allocation, gpointer user_data);
/**
@@ -531,11 +527,7 @@ eom_print_preview_new (void)
/* update_relative_sizes (preview); */
g_signal_connect (G_OBJECT (area),
-#if GTK_CHECK_VERSION (3, 0, 0)
"draw", G_CALLBACK (draw_cb),
-#else
- "expose-event", G_CALLBACK (expose_event_cb),
-#endif
preview);
g_signal_connect (G_OBJECT (area), "motion-notify-event",
@@ -557,22 +549,12 @@ eom_print_preview_new (void)
}
static gboolean
-#if GTK_CHECK_VERSION (3, 0, 0)
draw_cb (GtkDrawingArea *drawing_area,
cairo_t *cr,
-#else
-expose_event_cb (GtkDrawingArea *drawing_area,
- GdkEventExpose *eev,
-#endif
gpointer user_data)
{
update_relative_sizes (EOM_PRINT_PREVIEW (user_data));
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GtkWidget *widget = GTK_WIDGET (drawing_area);
- cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
-#endif
-
eom_print_preview_draw (EOM_PRINT_PREVIEW (user_data), cr);
if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) {
@@ -580,11 +562,6 @@ expose_event_cb (GtkDrawingArea *drawing_area,
cairo_status_to_string (cairo_status (cr)));
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
- cairo_destroy (cr);
- gdk_window_get_pointer (gtk_widget_get_window (widget), NULL, NULL, NULL);
-#endif
-
return TRUE;
}
@@ -969,11 +946,7 @@ motion_notify_event_cb (GtkWidget *widget,
GDK_FLEUR);
gdk_window_set_cursor (gtk_widget_get_window (widget),
cursor);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);
-#else
- gdk_cursor_unref (cursor);
-#endif
} else {
gdk_window_set_cursor (gtk_widget_get_window (widget),
NULL);
@@ -1009,11 +982,7 @@ eom_print_preview_draw (EomPrintPreview *preview, cairo_t *cr)
GtkWidget *area;
GtkAllocation allocation;
gint x0, y0;
-#if GTK_CHECK_VERSION (3, 4, 0)
GdkRGBA color;
-#else
- GtkStyle *style;
-#endif
gboolean has_focus;
priv = preview->priv;
@@ -1021,29 +990,17 @@ eom_print_preview_draw (EomPrintPreview *preview, cairo_t *cr)
has_focus = gtk_widget_has_focus (area);
-#if !GTK_CHECK_VERSION (3, 4, 0)
- style = gtk_widget_get_style (area);
-#endif
-
gtk_widget_get_allocation (area, &allocation);
/* draw the page */
-#if GTK_CHECK_VERSION (3, 4, 0)
gdk_rgba_parse (&color, "white");
gdk_cairo_set_source_rgba (cr, &color);
-#else
- gdk_cairo_set_source_color (cr, &style->white);
-#endif
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
cairo_fill (cr);
/* draw the page margins */
-#if GTK_CHECK_VERSION (3, 4, 0)
gdk_rgba_parse (&color, "black");
gdk_cairo_set_source_rgba (cr, &color);
-#else
- gdk_cairo_set_source_color (cr, &style->black);
-#endif
cairo_set_line_width (cr, 0.1);
cairo_rectangle (cr,
priv->l_rmargin, priv->t_rmargin,
@@ -1085,17 +1042,11 @@ eom_print_preview_draw (EomPrintPreview *preview, cairo_t *cr)
}
if (has_focus) {
-#if GTK_CHECK_VERSION(3, 0, 0)
GtkStyleContext *ctx;
ctx = gtk_widget_get_style_context (area);
gtk_render_focus (ctx, cr, 0, 0,
allocation.width, allocation.height);
-#else
- gtk_paint_focus (style, gtk_widget_get_window (area),
- GTK_STATE_NORMAL, NULL, NULL, NULL,
- 0, 0, allocation.width, allocation.height);
-#endif
}
}
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c
index 5ec6c57..914541d 100644
--- a/src/eom-scroll-view.c
+++ b/src/eom-scroll-view.c
@@ -160,11 +160,7 @@ static void view_on_drag_data_get_cb (GtkWidget *widget,
#define EOM_SCROLL_VIEW_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_SCROLL_VIEW, EomScrollViewPrivate))
-#if GTK_CHECK_VERSION (3, 4, 0)
G_DEFINE_TYPE (EomScrollView, eom_scroll_view, GTK_TYPE_GRID)
-#else
-G_DEFINE_TYPE (EomScrollView, eom_scroll_view, GTK_TYPE_TABLE)
-#endif
/*===================================
widget size changing handler &
@@ -384,11 +380,7 @@ eom_scroll_view_set_cursor (EomScrollView *view, EomScrollViewCursor new_cursor)
if (cursor) {
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);
-#else
- gdk_cursor_unref (cursor);
-#endif
gdk_flush();
}
}
@@ -424,15 +416,9 @@ check_scrollbar_visibility (EomScrollView *view, GtkAllocation *alloc)
compute_scaled_size (view, priv->zoom, &img_width, &img_height);
/* this should work fairly well in this special case for scrollbars */
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_get_preferred_size (priv->hbar, &req, NULL);
bar_height = req.height;
gtk_widget_get_preferred_size (priv->vbar, &req, NULL);
-#else
- gtk_widget_size_request (priv->hbar, &req);
- bar_height = req.height;
- gtk_widget_size_request (priv->vbar, &req);
-#endif
bar_width = req.width;
eom_debug_message (DEBUG_WINDOW, "Widget Size allocate: %i, %i Bar: %i, %i\n",
@@ -930,20 +916,14 @@ display_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data)
}
if (do_zoom) {
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDeviceManager *device_manager;
GdkDevice *device;
-#endif
gint x, y;
-#if GTK_CHECK_VERSION (3, 0, 0)
device_manager = gdk_display_get_device_manager (gtk_widget_get_display(widget));
device = gdk_device_manager_get_client_pointer (device_manager);
gdk_window_get_device_position (gtk_widget_get_window (widget), device,
-#else
- gdk_window_get_pointer (gtk_widget_get_window (widget),
-#endif
&x, &y, NULL);
set_zoom (view, zoom, TRUE, x, y);
}
@@ -1127,11 +1107,7 @@ eom_scroll_view_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer
return FALSE;
if (event->is_hint)
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_window_get_device_position (gtk_widget_get_window (GTK_WIDGET (priv->display)), event->device, &x, &y, &mods);
-#else
- gdk_window_get_pointer (gtk_widget_get_window (GTK_WIDGET (priv->display)), &x, &y, &mods);
-#endif
else {
x = event->x;
y = event->y;
@@ -1226,25 +1202,15 @@ eom_scroll_view_focus_out_event (GtkWidget *widget,
}
static gboolean
-#if GTK_CHECK_VERSION (3, 0, 0)
display_draw (GtkWidget *widget, cairo_t *cr, gpointer data)
-#else
-display_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data)
-#endif
{
EomScrollView *view;
EomScrollViewPrivate *priv;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- cairo_t *cr;
-#endif
GtkAllocation allocation;
int scaled_width, scaled_height;
int xofs, yofs;
g_return_val_if_fail (GTK_IS_DRAWING_AREA (widget), FALSE);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- g_return_val_if_fail (event != NULL, FALSE);
-#endif
g_return_val_if_fail (EOM_IS_SCROLL_VIEW (data), FALSE);
view = EOM_SCROLL_VIEW (data);
@@ -1273,12 +1239,6 @@ display_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data)
eom_debug_message (DEBUG_WINDOW, "zoom %.2f, xofs: %i, yofs: %i scaled w: %i h: %i\n",
priv->zoom, xofs, yofs, scaled_width, scaled_height);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (GTK_WIDGET (view->priv->display))));
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
-#endif
-
/* Paint the background */
cairo_set_source (cr, gdk_window_get_background_pattern (gtk_widget_get_window (priv->display)));
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
@@ -1362,9 +1322,6 @@ display_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data)
cairo_paint (cr);
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
- cairo_destroy (cr);
-#endif
return TRUE;
}
@@ -1703,11 +1660,6 @@ eom_scroll_view_set_image (EomScrollView *view, EomImage *image)
if (priv->image != NULL) {
free_image_resources (view);
- #if !GTK_CHECK_VERSION(3, 0, 0)
- if (gtk_widget_is_drawable (priv->display) && image == NULL) {
- gdk_window_clear (gtk_widget_get_window (priv->display));
- }
- #endif
}
g_assert (priv->image == NULL);
g_assert (priv->pixbuf == NULL);
@@ -1820,21 +1772,13 @@ eom_scroll_view_init (EomScrollView *view)
G_CALLBACK (adjustment_changed_cb),
view);
-#if GTK_CHECK_VERSION (3, 0, 0)
priv->hbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, priv->hadj);
-#else
- priv->hbar = gtk_hscrollbar_new (priv->hadj);
-#endif
priv->vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0, 100, 0, 10, 10, 100));
g_signal_connect (priv->vadj, "value_changed",
G_CALLBACK (adjustment_changed_cb),
view);
-#if GTK_CHECK_VERSION (3, 2, 0)
priv->vbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, priv->vadj);
-#else
- priv->vbar = gtk_vscrollbar_new (priv->vadj);
-#endif
priv->display = g_object_new (GTK_TYPE_DRAWING_AREA,
"can-focus", TRUE,
NULL);
@@ -1849,12 +1793,7 @@ eom_scroll_view_init (EomScrollView *view)
| GDK_KEY_PRESS_MASK);
g_signal_connect (G_OBJECT (priv->display), "configure_event",
G_CALLBACK (display_size_change), view);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_signal_connect (G_OBJECT (priv->display), "draw", G_CALLBACK (display_draw), view);
-#else
- g_signal_connect (G_OBJECT (priv->display), "expose_event",
- G_CALLBACK (display_expose_event), view);
-#endif
g_signal_connect (G_OBJECT (priv->display), "map_event",
G_CALLBACK (display_map_event), view);
g_signal_connect (G_OBJECT (priv->display), "button_press_event",
@@ -1883,7 +1822,6 @@ eom_scroll_view_init (EomScrollView *view)
g_signal_connect (G_OBJECT (priv->display), "drag-begin",
G_CALLBACK (view_on_drag_begin_cb), view);
-#if GTK_CHECK_VERSION (3, 4, 0)
gtk_grid_attach (GTK_GRID (view), priv->display,
0, 0, 1, 1);
gtk_widget_set_hexpand (priv->display, TRUE);
@@ -1894,22 +1832,6 @@ eom_scroll_view_init (EomScrollView *view)
gtk_grid_attach (GTK_GRID (view), priv->vbar,
1, 0, 1, 1);
gtk_widget_set_vexpand (priv->vbar, TRUE);
-#else
- gtk_table_attach (GTK_TABLE (view), priv->display,
- 0, 1, 0, 1,
- GTK_EXPAND | GTK_FILL,
- GTK_EXPAND | GTK_FILL,
- 0,0);
- gtk_table_attach (GTK_TABLE (view), priv->hbar,
- 0, 1, 1, 2,
- GTK_FILL,
- GTK_FILL,
- 0, 0);
- gtk_table_attach (GTK_TABLE (view), priv->vbar,
- 1, 2, 0, 1,
- GTK_FILL, GTK_FILL,
- 0, 0);
-#endif
g_settings_bind (settings, EOM_CONF_VIEW_USE_BG_COLOR, view,
"use-background-color", G_SETTINGS_BIND_DEFAULT);
@@ -2223,14 +2145,8 @@ eom_scroll_view_new (void)
widget = g_object_new (EOM_TYPE_SCROLL_VIEW,
"can-focus", TRUE,
-#if GTK_CHECK_VERSION (3, 4, 0)
"row-homogeneous", FALSE,
"column-homogeneous", FALSE,
-#else
- "n_rows", 2,
- "n_columns", 2,
- "homogeneous", FALSE,
-#endif
NULL);
@@ -2335,11 +2251,7 @@ _eom_scroll_view_update_bg_color (EomScrollView *view)
priv->background_surface = NULL;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_modify_bg (GTK_WIDGET (priv->display),
-#else
- gtk_widget_modify_bg (GTK_WIDGET (view),
-#endif
GTK_STATE_NORMAL,
selected);
}
diff --git a/src/eom-scroll-view.h b/src/eom-scroll-view.h
index 24ad306..d618fff 100644
--- a/src/eom-scroll-view.h
+++ b/src/eom-scroll-view.h
@@ -18,21 +18,13 @@ typedef struct _EomScrollViewPrivate EomScrollViewPrivate;
struct _EomScrollView {
-#if GTK_CHECK_VERSION (3, 4, 0)
GtkGrid base_instance;
-#else
- GtkTable widget;
-#endif
EomScrollViewPrivate *priv;
};
struct _EomScrollViewClass {
-#if GTK_CHECK_VERSION (3, 4, 0)
GtkGridClass parent_class;
-#else
- GtkTableClass parent_class;
-#endif
void (* zoom_changed) (EomScrollView *view, double zoom);
};
diff --git a/src/eom-sidebar.c b/src/eom-sidebar.c
index da3344e..fb71137 100644
--- a/src/eom-sidebar.c
+++ b/src/eom-sidebar.c
@@ -64,26 +64,13 @@ struct _EomSidebarPrivate {
GtkTreeModel *page_model;
};
-#if GTK_CHECK_VERSION (3, 2, 0)
G_DEFINE_TYPE (EomSidebar, eom_sidebar, GTK_TYPE_BOX)
-#else
-G_DEFINE_TYPE (EomSidebar, eom_sidebar, GTK_TYPE_VBOX)
-#endif
#define EOM_SIDEBAR_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_SIDEBAR, EomSidebarPrivate))
-#if GTK_CHECK_VERSION (3, 2, 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
-
static void
-#if GTK_CHECK_VERSION(3, 0, 0)
eom_sidebar_destroy (GtkWidget *object)
-#else
-eom_sidebar_destroy (GtkObject *object)
-#endif
{
EomSidebar *eom_sidebar = EOM_SIDEBAR (object);
@@ -97,11 +84,7 @@ eom_sidebar_destroy (GtkObject *object)
eom_sidebar->priv->page_model = NULL;
}
-#if GTK_CHECK_VERSION(3, 0, 0)
(* GTK_WIDGET_CLASS (eom_sidebar_parent_class)->destroy) (object);
-#else
- (* GTK_OBJECT_CLASS (eom_sidebar_parent_class)->destroy) (object);
-#endif
}
static void
@@ -197,26 +180,14 @@ static void
eom_sidebar_class_init (EomSidebarClass *eom_sidebar_class)
{
GObjectClass *g_object_class;
-#if GTK_CHECK_VERSION(3, 0, 0)
GtkWidgetClass *widget_class;
-#else
- GtkObjectClass *gtk_object_klass;
-#endif
g_object_class = G_OBJECT_CLASS (eom_sidebar_class);
-#if GTK_CHECK_VERSION(3, 0, 0)
widget_class = GTK_WIDGET_CLASS (eom_sidebar_class);
-#else
- gtk_object_klass = GTK_OBJECT_CLASS (eom_sidebar_class);
-#endif
g_type_class_add_private (g_object_class, sizeof (EomSidebarPrivate));
-#if GTK_CHECK_VERSION(3, 0, 0)
widget_class->destroy = eom_sidebar_destroy;
-#else
- gtk_object_klass->destroy = eom_sidebar_destroy;
-#endif
g_object_class->get_property = eom_sidebar_get_property;
g_object_class->set_property = eom_sidebar_set_property;
@@ -289,11 +260,7 @@ eom_sidebar_select_button_press_cb (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
gtk_widget_set_size_request (eom_sidebar->priv->menu, -1, -1);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_get_preferred_size (eom_sidebar->priv->menu, &requisition, NULL);
-#else
- gtk_widget_size_request (eom_sidebar->priv->menu, &requisition);
-#endif
gtk_widget_set_size_request (eom_sidebar->priv->menu,
MAX (allocation.width,
requisition.width), -1);
@@ -403,10 +370,8 @@ eom_sidebar_init (EomSidebar *eom_sidebar)
GtkWidget *arrow;
GtkWidget *image;
-#if GTK_CHECK_VERSION (3, 2, 0)
gtk_orientable_set_orientation (GTK_ORIENTABLE (eom_sidebar),
GTK_ORIENTATION_VERTICAL);
-#endif
eom_sidebar->priv = EOM_SIDEBAR_GET_PRIVATE (eom_sidebar);
@@ -419,7 +384,7 @@ eom_sidebar_init (EomSidebar *eom_sidebar)
G_TYPE_INT);
/* top option menu */
- hbox = gtk_hbox_new (FALSE, 0);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
eom_sidebar->priv->hbox = hbox;
gtk_box_pack_start (GTK_BOX (eom_sidebar), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
@@ -436,7 +401,7 @@ eom_sidebar_init (EomSidebar *eom_sidebar)
G_CALLBACK (eom_sidebar_select_button_key_press_cb),
eom_sidebar);
- select_hbox = gtk_hbox_new (FALSE, 0);
+ select_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
eom_sidebar->priv->label = gtk_label_new ("");
@@ -446,11 +411,7 @@ eom_sidebar_init (EomSidebar *eom_sidebar)
gtk_widget_show (eom_sidebar->priv->label);
-#if GTK_CHECK_VERSION (3, 14, 0)
arrow = gtk_image_new_from_icon_name ("pan-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/src/eom-sidebar.h b/src/eom-sidebar.h
index 88851b6..6986f41 100644
--- a/src/eom-sidebar.h
+++ b/src/eom-sidebar.h
@@ -42,21 +42,13 @@ typedef struct _EomSidebarPrivate EomSidebarPrivate;
#define EOM_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EOM_TYPE_SIDEBAR, EomSidebarClass))
struct _EomSidebar {
-#if GTK_CHECK_VERSION (3, 2, 0)
GtkBox base_instance;
-#else
- GtkVBox base_instance;
-#endif
EomSidebarPrivate *priv;
};
struct _EomSidebarClass {
-#if GTK_CHECK_VERSION (3, 2, 0)
GtkBoxClass base_class;
-#else
- GtkVBoxClass base_class;
-#endif
void (* page_added) (EomSidebar *eom_sidebar,
GtkWidget *main_widget);
diff --git a/src/eom-statusbar.c b/src/eom-statusbar.c
index 4c01536..b13ad0b 100644
--- a/src/eom-statusbar.c
+++ b/src/eom-statusbar.c
@@ -33,11 +33,6 @@
#define EOM_STATUSBAR_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_STATUSBAR, EomStatusbarPrivate))
-#if GTK_CHECK_VERSION (3, 2, 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
-
G_DEFINE_TYPE (EomStatusbar, eom_statusbar, GTK_TYPE_STATUSBAR)
struct _EomStatusbarPrivate
@@ -63,10 +58,8 @@ eom_statusbar_init (EomStatusbar *statusbar)
statusbar->priv = EOM_STATUSBAR_GET_PRIVATE (statusbar);
priv = statusbar->priv;
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_margin_top (GTK_WIDGET (statusbar), 0);
gtk_widget_set_margin_bottom (GTK_WIDGET (statusbar), 0);
-#endif
priv->img_num_label = gtk_label_new (NULL);
gtk_widget_set_size_request (priv->img_num_label, 100, 10);
@@ -78,7 +71,7 @@ eom_statusbar_init (EomStatusbar *statusbar)
TRUE,
0);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_end (GTK_BOX (statusbar),
vbox,
diff --git a/src/eom-thumb-nav.c b/src/eom-thumb-nav.c
index 6e1cb66..32af574 100644
--- a/src/eom-thumb-nav.c
+++ b/src/eom-thumb-nav.c
@@ -36,11 +36,7 @@
#define EOM_THUMB_NAV_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_THUMB_NAV, EomThumbNavPrivate))
-#if GTK_CHECK_VERSION (3, 2, 0)
G_DEFINE_TYPE (EomThumbNav, eom_thumb_nav, GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE (EomThumbNav, eom_thumb_nav, GTK_TYPE_HBOX);
-#endif
#define EOM_THUMB_NAV_SCROLL_INC 20
#define EOM_THUMB_NAV_SCROLL_MOVE 20
@@ -88,7 +84,6 @@ eom_thumb_nav_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer u
case GDK_SCROLL_RIGHT:
break;
-#if GTK_CHECK_VERSION (3, 3, 18)
case GDK_SCROLL_SMOOTH:
{
/* Compatibility code to catch smooth events from mousewheels */
@@ -105,7 +100,6 @@ eom_thumb_nav_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer u
inc *= (gint) y_delta;
}
break;
-#endif
default:
g_assert_not_reached ();
@@ -350,10 +344,8 @@ eom_thumb_nav_init (EomThumbNav *nav)
EomThumbNavPrivate *priv;
GtkWidget *arrow;
-#if GTK_CHECK_VERSION (3, 2, 0)
gtk_orientable_set_orientation (GTK_ORIENTABLE (nav),
GTK_ORIENTATION_HORIZONTAL);
-#endif
nav->priv = EOM_THUMB_NAV_GET_PRIVATE (nav);
@@ -366,11 +358,7 @@ eom_thumb_nav_init (EomThumbNav *nav)
priv->button_left = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (priv->button_left), GTK_RELIEF_NONE);
-#if GTK_CHECK_VERSION (3, 14, 0)
arrow = gtk_image_new_from_icon_name ("pan-start-symbolic", GTK_ICON_SIZE_BUTTON);
-#else
- arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_ETCHED_IN);
-#endif
gtk_container_add (GTK_CONTAINER (priv->button_left), arrow);
gtk_widget_set_size_request (GTK_WIDGET (priv->button_left), 25, 0);
@@ -425,11 +413,7 @@ eom_thumb_nav_init (EomThumbNav *nav)
priv->button_right = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (priv->button_right), GTK_RELIEF_NONE);
-#if GTK_CHECK_VERSION (3, 14, 0)
arrow = gtk_image_new_from_icon_name ("pan-end-symbolic", GTK_ICON_SIZE_BUTTON);
-#else
- arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
-#endif
gtk_container_add (GTK_CONTAINER (priv->button_right), arrow);
gtk_widget_set_size_request (GTK_WIDGET (priv->button_right), 25, 0);
@@ -563,13 +547,8 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
switch (mode)
{
case EOM_THUMB_NAV_MODE_ONE_ROW:
-#if GTK_CHECK_VERSION (3, 4, 3)
gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
GTK_ORIENTATION_HORIZONTAL);
-#else
- gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview),
- G_MAXINT);
-#endif
gtk_widget_set_size_request (priv->thumbview, -1, -1);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),
@@ -584,12 +563,8 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
break;
case EOM_THUMB_NAV_MODE_ONE_COLUMN:
-#if GTK_CHECK_VERSION (3, 4, 3)
gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
GTK_ORIENTATION_VERTICAL);
-#else
- gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview), 1);
-#endif
gtk_widget_set_size_request (priv->thumbview, -1, -1);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),
@@ -605,12 +580,8 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
break;
case EOM_THUMB_NAV_MODE_MULTIPLE_ROWS:
-#if GTK_CHECK_VERSION (3, 4, 3)
gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
GTK_ORIENTATION_VERTICAL);
-#else
- gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview), -1);
-#endif
gtk_widget_set_size_request (priv->thumbview, -1, 220);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),
@@ -626,12 +597,8 @@ eom_thumb_nav_set_mode (EomThumbNav *nav, EomThumbNavMode mode)
break;
case EOM_THUMB_NAV_MODE_MULTIPLE_COLUMNS:
-#if GTK_CHECK_VERSION (3, 4, 3)
gtk_orientable_set_orientation (GTK_ORIENTABLE(priv->thumbview),
GTK_ORIENTATION_VERTICAL);
-#else
- gtk_icon_view_set_columns (GTK_ICON_VIEW (priv->thumbview), -1);
-#endif
gtk_widget_set_size_request (priv->thumbview, 230, -1);
eom_thumb_view_set_item_height (EOM_THUMB_VIEW (priv->thumbview),
diff --git a/src/eom-thumb-nav.h b/src/eom-thumb-nav.h
index ab376a5..f4f86c7 100644
--- a/src/eom-thumb-nav.h
+++ b/src/eom-thumb-nav.h
@@ -49,21 +49,13 @@ typedef enum {
} EomThumbNavMode;
struct _EomThumbNav {
-#if GTK_CHECK_VERSION (3, 2, 0)
GtkBox base_instance;
-#else
- GtkHBox base_instance;
-#endif
EomThumbNavPrivate *priv;
};
struct _EomThumbNavClass {
-#if GTK_CHECK_VERSION (3, 2, 0)
GtkBoxClass parent_class;
-#else
- GtkHBoxClass parent_class;
-#endif
};
GType eom_thumb_nav_get_type (void) G_GNUC_CONST;
diff --git a/src/eom-thumb-view.c b/src/eom-thumb-view.c
index f3cea08..0e5cbed 100644
--- a/src/eom-thumb-view.c
+++ b/src/eom-thumb-view.c
@@ -38,23 +38,17 @@
#include <stdlib.h>
#include <string.h>
-#if GTK_CHECK_VERSION (3, 4, 3)
enum {
PROP_0,
PROP_ORIENTATION
};
-#endif
#define EOM_THUMB_VIEW_SPACING 0
#define EOM_THUMB_VIEW_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_THUMB_VIEW, EomThumbViewPrivate))
-#if GTK_CHECK_VERSION (3, 4, 3)
static void eom_thumb_view_init (EomThumbView *thumbview);
-#else
-G_DEFINE_TYPE (EomThumbView, eom_thumb_view, GTK_TYPE_ICON_VIEW);
-#endif
static EomImage* eom_thumb_view_get_image_from_path (EomThumbView *thumbview,
GtkTreePath *path);
@@ -62,12 +56,10 @@ static EomImage* eom_thumb_view_get_image_from_path (EomThumbView *thumbvie
static void eom_thumb_view_popup_menu (EomThumbView *widget,
GdkEventButton *event);
-#if GTK_CHECK_VERSION (3, 4, 3)
static void eom_thumb_view_update_columns (EomThumbView *view);
G_DEFINE_TYPE_WITH_CODE (EomThumbView, eom_thumb_view, GTK_TYPE_ICON_VIEW,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL));
-#endif
static gboolean
thumbview_on_query_tooltip_cb (GtkWidget *widget,
@@ -78,11 +70,7 @@ thumbview_on_query_tooltip_cb (GtkWidget *widget,
gpointer user_data);
static void
thumbview_on_parent_set_cb (GtkWidget *widget,
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkWidget *old_parent,
-#else
- GtkObject *oldparent,
-#endif
gpointer user_data);
static void
@@ -100,12 +88,10 @@ struct _EomThumbViewPrivate {
GtkCellRenderer *pixbuf_cell;
gint visible_range_changed_id;
-#if GTK_CHECK_VERSION (3, 4, 3)
GtkOrientation orientation;
gint n_images;
gulong image_add_id;
gulong image_removed_id;
-#endif
};
/* Drag 'n Drop */
@@ -177,16 +163,13 @@ static void
eom_thumb_view_dispose (GObject *object)
{
EomThumbViewPrivate *priv = EOM_THUMB_VIEW (object)->priv;
-#if GTK_CHECK_VERSION (3, 4, 3)
GtkTreeModel *model;
-#endif
if (priv->visible_range_changed_id != 0) {
g_source_remove (priv->visible_range_changed_id);
priv->visible_range_changed_id = 0;
}
-#if GTK_CHECK_VERSION (3, 4, 3)
model = gtk_icon_view_get_model (GTK_ICON_VIEW (object));
if (model && priv->image_add_id != 0) {
@@ -198,7 +181,6 @@ eom_thumb_view_dispose (GObject *object)
g_signal_handler_disconnect (model, priv->image_removed_id);
priv->image_removed_id = 0;
}
-#endif
G_OBJECT_CLASS (eom_thumb_view_parent_class)->dispose (object);
}
@@ -212,22 +194,13 @@ eom_thumb_view_finalize (GObject *object)
}
static void
-#if GTK_CHECK_VERSION(3, 0, 0)
eom_thumb_view_destroy (GtkWidget *object)
-#else
-eom_thumb_view_destroy (GtkObject *object)
-#endif
{
g_return_if_fail (EOM_IS_THUMB_VIEW (object));
-#if GTK_CHECK_VERSION(3, 0, 0)
GTK_WIDGET_CLASS (eom_thumb_view_parent_class)->destroy (object);
-#else
- GTK_OBJECT_CLASS (eom_thumb_view_parent_class)->destroy (object);
-#endif
}
-#if GTK_CHECK_VERSION (3, 4, 3)
static void
eom_thumb_view_get_property (GObject *object,
guint prop_id,
@@ -267,32 +240,21 @@ eom_thumb_view_set_property (GObject *object,
break;
}
}
-#endif
static void
eom_thumb_view_class_init (EomThumbViewClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
-#if GTK_CHECK_VERSION(3, 0, 0)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
-#else
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
-#endif
gobject_class->constructed = eom_thumb_view_constructed;
gobject_class->dispose = eom_thumb_view_dispose;
-#if GTK_CHECK_VERSION (3, 4, 3)
gobject_class->get_property = eom_thumb_view_get_property;
gobject_class->set_property = eom_thumb_view_set_property;
g_object_class_override_property (gobject_class, PROP_ORIENTATION,
"orientation");
-#endif
gobject_class->finalize = eom_thumb_view_finalize;
-#if GTK_CHECK_VERSION(3, 0, 0)
widget_class->destroy = eom_thumb_view_destroy;
-#else
- object_class->destroy = eom_thumb_view_destroy;
-#endif
g_type_class_add_private (class, sizeof (EomThumbViewPrivate));
}
@@ -422,11 +384,7 @@ thumbview_on_adjustment_changed_cb (EomThumbView *thumbview,
static void
thumbview_on_parent_set_cb (GtkWidget *widget,
-#if GTK_CHECK_VERSION(3, 0, 0)
GtkWidget *old_parent,
-#else
- GtkObject *old_parent,
-#endif
gpointer user_data)
{
EomThumbView *thumbview = EOM_THUMB_VIEW (widget);
@@ -703,10 +661,8 @@ eom_thumb_view_init (EomThumbView *thumbview)
thumbview->priv = EOM_THUMB_VIEW_GET_PRIVATE (thumbview);
thumbview->priv->visible_range_changed_id = 0;
-#if GTK_CHECK_VERSION (3, 4, 3)
thumbview->priv->image_add_id = 0;
thumbview->priv->image_removed_id = 0;
-#endif
}
/**
@@ -726,7 +682,6 @@ eom_thumb_view_new (void)
return GTK_WIDGET (thumbview);
}
-#if GTK_CHECK_VERSION (3, 4, 3)
static void
eom_thumb_view_update_columns (EomThumbView *view)
{
@@ -763,7 +718,6 @@ eom_thumb_view_row_deleted_cb (GtkTreeModel *tree_model,
priv->n_images--;
eom_thumb_view_update_columns (view);
}
-#endif
/**
* eom_thumb_view_set_model:
@@ -778,15 +732,12 @@ void
eom_thumb_view_set_model (EomThumbView *thumbview, EomListStore *store)
{
gint index;
-#if GTK_CHECK_VERSION (3, 4, 3)
EomThumbViewPrivate *priv;
GtkTreeModel *existing;
-#endif
g_return_if_fail (EOM_IS_THUMB_VIEW (thumbview));
g_return_if_fail (EOM_IS_LIST_STORE (store));
-#if GTK_CHECK_VERSION (3, 4, 3)
priv = thumbview->priv;
existing = gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview));
@@ -812,18 +763,13 @@ eom_thumb_view_set_model (EomThumbView *thumbview, EomListStore *store)
thumbview);
thumbview->priv->n_images = eom_list_store_length (store);
-#endif
index = eom_list_store_get_initial_pos (store);
-#if GTK_CHECK_VERSION (3, 4, 3)
gtk_icon_view_set_model (GTK_ICON_VIEW (thumbview),
GTK_TREE_MODEL (store));
eom_thumb_view_update_columns (thumbview);
-#else
- gtk_icon_view_set_model (GTK_ICON_VIEW (thumbview), GTK_TREE_MODEL (store));
-#endif
if (index >= 0) {
GtkTreePath *path = gtk_tree_path_new_from_indices (index, -1);
diff --git a/src/eom-window.c b/src/eom-window.c
index 6b3ffb4..d49886c 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -102,11 +102,6 @@ G_DEFINE_TYPE (EomWindow, eom_window, GTK_TYPE_WINDOW);
#define is_rtl (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL)
-#if GTK_CHECK_VERSION (3, 2, 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
-
typedef enum {
EOM_WINDOW_STATUS_UNKNOWN,
EOM_WINDOW_STATUS_INIT,
@@ -268,11 +263,7 @@ eom_window_set_collection_mode (EomWindow *window, EomWindowCollectionPos positi
if (resizable) {
mode = EOM_THUMB_NAV_MODE_MULTIPLE_ROWS;
-#if GTK_CHECK_VERSION (3, 2, 0)
priv->layout = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
-#else
- priv->layout = gtk_vpaned_new ();
-#endif
if (position == EOM_WINDOW_COLLECTION_POS_BOTTOM) {
gtk_paned_pack1 (GTK_PANED (priv->layout), hpaned, TRUE, FALSE);
@@ -284,7 +275,7 @@ eom_window_set_collection_mode (EomWindow *window, EomWindowCollectionPos positi
} else {
mode = EOM_THUMB_NAV_MODE_ONE_ROW;
- priv->layout = gtk_vbox_new (FALSE, 2);
+ priv->layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
if (position == EOM_WINDOW_COLLECTION_POS_BOTTOM) {
gtk_box_pack_start (GTK_BOX (priv->layout), hpaned, TRUE, TRUE, 0);
@@ -301,11 +292,7 @@ eom_window_set_collection_mode (EomWindow *window, EomWindowCollectionPos positi
if (resizable) {
mode = EOM_THUMB_NAV_MODE_MULTIPLE_COLUMNS;
-#if GTK_CHECK_VERSION (3, 2, 0)
priv->layout = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
-#else
- priv->layout = gtk_hpaned_new ();
-#endif
if (position == EOM_WINDOW_COLLECTION_POS_LEFT) {
gtk_paned_pack1 (GTK_PANED (priv->layout), priv->nav, FALSE, TRUE);
@@ -317,7 +304,7 @@ eom_window_set_collection_mode (EomWindow *window, EomWindowCollectionPos positi
} else {
mode = EOM_THUMB_NAV_MODE_ONE_COLUMN;
- priv->layout = gtk_hbox_new (FALSE, 2);
+ priv->layout = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
if (position == EOM_WINDOW_COLLECTION_POS_LEFT) {
gtk_box_pack_start (GTK_BOX (priv->layout), priv->nav, FALSE, FALSE, 0);
@@ -832,14 +819,10 @@ image_file_changed_cb (EomImage *img, EomWindow *window)
g_free (text);
g_free (markup);
- hbox = gtk_hbox_new (FALSE, 8);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (image, GTK_ALIGN_START);
gtk_widget_set_valign (image, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-#endif
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
@@ -1890,7 +1873,7 @@ eom_window_create_fullscreen_popup (EomWindow *window)
popup = gtk_window_new (GTK_WINDOW_POPUP);
- hbox = gtk_hbox_new (FALSE, 0);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (popup), hbox);
toolbar = gtk_ui_manager_get_widget (window->priv->ui_mgr,
@@ -1990,9 +1973,8 @@ update_ui_visibility (EomWindow *window)
static void
eom_window_run_fullscreen (EomWindow *window, gboolean slideshow)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
static const GdkRGBA black = { 0., 0., 0., 1.};
-#endif
+
EomWindowPrivate *priv;
GtkWidget *menubar;
gboolean upscale;
@@ -2068,27 +2050,7 @@ eom_window_run_fullscreen (EomWindow *window, gboolean slideshow)
gtk_widget_grab_focus (priv->view);
eom_scroll_view_override_bg_color (EOM_SCROLL_VIEW (window->priv->view),
-#if GTK_CHECK_VERSION (3, 0, 0)
&black);
-#else
- &(gtk_widget_get_style (GTK_WIDGET (window))->black));
-#endif
-
-#if !GTK_CHECK_VERSION (3, 0, 0)
- {
- GtkStyle *style;
-
- style = gtk_style_copy (gtk_widget_get_style (gtk_widget_get_parent (priv->view)));
-
- style->xthickness = 0;
- style->ythickness = 0;
-
- gtk_widget_set_style (gtk_widget_get_parent (priv->view),
- style);
-
- g_object_unref (style);
- }
-#endif
gtk_window_fullscreen (GTK_WINDOW (window));
eom_window_update_fullscreen_popup (window);
@@ -2150,9 +2112,6 @@ eom_window_stop_fullscreen (EomWindow *window, gboolean slideshow)
eom_scroll_view_override_bg_color (EOM_SCROLL_VIEW (window->priv->view),
NULL);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_style (gtk_widget_get_parent (window->priv->view), NULL);
-#endif
gtk_window_unfullscreen (GTK_WINDOW (window));
if (slideshow) {
@@ -2497,10 +2456,8 @@ eom_window_cmd_edit_toolbar (GtkAction *action, gpointer *user_data)
gtk_container_set_border_width (GTK_CONTAINER (editor), 5);
-#if GTK_CHECK_VERSION (3, 0, 0)
// Use as much vertical space as available
gtk_widget_set_vexpand (GTK_WIDGET (editor), TRUE);
-#endif
gtk_box_set_spacing (GTK_BOX (EGG_TOOLBAR_EDITOR (editor)), 5);
@@ -2737,14 +2694,10 @@ eom_window_set_wallpaper (EomWindow *window, const gchar *filename, const gchar
if (!visible_filename)
g_free (basename);
- hbox = gtk_hbox_new (FALSE, 8);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (image, GTK_ALIGN_START);
gtk_widget_set_valign (image, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-#endif
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
@@ -4199,12 +4152,8 @@ eom_window_open_editor (GtkAction *action,
if (app_info == NULL)
return;
-#if GTK_CHECK_VERSION (3, 0, 0)
context = gdk_display_get_app_launch_context (
gtk_widget_get_display (GTK_WIDGET (window)));
-#else
- context = gdk_app_launch_context_new ();
-#endif
gdk_app_launch_context_set_screen (context,
gtk_widget_get_screen (GTK_WIDGET (window)));
gdk_app_launch_context_set_icon (context,
@@ -4273,7 +4222,7 @@ eom_window_construct_ui (EomWindow *window)
priv = window->priv;
- priv->box = gtk_vbox_new (FALSE, 0);
+ priv->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), priv->box);
gtk_widget_show (priv->box);
@@ -4377,10 +4326,8 @@ eom_window_construct_ui (EomWindow *window)
"model", eom_application_get_toolbars_model (EOM_APP),
NULL));
-#if GTK_CHECK_VERSION (3, 0, 2)
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (priv->toolbar)),
GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
-#endif
egg_editable_toolbar_show (EGG_EDITABLE_TOOLBAR (priv->toolbar),
"Toolbar");
@@ -4408,7 +4355,7 @@ eom_window_construct_ui (EomWindow *window)
gtk_ui_manager_insert_action_group (priv->ui_mgr, priv->actions_recent, 0);
- priv->cbox = gtk_vbox_new (FALSE, 0);
+ priv->cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (priv->box), priv->cbox, TRUE, TRUE, 0);
gtk_widget_show (priv->cbox);
@@ -4425,13 +4372,9 @@ eom_window_construct_ui (EomWindow *window)
gtk_statusbar_get_context_id (GTK_STATUSBAR (priv->statusbar),
"tip_message");
- priv->layout = gtk_vbox_new (FALSE, 2);
+ priv->layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
-#if GTK_CHECK_VERSION (3, 2, 0)
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
-#else
- hpaned = gtk_hpaned_new ();
-#endif
priv->sidebar = eom_sidebar_new ();
/* The sidebar shouldn't be shown automatically on show_all(),
@@ -4544,12 +4487,10 @@ eom_window_init (EomWindow *window)
eom_debug (DEBUG_WINDOW);
-#if GTK_CHECK_VERSION(3, 0, 0)
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (window));
gtk_style_context_add_class (context, "eom-window");
-#endif
hints.min_width = EOM_WINDOW_MIN_WIDTH;
hints.min_height = EOM_WINDOW_MIN_HEIGHT;
diff --git a/src/main.c b/src/main.c
index f1b92f7..6638054 100644
--- a/src/main.c
+++ b/src/main.c
@@ -50,9 +50,7 @@
#include <exempi/xmp.h>
#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
#define EOM_CSS_FILE_PATH EOM_DATA_DIR G_DIR_SEPARATOR_S "eom.css"
-#endif
static EomStartupFlags flags;
@@ -191,18 +189,12 @@ main (int argc, char **argv)
{
GError *error = NULL;
GOptionContext *ctx;
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkCssProvider *provider;
-#endif
bindtextdomain (GETTEXT_PACKAGE, EOM_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gtk_rc_parse (EOM_DATA_DIR G_DIR_SEPARATOR_S "gtkrc");
-#endif
-
ctx = g_option_context_new (NULL);
g_option_context_add_main_entries (ctx, goption_options, PACKAGE);
/* Option groups are free'd together with the context
@@ -247,7 +239,6 @@ main (int argc, char **argv)
eom_job_queue_init ();
eom_thumbnail_init ();
-#if GTK_CHECK_VERSION (3, 0, 0)
/* Load special style properties for EomThumbView's scrollbar */
provider = gtk_css_provider_new ();
if (G_UNLIKELY (!gtk_css_provider_load_from_path(provider,
@@ -263,7 +254,6 @@ main (int argc, char **argv)
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
g_object_unref (provider);
-#endif
eom_plugin_engine_init ();
@@ -276,16 +266,8 @@ main (int argc, char **argv)
load_files ();
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gdk_threads_enter ();
-#endif
-
gtk_main ();
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gdk_threads_leave ();
-#endif
-
if (startup_files)
g_strfreev (startup_files);
diff --git a/src/zoom.c b/src/zoom.c
index bd38816..ee799eb 100644
--- a/src/zoom.c
+++ b/src/zoom.c
@@ -23,8 +23,6 @@
#include <math.h>
#include "zoom.h"
-
-
/**
* zoom_fit_size:
* @dest_width: Width of destination area.