Commit e3b7939b authored by Michael J. Chudobiak's avatar Michael J. Chudobiak

Bump various library requirements and remove in-code version checks

parent 7fb669d3
...@@ -86,8 +86,8 @@ Compiling ...@@ -86,8 +86,8 @@ Compiling
version 2 or greater, with the development tools installed properly. version 2 or greater, with the development tools installed properly.
The following is the detailed list of libraries you need: The following is the detailed list of libraries you need:
* glib version >= 2.6.0 * glib version >= 2.19.0
* gtk version >= 2.10.0 * gtk version >= 2.16.0
* libxml version >= 2.4.0 * libxml version >= 2.4.0
* libgnome version >= 2.6.0 * libgnome version >= 2.6.0
* libgnomeui version >= 2.6.0 * libgnomeui version >= 2.6.0
......
...@@ -22,8 +22,8 @@ dnl it too, or it will never make it into the spec file! ...@@ -22,8 +22,8 @@ dnl it too, or it will never make it into the spec file!
dnl dnl
dnl ========================================================================== dnl ==========================================================================
GLIB_REQUIRED=2.6.0 GLIB_REQUIRED=2.19.0
GTK_REQUIRED=2.14.0 GTK_REQUIRED=2.16.0
LIBXML_REQUIRED=2.4.0 LIBXML_REQUIRED=2.4.0
LIBGNOME_REQUIRED=2.6.0 LIBGNOME_REQUIRED=2.6.0
LIBGNOMEUI_REQUIRED=2.6.0 LIBGNOMEUI_REQUIRED=2.6.0
......
...@@ -2443,15 +2443,6 @@ gth_pixbuf_new_from_video (FileData *file, ...@@ -2443,15 +2443,6 @@ gth_pixbuf_new_from_video (FileData *file,
} }
#ifndef GDK_PIXBUF_CHECK_VERSION
#define GDK_PIXBUF_CHECK_VERSION(major,minor,micro) \
(GDK_PIXBUF_MAJOR > (major) || \
(GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR > (minor)) || \
(GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR == (minor) && \
GDK_PIXBUF_MICRO >= (micro)))
#endif
GdkPixbuf* GdkPixbuf*
gth_pixbuf_new_from_file (FileData *file, gth_pixbuf_new_from_file (FileData *file,
GError **error, GError **error,
...@@ -2522,24 +2513,8 @@ gth_pixbuf_new_from_file (FileData *file, ...@@ -2522,24 +2513,8 @@ gth_pixbuf_new_from_file (FileData *file,
/* rotate pixbuf if required, based on exif orientation tag (jpeg only) */ /* rotate pixbuf if required, based on exif orientation tag (jpeg only) */
debug (DEBUG_INFO, "Check orientation tag of %s. Width %d\n\r", file->local_path, requested_width); debug (DEBUG_INFO, "Check orientation tag of %s. Width %d\n\r", file->local_path, requested_width);
#if GDK_PIXBUF_CHECK_VERSION(2,11,5)
/* New in gtk 2.11.5 - see bug 439567 */
rotated = gdk_pixbuf_apply_embedded_orientation (pixbuf); rotated = gdk_pixbuf_apply_embedded_orientation (pixbuf);
debug (DEBUG_INFO, "Applying orientation using gtk function.\n\r"); debug (DEBUG_INFO, "Applying orientation using gtk function.\n\r");
#else
/* The old way - delete this once gtk 2.12 is widely used */
if (mime_type_is (file->mime_type, "image/jpeg")) {
GthTransform orientation;
GthTransform transform = GTH_TRANSFORM_NONE;
orientation = get_orientation_from_fd (file);
transform = (orientation >= 1 && orientation <= 8 ? orientation : GTH_TRANSFORM_NONE);
debug (DEBUG_INFO, "read_orientation_field says orientation is %d, transform needed is %d.\n\r", orientation, transform);
rotated = _gdk_pixbuf_transform (pixbuf, transform);
}
#endif
if (rotated == NULL) { if (rotated == NULL) {
rotated = pixbuf; rotated = pixbuf;
......
...@@ -869,17 +869,13 @@ gfile_xfer (GFile *sfile, ...@@ -869,17 +869,13 @@ gfile_xfer (GFile *sfile,
if (move) if (move)
g_file_move (sfile, dfile, g_file_move (sfile, dfile,
#if GLIB_CHECK_VERSION(2,19,0)
G_FILE_COPY_TARGET_DEFAULT_PERMS | G_FILE_COPY_TARGET_DEFAULT_PERMS |
#endif
attr, attr,
NULL, _empty_file_progress_cb, NULL, _empty_file_progress_cb,
NULL, error); NULL, error);
else else
g_file_copy (sfile, dfile, g_file_copy (sfile, dfile,
#if GLIB_CHECK_VERSION(2,19,0)
G_FILE_COPY_TARGET_DEFAULT_PERMS | G_FILE_COPY_TARGET_DEFAULT_PERMS |
#endif
attr, attr,
NULL, _empty_file_progress_cb, NULL, _empty_file_progress_cb,
NULL, error); NULL, error);
......
...@@ -5119,11 +5119,7 @@ menu_item_select_cb (GtkMenuItem *proxy, ...@@ -5119,11 +5119,7 @@ menu_item_select_cb (GtkMenuItem *proxy,
GtkAction *action; GtkAction *action;
char *message; char *message;
#if GTK_CHECK_VERSION(2,16,0)
action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy)); action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy));
#else
action = gtk_widget_get_action (GTK_WIDGET (proxy));
#endif
g_return_if_fail (action != NULL); g_return_if_fail (action != NULL);
g_object_get (G_OBJECT (action), "tooltip", &message, NULL); g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
...@@ -5277,13 +5273,8 @@ add_rotate_toolbar_item (GthBrowser *browser) ...@@ -5277,13 +5273,8 @@ add_rotate_toolbar_item (GthBrowser *browser)
gtk_tool_item_set_homogeneous (priv->rotate_tool_item, FALSE); gtk_tool_item_set_homogeneous (priv->rotate_tool_item, FALSE);
gtk_tool_item_set_tooltip_text (priv->rotate_tool_item, _("Rotate images without loss of quality")); gtk_tool_item_set_tooltip_text (priv->rotate_tool_item, _("Rotate images without loss of quality"));
gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (priv->rotate_tool_item), _("Rotate images without loss of quality")); gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (priv->rotate_tool_item), _("Rotate images without loss of quality"));
#if GTK_CHECK_VERSION(2,16,0)
gtk_activatable_set_related_action (GTK_ACTIVATABLE (priv->rotate_tool_item), gtk_activatable_set_related_action (GTK_ACTIVATABLE (priv->rotate_tool_item),
gtk_ui_manager_get_action (priv->ui, "/MenuBar/Tools/Tools_JPEGRotate")); gtk_ui_manager_get_action (priv->ui, "/MenuBar/Tools/Tools_JPEGRotate"));
#else
gtk_action_connect_proxy (gtk_ui_manager_get_action (priv->ui, "/MenuBar/Tools/Tools_JPEGRotate"),
GTK_WIDGET (priv->rotate_tool_item));
#endif
gtk_widget_show (GTK_WIDGET (priv->rotate_tool_item)); gtk_widget_show (GTK_WIDGET (priv->rotate_tool_item));
gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar), gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar),
priv->rotate_tool_item, priv->rotate_tool_item,
......
...@@ -283,11 +283,7 @@ menu_item_select_cb (GtkMenuItem *proxy, ...@@ -283,11 +283,7 @@ menu_item_select_cb (GtkMenuItem *proxy,
GtkAction *action; GtkAction *action;
char *message; char *message;
#if GTK_CHECK_VERSION(2,16,0)
action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy)); action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy));
#else
action = gtk_widget_get_action (GTK_WIDGET (proxy));
#endif
g_return_if_fail (action != NULL); g_return_if_fail (action != NULL);
g_object_get (G_OBJECT (action), "tooltip", &message, NULL); g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
...@@ -1317,13 +1313,8 @@ add_open_with_toolbar_item (GthViewer *viewer) ...@@ -1317,13 +1313,8 @@ add_open_with_toolbar_item (GthViewer *viewer)
gtk_tool_item_set_homogeneous (priv->open_with_tool_item, FALSE); gtk_tool_item_set_homogeneous (priv->open_with_tool_item, FALSE);
gtk_tool_item_set_tooltip_text (priv->open_with_tool_item, _("Open selected images with an application")); gtk_tool_item_set_tooltip_text (priv->open_with_tool_item, _("Open selected images with an application"));
gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (priv->open_with_tool_item), _("Open selected images with an application")); gtk_menu_tool_button_set_arrow_tooltip_text (GTK_MENU_TOOL_BUTTON (priv->open_with_tool_item), _("Open selected images with an application"));
#if GTK_CHECK_VERSION(2,16,0)
gtk_activatable_set_related_action (GTK_ACTIVATABLE (priv->open_with_tool_item), gtk_activatable_set_related_action (GTK_ACTIVATABLE (priv->open_with_tool_item),
gtk_ui_manager_get_action (priv->ui, "/MenuBar/File/Image_OpenWith")); gtk_ui_manager_get_action (priv->ui, "/MenuBar/File/Image_OpenWith"));
#else
gtk_action_connect_proxy (gtk_ui_manager_get_action (priv->ui, "/MenuBar/File/Image_OpenWith"),
GTK_WIDGET (priv->open_with_tool_item));
#endif
gtk_widget_show (GTK_WIDGET (priv->open_with_tool_item)); gtk_widget_show (GTK_WIDGET (priv->open_with_tool_item));
gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar), gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment