Commit 60ff454a authored by Paolo Bacchilega's avatar Paolo Bacchilega Committed by Paolo Bacchilega

move ResetExif under RotateImages, add a searator.

2006-10-12  Paolo Bacchilega  <paobac@cvs.gnome.org>

	* src/gth-browser-ui.h: move ResetExif under RotateImages, add a
	searator.

	* src/gth-window-actions-entries.h: changed "Reset Exif
orientation" to
	"Reset Exif Orientation".

	* doc/C/gthumb.xml:
	* data/glade/gthumb_camera.glade:
	* src/dlg-photo-importer.c (dlg_photo_importer): added a help
button.

	* src/dlg-reset-exif.c (apply_transformation): removed unused
variables
	* src/rotation-utils.h: added reset_orientation_field

	* NEWS:
	* README:
	* data/glade/gthumb_tools.glade:
	* doc/C/gthumb.xml:
	* libgthumb/print-callbacks.c:
	* src/Makefile.am:
	* src/gth-browser-ui.h:
	* src/gth-browser.c:
	* src/gth-viewer-ui.h:
	* src/gth-window-actions-callbacks.c:
	* src/gth-window-actions-callbacks.h:
	* src/gth-window-actions-entries.h:
	* src/main.c:
	* src/dlg-reset-exif.h:
	* src/dlg-reset-exif.c:

	1. Adds a Tool > Reset Exif orientation function, for fixing
images
	incorrectly imported and auto-rotated by previous versions of
gthumb.

	2. Updates the README file, indicating the correct library
requirements.

	3. Updates the NEWS file, to reflect the exif improvements.

	4. Makes the short command line options work (trivial patch from
bug
	349747)

	5. Makes print scaling work (trivial patch from bug 353681).

	Patch by Michael Chudobiak
parent 6e72c420
2006-10-12 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-browser-ui.h: move ResetExif under RotateImages, add a
searator.
* src/gth-window-actions-entries.h: changed "Reset Exif orientation" to
"Reset Exif Orientation".
* doc/C/gthumb.xml:
* data/glade/gthumb_camera.glade:
* src/dlg-photo-importer.c (dlg_photo_importer): added a help button.
* src/dlg-reset-exif.c (apply_transformation): removed unused variables
* src/rotation-utils.h: added reset_orientation_field
* NEWS:
* README:
* data/glade/gthumb_tools.glade:
* doc/C/gthumb.xml:
* libgthumb/print-callbacks.c:
* src/Makefile.am:
* src/gth-browser-ui.h:
* src/gth-browser.c:
* src/gth-viewer-ui.h:
* src/gth-window-actions-callbacks.c:
* src/gth-window-actions-callbacks.h:
* src/gth-window-actions-entries.h:
* src/main.c:
* src/dlg-reset-exif.h:
* src/dlg-reset-exif.c:
1. Adds a Tool > Reset Exif orientation function, for fixing images
incorrectly imported and auto-rotated by previous versions of gthumb.
2. Updates the README file, indicating the correct library requirements.
3. Updates the NEWS file, to reflect the exif improvements.
4. Makes the short command line options work (trivial patch from bug
349747)
5. Makes print scaling work (trivial patch from bug 353681).
Patch by Michael Chudobiak
2006-10-11 Paolo Bacchilega <paobac@cvs.gnome.org>
* data/glade/gthumb_camera.glade:
......
version 2.9.0
-------------
* Added proper support for the Exif orientation tag when importing,
rotating, and displaying JPEG images. See bug #343867: Rotating image
should alter EXIF data
* Fixed bug #361416: Reset Exif orientation tag tool
version 2.7.9
-------------
* Fixed bug #351058: build failure when -Wl,--as-needed is passed to
......
......@@ -9,7 +9,9 @@ Notes:
they can be used even in the GNOME 2.2 environment but in this case
gThumb and Nautilus do not share the thumbnails database.
* versions 2.2.0 and higher are for GNOME 2.2 and GNOME 2.4.
* 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:
http://gthumb.sourceforge.net
......@@ -82,33 +84,30 @@ Compiling
version 2 or greater, with the development tools installed properly.
The following is the detailed list of libraries you need:
* glib version >= 2.2.0
* gtk version >= 2.2.0
* glib version >= 2.6.0
* gtk version >= 2.8.0
* libxml version >= 2.4.0
* libgnome version >= 2.2.0
* libgnomeui version >= 2.2.0
* libgnomecanvas version >= 2.0.0
* gnome-vfs version >= 2.1.3
* libglade version >= 2.0.0
* libgnomeprint version >= 2.1.0
* libgnomeprintui version >= 2.1.0
* libbonobo version >= 2.3.3
* libbonoboui version >= 2.3.3
If you want to view EXIF data attached to images, you need the libexif
library version >= 0.5.12 that can be found at this web site :
http://libexif.sourceforge.net
* 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
* libexif version >= 0.6.9
* libjpeg
If the libtiff library is present you can save images in TIFF
format.
If the libjpeg library is present you have more saving options for
the JPEG format and the 'rotate jpeg' tool is implemented internally
otherwise it is implemented calling the external command: jpegtran.
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
comments in the IPTC metadata of a JPEG image.
Download
========
......@@ -122,4 +121,4 @@ Download
cvs -d:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co gthumb
17 December 2003
11 October 2006
......@@ -119,6 +119,19 @@
</child>
</widget>
</child>
<child>
<widget class="GtkButton" id="import_helpbutton">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-11</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
......@@ -452,7 +465,7 @@
<property name="visible">True</property>
<property name="tooltip" translatable="yes">If this checkbox is enabled and the imported photo contains an Exif orientation tag, the image data will be physically transformed (losslessly) so that the viewed image looks the same as before but the orientation tag is reset to &quot;top left&quot;. If this checkbox is not enabled, the image data and the orientation tag are both left unchanged. The image will be displayed identically by gthumb for both possibilities, but for maximum compatibility with other applications this checkbox should be enabled.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Apply physical transform</property>
<property name="label" translatable="yes">Rotate images physically</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
......
......@@ -3607,4 +3607,123 @@ Overwrite</property>
</child>
</widget>
<widget class="GtkDialog" id="reset_exif_dialog">
<property name="border_width">6</property>
<property name="title" translatable="yes">Reset Exif Orientation Tags</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="vbox69">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="x_help_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-11</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="x_cancel_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-6</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="x_ok_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-5</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox70">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label120">
<property name="visible">True</property>
<property name="label" translatable="yes">Click OK to reset the Exif orientation tag for the selected images to Top-Left.</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">True</property>
<property name="selectable">False</property>
<property name="xalign">0</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>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>
......@@ -2044,6 +2044,26 @@
the <guilabel>Apply physical transform</guilabel> checkbox is enabled.
</para>
</sect2>
<sect2 id="gthumb-reset-exif">
<title>Resetting the Exif Orientation Tag</title>
<para>
The previous section describes how JPEG images can be rotated using two
methods (physical transforms or Exif orientation tag changes). &app; supports
both methods properly as of version 2.9.0. Some previous versions
of &app; auto-rotated images improperly when importing, by performing
a physical transformation without resetting the Exif orientation tag
to "top-left". These previous versions ignored the orientation tag when
displaying the images, so no problem was apparent (although the problem
was visible if other image viewers were used to view the same images).
Versions 2.9.0 and later respect this tag, so the incorrect rotation will be visible.
</para>
<para>
The <guilabel>Reset Exif orientation tag</guilabel> tool is provided to fix
this problem. Simply select the affected images, and apply the
<guilabel>Reset Exif orientation tag</guilabel> tool. This will reset
the Exif orientation tag to "top-left".
</para>
</sect2>
<sect2 id="gthumb-convert-format">
<title>To Convert the Image Format</title>
<para>
......@@ -2195,7 +2215,7 @@
</guimenuitem></menuchoice>.
</para>
</sect2>
<sect2 id="gthumb-photo">
<sect2 id="gthumb-import-photos">
<title>To Import Photos from a Digital Camera</title>
<para>
To import photos from a digital camera, choose
......
......@@ -1253,8 +1253,6 @@ catalog_update_custom_page_size (PrintCatalogDialogData *data)
height = gtk_spin_button_get_value (GTK_SPIN_BUTTON (data->height_spinbutton));
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_HEIGHT, height, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_HEIGHT, height, unit);
catalog_update_page (data);
}
......@@ -1386,8 +1384,6 @@ catalog_set_standard_page_size (PrintCatalogDialogData *data,
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_HEIGHT, height, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_WIDTH, width, unit);
gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_HEIGHT, height, unit);
catalog_update_page_size_from_config (data);
catalog_update_page (data);
......
......@@ -77,6 +77,8 @@ gthumb_SOURCES = \
dlg-preferences.h \
dlg-rename-series.c \
dlg-rename-series.h \
dlg-reset-exif.c \
dlg-reset-exif.h \
dlg-scale-image.c \
dlg-scale-image.h \
dlg-scale-series.c \
......
......@@ -30,6 +30,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <libgnome/gnome-help.h>
#include <libgnomeui/gnome-icon-theme.h>
#include <libgnomeui/gnome-icon-lookup.h>
#include <libgnomevfs/gnome-vfs-file-info.h>
......@@ -1790,11 +1791,44 @@ start_operation (DialogData *data,
}
/* called when the "help" button is pressed. */
static void
help_cb (GtkWidget *widget,
DialogData *data)
{
GError *err;
err = NULL;
gnome_help_display ("gthumb", "gthumb-import-photos", &err);
if (err != NULL) {
GtkWidget *d;
d = gtk_message_dialog_new (GTK_WINDOW (data->dialog),
0,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
_("Could not display help: %s"),
err->message);
g_signal_connect (G_OBJECT (d), "response",
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_window_set_resizable (GTK_WINDOW (d), FALSE);
gtk_widget_show (d);
g_error_free (err);
}
}
void
dlg_photo_importer (GthBrowser *browser)
{
DialogData *data;
GtkWidget *btn_cancel;
GtkWidget *btn_help;
GdkPixbuf *mute_pixbuf;
char *default_path;
char *esc_uri;
......@@ -1859,6 +1893,7 @@ dlg_photo_importer (GthBrowser *browser)
data->import_ok_button = glade_xml_get_widget (data->gui, "import_okbutton");
data->reset_exif_tag_on_import_checkbutton = glade_xml_get_widget (data->gui, "reset_exif_tag_on_import_checkbutton");
btn_cancel = glade_xml_get_widget (data->gui, "import_cancelbutton");
btn_help = glade_xml_get_widget (data->gui, "import_helpbutton");
data->image_list = gth_image_list_new (THUMB_SIZE + THUMB_BORDER);
gth_image_list_set_view_mode (GTH_IMAGE_LIST (data->image_list), GTH_VIEW_MODE_LABEL);
......@@ -1918,6 +1953,10 @@ dlg_photo_importer (GthBrowser *browser)
"clicked",
G_CALLBACK (ok_clicked_cb),
data);
g_signal_connect (G_OBJECT (btn_help),
"clicked",
G_CALLBACK (help_cb),
data);
g_signal_connect (G_OBJECT (btn_cancel),
"clicked",
G_CALLBACK (cancel_clicked_cb),
......
......@@ -171,6 +171,8 @@ static const gchar *main_ui_info =
" </menu>"
" <separator/>"
" <menuitem action='Tools_JPEGRotate'/>"
" <menuitem action='Tools_ResetExif'/>"
" <separator/>"
" <menuitem action='Tools_ScaleSeries'/>"
" <menuitem action='Tools_ConvertFormat'/>"
" <menuitem action='Tools_ChangeDate'/>"
......@@ -295,6 +297,8 @@ static const gchar *main_ui_info =
" <popup name='RotateImageMenu'>"
" <menuitem action='Tools_JPEGRotate_Right'/>"
" <menuitem action='Tools_JPEGRotate_Left'/>"
" <separator/>"
" <menuitem action='Tools_ResetExif'/>"
" </popup>"
" <accelerator name='ControlEqualAccel' action='ControlEqual'/>"
"</ui>";
......
......@@ -960,6 +960,7 @@ window_update_sensitivity (GthBrowser *browser)
set_action_sensitive (browser, "Tools_WebExporter", sel_not_null);
set_action_sensitive (browser, "Tools_ConvertFormat", sel_not_null);
set_action_sensitive (browser, "Tools_ChangeDate", sel_not_null);
set_action_sensitive (browser, "Tools_ResetExif", sel_not_null);
set_action_sensitive (browser, "Tools_JPEGRotate", sel_not_null);
set_action_sensitive (browser, "Tools_ScaleSeries", sel_not_null);
set_action_sensitive (browser, "Wallpaper_Centered", ! image_is_void);
......
......@@ -116,6 +116,7 @@ static const gchar *viewer_window_ui_info =
" <separator/>"
" <menuitem action='Tools_JPEGRotate'/>"
" <menuitem action='Tools_ChangeDate'/>"
" <menuitem action='Tools_ResetExif'/>"
" </menu>"
" <menu name='Help' action='HelpMenu'>"
" <menuitem action='Help_Help'/>"
......@@ -154,6 +155,7 @@ static const gchar *viewer_window_ui_info =
" <popup name='RotateImageMenu'>"
" <menuitem action='Tools_JPEGRotate_Right'/>"
" <menuitem action='Tools_JPEGRotate_Left'/>"
" <menuitem action='Tools_ResetExif'/>"
" </popup>"
" <popup name='OpenWithMenu'>"
" <menuitem action='File_OpenFolder'/>"
......
......@@ -42,6 +42,7 @@
#include "dlg-catalog.h"
#include "dlg-categories.h"
#include "dlg-change-date.h"
#include "dlg-reset-exif.h"
#include "dlg-comment.h"
#include "dlg-convert.h"
#include "dlg-file-utils.h"
......@@ -873,6 +874,14 @@ gth_window_activate_action_tools_change_date (GtkAction *action,
}
void
gth_window_activate_action_tools_reset_exif (GtkAction *action,
GthWindow *window)
{
dlg_reset_exif (window);
}
void
gth_window_activate_action_tools_jpeg_rotate (GtkAction *action,
GthWindow *window)
......
......@@ -78,5 +78,6 @@ DEFINE_ACTION(gth_window_activate_action_tools_change_date)
DEFINE_ACTION(gth_window_activate_action_tools_jpeg_rotate)
DEFINE_ACTION(gth_window_activate_action_tools_jpeg_rotate_right)
DEFINE_ACTION(gth_window_activate_action_tools_jpeg_rotate_left)
DEFINE_ACTION(gth_window_activate_action_tools_reset_exif)
#endif /* GTH_WINDOW_ACTIONS_CALLBACK_H */
......@@ -251,6 +251,11 @@ static GtkActionEntry gth_window_action_entries[] = {
N_("Change images last modified date"),
G_CALLBACK (gth_window_activate_action_tools_change_date) },
{ "Tools_ResetExif", NULL,
N_("Reset Exif Orientation"), NULL,
N_("Reset Exif orientation to top-left"),
G_CALLBACK (gth_window_activate_action_tools_reset_exif) },
{ "Tools_JPEGRotate", GTHUMB_STOCK_TRANSFORM,
N_("Ro_tate Images"), NULL,
N_("Rotate images without loss of quality"),
......
......@@ -84,10 +84,10 @@ static GnomeIconTheme *icon_theme = NULL;
static BonoboObject *gth_application = NULL;
struct poptOption options[] = {
{ "fullscreen", '\0', POPT_ARG_NONE, &StartInFullscreen, 0,
{ "fullscreen", 'f', POPT_ARG_NONE, &StartInFullscreen, 0,
N_("Start in fullscreen mode"),
0 },
{ "slideshow", '\0', POPT_ARG_NONE, &StartSlideshow, 0,
{ "slideshow", 's', POPT_ARG_NONE, &StartSlideshow, 0,
N_("Automatically start a slideshow"),
0 },
{ "import-photos", '\0', POPT_ARG_NONE, &ImportPhotos, 0,
......
......@@ -36,7 +36,7 @@ struct _RotationData {
};
RotationData* rotation_data_new ();
void reset_orientation_field (const char *path);
void update_rotation_from_exif_data (const char *filename,
RotationData *rot_data);
void apply_transformation_exif (GtkWindow *win,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment