[Goodies-commits] r6514 - in ristretto/branches/ristretto-gio: . src

Stephan Arts stephan at xfce.org
Mon Jan 19 23:05:50 CET 2009


Author: stephan
Date: 2009-01-19 22:05:50 +0000 (Mon, 19 Jan 2009)
New Revision: 6514

Modified:
   ristretto/branches/ristretto-gio/TODO
   ristretto/branches/ristretto-gio/configure.in.in
   ristretto/branches/ristretto-gio/src/image_transform_orientation.c
   ristretto/branches/ristretto-gio/src/main_window.c
Log:
- reduce glib and gtk requirements
- Update TODO
- Implement manual rotation



Modified: ristretto/branches/ristretto-gio/TODO
===================================================================
--- ristretto/branches/ristretto-gio/TODO	2009-01-19 21:19:35 UTC (rev 6513)
+++ ristretto/branches/ristretto-gio/TODO	2009-01-19 22:05:50 UTC (rev 6514)
@@ -0,0 +1 @@
+- Merge transform actions of consecutive imagetransformations of the same type

Modified: ristretto/branches/ristretto-gio/configure.in.in
===================================================================
--- ristretto/branches/ristretto-gio/configure.in.in	2009-01-19 21:19:35 UTC (rev 6513)
+++ ristretto/branches/ristretto-gio/configure.in.in	2009-01-19 22:05:50 UTC (rev 6514)
@@ -1,5 +1,5 @@
-dnl
-dnl Copyright (c) 2006
+;nl
+dnl Copyright (c) 2006-2009
 dnl         The Xfce development team. All rights reserved.
 dnl
 dnl Originally written for Xfce by Benedikt Meurer <benny at xfce.org>
@@ -13,7 +13,7 @@
 m4_define([ristretto_version_minor], [0])
 m4_define([ristretto_version_micro], [21])
 m4_define([ristretto_version_build], [r at REVISION@])
-m4_define([ristretto_version_tag], []) # Leave empty for releases
+m4_define([ristretto_version_tag], [gio]) # Leave empty for releases
 m4_define([ristretto_version], [ristretto_version_major().ristretto_version_minor().ristretto_version_micro()ifelse(ristretto_version_tag(),[],[], [-ifelse(ristretto_version_tag(), [svn], [ristretto_version_tag()-ristretto_version_build()], [ristretto_version_tag()])])])
 
 dnl *******************************************
@@ -51,30 +51,16 @@
 XDT_I18N([@LINGUAS@])
 
 XDT_CHECK_PACKAGE([LIBEXIF], [libexif], [0.6.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0])
-XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.18.0])
-XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.18.0])
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.18.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.16.0])
+XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.16.0])
+XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.16.0])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.16.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.34])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
 XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
 
-AC_ARG_ENABLE([xfce-desktop],
-              [AC_HELP_STRING([--enable-xfce-desktop],
-                              [Build with xfdesktop support (xfce >= 4.5)])],
-              [build_xfce_desktop=$enableval],
-              [build_xfce_desktop=yes])
-if test "x$build_xfce_desktop" = "xyes"; then
-	AC_CHECK_PROG([xfconf_query_found], [xfconf-query], [yes], [no])
-	if test x"$xfconf_query_found" = x"no"; then
-		echo "***"
-		echo "*** xfconf-query was not found on your system."
-		echo "*** The wallpaper won't work without it installed."
-		echo "***"
-	fi
-    AC_DEFINE([WITH_DESKTOP_WALLPAPER], [1], [Define With Desktop wallpaper])
-fi
+XDT_CHECK_OPTIONAL_PACKAGE ([XFCONF], [xfconf-0], [4.5.93], [xfconf], [xfconf configuration backend])
 
 
 dnl check for debugging support
@@ -99,7 +85,3 @@
 echo ""
 echo "The binary will be installed in $prefix/bin"
 echo "----------------------------------------"
-echo "Xfce 4.6 wallpaper support: $build_xfce_desktop"
-echo ""
-echo ""
-echo "Configure finished, type 'make' to build."

Modified: ristretto/branches/ristretto-gio/src/image_transform_orientation.c
===================================================================
--- ristretto/branches/ristretto-gio/src/image_transform_orientation.c	2009-01-19 21:19:35 UTC (rev 6513)
+++ ristretto/branches/ristretto-gio/src/image_transform_orientation.c	2009-01-19 22:05:50 UTC (rev 6514)
@@ -188,6 +188,8 @@
         rstto_image_set_pixbuf (image, gdk_pixbuf_rotate_simple (tmp_pixbuf, (360+(trans_orientation->rotation))%360));
         g_object_unref (tmp_pixbuf);
     }
+
+    return TRUE;
 }
 
 static gboolean
@@ -223,6 +225,7 @@
     rstto_image_set_pixbuf (image, gdk_pixbuf_rotate_simple (tmp_pixbuf, 360-((360+(trans_orientation->rotation))%360)));
     g_object_unref (tmp_pixbuf);
 
+    return TRUE;
 }
 
 static void

Modified: ristretto/branches/ristretto-gio/src/main_window.c
===================================================================
--- ristretto/branches/ristretto-gio/src/main_window.c	2009-01-19 21:19:35 UTC (rev 6513)
+++ ristretto/branches/ristretto-gio/src/main_window.c	2009-01-19 22:05:50 UTC (rev 6514)
@@ -27,6 +27,10 @@
 #include <libexif/exif-data.h>
 
 #include "image.h"
+
+#include "image_transformation.h"
+#include "image_transform_orientation.h"
+
 #include "navigator.h"
 #include "picture_viewer.h"
 #include "main_window.h"
@@ -101,6 +105,11 @@
 cb_rstto_main_window_zoom_out (GtkWidget *widget, RsttoMainWindow *window);
 
 static void
+cb_rstto_main_window_rotate_cw (GtkWidget *widget, RsttoMainWindow *window);
+static void
+cb_rstto_main_window_rotate_ccw (GtkWidget *widget, RsttoMainWindow *window);
+
+static void
 cb_rstto_main_window_next_image (GtkWidget *widget, RsttoMainWindow *window);
 static void
 cb_rstto_main_window_previous_image (GtkWidget *widget, RsttoMainWindow *window);
@@ -169,8 +178,8 @@
   { "zoom-100", GTK_STOCK_ZOOM_100, N_ ("_Normal Size"), "<control>0", NULL, G_CALLBACK (cb_rstto_main_window_zoom_100), },
 /* Rotation submenu */
   { "rotation-menu", NULL, N_ ("_Rotation"), NULL, },
-  { "rotate-cw", NULL, N_ ("Rotate _Right"), NULL, NULL, NULL, },
-  { "rotate-ccw", NULL, N_ ("Rotate _Left"), NULL, NULL, NULL, },
+  { "rotate-cw", NULL, N_ ("Rotate _Right"), NULL, NULL, G_CALLBACK (cb_rstto_main_window_rotate_cw), },
+  { "rotate-ccw", NULL, N_ ("Rotate _Left"), NULL, NULL, G_CALLBACK (cb_rstto_main_window_rotate_ccw), },
 /* Go Menu */
   { "go-menu",  NULL, N_ ("_Go"), NULL, },
   { "forward",  GTK_STOCK_GO_FORWARD, N_ ("_Forward"), "space", NULL, G_CALLBACK (cb_rstto_main_window_next_image), },
@@ -546,7 +555,64 @@
     rstto_picture_viewer_set_scale (RSTTO_PICTURE_VIEWER (window->priv->picture_viewer), scale / ZOOM_FACTOR);
 }
 
+/**********************/
+/* ROTATION CALLBACKS */
+/**********************/
+
 /**
+ * cb_rstto_main_window_rotate_cw:
+ * @widget:
+ * @window:
+ *
+ *
+ */
+static void
+cb_rstto_main_window_rotate_cw (GtkWidget *widget, RsttoMainWindow *window)
+{
+    RsttoImageTransformation *transform;
+    RsttoImage *image;
+
+    if (window->priv->iter)
+        image = rstto_navigator_iter_get_image (window->priv->iter);
+
+    if (image)
+    {
+        transform = rstto_image_transform_orientation_new ( FALSE, FALSE, GDK_PIXBUF_ROTATE_CLOCKWISE);
+        rstto_image_push_transformation (image, G_OBJECT (transform), NULL);
+        rstto_image_load (image, TRUE, NULL);
+    }
+}
+
+/**
+ * cb_rstto_main_window_rotate_ccw:
+ * @widget:
+ * @window:
+ *
+ *
+ */
+static void
+cb_rstto_main_window_rotate_ccw (GtkWidget *widget, RsttoMainWindow *window)
+{
+    RsttoImageTransformation *transform;
+    RsttoImage *image;
+
+    if (window->priv->iter)
+        image = rstto_navigator_iter_get_image (window->priv->iter);
+
+    if (image)
+    {
+        transform = rstto_image_transform_orientation_new ( FALSE, FALSE, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE);
+        rstto_image_push_transformation (image, G_OBJECT (transform), NULL);
+        rstto_image_load (image, TRUE, NULL);
+    }
+}
+
+
+/************************/
+/* NAVIGATION CALLBACKS */
+/************************/
+
+/**
  * cb_rstto_main_window_first_image:
  * @widget:
  * @window:




More information about the Goodies-commits mailing list