Merge branch 'ke' into ke-lua
authorKlaus Ethgen <Klaus@Ethgen.de>
Sat, 29 Oct 2011 22:41:36 +0000 (23:41 +0100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Sat, 29 Oct 2011 22:41:36 +0000 (23:41 +0100)
* ke: (74 commits)
  rename file_data_new_simple to file_data_new_group, filedata.c cleanup
  recognize all registered extensions, even if they contain dots
  sidecar_file_priority function is already called with extension as an argument
  call notify functions in in an idle call
  move the grouping code from file_data_new to filelist_read
  separate function fortesting changed files without sidecars
  consistent use of fd->extension
  simplified grouping of sidecars
  fixed filelist_sort_compare_filedata to not return 0 no different files
  always check for sidecars by readdir
  do not use FileData entries with empty path
  updated copyright notice
  added custom tiff loader
  added long-term cache for keywords
  set stereo.fixed default values to hdmi stereo standard
  fixed stereo.fixed preferences
  fixed stereo_temp_disable functionality
  ignore raw image support reported by the pixbuf loader
  fixed using DEBUG_N from multiple threads
  Fix bug 3006812: ensure exif cache is initialized even when all files are unreadable.
  ...

1  2 
configure.in
src/Makefile.am
src/main.c

diff --combined configure.in
@@@ -291,6 -291,49 +291,49 @@@ AM_CONDITIONAL(HAVE_LCMS, [test "x$HAVE
  AC_SUBST(LCMS_CFLAGS)
  AC_SUBST(LCMS_LIBS)
  
+ #  libjpeg support
+ # ----------------------------------------------------------------------
+ AC_ARG_ENABLE([jpeg],
+   AC_HELP_STRING([--disable-jpeg], [disable direct jpeg support]),
+     [libjpeg=$enableval], [libjpeg=auto])
+ if test "x${libjpeg}" != "xno"; then
+   AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
+       HAVE_JPEG=yes
+       JPEG_LIBS=-ljpeg
+       AC_DEFINE(HAVE_JPEG, 1, [define to enable use of custom jpeg loader]),
+       HAVE_JPEG=no)
+ else
+   HAVE_JPEG=disabled
+ fi
+ AM_CONDITIONAL(HAVE_JPEG, [test "x$HAVE_JPEG" = xyes])
+ AC_SUBST(JPEG_CFLAGS)
+ AC_SUBST(JPEG_LIBS)
+ #  libtiff support
+ # ----------------------------------------------------------------------
+ AC_ARG_ENABLE([tiff],
+   AC_HELP_STRING([--disable-tiff], [disable direct tiff support]),
+     [libtiff=$enableval], [libtiff=auto])
+ if test "x${libtiff}" != "xno"; then
+   AC_CHECK_LIB(tiff, TIFFClientOpen,
+       HAVE_TIFF=yes
+       TIFF_LIBS=-ltiff
+       AC_DEFINE(HAVE_TIFF, 1, [define to enable use of custom tiff loader]),
+       HAVE_TIFF=no)
+ else
+   HAVE_TIFF=disabled
+ fi
+ AM_CONDITIONAL(HAVE_TIFF, [test "x$HAVE_TIFF" = xyes])
+ AC_SUBST(TIFF_CFLAGS)
+ AC_SUBST(TIFF_LIBS)
  
  #  Exiv2 support
  # ----------------------------------------------------------------------
@@@ -376,33 -419,6 +419,33 @@@ AM_CONDITIONAL(HAVE_LIBCHAMPLAIN_GTK, [
  AC_SUBST(LIBCHAMPLAIN_GTK_CFLAGS)
  AC_SUBST(LIBCHAMPLAIN_GTK_LIBS)
  
 +#  Lua support
 +# ----------------------------------------------------------------------
 +
 +AC_ARG_ENABLE([lua],
 +  AC_HELP_STRING([--disable-lua], [disable lua support]),
 +    [liblua=$enableval], [liblua=auto])
 +
 +if test "x${liblua}" != "xno"; then
 +  PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
 +    [
 +      HAVE_LUA=yes
 +      AC_DEFINE(HAVE_LUA, 1, [define to enable lua support])
 +    ],
 +    [
 +      HAVE_LUA=no
 +      AC_MSG_WARN([$LUA_PKG_ERRORS])
 +    ])
 +else
 +  HAVE_LUA=disabled
 +fi
 +
 +AM_CONDITIONAL(HAVE_LUA, [test "x$HAVE_LUA" = xyes])
 +AC_SUBST(LUA_CFLAGS)
 +AC_SUBST(LUA_LIBS)
 +
 +# ----------------------------------------------------------------------
 +
  AH_TOP([
  /** \file
   * \short autogenerated definition by autoheader.
@@@ -476,7 -492,7 +519,7 @@@ Flags
    Gtk:           $GTK_CFLAGS
    Glib:          $GLIB_CFLAGS
    Thread:        $GTHREAD_LIBS
-   Others:      $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS $LUA_LIBS
 -  Others:      $JPEG_LIBS $TIFF_LIBS $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS
++  Others:      $JPEG_LIBS $TIFF_LIBS $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS $LUA_LIBS
  
  Localization:
    NLS support:   $USE_NLS
@@@ -494,7 -510,6 +537,7 @@@ Support
    Lirc:          $HAVE_LIRC
    Libchamplain:               $HAVE_LIBCHAMPLAIN
    Libchamplain-gtk:   $HAVE_LIBCHAMPLAIN_GTK
 +  Lua:                 $HAVE_LUA
  
  Documentation:
    Doxygen:       $DOXYGEN
diff --combined src/Makefile.am
@@@ -7,7 -7,6 +7,7 @@@ AM_CFLAGS =                              
        $(EXIV2_CFLAGS)                 \
        $(LIBCHAMPLAIN_CFLAGS)          \
        $(LIBCHAMPLAIN_GTK_CFLAGS)      \
 +      $(LUA_CFLAGS)                   \
        -I$(top_srcdir)                 \
        -I$(top_builddir)
  
@@@ -18,7 -17,6 +18,7 @@@ AM_CXXFLAGS =                         
        $(EXIV2_CFLAGS)                 \
        $(LIBCHAMPLAIN_CFLAGS)          \
        $(LIBCHAMPLAIN_GTK_CFLAGS)      \
 +      $(LUA_CFLAGS)                   \
        -I$(top_srcdir)                 \
        -I$(top_builddir)
  
@@@ -162,10 -160,18 +162,18 @@@ geeqie_SOURCES = 
        image.h         \
        image-load.c    \
        image-load.h    \
+       image_load_gdk.c\
+       image_load_gdk.h\
+       image_load_jpeg.c\
+       image_load_jpeg.h\
+       image_load_tiff.c\
+       image_load_tiff.h\
        image-overlay.c \
        image-overlay.h \
        img-view.c      \
        img-view.h      \
+       jpeg_parser.c   \
+       jpeg_parser.h   \
        layout.c        \
        layout.h        \
        layout_config.c \
        pan-view.h      \
        pixbuf-renderer.c       \
        pixbuf-renderer.h       \
+       renderer-tiles.c        \
+       renderer-tiles.h        \
        pixbuf_util.c   \
        pixbuf_util.h   \
        preferences.c   \
        view_file_icon.c        \
        view_file_icon.h        \
        window.c        \
 -      window.h
 +      window.h        \
 +      lua.c
  
- geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS) $(LUA_LIBS)
 -geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(JPEG_LIBS) $(TIFF_LIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS)
++geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(JPEG_LIBS) $(TIFF_LIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS) $(LUA_LIBS)
  
  EXTRA_DIST = \
        $(extra_SLIK)
diff --combined src/main.c
@@@ -45,7 -45,6 +45,7 @@@
  #include "exif.h"
  #include "histogram.h"
  #include "pixbuf_util.h"
 +#include "glua.h"
  
  #ifdef HAVE_LIBCHAMPLAIN
  #ifdef HAVE_LIBCHAMPLAIN_GTK
@@@ -126,7 -125,7 +126,7 @@@ static void parse_command_line_add_file
                {
                if (!*path) *path = remove_level_from_path(path_parsed);
                if (!*file) *file = g_strdup(path_parsed);
-               *list = g_list_prepend(*list, file_data_new_simple(path_parsed));
+               *list = g_list_prepend(*list, file_data_new_group(path_parsed));
                }
  }
  
@@@ -142,7 -141,7 +142,7 @@@ static void parse_command_line_add_dir(
  
        path_parsed = g_strdup(dir);
        parse_out_relatives(path_parsed);
-       dir_fd = file_data_new_simple(path_parsed);
+       dir_fd = file_data_new_dir(path_parsed);
        
  
        if (filelist_read(dir_fd, &files, NULL))
@@@ -741,6 -740,8 +741,8 @@@ gint main(gint argc, gchar *argv[]
        g_thread_init(NULL);
        gdk_threads_init();
        gdk_threads_enter();
+       debug_mutex = g_mutex_new();
  #endif
        
        /* init execution time counter (debug only) */
  #endif
  
        exif_init();
 -      
 +
 +#ifdef HAVE_LUA
 +      lua_init();
 +#endif
 +
        /* setup random seed for random slideshow */
        srand(time(NULL));