$config['mproc'] = cpus
end
end
+ $config['rotate-set-exif'] ||= 'true'
$tempfiles = []
$todelete = []
end
$modified = true
#- update rotate attribute
- xmlelem.add_attribute("#{attributes_prefix}rotate", ((xmlelem.attributes["#{attributes_prefix}rotate"].to_i + angle) % 360).to_s)
+ new_angle = (xmlelem.attributes["#{attributes_prefix}rotate"].to_i + angle) % 360
+ xmlelem.add_attribute("#{attributes_prefix}rotate", new_angle.to_s)
+
+ if $config['rotate-set-exif'] == 'true'
+ Exif.set_orientation(from_utf8($current_path + '/' + xmlelem.attributes['filename']), angle_to_exif_orientation(new_angle))
+ end
$modified_pixbufs[thumbnail_img] ||= {}
$modified_pixbufs[thumbnail_img][:angle_to_orig] = (($modified_pixbufs[thumbnail_img][:angle_to_orig] || 0) + angle) % 360
SceneType")), { :scrolled => true })
}
+ tbl.attach(update_exif_orientation_check = Gtk::CheckButton.new(utf8(_("Update file's EXIF orientation when rotating a picture"))),
+ 0, 2, 2, 3, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tooltips.set_tip(update_exif_orientation_check, utf8(_("When rotating a picture (Alt-Right/Left), also update EXIF orientation in the file itself")), nil)
+ update_exif_orientation_check.active = $config['rotate-set-exif'] == 'true'
+
dialog.vbox.show_all
dialog.run { |response|
if response == Gtk::Dialog::RESPONSE_OK
$config['convert-enhance'] = from_utf8(enhance_entry.text)
$config['comments-format'] = from_utf8(commentsformat_entry.text.gsub(/'/, ''))
+ $config['rotate-set-exif'] = update_exif_orientation_check.active?.to_s
end
}
dialog.destroy
$config['browser'] ||= "/usr/bin/mozilla-firefox -remote 'openURL(%f,new-window)' || /usr/bin/mozilla-firefox %f"
$config['preload-distance'] ||= '5'
$config['cache-memory-use'] ||= 'memfree_80%'
-# $config['rotate-set-exif'] ||= 'true'
+ $config['rotate-set-exif'] ||= 'true'
set_cache_memory_use_figure
end
entry.free_pixbuf_thumbnail
$mainview.redraw
entry.image.pixbuf = entry.pixbuf_thumbnail
+ if $config['rotate-set-exif'] == 'true'
+ Exif.set_orientation(entry.path, angle_to_exif_orientation(entry.angle))
+ end
end
elsif event.state & Gdk::Window::CONTROL_MASK != 0
cache_specify_spin.value = $config['cache-memory-use'].to_i
end
-# tbl.attach(update_exif_orientation_check = Gtk::CheckButton.new(utf8(_("Update file's EXIF orientation when rotating a picture"))),
-# 0, 2, 4, 5, Gtk::FILL, Gtk::SHRINK, 2, 2)
-# tooltips.set_tip(update_exif_orientation_check, utf8(_("When rotating a picture (Alt-Right/Left), also update EXIF orientation in the file itself")), nil)
-# update_exif_orientation_check.active = $config['rotate-set-exif']
+ tbl.attach(update_exif_orientation_check = Gtk::CheckButton.new(utf8(_("Update file's EXIF orientation when rotating a picture"))),
+ 0, 2, 4, 5, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tooltips.set_tip(update_exif_orientation_check, utf8(_("When rotating a picture (Alt-Right/Left), also update EXIF orientation in the file itself")), nil)
+ update_exif_orientation_check.active = $config['rotate-set-exif'] == 'true'
dialog.vbox.show_all
dialog.run { |response|
$config['video-viewer'] = from_utf8(video_viewer_entry.text)
$config['browser'] = from_utf8(browser_entry.text)
$config['preload-distance'] = preload_distance.value
-# $config['rotate-set-exif'] = update_exif_orientation_check.active?
+ $config['rotate-set-exif'] = update_exif_orientation_check.active?.to_s
if cache_memfree_radio.active?
$config['cache-memory-use'] = "memfree_#{cache_memfree_spin.value}%"
else