[gthumb] Bump various library requirements and remove in-code version checks



commit e3b7939b1a033b7a4d5249f3b8762fbbdbf18f2c
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Tue Jun 16 08:40:19 2009 -0400

    Bump various library requirements and remove in-code version checks

 README                  |    4 ++--
 configure.in            |    4 ++--
 libgthumb/file-utils.c  |   25 -------------------------
 libgthumb/gfile-utils.c |    4 ----
 src/gth-browser.c       |    9 ---------
 src/gth-viewer.c        |    9 ---------
 6 files changed, 4 insertions(+), 51 deletions(-)
---
diff --git a/README b/README
index 6ecc60b..b926023 100644
--- a/README
+++ b/README
@@ -86,8 +86,8 @@ Compiling
   version 2 or greater, with the development tools installed properly.
   The following is the detailed list of libraries you need:
 
-	* glib	 		version >= 2.6.0
-	* gtk 			version >= 2.10.0
+	* glib	 		version >= 2.19.0
+	* gtk 			version >= 2.16.0
 	* libxml 		version >= 2.4.0
 	* libgnome 		version >= 2.6.0
 	* libgnomeui 		version >= 2.6.0
diff --git a/configure.in b/configure.in
index ceaae8d..7e99900 100644
--- a/configure.in
+++ b/configure.in
@@ -22,8 +22,8 @@ dnl it too, or it will never make it into the spec file!
 dnl
 dnl ==========================================================================
 
-GLIB_REQUIRED=2.6.0
-GTK_REQUIRED=2.14.0
+GLIB_REQUIRED=2.19.0
+GTK_REQUIRED=2.16.0
 LIBXML_REQUIRED=2.4.0
 LIBGNOME_REQUIRED=2.6.0
 LIBGNOMEUI_REQUIRED=2.6.0
diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c
index 576db4c..d36dad5 100644
--- a/libgthumb/file-utils.c
+++ b/libgthumb/file-utils.c
@@ -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*
 gth_pixbuf_new_from_file (FileData               *file,
 			  GError                **error,
@@ -2522,24 +2513,8 @@ gth_pixbuf_new_from_file (FileData               *file,
 	/* 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);
-
-#if GDK_PIXBUF_CHECK_VERSION(2,11,5)
-        /* New in gtk 2.11.5 - see bug 439567 */
         rotated = gdk_pixbuf_apply_embedded_orientation (pixbuf);      	
         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) {
 		rotated = pixbuf;
diff --git a/libgthumb/gfile-utils.c b/libgthumb/gfile-utils.c
index 6aadb7f..da1e678 100644
--- a/libgthumb/gfile-utils.c
+++ b/libgthumb/gfile-utils.c
@@ -869,17 +869,13 @@ gfile_xfer (GFile    *sfile,
 
         if (move)
                 g_file_move (sfile, dfile,
-#if GLIB_CHECK_VERSION(2,19,0)
 			     G_FILE_COPY_TARGET_DEFAULT_PERMS |
-#endif 
                              attr,
                              NULL, _empty_file_progress_cb,
                              NULL, error);
         else
                 g_file_copy (sfile, dfile,
-#if GLIB_CHECK_VERSION(2,19,0)
                              G_FILE_COPY_TARGET_DEFAULT_PERMS |
-#endif 
                              attr,
                              NULL, _empty_file_progress_cb,
                              NULL, error);
diff --git a/src/gth-browser.c b/src/gth-browser.c
index a9c14f4..48bf22f 100644
--- a/src/gth-browser.c
+++ b/src/gth-browser.c
@@ -5119,11 +5119,7 @@ menu_item_select_cb (GtkMenuItem *proxy,
 	GtkAction *action;
 	char      *message;
 
-#if GTK_CHECK_VERSION(2,16,0)
 	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_object_get (G_OBJECT (action), "tooltip", &message, NULL);
@@ -5277,13 +5273,8 @@ add_rotate_toolbar_item (GthBrowser *browser)
 	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_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_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_toolbar_insert (GTK_TOOLBAR (priv->toolbar),
 			    priv->rotate_tool_item,
diff --git a/src/gth-viewer.c b/src/gth-viewer.c
index 4a5eb18..59dd66b 100644
--- a/src/gth-viewer.c
+++ b/src/gth-viewer.c
@@ -283,11 +283,7 @@ menu_item_select_cb (GtkMenuItem *proxy,
         GtkAction *action;
         char      *message;
 
-#if GTK_CHECK_VERSION(2,16,0)
 	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_object_get (G_OBJECT (action), "tooltip", &message, NULL);
@@ -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_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"));
-#if GTK_CHECK_VERSION(2,16,0)
 	gtk_activatable_set_related_action (GTK_ACTIVATABLE (priv->open_with_tool_item),
 					    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_toolbar_insert (GTK_TOOLBAR (priv->toolbar),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]