...
 
Commits (42)
  • Michael J. Chudobiak's avatar
    Initial attempt to implement Gnome VFS support. Folders and images can now · dc797eb6
    Michael J. Chudobiak authored
    2007-01-21  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (resolve_all_symlinks),
            (gth_pixbuf_new_from_uri), (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            * libgthumb/gtk-utils.c: (create_pixbuf):
            * libgthumb/image-loader.c: (load_image_thread),
            (image_loader_get_path):
            * libgthumb/jpeg-utils.c: (do_load_internal):
            * libgthumb/print-callbacks.c: (draw_page):
            * libgthumb/thumb-loader.c: (thumb_loader),
            (thumb_loader_set_path), (thumb_loader_get_path),
            (thumb_loader_start__step2), (thumb_loader_error_cb):
            * src/dlg-photo-importer.c: (load_images_preview__step),
            (dlg_photo_importer):
            * src/dlg-web-exporter.c: (theme_dialog__sel_changed_cb):
            * src/rotation-utils.c: (apply_transformation_generic):
            Initial attempt to implement Gnome VFS support. Folders and images
            can now be opened using the "Other..." folder function (but not
            through the command line. Bug 143197. Tested with ssh:// URIs.
    
    
    svn path=/branches/vfs-testing/; revision=1277
    dc797eb6
  • Michael J. Chudobiak's avatar
    Set gtk_file_chooser_set_local_only to FALSE to permit browsing of VFS · 61ecadca
    Michael J. Chudobiak authored
    2007-01-21  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * src/gth-browser-actions-callbacks.c:
            (gth_browser_activate_action_go_location):
            * src/gth-folder-selection-dialog.c: (browse_button_clicked_cb):
            Set gtk_file_chooser_set_local_only to FALSE to permit
            browsing of VFS URIs.
    
    
    svn path=/branches/vfs-testing/; revision=1278
    61ecadca
  • Michael J. Chudobiak's avatar
    Merged changes from trunk, revs 1275:1279 · 0ac6b8b7
    Michael J. Chudobiak authored
    svn path=/branches/vfs-testing/; revision=1280
    0ac6b8b7
  • Michael J. Chudobiak's avatar
    Added gnome_authentication_manager_init to provide VFS authentication · ff8de113
    Michael J. Chudobiak authored
    2007-01-22  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * src/main.c: (main):
            Added gnome_authentication_manager_init to provide VFS
            authentication callbacks.
    
    
    svn path=/branches/vfs-testing/; revision=1281
    ff8de113
  • Michael J. Chudobiak's avatar
    Preliminary attempt to add video thumbnailing and viewing. Bug 134366. · d218346d
    Michael J. Chudobiak authored
    2007-01-22  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (file_is_mimetype), (file_is_image),
            (file_is_video), (gth_pixbuf_new_from_uri):
            * libgthumb/file-utils.h:
            * libgthumb/gth-file-list.c: (load_new_list):
            * libgthumb/image-loader.c: (load_image_thread):
            * libgthumb/thumb-loader.c: (thumb_loader):
            * src/dlg-duplicates.c: (directory_load_cb):
            * src/dlg-search.c: (file_respects_search_criteria):
            * src/gth-browser.c: (launch_videos_in_list),
            (gth_browser_hide_sidebar):
            * src/gth-monitor.c: (add_monitor_event):
            Preliminary attempt to add video thumbnailing and viewing.
            Bug 134366. Still a work in progress.
    
    
    svn path=/branches/vfs-testing/; revision=1284
    d218346d
  • Michael J. Chudobiak's avatar
    Merged changes from trunk, revs 1279:1284 · 8c59deee
    Michael J. Chudobiak authored
    
    svn path=/branches/vfs-testing/; revision=1285
    8c59deee
  • Michael J. Chudobiak's avatar
    Show a video thumbnail in image viewer mode. Launch external viewer (in · b3a0a162
    Michael J. Chudobiak authored
    2007-01-23  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/image-loader.c: (image_loader_finalize),
            (image_loader_init), (image_loader_new), (load_image_thread):
            * src/gth-browser.c: (launch_videos_in_list), (key_press_cb),
            (gth_browser_hide_sidebar):
            Show a video thumbnail in image viewer mode. Launch external
            viewer (in browser or viewer mode) by pressing "enter".
    
    
    svn path=/branches/vfs-testing/; revision=1286
    b3a0a162
  • Michael J. Chudobiak's avatar
    Cache the "large" video thumbnails made in image viewer mode. · 0cd8c532
    Michael J. Chudobiak authored
    2007-01-23  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/image-loader.c: (load_image_thread):
            Cache the "large" video thumbnails made in image viewer mode.
    
    
    svn path=/branches/vfs-testing/; revision=1287
    0cd8c532
  • Michael J. Chudobiak's avatar
    Fixed remove_special_dirs_from_path to work properly with URIs. · 5d602af4
    Michael J. Chudobiak authored
    2007-01-24  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (file_is_image_or_video),
            (remove_special_dirs_from_path), (gth_pixbuf_new_from_uri),
            (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            * libgthumb/gth-file-list.c: (load_new_list):
            * libgthumb/image-loader.c: (load_image_thread):
            * libgthumb/thumb-loader.c: (thumb_loader):
            * src/dlg-duplicates.c: (directory_load_cb):
            * src/dlg-photo-importer.c: (adjust_orientation__step):
            * src/dlg-search.c: (file_respects_search_criteria):
            * src/gth-browser.c: (launch_videos_in_list):
            * src/gth-monitor.c: (add_monitor_event):
            * src/main.c: (initialize_data):
    
            Fixed remove_special_dirs_from_path to work properly with URIs.
    
            Made file_is_image_or_video more efficient - fewer file accesses.
    
            Allow single VFS files and directories to be launched from the
            command line. Command-line-catalog (multiple files) still does
            not work yet.
    
    
    svn path=/branches/vfs-testing/; revision=1288
    5d602af4
  • Michael J. Chudobiak's avatar
    Change "Exec=gthumb %F" to "Exec=gthumb %U" to allow launching of VFS URIs · a24e161e
    Michael J. Chudobiak authored
    2007-01-24  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * data/gthumb.desktop.in:
            Change "Exec=gthumb %F" to "Exec=gthumb %U" to allow launching
            of VFS URIs from Nautilus.
    
    
    svn path=/branches/vfs-testing/; revision=1289
    a24e161e
  • Michael J. Chudobiak's avatar
    Further tweaks to remove_special_dirs_from_path, to work properly with · 498763a2
    Michael J. Chudobiak authored
    2007-01-25  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (remove_special_dirs_from_path):
            Further tweaks to remove_special_dirs_from_path, to work properly
            with file:/// URIs. Fixes catalog browsing.
    
    
    svn path=/branches/vfs-testing/; revision=1290
    498763a2
  • Michael J. Chudobiak's avatar
    Set gtk_file_chooser_set_local_only to FALSE, for VFS browsing. · 976f9f52
    Michael J. Chudobiak authored
    2007-01-25  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/dlg-save-image.c: (dlg_save_image_as):
            * src/dlg-web-exporter.c: (theme_dialog__install_theme_clicked):
            Set gtk_file_chooser_set_local_only to FALSE, for VFS browsing.
    
            * libgthumb/file-utils.c: (remove_special_dirs_from_path):
            * src/main.c: (initialize_data):
            Minor corrections to URI/path handling.
    
    
    svn path=/branches/vfs-testing/; revision=1291
    976f9f52
  • Michael J. Chudobiak's avatar
    Animated remote gifs work now, using gnome_vfs_xfer_uri. · 552da7d4
    Michael J. Chudobiak authored
    2007-01-25  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (gth_pixbuf_animation_new_from_uri):
            Animated remote gifs work now, using gnome_vfs_xfer_uri.
    
    
    svn path=/branches/vfs-testing/; revision=1292
    552da7d4
  • Michael J. Chudobiak's avatar
    Return to browser mode after showing a video in viewer mode. · 267430c1
    Michael J. Chudobiak authored
    2007-01-26  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * src/gth-browser.c: (key_press_cb):
            Return to browser mode after showing a video in viewer mode.
    
    
    svn path=/branches/vfs-testing/; revision=1293
    267430c1
  • Michael J. Chudobiak's avatar
    Merged changes from trunk, revs 1279:1284 · 2dc13d03
    Michael J. Chudobiak authored
    
    svn path=/branches/vfs-testing/; revision=1295
    2dc13d03
  • Hubert Figuière's avatar
    detect raw files. load thumbnails for RAW user libopenraw. Partially fix · e4d890c4
    Hubert Figuière authored
    2007-01-26  Hubert Figuiere  <hub@figuiere.net>
    
    	* libgthumb/file-utils.[ch] (image_is_raw): detect raw files.
    	* libgthumb/thumb-loader.c (thumb_loader): load thumbnails for
    	RAW user libopenraw. Partially fix bug #145564.
    	* configure.in: detect libopenraw.
    
    
    svn path=/branches/vfs-testing/; revision=1296
    e4d890c4
  • Michael J. Chudobiak's avatar
    Added initial VFS support for raw thumbnailing. Something doesn't quite · 54f72939
    Michael J. Chudobiak authored
    2007-01-27  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (image_is_raw),
            (make_local_copy_of_remote_file), (gth_pixbuf_new_from_uri),
            (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            * libgthumb/image-loader.c: (load_image_thread):
            * libgthumb/thumb-loader.c: (thumb_loader):
            Added initial VFS support for raw thumbnailing. Something
            doesn't quite work yet though...
    
    
    svn path=/branches/vfs-testing/; revision=1297
    54f72939
  • Michael J. Chudobiak's avatar
    Added missing config.h include to fix raw thumbnailing. Deleted debugging · c157c2d0
    Michael J. Chudobiak authored
    2007-01-27  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (gth_pixbuf_animation_new_from_uri):
            Added missing config.h include to fix raw thumbnailing. Deleted
            debugging printfs.
    
    
    svn path=/branches/vfs-testing/; revision=1298
    c157c2d0
  • Michael J. Chudobiak's avatar
    Added more complete list of raw image mime types. · c3edef0f
    Michael J. Chudobiak authored
    2007-01-27  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (image_is_raw):
            Added more complete list of raw image mime types.
    
    
    svn path=/branches/vfs-testing/; revision=1299
    c3edef0f
  • Michael J. Chudobiak's avatar
    Merged changes from trunk, revs 1294:1302 · f25f3574
    Michael J. Chudobiak authored
    svn path=/branches/vfs-testing/; revision=1303
    f25f3574
  • Michael J. Chudobiak's avatar
    Added temporary file/directory removal convenience functions. · 4e3a7d7b
    Michael J. Chudobiak authored
    2007-01-28  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (remove_temp_file), (remove_temp_dir),
            (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            Added temporary file/directory removal convenience functions.
    
    
    svn path=/branches/vfs-testing/; revision=1304
    4e3a7d7b
  • Michael J. Chudobiak's avatar
    Added printfs to debug remote permissions problems. Delete these later. · 70869ece
    Michael J. Chudobiak authored
    2007-01-28  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (check_permissions)
            Added printfs to debug remote permissions problems.
    	Delete these later.
    
            * libgthumb/file-utils.c: (is_local_file),
            (make_remote_copy_of_local_file), (gth_pixbuf_new_from_uri),
            (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            New convenience function (is_local_file), and a new function to
            copy local files to a remote VFS URI.
    
    
    svn path=/branches/vfs-testing/; revision=1305
    70869ece
  • Michael J. Chudobiak's avatar
    Deleted debugging printfs, and fixed a memory leak (was missing · f95f3a93
    Michael J. Chudobiak authored
    2007-01-29  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (check_permissions):
            Deleted debugging printfs, and fixed a memory leak (was
            missing gnome_vfs_file_info_unref)
    
            * src/dlg-jpegtran.c: (apply_transformation):
            Enabled rotation of remote VFS files, and fixed a memory leak (was
            missing gnome_vfs_file_info_unref)
    
    
    svn path=/branches/vfs-testing/; revision=1306
    f95f3a93
  • Michael J. Chudobiak's avatar
    Better error messages. · 8ed114f0
    Michael J. Chudobiak authored
    2007-01-29  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * src/dlg-jpegtran.c: (apply_transformation):
            Better error messages.
    
            * src/rotation-utils.c: (apply_transformation_jpeg):
            Better error reporting, and make better use of convenience
            functions like file_move, remove_temp_file, remove_temp_dir.
    
    
    svn path=/branches/vfs-testing/; revision=1307
    8ed114f0
  • Michael J. Chudobiak's avatar
    Added remote VFS support for reading comments. Writing comments isn't · fd24d507
    Michael J. Chudobiak authored
    2007-01-30  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/comments.c: (load_comment_from_xml):
            Added remote VFS support for reading comments.
            Writing comments isn't supported, yet.
    
    
    svn path=/branches/vfs-testing/; revision=1308
    fd24d507
  • Michael J. Chudobiak's avatar
    Added remote VFS support for reading IPTC comments. Writing comments isn't · 8590df31
    Michael J. Chudobiak authored
    2007-01-30  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/comments.c: (load_comment_from_iptc):
            Added remote VFS support for reading IPTC comments.
            Writing comments isn't supported, yet.
    
    
    svn path=/branches/vfs-testing/; revision=1310
    8590df31
  • Michael J. Chudobiak's avatar
    Added remote VFS support for reading EXIF tags. Writing tags isn't · c9c263e6
    Michael J. Chudobiak authored
    2007-01-30  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/gth-exif-utils.c: (gth_exif_data_new_from_uri),
            (get_exif_tag), (get_exif_tag_short), (get_exif_time),
            (get_exif_aperture_value), (copy_exif_data):
            * src/gth-exif-data-viewer.c: (update_exif_data):
            * libgthumb/gth-exif-utils.h:
            Added remote VFS support for reading EXIF tags.
            Writing tags isn't supported, yet.
    
    	Also merged 1302:1310 from trunk.
    
    
    svn path=/branches/vfs-testing/; revision=1311
    c9c263e6
  • Michael J. Chudobiak's avatar
    Simplified the local-copy-of-VFS-files creation routines. Added initial · 17ee37df
    Michael J. Chudobiak authored
    2007-02-01  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/comments.c: (load_comment_from_iptc),
            (load_comment_from_xml):
            * libgthumb/file-utils.c: (remove_temp_file_and_dir),
            (make_cache_copy_of_remote_file), (gth_pixbuf_new_from_uri),
            (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            * libgthumb/gth-exif-utils.c: (gth_exif_data_new_from_uri):
            * src/dlg-jpegtran.c: (apply_transformation):
            * src/rotation-utils.c: (apply_transformation_jpeg):
    
            Simplified the local-copy-of-VFS-files creation routines.
            Added initial framework to cache VFS files over longer term.
            Removed gnome_gdk_pixbuf_new_from_uri (will be deprecated).
            Known issue: "local_file" variables not always g_free'd 
            properly. This will be fixed when caching is added.
    
    
    svn path=/branches/vfs-testing/; revision=1312
    17ee37df
  • Michael J. Chudobiak's avatar
    Further simplification of local-copy-of-VFS-files creation routines. Added · c4b47460
    Michael J. Chudobiak authored
    2007-02-01  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/comments.c: (load_comment_from_iptc),
            (load_comment_from_xml):
            * libgthumb/file-utils.c: (get_cache_full_path),
            (obtain_local_file), (gth_pixbuf_new_from_uri),
            (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            * libgthumb/gth-exif-utils.c: (gth_exif_data_new_from_uri):
            * libgthumb/gthumb-init.c: (ensure_directories_exist):
            * libgthumb/typedefs.h:
            * src/dlg-jpegtran.c: (apply_transformation):
            Further simplification of local-copy-of-VFS-files creation routines.
            Added basic semi-permanent remote file caching. Need to added
            mtime checks and purging of old / excess files.
    
    
    svn path=/branches/vfs-testing/; revision=1313
    c4b47460
  • Michael J. Chudobiak's avatar
    Added mtime checking for remote file caching. Need to add mechanism to · 37c1f399
    Michael J. Chudobiak authored
    2007-02-01  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (obtain_local_file):
            Added mtime checking for remote file caching. Need to add
            mechanism to prune cache next.
    
    
    svn path=/branches/vfs-testing/; revision=1314
    37c1f399
  • Michael J. Chudobiak's avatar
    Added cache pruning. This should be a workable cache for remote VFS URIs · 271900b4
    Michael J. Chudobiak authored
    2007-02-01  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (obtain_local_file):
            Added cache pruning. This should be a workable cache for
            remote VFS URIs now.
    
    
    svn path=/branches/vfs-testing/; revision=1315
    271900b4
  • Michael J. Chudobiak's avatar
    Added prune_cache function separately. Call it at start-up also. · a9c974f9
    Michael J. Chudobiak authored
    2007-02-01  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (prune_cache), (obtain_local_file):
            * libgthumb/file-utils.h:
            * libgthumb/gthumb-init.c: (ensure_directories_exist):
            Added prune_cache function separately. Call it at start-up also.
    
    
    svn path=/branches/vfs-testing/; revision=1316
    a9c974f9
  • Michael J. Chudobiak's avatar
    Fixed display of remote URIs. · 15afe5d7
    Michael J. Chudobiak authored
    2007-02-01  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (get_uri_display_name)
            Fixed display of remote URIs.
    
            (obtain_local_file), (gth_pixbuf_new_from_uri),
            (gth_pixbuf_animation_new_from_uri):
            Stripped out "file://" from cache file names.
    
            * libgthumb/gth-exif-utils.c: (get_exif_tag), (get_exif_tag_short),
            (get_exif_time), (get_exif_aperture_value):
            * libgthumb/print-callbacks.c: (image_info_new):
            * src/rotation-utils.c: (read_orientation_field),
            (write_orientation_field), (apply_transformation_jpeg),
            (apply_transformation_generic):
            Removed extraneous remove_scheme_from_uri calls.
    
    
    svn path=/branches/vfs-testing/; revision=1318
    15afe5d7
  • Michael J. Chudobiak's avatar
    Merged changes from trunk, revs 1310:1318 · 5b367e3a
    Michael J. Chudobiak authored
    
    svn path=/branches/vfs-testing/; revision=1319
    5b367e3a
  • Michael J. Chudobiak's avatar
    News from vfs-testing branch · 0134066f
    Michael J. Chudobiak authored
    2007-02-02  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * NEWS:
            News from vfs-testing branch
    
            * libgthumb/file-utils.c: (gth_pixbuf_new_from_video),
            (gth_pixbuf_new_from_uri), (gth_pixbuf_animation_new_from_uri):
            * libgthumb/file-utils.h:
            * libgthumb/image-loader.c: (load_image_thread):
            * libgthumb/thumb-loader.c: (thumb_loader):
            Moved remaining pixbuf/animation loading routines out of
            image-loader.c and thumb-loader.c into file-utils.c, to reduce
            duplication.
    
    
    svn path=/branches/vfs-testing/; revision=1320
    0134066f
  • Michael J. Chudobiak's avatar
    Enabled editing / saving of remote VFS files. Enabled IPTC comment · 3641b454
    Michael J. Chudobiak authored
    2007-02-02  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/comments.c: (save_comment_iptc), (save_comment),
            (comments_load_comment):
            * libgthumb/dlg-save-image.c: (save_image):
            * libgthumb/file-utils.c: (copy_cache_file_to_remote_uri):
            * libgthumb/file-utils.h:
            * libgthumb/gth-exif-utils.c: (save_exif_data_to_uri),
            (copy_exif_data):
            * libgthumb/gth-exif-utils.h:
            * libgthumb/pixbuf-utils.c: (_gdk_pixbuf_savev):
            * src/dlg-jpegtran.c: (apply_transformation):
            * src/dlg-reset-exif.c: (apply_transformation):
            * src/gth-browser.c: (window_update_image_info), (save_jpeg_data):
            * src/gth-viewer.c: (viewer_update_image_info), (save_jpeg_data):
            Enabled editing / saving of remote VFS files.
            Enabled IPTC comment editing/saving on remote VFS files.
            Still minor issues with XML comment handling.
    
    
    svn path=/branches/vfs-testing/; revision=1321
    3641b454
  • Michael J. Chudobiak's avatar
    Fixed XML comment editing of remote files. · 77df6dbd
    Michael J. Chudobiak authored
    2007-02-03  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/comments.c: (save_comment):
              Fixed XML comment editing of remote files.
    
            * libgthumb/file-utils.c: (prune_cache):
              Prune cached comment files too.
    
    
    svn path=/branches/vfs-testing/; revision=1322
    77df6dbd
  • Michael J. Chudobiak's avatar
    Removed unused variable. · aaf8a2fc
    Michael J. Chudobiak authored
    2007-02-03  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/comments.c: (save_comment_iptc):
              Removed unused variable.
    
            * src/catalog-web-exporter.c:
            (copy_exif_from_orig_and_reset_orientation):
              Enabled VFS support.
    
            * src/gth-exif-data-viewer.c: (update_file_info):
              Show full path in file info sidebar.
    
    
    svn path=/branches/vfs-testing/; revision=1323
    aaf8a2fc
  • Michael J. Chudobiak's avatar
    Set local_only to false, to fix bug 403932. · 35054cba
    Michael J. Chudobiak authored
    2007-02-03  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * data/glade/gthumb_camera.glade:
            * data/glade/gthumb_convert.glade:
            * data/glade/gthumb_png_exporter.glade:
            * data/glade/gthumb_preferences.glade:
            * data/glade/gthumb_search.glade:
            * data/glade/gthumb_tools.glade:
              Set local_only to false, to fix bug 403932.
    
    
    svn path=/branches/vfs-testing/; revision=1324
    35054cba
  • Michael J. Chudobiak's avatar
    Do not prune the cache every time the remote cache is added to - just at · ac9ea82b
    Michael J. Chudobiak authored
    2007-02-06  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (obtain_local_file):
              Do not prune the cache every time the remote 
              cache is added to - just at startup.
    
    
    svn path=/branches/vfs-testing/; revision=1325
    ac9ea82b
  • Michael J. Chudobiak's avatar
    Don't use f_load_scaled_jpeg on remote VFS files. It is MUCH faster to use · 7018ef06
    Michael J. Chudobiak authored
    2007-02-06  Michael J. Chudobiak  <mjc@cvs.gnome.org>
    
            * libgthumb/file-utils.c: (gth_pixbuf_animation_new_from_uri):
              Don't use f_load_scaled_jpeg on remote VFS files. It is MUCH
              faster to use a cached copy, for typical file sizes.
    
            * src/gth-browser.c: (dir_list_started_cb):
              Changed "Wait Please..." string to "Getting directory listing...",
              for clarity.
    
    
    svn path=/branches/vfs-testing/; revision=1326
    7018ef06
  • Michael J. Chudobiak's avatar
    Merged changes from trunk, revs 1318:1329 · ef09f65e
    Michael J. Chudobiak authored
    
    svn path=/branches/vfs-testing/; revision=1330
    ef09f65e
2007-02-07 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-viewer.c (gth_viewer_exec_pixbuf_op):
* src/gth-browser.c (gth_browser_exec_pixbuf_op):
Ignore a new gth_pixbuf_op when there already one running.
Fixes bug #392632 – crash in gThumb Image Viewer: repeatedly
pressing Ctrl... Patch by manuel
2007-02-07 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-browser-ui.h:
* src/gth-viewer-ui.h:
* src/gth-viewer-actions-entries.h:
* src/gth-browser-actions-entries.h:
* src/gth-viewer.c:
* src/gth-browser.c: removed the info_bar in the viewer window and
in the browser window when the file list is hidden. Added a
'properties' button on the toolbar.
Added a 'zoot to fit width' button in the viewer toolbar.
* libgthumb/gthumb-stock.h:
* libgthumb/gthumb-stock.c: added GTHUMB_STOCK_METADATA
* src/gth-window.c: indentation fix.
* libgthumb/gth-file-list.c: get the mime type only once and only here,
this is used to speed up list loading when slow mime detection is
used, and is also used to avoid to get the image mime type in the
image-loader thread (which is dangerous).
* libgthumb/file-data.c:
* libgthumb/file-data.h: added a mime_type field.
* libgthumb/thumb-loader.c: no need to use the accurate mime detection
system and no need to load a gif image as an animation in the
thumbnail loader.
* libgthumb/image-loader.c: removed an identation level.
* libgthumb/image-loader.h:
* libgthumb/thumb-loader.h: added a mime_type argument to the
[thumb|image]_loader_set_path functions
* src/gthumb-preloader.c:
* src/gth-batch-op.c:
* src/dlg-jpegtran.c:
* src/dlg-duplicates.c:
* src/catalog-web-exporter.c:
* src/dlg-convert.c:
* src/catalog-png-exporter.c:
* libgthumb/print-callbacks.c: updated calls to image_loader_set_path
adding the new mime_type argument (setting the mime_type to NULL for now).
* libgthumb/file-utils.h:
* libgthumb/file-utils.c: function image_is_type is now public
added function can_load_mime_type, removed image_is_gif__accurate.
2007-02-06 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (gth_pixbuf_animation_new_from_uri):
Don't use f_load_scaled_jpeg on remote VFS files. It is MUCH
faster to use a cached copy, for typical file sizes.
* src/gth-browser.c: (dir_list_started_cb):
Changed "Wait Please..." string to "Getting directory listing...",
for clarity.
2007-02-06 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (obtain_local_file):
Do not prune the cache every time the remote
cache is added to - just at startup.
2007-02-03 Michael J. Chudobiak <mjc@cvs.gnome.org>
* data/glade/gthumb_camera.glade:
* data/glade/gthumb_convert.glade:
* data/glade/gthumb_png_exporter.glade:
* data/glade/gthumb_preferences.glade:
* data/glade/gthumb_search.glade:
* data/glade/gthumb_tools.glade:
Set local_only to false, to fix bug 403932.
2007-02-03 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/comments.c: (save_comment_iptc):
Removed unused variable.
* src/catalog-web-exporter.c:
(copy_exif_from_orig_and_reset_orientation):
Enabled VFS support.
* src/gth-exif-data-viewer.c: (update_file_info):
Show full path in file info sidebar.
2007-02-03 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/comments.c: (save_comment):
Fixed XML comment editing of remote files.
* libgthumb/file-utils.c: (prune_cache):
Prune cached comment files too.
2007-02-02 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/comments.c: (save_comment_iptc), (save_comment),
(comments_load_comment):
* libgthumb/dlg-save-image.c: (save_image):
* libgthumb/file-utils.c: (copy_cache_file_to_remote_uri):
* libgthumb/file-utils.h:
* libgthumb/gth-exif-utils.c: (save_exif_data_to_uri),
(copy_exif_data):
* libgthumb/gth-exif-utils.h:
* libgthumb/pixbuf-utils.c: (_gdk_pixbuf_savev):
* src/dlg-jpegtran.c: (apply_transformation):
* src/dlg-reset-exif.c: (apply_transformation):
* src/gth-browser.c: (window_update_image_info), (save_jpeg_data):
* src/gth-viewer.c: (viewer_update_image_info), (save_jpeg_data):
Enabled editing / saving of remote VFS files.
Enabled IPTC comment editing/saving on remote VFS files.
Still minor issues with XML comment handling.
2007-02-02 Michael J. Chudobiak <mjc@cvs.gnome.org>
* NEWS:
News from vfs-testing branch
* libgthumb/file-utils.c: (gth_pixbuf_new_from_video),
(gth_pixbuf_new_from_uri), (gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
* libgthumb/image-loader.c: (load_image_thread):
* libgthumb/thumb-loader.c: (thumb_loader):
Moved remaining pixbuf/animation loading routines out of
image-loader.c and thumb-loader.c into file-utils.c, to reduce
duplication.
2007-02-01 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (get_uri_display_name)
Fixed display of remote URIs.
(obtain_local_file), (gth_pixbuf_new_from_uri),
(gth_pixbuf_animation_new_from_uri):
Stripped out "file://" from cache file names.
* libgthumb/gth-exif-utils.c: (get_exif_tag), (get_exif_tag_short),
(get_exif_time), (get_exif_aperture_value):
* libgthumb/print-callbacks.c: (image_info_new):
* src/rotation-utils.c: (read_orientation_field),
(write_orientation_field), (apply_transformation_jpeg),
(apply_transformation_generic):
Removed extraneous remove_scheme_from_uri calls.
2007-02-01 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-browser.c: removed commented code.
* libgthumb/gth-file-list.c: stop loading the thumbnails if the queue
is not void.
* src/gth-dir-list.c (gth_dir_list_change_to): always call
path_list_async_new, instead of waiting for the file list to be
interrupted.
2007-02-01 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (prune_cache), (obtain_local_file):
* libgthumb/file-utils.h:
* libgthumb/gthumb-init.c: (ensure_directories_exist):
Added prune_cache function separately. Call it at start-up also.
2007-02-01 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (obtain_local_file):
Added cache pruning. This should be a workable cache for
remote VFS URIs now.
2007-02-01 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (obtain_local_file):
Added mtime checking for remote file caching. Need to add
mechanism to prune cache next.
2007-02-01 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/comments.c: (load_comment_from_iptc),
(load_comment_from_xml):
* libgthumb/file-utils.c: (get_cache_full_path),
(obtain_local_file), (gth_pixbuf_new_from_uri),
(gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
* libgthumb/gth-exif-utils.c: (gth_exif_data_new_from_uri):
* libgthumb/gthumb-init.c: (ensure_directories_exist):
* libgthumb/typedefs.h:
* src/dlg-jpegtran.c: (apply_transformation):
Further simplification of local-copy-of-VFS-files creation routines.
Added basic semi-permanent remote file caching. Need to added
mtime checks and purging of old / excess files.
2007-02-01 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/comments.c: (load_comment_from_iptc),
(load_comment_from_xml):
* libgthumb/file-utils.c: (remove_temp_file_and_dir),
(make_cache_copy_of_remote_file), (gth_pixbuf_new_from_uri),
(gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
* libgthumb/gth-exif-utils.c: (gth_exif_data_new_from_uri):
* src/dlg-jpegtran.c: (apply_transformation):
* src/rotation-utils.c: (apply_transformation_jpeg):
Simplified the local-copy-of-VFS-files creation routines.
Added initial framework to cache VFS files over longer term.
Removed gnome_gdk_pixbuf_new_from_uri (will be deprecated).
Known issue: "local_file" variables not always g_free'd
properly. This will be fixed when caching is added.
2007-01-30 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/gth-exif-utils.c: (gth_exif_data_new_from_uri),
(get_exif_tag), (get_exif_tag_short), (get_exif_time),
(get_exif_aperture_value), (copy_exif_data):
* src/gth-exif-data-viewer.c: (update_exif_data):
* libgthumb/gth-exif-utils.h:
Added remote VFS support for reading EXIF tags.
Writing tags isn't supported, yet.
2007-01-30 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/comments.c: (load_comment_from_iptc):
Added remote VFS support for reading IPTC comments.
Writing comments isn't supported, yet.
2007-01-30 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/comments.c: (load_comment_from_xml):
Added remote VFS support for reading comments.
Writing comments isn't supported, yet.
2007-01-29 Michael J. Chudobiak <mjc@cvs.gnome.org>
* src/dlg-jpegtran.c: (apply_transformation):
Better error messages.
* src/rotation-utils.c: (apply_transformation_jpeg):
Better error reporting, and make better use of convenience
functions like file_move, remove_temp_file, remove_temp_dir.
2007-01-29 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (check_permissions):
Deleted debugging printfs, and fixed a memory leak (was
missing gnome_vfs_file_info_unref)
* src/dlg-jpegtran.c: (apply_transformation):
Enabled rotation of remote VFS files, and fixed a memory leak (was
missing gnome_vfs_file_info_unref)
2007-01-28 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (check_permissions)
Added printfs to debug remote permissions problems.
Delete these later.
* libgthumb/file-utils.c: (is_local_file),
(make_remote_copy_of_local_file), (gth_pixbuf_new_from_uri),
(gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
New convenience function (is_local_file), and a new function to
copy local files to a remote VFS URI.
2007-01-28 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (remove_temp_file), (remove_temp_dir),
(gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
Added temporary file/directory removal convenience functions.
2007-01-28 Paolo Bacchilega <paobac@cvs.gnome.org>
* data/glade/gthumb_crop.glade:
* src/dlg-crop.c:
Added option to invert the aspect ratio even for non-custom ratios.
Fixes bug #389870 – Missing option in Image Crop Aspect Ratio
2007-01-28 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-fullscreen.c (viewer_key_press_cb):
* src/gth-browser.c (key_press_cb):
* src/gth-viewer.c (viewer_key_press_cb):
* libgthumb/jpegutils/jpegtran.c (jtransform_perfect_transform):
Fixed compiler warnings.
2007-01-28 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-fullscreen.c:
* src/gth-browser.c:
* src/gth-browser.c:
* src/gth-viewer.c:
* libgthumb/image-viewer.c:
* libgthumb/image-viewer.h:
Add more signals to ImageViewer so that it can handle more keypresses
autonomically (#401544). Patch by Björn Lindqvist.
2007-01-27 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (image_is_raw):
Added more complete list of raw image mime types.
2007-01-27 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (gth_pixbuf_animation_new_from_uri):
Added missing config.h include to fix raw thumbnailing. Deleted
debugging printfs.
2007-01-27 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (image_is_raw),
(make_local_copy_of_remote_file), (gth_pixbuf_new_from_uri),
(gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
* libgthumb/image-loader.c: (load_image_thread):
* libgthumb/thumb-loader.c: (thumb_loader):
Added initial VFS support for raw thumbnailing. Something
doesn't quite work yet though...
2007-01-26 Hubert Figuiere <hub@figuiere.net>
* libgthumb/file-utils.[ch] (image_is_raw): detect raw files.
* libgthumb/thumb-loader.c (thumb_loader): load thumbnails for
RAW user libopenraw. Partially fix bug #145564.
* configure.in: detect libopenraw.
2007-01-26 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/jpegutils/jpegtran.c: (update_exif_thumbnail),
(jtransform_perfect_transform), (jpegtran_internal),
(jpegtran_thumbnail), (jpegtran):
* libgthumb/jpegutils/jpegtran.h:
* src/catalog-web-exporter.c: (export__copy_image):
* src/dlg-jpegtran.c: (apply_transformation):
* src/dlg-photo-importer.c: (adjust_orientation__step):
* src/rotation-utils.c: (jpeg_mcu_dialog),
(apply_transformation_jpeg):
* src/rotation-utils.h:
Applied Jef Driesen's callback-based jpegtran scheme, for greater
efficiency during lossless rotates, etc. Bug 361913.
2007-01-26 Michael J. Chudobiak <mjc@cvs.gnome.org>
* src/gth-browser.c: (key_press_cb):
Return to browser mode after showing a video in viewer mode.
2007-01-25 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (gth_pixbuf_animation_new_from_uri):
Animated remote gifs work now, using gnome_vfs_xfer_uri.
2007-01-25 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/dlg-save-image.c: (dlg_save_image_as):
* src/dlg-web-exporter.c: (theme_dialog__install_theme_clicked):
Set gtk_file_chooser_set_local_only to FALSE, for VFS browsing.
* libgthumb/file-utils.c: (remove_special_dirs_from_path):
* src/main.c: (initialize_data):
Minor corrections to URI/path handling.
2007-01-25 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (remove_special_dirs_from_path):
Further tweaks to remove_special_dirs_from_path, to work properly
with file:/// URIs. Fixes catalog browsing.
2007-01-24 Michael J. Chudobiak <mjc@cvs.gnome.org>
* data/gthumb.desktop.in:
Change "Exec=gthumb %F" to "Exec=gthumb %U" to allow launching
of VFS URIs from Nautilus.
2007-01-24 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (file_is_image_or_video),
(remove_special_dirs_from_path), (gth_pixbuf_new_from_uri),
(gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
* libgthumb/gth-file-list.c: (load_new_list):
* libgthumb/image-loader.c: (load_image_thread):
* libgthumb/thumb-loader.c: (thumb_loader):
* src/dlg-duplicates.c: (directory_load_cb):
* src/dlg-photo-importer.c: (adjust_orientation__step):
* src/dlg-search.c: (file_respects_search_criteria):
* src/gth-browser.c: (launch_videos_in_list):
* src/gth-monitor.c: (add_monitor_event):
* src/main.c: (initialize_data):
Fixed remove_special_dirs_from_path to work properly with URIs.
Made file_is_image_or_video more efficient - fewer file accesses.
Allow single VFS files and directories to be launched from the
command line. Command-line-catalog (multiple files) still does
not work yet.
2007-01-23 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/image-loader.c: (load_image_thread):
Cache the "large" video thumbnails made in image viewer mode.
2007-01-23 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/image-loader.c: (image_loader_finalize),
(image_loader_init), (image_loader_new), (load_image_thread):
* src/gth-browser.c: (launch_videos_in_list), (key_press_cb),
(gth_browser_hide_sidebar):
Show a video thumbnail in image viewer mode. Launch external
viewer (in browser or viewer mode) by pressing "enter".
2007-01-22 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (file_is_mimetype), (file_is_image),
(file_is_video), (gth_pixbuf_new_from_uri):
* libgthumb/file-utils.h:
* libgthumb/gth-file-list.c: (load_new_list):
* libgthumb/image-loader.c: (load_image_thread):
* libgthumb/thumb-loader.c: (thumb_loader):
* src/dlg-duplicates.c: (directory_load_cb):
* src/dlg-search.c: (file_respects_search_criteria):
* src/gth-browser.c: (launch_videos_in_list),
(gth_browser_hide_sidebar):
* src/gth-monitor.c: (add_monitor_event):
Preliminary attempt to add video thumbnailing and viewing.
Bug 134366. Still a work in progress.
2007-01-22 Michael J. Chudobiak <mjc@cvs.gnome.org>
* src/main.c: (main):
Added gnome_authentication_manager_init to provide VFS
authentication callbacks.
2007-01-22 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-viewer.c:
* src/main.c: fixed compilation when gtkunique is disabled.
2007-01-22 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-window.c:
* src/main.c:
* src/main.h:
* src/Makefile.am:
* configure.in: the gtkunique dependency is now optional.
2007-01-22 Paolo Bacchilega <paobac@cvs.gnome.org>
* data/GNOME_GThumb.server.in.in: removed
* src/GNOME_GThumb.idl: removed
* src/gth-application.c: removed
* src/gth-application.h: removed
* data/Makefile.am:
* libgthumb/Makefile.am:
* libgthumb/jpegutils/Makefile.am:
* po/POTFILES.in:
* src/gth-viewer.c:
* src/gth-window.c:
* src/main.c:
* src/main.h:
* src/Makefile.am:
* configure.in:
* README:
Use GtkUnique to provide a single instance application.
Removed the bonobo dependency (#389197).
2007-01-21 Michael J. Chudobiak <mjc@cvs.gnome.org>
* src/gth-browser-actions-callbacks.c:
(gth_browser_activate_action_go_location):
* src/gth-folder-selection-dialog.c: (browse_button_clicked_cb):
Set gtk_file_chooser_set_local_only to FALSE to permit
browsing of VFS URIs.
2007-01-21 Michael J. Chudobiak <mjc@cvs.gnome.org>
* libgthumb/file-utils.c: (resolve_all_symlinks),
(gth_pixbuf_new_from_uri), (gth_pixbuf_animation_new_from_uri):
* libgthumb/file-utils.h:
* libgthumb/gtk-utils.c: (create_pixbuf):
* libgthumb/image-loader.c: (load_image_thread),
(image_loader_get_path):
* libgthumb/jpeg-utils.c: (do_load_internal):
* libgthumb/print-callbacks.c: (draw_page):
* libgthumb/thumb-loader.c: (thumb_loader),
(thumb_loader_set_path), (thumb_loader_get_path),
(thumb_loader_start__step2), (thumb_loader_error_cb):
* src/dlg-photo-importer.c: (load_images_preview__step),
(dlg_photo_importer):
* src/dlg-web-exporter.c: (theme_dialog__sel_changed_cb):
* src/rotation-utils.c: (apply_transformation_generic):
Initial attempt to implement Gnome VFS support. Folders and images
can now be opened using the "Other..." folder function (but not
through the command line. Bug 143197. Tested with ssh:// URIs.
2007-01-21 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-browser.c: use pack_end to add the filterbar, this way the
......
vfs-testing branch
------------------
* Added support for displaying gnome-vfs locations (bug #143197)
* Added thumbnailing and player-launching for videos (bug #134366)
* Added thumbnailing for RAW photos (bug #145564)
version 2.9.1
-------------
* Added red-eye removal tool (bug #140533).
......
This is the distribution of gThumb, an image viewer and browser utility
for the GNOME environment.
for the GNOME environment.
Notes:
......@@ -7,13 +7,13 @@ Notes:
* versions from 1.100 to 2.0 are for the GNOME 2.0 environment, though
they can be used even in the GNOME 2.2 environment but in this case
gThumb and Nautilus do not share the thumbnails database.
gThumb and Nautilus do not share the thumbnails database.
* versions 2.2.0 to 2.4.2 are for GNOME 2.2 and GNOME 2.4.
* versions 2.5 and higher are for GNOME 2.6.
* more information about gthumb can be found at:
* more information about gthumb can be found at:
http://gthumb.sourceforge.net
What is gThumb
......@@ -31,8 +31,8 @@ What is gThumb
* gThumb is an image viewer
+ View single images (including GIF animations). Supported image
types are: BMP, JPEG, GIF, PNG, TIFF, TGA, ICO, XPM.
+ View EXIF data attached to JPEG images.
types are: BMP, JPEG, GIF, PNG, TIFF, TGA, ICO, XPM.
+ View EXIF data attached to JPEG images.
+ View in fullscreen mode.
+ View images rotated, flipped, mirrored.
......@@ -47,7 +47,7 @@ What is gThumb
* gThumb is an image editor
+ Change image hue, saturation, lightness, contrast and adjust colors.
+ Change image hue, saturation, lightness, contrast and adjust colors.
+ Scale and rotate images.
+ Save images in the following formats: JPEG, PNG, TIFF, TGA.
......@@ -68,7 +68,7 @@ Licensing
=========
This program is released under the terms of the GNU General Public
License (GNU GPL).
License (GNU GPL).
You can find a copy of the license in the file COPYING.
......@@ -76,29 +76,28 @@ Compiling
=========
In order to build this program you need a working GNOME environment
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:
* glib version >= 2.6.0
* gtk version >= 2.8.0
* gtk version >= 2.8.0
* libxml version >= 2.4.0
* libgnome version >= 2.6.0
* libgnomeui version >= 2.6.0
* libgnomecanvas version >= 2.6.0
* gnome-vfs version >= 2.6.0
* libglade version >= 2.4.0
* libgnome version >= 2.6.0
* libgnomeui version >= 2.6.0
* libgnomecanvas version >= 2.6.0
* gnome-vfs version >= 2.6.0
* libglade version >= 2.4.0
* libgnomeprint version >= 2.6.0
* libgnomeprintui version >= 2.6.0
* libbonobo version >= 2.6.0
* libbonoboui version >= 2.6.0
* intltool version >= 0.35.0
* libexif version >= 0.6.9
* libjpeg
* gtkunique version >= 0.9.1
If the libtiff library is present you can save images in TIFF
format.
If the libgphoto2 library version >= 2.1.3 is present you can import
If the libgphoto2 library version >= 2.1.3 is present you can import
photos from your camera.
If the libiptc library version >= 0.2.1 is present you can store
......@@ -107,7 +106,7 @@ Compiling
Download
========
* Tar archives can be found here:
* Tar archives can be found here:
http://ftp.gnome.org/pub/GNOME/sources/gthumb
......
......@@ -30,11 +30,11 @@ LIBGNOMEUI_REQUIRED=2.6.0
LIBGNOMECANVAS_REQUIRED=2.6.0
GNOME_VFS_REQUIRED=2.6.0
LIBGLADE_REQUIRED=2.4.0
LIBBONOBO_REQUIRED=2.6.0
LIBBONOBOUI_REQUIRED=2.6.0
LIBEXIF_REQUIRED=0.6.13
LIBIPTCDATA_REQUIRED=0.2.1
LIBGPHOTO_REQUIRED=2.1.3
GTKUNIQUE_REQUIRED=0.9.1
LIBOPENRAW_REQUIRED=0.0.2
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
......@@ -44,16 +44,14 @@ AC_SUBST(LIBGNOMEUI_REQUIRED)
AC_SUBST(LIBGNOMECANVAS_REQUIRED)
AC_SUBST(GNOME_VFS_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
AC_SUBST(LIBBONOBO_REQUIRED)
AC_SUBST(LIBBONOBOUI_REQUIRED)
AC_SUBST(LIBEXIF_REQUIRED)
AC_SUBST(LIBIPTCDATA_REQUIRED)
AC_SUBST(LIBGPHOTO_REQUIRED)
AC_SUBST(GTKUNIQUE_REQUIRED)
AC_SUBST(LIBOPENRAW_REQUIRED)
dnl ===========================================================================
AM_PATH_ORBIT2
PKG_CHECK_MODULES(GTHUMB, \
glib-2.0 >= $GLIB_REQUIRED \
gthread-2.0 \
......@@ -228,11 +226,36 @@ if test x$enable_gphoto2 = xyes ; then
[HAVE_GPHOTO2=no])
fi
dnl ###############################################
#
# Checks for gtkunique
#
AC_ARG_ENABLE([gtkunique],
[AC_HELP_STRING([--disable-gtkunique],[disable support for gtkunique])],,
[enable_gtkunique=yes])
HAVE_GTKUNIQUE=no
if test x$enable_gtkunique = xyes ; then
PKG_CHECK_MODULES(GTKUNIQUE, gtkunique-1.0 >= $GTKUNIQUE_REQUIRED,
[AC_DEFINE(HAVE_GTKUNIQUE, 1, [Define to 1 to enable gtkunique support])
HAVE_GTKUNIQUE=yes],
[HAVE_GTKUNIQUE=no])
fi
#
# Checks for libopenraw
#
AC_ARG_ENABLE([libopenraw],
[AC_HELP_STRING([--disable-libopenraw],[disable support for libopenraw])],,
[enable_libopenraw=yes])
HAVE_LIBOPENRAW=no
if test x$enable_libopenraw = xyes ; then
PKG_CHECK_MODULES(LIBOPENRAW, libopenraw-gnome-1.0 >= $LIBOPENRAW_REQUIRED,
[AC_DEFINE(HAVE_LIBOPENRAW, 1, [Define to 1 to enable libopenraw support])
HAVE_LIBOPENRAW=yes],
[HAVE_LIBOPENRAW=no])
fi
IDL_MODULES="bonobo-activation-2.0 libbonobo-2.0 libbonoboui-2.0"
IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $IDL_MODULES | $srcdir/add-include-prefix`"
AC_SUBST(IDL_INCLUDES)
dnl ###############################################
......@@ -331,13 +354,15 @@ echo "
Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
Have XRender: ${HAVE_RENDER}
Have XTest: ${have_xtest}
Source code location: ${srcdir}
Compiler: ${CC}
Have XRender: ${HAVE_RENDER}
Have XTest: ${have_xtest}
Have XF86VidModeSetGamma: ${have_xf86gamma}
Have libiptcdata: ${HAVE_IPTC}
Have libiptcdata: ${HAVE_IPTC}
Have libtiff: ${HAVE_TIFF}
Have libgphoto: ${HAVE_GPHOTO2}
Have gtkunique: ${HAVE_GTKUNIQUE}
Have libopenraw: ${HAVE_LIBOPENRAW}
"
<oaf_info>
<oaf_server iid="OAFIID:GNOME_GThumb_Application_Factory" type="exe" location="goo">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/ObjectFactory:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" _value="GThumb Application Factory"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_GThumb_Application" type="factory" location="OAFIID:GNOME_GThumb_Application_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
<item value="IDL:GNOME/Goobox/Application:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" _value="GThumb Application"/>
</oaf_server>
</oaf_info>
......@@ -32,14 +32,6 @@ schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
bonobodir = $(libdir)/bonobo
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_GThumb.server.in.in
server_DATA = $(server_in_files:.server.in.in=.server)
$(server_in_files:.server.in.in=.server.in): $(server_in_files)
sed -e "s|\@BONOBODIR\@|$(bonobodir)|" $< > $@
@INTLTOOL_SERVER_RULE@
if GCONF_SCHEMAS_INSTALL
install-data-local:
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/data/$(schema_DATA)
......@@ -52,13 +44,8 @@ EXTRA_DIST = \
$(desktop_in_files) \
$(desktop_DATA) \
$(icon_DATA) \
$(man_MANS) \
$(server_in_files)
$(man_MANS)
DISTCLEANFILES = \
$(schema_DATA) \
$(desktop_DATA) \
$(server_DATA) \
GNOME_GThumb.server.in \
GNOME_GThumb.server
$(desktop_DATA)
......@@ -445,7 +445,7 @@
<property name="visible">True</property>
<property name="title" translatable="yes">Choose destination folder</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">True</property>
<property name="local_only">False</property>
<property name="show_hidden">False</property>
<property name="do_overwrite_confirmation">False</property>
<property name="width_chars">-1</property>
......
......@@ -423,7 +423,7 @@ Overwrite</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Choose destination folder</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">True</property>
<property name="local_only">False</property>
<property name="show_hidden">False</property>
<property name="width_chars">-1</property>
</widget>
......
......@@ -897,105 +897,10 @@
<property name="right_padding">0</property>
<child>
<widget class="GtkTable" id="table3">
<widget class="GtkVBox" id="vbox8">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<widget class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkHBox" id="custom_ratio_box">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkSpinButton" id="ratio_w_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<property name="numeric">False</property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
<property name="adjustment">1 1 9999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="ratio_swap_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="ratio_swap_image">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="ratio_h_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<property name="numeric">False</property>
<property name="update_policy">GTK_UPDATE_IF_VALID</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
<property name="adjustment">1 1 9999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
</packing>
</child>
<property name="spacing">6</property>
<child>
<widget class="GtkOptionMenu" id="ratio_optionmenu">
......@@ -1072,12 +977,104 @@
</child>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="custom_ratio_box">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkSpinButton" id="ratio_w_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<property name="numeric">False</property>
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
<property name="adjustment">1 1 9999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="label">:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="ratio_h_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<property name="numeric">False</property>
<property name="update_policy">GTK_UPDATE_IF_VALID</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
<property name="adjustment">1 1 9999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="invert_ratio_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">I_nvert aspect ratio</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
......
......@@ -649,7 +649,7 @@
<property name="visible">True</property>
<property name="title" translatable="yes">Choose destination folder</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">True</property>
<property name="local_only">False</property>
<property name="show_hidden">False</property>
<property name="width_chars">-1</property>
</widget>
......
......@@ -578,7 +578,7 @@
<property name="visible">True</property>
<property name="title" translatable="yes">Choose startup folder</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">True</property>
<property name="local_only">False</property>
<property name="show_hidden">False</property>
<property name="do_overwrite_confirmation">False</property>
<property name="width_chars">-1</property>
......
......@@ -602,7 +602,7 @@
<property name="visible">True</property>
<property name="title" translatable="yes"></property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">True</property>
<property name="local_only">False</property>
<property name="show_hidden">False</property>
<property name="do_overwrite_confirmation">False</property>
<property name="width_chars">-1</property>
......
......@@ -1090,7 +1090,7 @@ keys to rotate and save losslessly, bypassing this dialog.&lt;/i&gt;&lt;/small&g
<property name="visible">True</property>
<property name="title" translatable="yes"></property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">True</property>
<property name="local_only">False</property>
<property name="show_hidden">False</property>
<property name="do_overwrite_confirmation">False</property>
<property name="width_chars">-1</property>
......@@ -3380,7 +3380,7 @@ keys to rotate and save losslessly, bypassing this dialog.&lt;/i&gt;&lt;/small&g
<property name="visible">True</property>
<property name="title" translatable="yes">Choose destination folder</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">True</property>
<property name="local_only">False</property>
<property name="show_hidden">False</property>
<property name="do_overwrite_confirmation">False</property>
<property name="width_chars">-1</property>
......
......@@ -4,7 +4,7 @@ _GenericName=Image Viewer
_Comment=View and organize your images
Categories=GNOME;GTK;Application;Graphics;Viewer;
Encoding=UTF-8
Exec=gthumb %F
Exec=gthumb %U
Icon=gthumb
MimeType=image/bmp;image/jpeg;image/gif;image/png;image/tiff;image/x-bmp;image/x-ico;image/x-png;image/x-tga;image/xpm;
StartupNotify=true
......
......@@ -2,7 +2,7 @@ SUBDIRS = icons cursors jpegutils
DIST_SUBDIRS = icons cursors jpegutils
if ENABLE_DEPRECATIONS
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
else
DISABLE_DEPRECATED =
endif
......@@ -14,6 +14,7 @@ INCLUDES = \
$(GTHUMB_CFLAGS) \
-DGTHUMB_MODULEDIR=\""$(libdir)/gthumb/modules"\" \
-DGTHUMB_GLADEDIR=\""$(gladedir)"\" \
$(LIBOPENRAW_CFLAGS) \
$(DISABLE_DEPRECATED)
libgthumbdir = $(libdir)
......@@ -139,6 +140,7 @@ libgthumb_la_LIBADD = \
$(TIFF_LIBS) \
$(GTHUMB_LIBS) \
$(IPTCDATA_LIBS) \
$(LIBOPENRAW_LIBS) \
$(top_builddir)/libgthumb/jpegutils/libgthumb-jpegutils.la
gthumb-marshal.h: gthumb-marshal.list $(GLIB_GENMARSHAL)
......
......@@ -359,13 +359,24 @@ load_comment_from_iptc (const char *filename)
struct tm t;
int i;
int got_date = 0, got_time = 0;
char *local_file = NULL;
if (filename == NULL)
return NULL;
d = iptc_data_new_from_jpeg (filename);
if (!d)
/* libiptcdata does not support VFS URIs directly, so make a temporary local
copy of remote comment files. */
local_file = obtain_local_file (filename);
if (local_file == NULL)
return NULL;
d = iptc_data_new_from_jpeg (local_file);
if (!d) {
g_free (local_file);
return NULL;
}
data = comment_data_new ();
......@@ -418,6 +429,8 @@ load_comment_from_iptc (const char *filename)
data->iptc_data = d;
g_free (local_file);
return data;
}
......@@ -537,10 +550,23 @@ save_comment_iptc (const char *filename,
IptcDataSet *ds;
time_t mtime;
int i;
gboolean is_local;
char *local_file_to_modify = NULL;
mtime = get_file_mtime (filename);
is_local = is_local_file (filename);
d = iptc_data_new_from_jpeg (filename);
/* If the original file is stored on a remote VFS location, copy it to a local
temp file, modify it, then copy it back. This is easier than modifying the
underlying jpeg code (and other code) to handle VFS URIs. */
local_file_to_modify = obtain_local_file (filename);
if (local_file_to_modify == NULL)
return;
mtime = get_file_mtime (local_file_to_modify);
d = iptc_data_new_from_jpeg (local_file_to_modify);
if (d) {
clear_iptc_comment (d);
}
......@@ -615,10 +641,14 @@ save_comment_iptc (const char *filename,
iptc_data_set_encoding_utf8 (d);
iptc_data_sort (d);
save_iptc_data (filename, d);
set_file_mtime (filename, mtime);
save_iptc_data (local_file_to_modify, d);
set_file_mtime (local_file_to_modify, mtime);
iptc_data_unref (d);
if (!is_local)
copy_cache_file_to_remote_uri (local_file_to_modify, filename);
g_free (local_file_to_modify);
}
......@@ -781,6 +811,7 @@ load_comment_from_xml (const char *filename)
{
CommentData *data;
char *comment_file;
char *local_comment_file = NULL;
xmlDocPtr doc;
xmlNodePtr root, node;
xmlChar *value;
......@@ -795,9 +826,20 @@ load_comment_from_xml (const char *filename)
return NULL;
}
doc = xmlParseFile (comment_file);
/* libxml2 does not support VFS URIs directly, so make a temporary local
copy of remote comment files. */
local_comment_file = obtain_local_file (comment_file);
if (local_comment_file == NULL) {
g_free (comment_file);
return NULL;
}
doc = xmlParseFile (local_comment_file);
if (doc == NULL) {
g_free (comment_file);
g_free (local_comment_file);
return NULL;
}
......@@ -836,6 +878,7 @@ load_comment_from_xml (const char *filename)
xmlFreeDoc (doc);
g_free (comment_file);
g_free (local_comment_file);
return data;
}
......@@ -849,18 +892,34 @@ save_comment (const char *filename,
xmlDocPtr doc;
xmlNodePtr tree, subtree;
char *comment_file = NULL;
char *remote_comment_file = NULL;
char *time_str = NULL;
char *keywords_str = NULL;
char *dest_dir = NULL;
char *e_comment = NULL, *e_place = NULL, *e_keywords = NULL;
gboolean is_local;
char *local_file = NULL;
if (save_embedded) {
#ifdef HAVE_LIBIPTCDATA
if (image_is_jpeg (filename))
save_comment_iptc (get_file_path_from_uri (filename), data);
save_comment_iptc (filename, data);
#endif /* HAVE_LIBIPTCDATA */
}
is_local = is_local_file (filename);
/* If the original file is stored on a remote VFS location, copy it to a local
temp file, modify it, then copy it back. This is easier than modifying the
underlying jpeg code (and other code) to handle VFS URIs. */
local_file = obtain_local_file (filename);
if (local_file == NULL)
return;
if (comment_data_is_void (data)) {
comment_delete (filename);
return;
......@@ -909,7 +968,7 @@ save_comment (const char *filename,
/* Write to disk. */
comment_file = comments_get_comment_filename (filename, TRUE, TRUE);
comment_file = comments_get_comment_filename (local_file, TRUE, TRUE);
dest_dir = remove_level_from_path (comment_file);
......@@ -918,7 +977,15 @@ save_comment (const char *filename,
xmlSaveFile (comment_file, doc);
}
g_free (dest_dir);
if (!is_local) {
remote_comment_file = comments_get_comment_filename (filename, TRUE, TRUE);
copy_cache_file_to_remote_uri (comment_file, remote_comment_file);
g_free (remote_comment_file);
}
g_free (comment_file);
g_free (local_file);
xmlFreeDoc (doc);
}
......@@ -938,7 +1005,7 @@ comments_load_comment (const char *filename,
if (try_embedded) {
#ifdef HAVE_LIBIPTCDATA
if (image_is_jpeg (filename))
img_comment = load_comment_from_iptc (get_file_path_from_uri (filename));
img_comment = load_comment_from_iptc (filename);
if (img_comment != NULL) {
if (xml_comment == NULL)
xml_comment = comment_data_new ();
......
......@@ -94,28 +94,12 @@ save_image (GtkWindow *parent,
SaveImageData *data,
GtkDialog *file_sel)
{
char *dir;
gboolean file_exists;
gboolean image_saved = FALSE;
if (filename == NULL)
return FALSE;
/* Check permissions */
dir = remove_level_from_path (filename);
if (! check_permissions (dir, R_OK | W_OK | X_OK)) {
char *utf8_path;
utf8_path = g_filename_display_name (dir);
_gtk_error_dialog_run (parent,
_("You don't have the right permissions to create images in the folder \"%s\""),
utf8_path);
g_free (utf8_path);
g_free (dir);
return FALSE;
}
g_free (dir);
file_exists = path_is_file (filename);
if ((file_sel != NULL) && file_exists) {
......@@ -277,6 +261,9 @@ dlg_save_image_as (GtkWindow *parent,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
/* Permit VFS URIs */
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (file_sel), FALSE);
gtk_dialog_set_default_response (GTK_DIALOG (file_sel), GTK_RESPONSE_ACCEPT);
/**/
......
......@@ -50,6 +50,9 @@ file_data_new (const char *path,
fd->mtime = info->mtime;
}
if (info->mime_type != NULL)
fd->mime_type = info->mime_type;
/* The Exif DateTime tag is only recorded on an as-needed basis during
DateTime sorts. The tag in memory is refreshed if the file mtime has
changed, so it is recorded as well. */
......@@ -103,6 +106,9 @@ file_data_update (FileData *fd)
fd->error = FALSE;
fd->thumb = FALSE;
g_free (fd->mime_type);
fd->mime_type = NULL;
escaped = escape_uri (fd->path);
info = gnome_vfs_file_info_new ();
result = gnome_vfs_get_file_info (escaped,
......@@ -125,6 +131,9 @@ file_data_update (FileData *fd)
g_free (fd->utf8_name);
fd->utf8_name = g_filename_to_utf8 (fd->name, -1, 0, 0, 0);
if (info->mime_type != NULL)
fd->mime_type = info->mime_type;
fd->size = info->size;
fd->mtime = info->mtime;
fd->ctime = info->ctime;
......
......@@ -36,6 +36,7 @@ typedef struct {
char *path; /* Full path name. */
const char *name; /* File name only. */
char *utf8_name;
const char *mime_type;
GnomeVFSFileSize size;
time_t ctime;
time_t mtime;
......
......@@ -20,6 +20,8 @@
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*/
#define GDK_PIXBUF_ENABLE_BACKEND
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -34,9 +36,12 @@
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include <config.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk-pixbuf/gdk-pixbuf-animation.h>
#include <libgnomeui/gnome-thumbnail.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnomevfs/gnome-vfs-handle.h>
#include <libgnomevfs/gnome-vfs-mime.h>
......@@ -48,7 +53,13 @@
#include "glib-utils.h"
#include "gconf-utils.h"
#include "file-utils.h"
#include "jpeg-utils.h"
#include "pixbuf-utils.h"
#include "typedefs.h"
#ifdef HAVE_LIBOPENRAW
#include <libopenraw-gnome/gdkpixbuf.h>
#endif
#define BUF_SIZE 4096
#define CHUNK_SIZE 128
......@@ -641,48 +652,55 @@ get_mime_type_from_ext (const char *ext)
}
gboolean
file_is_image (const gchar *name,
gboolean fast_file_type)
gboolean mime_type_is_image (const char *mime_type)
{
const char *result = NULL;
gboolean is_an_image;
return ( (strstr (mime_type, "image") != NULL)
|| (strcmp (mime_type, "application/x-crw") == 0) );
}
if (fast_file_type) {
char *filename, *n1;
filename = get_sample_name (name);
if (filename == NULL)
return FALSE;
gboolean file_is_image (const gchar *name,
gboolean fast_file_type)
{
const char *mime_type = NULL;
n1 = g_filename_to_utf8 (filename, -1, 0, 0, 0);
if (n1 != NULL) {
char *n2, *n3;
n2 = g_utf8_strdown (n1, -1);
n3 = g_filename_from_utf8 (n2, -1, 0, 0, 0);
mime_type = get_file_mime_type (name, fast_file_type);
if (mime_type == NULL)
return FALSE;
if (n3 != NULL)
result = gnome_vfs_mime_type_from_name_or_default (n3, NULL);
return mime_type_is_image (mime_type);
}
g_free (n3);
g_free (n2);
g_free (n1);
}
} else {
if (uri_scheme_is_file (name))
name = get_file_path_from_uri (name);
result = gnome_vfs_get_file_mime_type (name, NULL, FALSE);
}
/* Unknown file type. */
if (result == NULL)
return FALSE;
gboolean file_is_video (const gchar *name,
gboolean fast_file_type)
{
const char *mime_type = NULL;
mime_type = get_file_mime_type (name, fast_file_type);
if (mime_type == NULL)
return FALSE;
return mime_type_is_video (mime_type);
}
/* If the description contains the word 'image' than we suppose
* it is an image that gdk-pixbuf can load. */
is_an_image = strstr (result, "image") != NULL;
return is_an_image;
gboolean mime_type_is_video (const char *mime_type)
{
return (strstr (mime_type, "video") != NULL);
}