[Goodies-commits] r3106 - in ristretto/trunk: . po src

Stephan Arts stephan at xfce.org
Sat Sep 1 15:41:45 CEST 2007


Author: stephan
Date: 2007-09-01 13:41:45 +0000 (Sat, 01 Sep 2007)
New Revision: 3106

Modified:
   ristretto/trunk/ChangeLog
   ristretto/trunk/INSTALL
   ristretto/trunk/install-sh
   ristretto/trunk/missing
   ristretto/trunk/po/Makefile.in.in
   ristretto/trunk/src/main.c
   ristretto/trunk/src/navigator.c
   ristretto/trunk/src/picture_viewer.c
   ristretto/trunk/src/thumbnail_viewer.c
Log:
Modify ChangeLog (i really should take a look at it prior to releases)
Fix some bugs with the thumbnail viewer



Modified: ristretto/trunk/ChangeLog
===================================================================
--- ristretto/trunk/ChangeLog	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/ChangeLog	2007-09-01 13:41:45 UTC (rev 3106)
@@ -1,13 +1,18 @@
-2007-08-27:
+2007-09-01: 
+	* src/thumbnail_viewer.c:
+	  Improve themeability
+	  Improve thumbnail-rendering
+
+2007-08-29: Release 0.0.2
 	* icons/22x22,
 	  icons/24x24,
 	  icons/32x32,
 	  icons/36x36: Added aditional icons
 	* README: Written the README file
 	* configure.in.in: Fixed version-numbering
-	* src/thumbnailer.c: Added scrollwheel navigation
+	* src/thumbnail_viewer.c: Added scrollwheel navigation
 	  Fixed backwards scrolling of thumbnailer
-	* src/pictureviewer.c: Added scrollwheel zooming
+	* src/picture_viewer.c: Added scrollwheel zooming
 	  Fix Bug #3500 (Do not upscale images by default)
 	  Add a minimum zoom-level of 5% and a maximum of 1600%.
 	  Prevent images being down-scaled beyond 1 pixel.

Modified: ristretto/trunk/INSTALL
===================================================================
--- ristretto/trunk/INSTALL	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/INSTALL	2007-09-01 13:41:45 UTC (rev 3106)
@@ -1,236 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-These are generic installation instructions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
-
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
-
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
-     Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-

Modified: ristretto/trunk/install-sh
===================================================================
--- ristretto/trunk/install-sh	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/install-sh	2007-09-01 13:41:45 UTC (rev 3106)
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--d         create directories instead of installing files.
--g GROUP   $chgrpprog installed files to GROUP.
--m MODE    $chmodprog installed files to MODE.
--o USER    $chownprog installed files to USER.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-	shift
-	shift
-	continue;;
-
-    -T) no_target_directory=true
-	shift
-	continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    *)  # When -d is used, all remaining arguments are directories to create.
-	# When -t is used, the destination is already specified.
-	test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-	for arg
-	do
-          if test -n "$dstarg"; then
-	    # $@ is not empty: it contains at least $arg.
-	    set fnord "$@" "$dstarg"
-	    shift # fnord
-	  fi
-	  shift # arg
-	  dstarg=$arg
-	done
-	break;;
-  esac
-done
-
-if test -z "$1"; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
-  else
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dstarg: Is a directory" >&2
-	exit 1
-      fi
-      dst=$dst/`basename "$src"`
-    fi
-  fi
-
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
-  # Make sure that the destination directory exists.
-
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-	 '
-    IFS="${IFS-$defaultIFS}"
-
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
-
-    pathcomp=
-
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
-      shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-	# mkdir can fail with a `File exist' error in case several
-	# install-sh are creating the directory concurrently.  This
-	# is OK.
-	test -d "$pathcomp" || exit
-      fi
-      pathcomp=$pathcomp/
-    done
-  fi
-
-  if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
-  else
-    dstfile=`basename "$dst"`
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
-
-    # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-	   # The rename failed, perhaps because mv can't rename something else
-	   # to itself, or perhaps because mv is so ancient that it does not
-	   # support -f.
-
-	   # Now remove or move aside any old file at destination location.
-	   # We try this two ways since rm can't unlink itself on some
-	   # systems and the destination file might be busy for other
-	   # reasons.  In this case, the final cleanup might fail but the new
-	   # file should still install successfully.
-	   {
-	     if test -f "$dstdir/$dstfile"; then
-	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-	       || {
-		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-		 (exit 1); exit 1
-	       }
-	     else
-	       :
-	     fi
-	   } &&
-
-	   # Now rename the file to the real destination.
-	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-	 }
-    }
-  fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:

Modified: ristretto/trunk/missing
===================================================================
--- ristretto/trunk/missing	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/missing	2007-09-01 13:41:45 UTC (rev 3106)
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake at gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f y.tab.h ]; then
-	echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case "$firstarg" in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case "$firstarg" in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:

Modified: ristretto/trunk/po/Makefile.in.in
===================================================================
--- ristretto/trunk/po/Makefile.in.in	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/po/Makefile.in.in	2007-09-01 13:41:45 UTC (rev 3106)
@@ -134,7 +134,7 @@
 dvi info tags TAGS ID:
 
 # Define this as empty until I found a useful application.
-installcheck:
+install-exec installcheck:
 
 uninstall:
 	linguas="$(USE_LINGUAS)"; \

Modified: ristretto/trunk/src/main.c
===================================================================
--- ristretto/trunk/src/main.c	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/src/main.c	2007-09-01 13:41:45 UTC (rev 3106)
@@ -308,6 +308,7 @@
 
     gtk_widget_set_size_request(window, 400, 300);
 
+    gtk_container_add(GTK_CONTAINER(s_window), viewer);
     gtk_box_pack_start(GTK_BOX(main_hbox), main_vbox1, TRUE, TRUE, 0);
 
     gtk_box_pack_start(GTK_BOX(main_vbox1), s_window, TRUE, TRUE, 0);
@@ -384,7 +385,6 @@
 
     gtk_widget_show_all(window);
     gtk_widget_hide(menu_item_pause);
-    gtk_container_add(GTK_CONTAINER(s_window), viewer);
     gtk_widget_show(viewer);
 
     if(!strcmp(thumbnail_viewer_orientation, "hide"))

Modified: ristretto/trunk/src/navigator.c
===================================================================
--- ristretto/trunk/src/navigator.c	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/src/navigator.c	2007-09-01 13:41:45 UTC (rev 3106)
@@ -96,6 +96,7 @@
 {
     navigator->file_iter = NULL;
     navigator->compare_func = (GCompareFunc)rstto_navigator_entry_name_compare_func;
+    navigator->old_position = -1;
 }
 
 static void
@@ -344,7 +345,7 @@
         g_list_foreach(navigator->file_list, (GFunc)rstto_navigator_entry_free, NULL);
         navigator->file_list = NULL;
         navigator->file_iter = NULL;
-        navigator->old_position = 0;
+        navigator->old_position = -1;
     }
     g_signal_emit(G_OBJECT(navigator), rstto_navigator_signals[RSTTO_NAVIGATOR_SIGNAL_REORDERED], 0, NULL);
     

Modified: ristretto/trunk/src/picture_viewer.c
===================================================================
--- ristretto/trunk/src/picture_viewer.c	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/src/picture_viewer.c	2007-09-01 13:41:45 UTC (rev 3106)
@@ -346,19 +346,11 @@
         g_signal_connect(G_OBJECT(viewer->hadjustment), "value-changed", (GCallback)viewer->priv->cb_value_changed, viewer);
         g_object_ref(viewer->hadjustment);
     }
-    else
-    {
-        g_warning("no hadjustment set");
-    }
     if(viewer->vadjustment)
     {
         g_signal_connect(G_OBJECT(viewer->vadjustment), "value-changed", (GCallback)viewer->priv->cb_value_changed, viewer);
         g_object_ref(viewer->vadjustment);
     }
-    else
-    {
-        g_warning("no vadjustment set");
-    }
     return TRUE;
 }
 
@@ -653,61 +645,24 @@
 static void
 cb_rstto_picture_viewer_scroll_event (RsttoPictureViewer *viewer, GdkEventScroll *event)
 {
-    GtkWidget *widget = GTK_WIDGET(viewer);
     RsttoNavigatorEntry *entry = rstto_navigator_get_file(viewer->priv->navigator);
     gdouble scale = rstto_navigator_entry_get_scale(entry);
-    gdouble x = (viewer->hadjustment->value + event->x);
-    gdouble y = (viewer->vadjustment->value + event->y);
-    gint width = gdk_pixbuf_get_width(viewer->priv->src_pixbuf);
-    gint height = gdk_pixbuf_get_height(viewer->priv->src_pixbuf);
     switch(event->direction)
     {
         case GDK_SCROLL_UP:
         case GDK_SCROLL_LEFT:
-            x = x / 1.2 - event->x;
-            y = y / 1.2 - event->y;
             rstto_navigator_entry_set_scale(entry, scale / 1.2);
             rstto_navigator_entry_set_fit_to_screen (entry, FALSE);
             break;
         case GDK_SCROLL_DOWN:
         case GDK_SCROLL_RIGHT:
-            x = x * 1.2 - event->x;
-            y = y * 1.2 - event->y;
             rstto_navigator_entry_set_scale(entry, scale * 1.2);
             rstto_navigator_entry_set_fit_to_screen (entry, FALSE);
             break;
     }
-    if(viewer->hadjustment)
+
+    if(rstto_picture_viewer_refresh(viewer))
     {
-        viewer->hadjustment->page_size = widget->allocation.width;
-        viewer->hadjustment->upper = width * scale;
-        viewer->hadjustment->lower = 0;
-        viewer->hadjustment->step_increment = 1;
-        viewer->hadjustment->page_increment = 100;
-        viewer->hadjustment->value = x ;
-        if((viewer->hadjustment->value + viewer->hadjustment->page_size) > viewer->hadjustment->upper)
-        {
-            viewer->hadjustment->value = viewer->hadjustment->upper - viewer->hadjustment->page_size;
-        }
-        gtk_adjustment_changed(viewer->hadjustment);
+        rstto_picture_viewer_paint(GTK_WIDGET(viewer));
     }
-    if(viewer->vadjustment)
-    {
-        viewer->vadjustment->page_size = widget->allocation.height;
-        viewer->vadjustment->upper = height * scale;
-        viewer->vadjustment->lower = 0;
-        viewer->vadjustment->step_increment = 1;
-        viewer->vadjustment->page_increment = 100;
-        viewer->vadjustment->value = y ;
-        if((viewer->vadjustment->value + viewer->vadjustment->page_size) > viewer->vadjustment->upper)
-        {
-            viewer->vadjustment->value = viewer->vadjustment->upper - viewer->vadjustment->page_size;
-        }
-        gtk_adjustment_changed(viewer->vadjustment);
-    }
-    
-    if (viewer->vadjustment)
-    {
-        gtk_adjustment_value_changed(viewer->vadjustment);
-    }
 }

Modified: ristretto/trunk/src/thumbnail_viewer.c
===================================================================
--- ristretto/trunk/src/thumbnail_viewer.c	2007-08-30 15:05:08 UTC (rev 3105)
+++ ristretto/trunk/src/thumbnail_viewer.c	2007-09-01 13:41:45 UTC (rev 3106)
@@ -178,17 +178,11 @@
     {
         case GTK_ORIENTATION_HORIZONTAL:
             viewer->priv->dimension = widget->allocation.height;
-            viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-            viewer->priv->end = widget->allocation.width / viewer->priv->dimension + viewer->priv->begin;
             break;
         case GTK_ORIENTATION_VERTICAL:
             viewer->priv->dimension = widget->allocation.width;
-            viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-            viewer->priv->end = widget->allocation.height / viewer->priv->dimension + viewer->priv->begin;
             break;
     }
-
-
 }
 
 static void
@@ -229,12 +223,6 @@
 
     if (GTK_WIDGET_REALIZED (viewer))
     {
-        viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-        if (viewer->priv->orientation == GTK_ORIENTATION_VERTICAL)
-            viewer->priv->end = widget->allocation.height / viewer->priv->dimension + viewer->priv->begin;
-        else 
-            viewer->priv->end = widget->allocation.width / viewer->priv->dimension + viewer->priv->begin;
-
         rstto_thumbnail_viewer_paint(viewer);
     }
 
@@ -245,117 +233,64 @@
 rstto_thumbnail_viewer_paint(RsttoThumbnailViewer *viewer)
 {
     GtkWidget *widget = GTK_WIDGET(viewer);
-    GdkColor color;
-
-    gint position = rstto_navigator_get_position(viewer->priv->navigator);
-
-    color.pixel = 0xffffffff;
-    GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(widget->window));
-    GdkGC *gc_bg_normal = gdk_gc_new(GDK_DRAWABLE(widget->window));
-    GdkGC *gc_bg_selected = gdk_gc_new(GDK_DRAWABLE(widget->window));
-
-    gdk_gc_set_foreground(gc, &color);
-    gdk_gc_set_foreground(gc_bg_selected,
-                        &(widget->style->bg[GTK_STATE_SELECTED]));
-    gdk_gc_set_foreground(gc_bg_normal,
-                        &(widget->style->bg[GTK_STATE_NORMAL]));
-    
-    gint i;
-    switch (viewer->priv->orientation)
+    gint nr = rstto_navigator_get_position(viewer->priv->navigator);
+    gint n_entries = rstto_navigator_get_n_files(viewer->priv->navigator);
+    gint offset = 0, i;
+    if (viewer->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
     {
-        case GTK_ORIENTATION_HORIZONTAL:
-            if (widget->allocation.width > (viewer->priv->end * viewer->priv->dimension - viewer->priv->offset))
-            {
-                gdk_window_clear_area(widget->window, 
-                                        (viewer->priv->dimension * viewer->priv->end) - viewer->priv->offset, 
-                                        0,
-                                        widget->allocation.width - (viewer->priv->dimension * viewer->priv->end - viewer->priv->offset) - 16,
-                                        widget->allocation.height);
-            }
-            break;
-        case GTK_ORIENTATION_VERTICAL:
-            if (widget->allocation.height > (viewer->priv->end * viewer->priv->dimension) - viewer->priv->offset)
-            {
-                gdk_window_clear_area(widget->window, 
-                                        0,
-                                        (viewer->priv->dimension * viewer->priv->end) - viewer->priv->offset, 
-                                        widget->allocation.width,
-                                        widget->allocation.height - (viewer->priv->dimension * viewer->priv->end - viewer->priv->offset) - 16);
-            }
-            break;
+        offset  = (((widget->allocation.width - viewer->priv->dimension) / 2) - nr * viewer->priv->dimension);
+        gint min = nr - (((widget->allocation.width - viewer->priv->dimension) / 2) / viewer->priv->dimension) - 1;
+        gint max = nr + (((widget->allocation.width - viewer->priv->dimension) / 2) / viewer->priv->dimension) + 1;
+        viewer->priv->begin = min < 0? 0 : min;
+        viewer->priv->end = max > n_entries? n_entries: max;
+        if (offset > 0)
+        {
+            gdk_window_clear_area(widget->window, 
+                                0,
+                                0,
+                                offset,
+                                widget->allocation.height);
+        }
+        if ((offset + (viewer->priv->end* viewer->priv->dimension)) < widget->allocation.width)
+        {
+            gdk_window_clear_area(widget->window, 
+                                offset + (viewer->priv->end * viewer->priv->dimension),
+                                0,
+                                widget->allocation.width - (offset + (viewer->priv->end * viewer->priv->dimension)),
+                                widget->allocation.height);
+
+        }
     }
-    for(i = viewer->priv->begin; i <= viewer->priv->end; ++i)
-    { 
-        rstto_thumbnail_viewer_paint_entry(viewer, i , i==position?TRUE:FALSE);
-    }
-    switch (viewer->priv->orientation)
+    else
     {
-        case GTK_ORIENTATION_HORIZONTAL:
-            gtk_paint_box(widget->style,
-                            widget->window,
-                            GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            0, 0, 16, viewer->priv->dimension);
-            gtk_paint_arrow(widget->style,
-                            widget->window,
-                            viewer->priv->offset == 0?GTK_STATE_INSENSITIVE:GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            GTK_ARROW_LEFT,
-                            TRUE,
-                            0,viewer->priv->dimension / 2 - 7,14,14);
+        offset  = (((widget->allocation.height - viewer->priv->dimension) / 2) - nr * viewer->priv->dimension);
+        gint min = nr - (((widget->allocation.height - viewer->priv->dimension) / 2) / viewer->priv->dimension) - 1;
+        gint max = nr + (((widget->allocation.height - viewer->priv->dimension) / 2) / viewer->priv->dimension) + 1;
+        viewer->priv->begin = min < 0? 0 : min;
+        viewer->priv->end = max > n_entries? n_entries: max;
+        if (offset > 0)
+        {
+            gdk_window_clear_area(widget->window, 
+                                0,
+                                0,
+                                widget->allocation.width,
+                                offset);
+        }
+        if ((offset + (viewer->priv->end* viewer->priv->dimension)) < widget->allocation.height)
+        {
+            gdk_window_clear_area(widget->window, 
+                                0,
+                                offset + (viewer->priv->end * viewer->priv->dimension),
+                                widget->allocation.width,
+                                widget->allocation.height - (offset + (viewer->priv->end * viewer->priv->dimension)));
 
-            gtk_paint_box(widget->style,
-                            widget->window,
-                            GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            widget->allocation.width - 16, 0, 16, viewer->priv->dimension);
-            gtk_paint_arrow(widget->style,
-                            widget->window,
-                            ((rstto_navigator_get_n_files(viewer->priv->navigator) * viewer->priv->dimension) - viewer->priv->offset) > (widget->allocation.width-32)?GTK_STATE_NORMAL:GTK_STATE_INSENSITIVE,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            GTK_ARROW_RIGHT,
-                            TRUE,
-                            widget->allocation.width - 16, viewer->priv->dimension / 2 - 7,14,14);
-            break;
-        case GTK_ORIENTATION_VERTICAL:
-            gtk_paint_box(widget->style,
-                            widget->window,
-                            GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            0, 0, viewer->priv->dimension, 16);
-            gtk_paint_arrow(widget->style,
-                            widget->window,
-                            viewer->priv->offset == 0?GTK_STATE_INSENSITIVE:GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            GTK_ARROW_UP,
-                            TRUE,
-                            viewer->priv->dimension / 2 - 7,0,14,14);
-
-            gtk_paint_box(widget->style,
-                            widget->window,
-                            GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            0, widget->allocation.height - 16, viewer->priv->dimension, 16);
-            gtk_paint_arrow(widget->style,
-                            widget->window,
-                            (i * viewer->priv->dimension) - viewer->priv->offset > widget->allocation.height - 32?GTK_STATE_NORMAL:GTK_STATE_INSENSITIVE,
-                            GTK_SHADOW_NONE,
-                            NULL,NULL,NULL,
-                            GTK_ARROW_DOWN,
-                            TRUE,
-                            viewer->priv->dimension / 2 - 7, widget->allocation.height - 16,14,14);
-            break;
+        }
     }
-    GdkCursor *cursor = gdk_cursor_new(GDK_LEFT_PTR);
-    gdk_window_set_cursor(widget->window, cursor);
-    gdk_cursor_unref(cursor);
+    viewer->priv->offset = offset;
+    for (i = viewer->priv->begin; i <= viewer->priv->end; ++i)
+    {
+        rstto_thumbnail_viewer_paint_entry(viewer, i, nr == i);
+    }
 }
 
 static void
@@ -381,114 +316,42 @@
 }
 
 static void
+cb_rstto_thumbnailer_scroll_event (RsttoThumbnailViewer *viewer, GdkEventScroll *event)
+{
+    switch(event->direction)
+    {
+        case GDK_SCROLL_UP:
+        case GDK_SCROLL_LEFT:
+            rstto_navigator_jump_back(viewer->priv->navigator);
+            break;
+        case GDK_SCROLL_DOWN:
+        case GDK_SCROLL_RIGHT:
+            rstto_navigator_jump_forward(viewer->priv->navigator);
+            break;
+    }
+}
+
+
+static void
 cb_rstto_thumbnailer_button_press_event (RsttoThumbnailViewer *viewer,
                                          GdkEventButton *event)
 {
-    GtkWidget *widget = GTK_WIDGET(viewer);
     gint n = 0;
-    gint old_offset = viewer->priv->offset;
     if (event->button == 1)
     {
         switch(viewer->priv->orientation)
         {
             case GTK_ORIENTATION_HORIZONTAL:
-                if(event->button == 1)
-                {
-                    if ((event->x < 20) || ((widget->allocation.width - event->x) < 20))
-                        n = -1;
-                    else
-                        n = (event->x - 20 + viewer->priv->offset) / viewer->priv->dimension;
-                }
+                n = (event->x - viewer->priv->offset) / viewer->priv->dimension;
                 break;
             case GTK_ORIENTATION_VERTICAL:
-                if(event->button == 1)
-                {
-                    if ((event->y < 20) || ((widget->allocation.height - event->y) < 20))
-                        n = -1;
-                    else
-                        n = (event->y - 20 + viewer->priv->offset) / viewer->priv->dimension;
-
-                }
+                n = (event->y - viewer->priv->offset) / viewer->priv->dimension;
                 break;
-
         }
-        if (n < 0)
-        {
-            if (((viewer->priv->orientation == GTK_ORIENTATION_HORIZONTAL) && (event->x < 20)) ||
-                ((viewer->priv->orientation == GTK_ORIENTATION_VERTICAL) && (event->y < 20)))
-            {
-                viewer->priv->offset -= viewer->priv->dimension;
-                if(viewer->priv->offset < 0)
-                {
-                    viewer->priv->offset = 0;
-                }
-                viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-                if (viewer->priv->orientation == GTK_ORIENTATION_VERTICAL)
-                    viewer->priv->end = widget->allocation.height / viewer->priv->dimension + viewer->priv->begin;
-                else 
-                    viewer->priv->end = widget->allocation.width / viewer->priv->dimension + viewer->priv->begin;
-            }
-            else
-            {
-                if(rstto_navigator_get_n_files(viewer->priv->navigator) == 0)
-                    viewer->priv->offset = 0;
-                else
-                {
-                    if(viewer->priv->orientation == GTK_ORIENTATION_VERTICAL)
-                    {
-                        if((rstto_navigator_get_n_files(viewer->priv->navigator) * viewer->priv->dimension - viewer->priv->offset) > widget->allocation.height)
-                        {
-                            viewer->priv->offset += viewer->priv->dimension / 2;
-                            viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-                            viewer->priv->end = widget->allocation.height / viewer->priv->dimension + viewer->priv->begin;
-                        }
-                    }
-                    if(viewer->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
-                    {
-                        if((rstto_navigator_get_n_files(viewer->priv->navigator) * viewer->priv->dimension - viewer->priv->offset) > widget->allocation.width)
-                        {
-                            viewer->priv->offset += viewer->priv->dimension / 2;
-                            viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-                            viewer->priv->end = widget->allocation.width / viewer->priv->dimension + viewer->priv->begin;
-                        }
-                    }
-                }
-            }
-            if(old_offset != viewer->priv->offset)
-                rstto_thumbnail_viewer_paint(viewer);
-        }
-        else
-        {
-            if ( n < rstto_navigator_get_n_files(viewer->priv->navigator))
-            {
-                if(GTK_WIDGET_REALIZED(widget))
-                {
-                    GdkCursor *cursor = gdk_cursor_new(GDK_WATCH);
-                    gdk_window_set_cursor(widget->window, cursor);
-                    gdk_cursor_unref(cursor);
-                }
-                rstto_navigator_set_file(viewer->priv->navigator, n);
-            }
-        }
+        rstto_navigator_set_file(viewer->priv->navigator, n);
     }
 }
 
-static void
-cb_rstto_thumbnailer_scroll_event (RsttoThumbnailViewer *viewer, GdkEventScroll *event)
-{
-    switch(event->direction)
-    {
-        case GDK_SCROLL_UP:
-        case GDK_SCROLL_LEFT:
-            rstto_navigator_jump_back(viewer->priv->navigator);
-            break;
-        case GDK_SCROLL_DOWN:
-        case GDK_SCROLL_RIGHT:
-            rstto_navigator_jump_forward(viewer->priv->navigator);
-            break;
-    }
-}
-
 void
 rstto_thumbnail_viewer_set_orientation (RsttoThumbnailViewer *viewer, GtkOrientation orientation)
 {
@@ -504,131 +367,33 @@
 static void
 cb_rstto_thumbnailer_nav_new_entry(RsttoNavigator *nav, gint nr, RsttoNavigatorEntry *entry, RsttoThumbnailViewer *viewer)
 {
-    GtkWidget *widget = GTK_WIDGET(viewer);
-    if (GTK_WIDGET_REALIZED(viewer))
-    {
-        /* Check if the entry is visible */
-        if (viewer->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
-            viewer->priv->end = widget->allocation.width / viewer->priv->dimension + viewer->priv->begin;
-        else
-            viewer->priv->end = widget->allocation.height / viewer->priv->dimension + viewer->priv->begin;
-        if ((nr >= viewer->priv->begin) && (nr <= viewer->priv->end))
-        {
-            RsttoNavigatorEntry *s_entry = rstto_navigator_get_file(nav);
-            if (s_entry == entry)
-            {
-                rstto_thumbnail_viewer_paint_entry(viewer, nr, TRUE);
-            }
-            else
-            {
-                rstto_thumbnail_viewer_paint_entry(viewer, nr, FALSE);
-            }
-        }
-    }
 }
 
 static void
 cb_rstto_thumbnailer_nav_iter_changed(RsttoNavigator *nav, gint nr, RsttoNavigatorEntry *entry, RsttoThumbnailViewer *viewer)
 {
-    GtkWidget *widget = GTK_WIDGET(viewer);
     if (GTK_WIDGET_REALIZED(viewer))
     {
-        GdkCursor *cursor = gdk_cursor_new(GDK_WATCH);
-        gdk_window_set_cursor(widget->window, cursor);
-        gdk_cursor_unref(cursor);
-        
-        if (viewer->priv->auto_center == TRUE)
-        {
-            gint old_offset = viewer->priv->offset;
-            switch (viewer->priv->orientation)
-            {
-                case GTK_ORIENTATION_HORIZONTAL:
-                    viewer->priv->offset = nr * viewer->priv->dimension - widget->allocation.width / 2 +viewer->priv->dimension / 2;
-                    if (viewer->priv->offset < 0)
-                    {
-                        viewer->priv->offset = 0;
-                        viewer->priv->begin = 0;
-                        viewer->priv->end = widget->allocation.width / viewer->priv->dimension;
-                    }
-                    else
-                    {
-                        viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-                        viewer->priv->end = widget->allocation.width / viewer->priv->dimension + viewer->priv->begin;
-                    }
-                    break;
-                case GTK_ORIENTATION_VERTICAL:
-                    viewer->priv->offset = nr * viewer->priv->dimension - widget->allocation.height / 2 +viewer->priv->dimension / 2;
-                    if (viewer->priv->offset < 0)
-                    {
-                        viewer->priv->offset = 0;
-                        viewer->priv->begin = 0;
-                        viewer->priv->end = widget->allocation.height / viewer->priv->dimension;
-                    }
-                    else
-                    {
-                        viewer->priv->begin = viewer->priv->offset / viewer->priv->dimension;
-                        viewer->priv->end = widget->allocation.height / viewer->priv->dimension + viewer->priv->begin;
-                    }
-                    break;
-            }
-            if (viewer->priv->end > rstto_navigator_get_n_files(viewer->priv->navigator))
-            {
-                viewer->priv->end = rstto_navigator_get_n_files(viewer->priv->navigator);
-            }
-            if (viewer->priv->offset == old_offset)
-            {
-                rstto_thumbnail_viewer_paint_entry(viewer, rstto_navigator_get_old_position(viewer->priv->navigator), FALSE);
-                rstto_thumbnail_viewer_paint_entry(viewer, nr, TRUE);
-            }
-            else
-            {
-                rstto_thumbnail_viewer_paint(viewer);
-            }
-        }
-        else
-        {
-            rstto_thumbnail_viewer_paint_entry(viewer, rstto_navigator_get_old_position(viewer->priv->navigator), FALSE);
-            RsttoNavigatorEntry *s_entry = rstto_navigator_get_file(nav);
-            if (s_entry == entry)
-            {
-                rstto_thumbnail_viewer_paint_entry(viewer, nr, TRUE);
-            }
-            else
-            {
-                rstto_thumbnail_viewer_paint_entry(viewer, nr, FALSE);
-            }
-        }
-        
-
-        cursor = gdk_cursor_new(GDK_LEFT_PTR);
-        gdk_window_set_cursor(widget->window, cursor);
-        gdk_cursor_unref(cursor);
+        rstto_thumbnail_viewer_paint(viewer);
     }
 }
 
 static void
 cb_rstto_thumbnailer_nav_reordered (RsttoNavigator *nav, RsttoThumbnailViewer *viewer)
 {
-    if (GTK_WIDGET_REALIZED(viewer))
-    {
-        rstto_thumbnail_viewer_paint(viewer);
-    }
 }
 
 static gboolean
 rstto_thumbnail_viewer_paint_entry (RsttoThumbnailViewer *viewer, gint nr, gboolean selected)
 {
-    GdkColor color;
     GtkWidget *widget = GTK_WIDGET(viewer);
     gint pixmap_offset = 0;
     gint max_size = viewer->priv->dimension;
     RsttoNavigatorEntry *entry = rstto_navigator_get_nth_file(viewer->priv->navigator, nr);
-    color.pixel = 0xffffffff;
     GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(widget->window));
     GdkGC *gc_bg_normal = gdk_gc_new(GDK_DRAWABLE(widget->window));
     GdkGC *gc_bg_selected = gdk_gc_new(GDK_DRAWABLE(widget->window));
 
-    gdk_gc_set_foreground(gc, &color);
     gdk_gc_set_foreground(gc_bg_selected,
                         &(widget->style->bg[GTK_STATE_SELECTED]));
     gdk_gc_set_foreground(gc_bg_normal,
@@ -636,34 +401,35 @@
     GdkPixmap *pixmap = NULL;
     if (entry)
     {
-        GdkPixbuf *pixbuf = rstto_navigator_entry_get_thumb(entry, viewer->priv->dimension - 8);
+        GdkPixbuf *pixbuf = rstto_navigator_entry_get_thumb(entry, viewer->priv->dimension - 4);
         pixmap = gdk_pixmap_new(widget->window, viewer->priv->dimension, viewer->priv->dimension, -1);
 
-        gdk_draw_rectangle(GDK_DRAWABLE(pixmap),
-                            gc,
-                            TRUE,
-                            0,
-                            0,
-                            viewer->priv->dimension,
-                            viewer->priv->dimension);
         if(selected)
         {
+            gdk_gc_set_foreground(gc, &widget->style->fg[GTK_STATE_SELECTED]);
             gdk_draw_rectangle(GDK_DRAWABLE(pixmap),
                             gc_bg_selected,
                             TRUE,
-                            4, 4, 
-                            viewer->priv->dimension - 8,
-                            viewer->priv->dimension - 8);
+                            0, 0, 
+                            viewer->priv->dimension,
+                            viewer->priv->dimension);
         }
         else
         {
+            gdk_gc_set_foreground(gc, &widget->style->fg[GTK_STATE_NORMAL]);
             gdk_draw_rectangle(GDK_DRAWABLE(pixmap),
                             gc_bg_normal,
                             TRUE,
-                            4, 4, 
-                            viewer->priv->dimension - 8,
-                            viewer->priv->dimension - 8);
+                            0, 0, 
+                            viewer->priv->dimension,
+                            viewer->priv->dimension);
         }
+        gdk_draw_rectangle(GDK_DRAWABLE(pixmap),
+                            gc,
+                            FALSE,
+                            1, 1, 
+                            viewer->priv->dimension - 3,
+                            viewer->priv->dimension - 3);
 
         if(pixbuf)
         {
@@ -704,10 +470,10 @@
                 gdk_draw_drawable(GDK_DRAWABLE(widget->window),
                             gc,
                             pixmap,
-                            pixmap_offset, 0,
-                            16 + ( nr * viewer->priv->dimension) - viewer->priv->offset + pixmap_offset,
+                            0, 0,
+                            viewer->priv->offset + ( nr * viewer->priv->dimension),
                             0,
-                            max_size - pixmap_offset,
+                            viewer->priv->dimension,
                             viewer->priv->dimension);
 
                 break;
@@ -715,11 +481,11 @@
                 gdk_draw_drawable(GDK_DRAWABLE(widget->window),
                             gc,
                             pixmap,
-                            0, pixmap_offset,
+                            0, 0,
                             0,
-                            16 + ( nr * viewer->priv->dimension) - viewer->priv->offset + pixmap_offset,
+                            viewer->priv->offset + (nr * viewer->priv->dimension),
                             viewer->priv->dimension,
-                            max_size - pixmap_offset);
+                            viewer->priv->dimension);
                 break;
         }
     }




More information about the Goodies-commits mailing list