...
 
Commits (67)
version 2.14.4
--------------
Bugs fixed:
* Preserve XMP lists when saving an image (#674908)
* Fixed help button in preferences window (Michael J. Chudobiak)
(#671290)
* Removed useless and potentially dangerous strncpy (#672866)
version 2.14.3
--------------
Bugs fixed:
* Do not show duplicate entries in the sidebar and bookmarks menu.
(#669367)
* Fixed filtering by embedded title and description.
* Fixed crash when opening the comment dialog.
* Fixed many memory leaks.
* Fixed file renaming in viewer mode. (#670392)
* Fixed some compiler warnings. (#668947)
New or updated application translations:
* Swedish (Daniel Nylander)
version 2.14.2
--------------
Bugs fixed:
* Fixed memory leak in 'Adjust Colors'. (#667931)
* Fixed renaming of folders and catalogs.
* Fixed names of the gconf keys for the 'change date' tool.
* Fixed possible crash on startup.
New or updated application translations:
* German (Christian Kirbach)
version 2.14.1
--------------
Bugs fixed:
* Fixed infinite reloading of some images when selected in the file
list.
* Fixed export to Photobucket.
* Fixed crash when no file properties view is registered.
* Fixed crash when closing the media viewer very quickly.
* Fixed some memory leaks.
New or updated application translations:
* Czech (Marek Černocký)
* Español; Castellano (Jorge González)
* Japanese (Takeshi AIHANA)
* Polish (Piotr Drąg)
version 2.14.0
---------------
Bugs fixed:
* Resize images: when resinging a single image update the second dimension
if the ratio is fixed. (#662397)
* Faster image loading if the file is not local (#655471)
* File selection not updated in status bar when using thumbnail side
panel (#660430)
New or updated application translations:
* Czech (Marek Černocký)
* Esperanto (Kristjan SCHMIDT)
* French (Claude Paroz)
* German (Mario Blättermann)
* Indonesian (Andika Triwidada)
* Japanese (Takeshi AIHANA)
* Slovenian Translation (Matej Urbančič)
* Swedish (Daniel Nylander)
New or updated manual translations:
* Deutsch (Mario Blättermann)
* French (Claude Paroz)
version 2.13.91
---------------
......
AC_PREREQ(2.63)
AC_INIT([gthumb],[2.13.91],[http://bugzilla.gnome.org/enter_bug.cgi?product=gthumb])
AC_INIT([gthumb],[2.14.4],[http://bugzilla.gnome.org/enter_bug.cgi?product=gthumb])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
AC_CONFIG_HEADERS([config.h])
......@@ -137,6 +137,7 @@ PKG_CHECK_MODULES(GTHUMB, [
gtk+-2.0 >= $GTK_REQUIRED
gconf-2.0 >= $GCONF_REQUIRED
libpng
zlib
ice
])
AC_SUBST(GTHUMB_LIBS)
......
......@@ -138,8 +138,10 @@ update_system_bookmark_list_from_content (GthBrowser *browser,
line = g_strsplit (lines[i], " ", 2);
uri = line[0];
if (uri == NULL)
if (uri == NULL) {
g_strfreev (line);
continue;
}
file = g_file_new_for_uri (uri);
icon = _g_file_get_icon (file);
......@@ -159,7 +161,7 @@ update_system_bookmark_list_from_content (GthBrowser *browser,
-1);
g_free (name);
g_object_unref (icon);
_g_object_unref (icon);
g_object_unref (file);
g_strfreev (line);
}
......
......@@ -245,6 +245,7 @@ _cairo_image_surface_create_from_png (GthFileData *file_data,
if (cairo_surface_status (cairo_png_data->surface) == CAIRO_STATUS_SUCCESS)
gth_image_set_cairo_surface (image, cairo_png_data->surface);
g_free (row_pointers);
_cairo_png_data_destroy (cairo_png_data);
return image;
......
......@@ -611,7 +611,9 @@ catalogs__gth_browser_folder_tree_popup_before_cb (GthBrowser *browser,
g_object_set (action, "sensitive", sensitive, NULL);
action = gtk_action_group_get_action (data->actions, "Catalog_Rename");
sensitive = (folder != NULL) && _g_content_type_is_a (g_file_info_get_content_type (folder->info), "gthumb/library") && g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME);
sensitive = ((folder != NULL)
&& (_g_content_type_is_a (g_file_info_get_content_type (folder->info), "gthumb/library") || _g_content_type_is_a (g_file_info_get_content_type (folder->info), "gthumb/catalog"))
&& g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME));
g_object_set (action, "sensitive", sensitive, NULL);
action = gtk_action_group_get_action (data->actions, "Catalog_Properties");
......
......@@ -83,13 +83,6 @@ catalog_saved_cb (void **buffer,
}
static char *
clear_name_for_file (const char *display_name)
{
return _g_utf8_replace (display_name, "/", "_");
}
static void
save_button_clicked_cb (GtkButton *button,
DialogData *data)
......@@ -108,7 +101,7 @@ save_button_clicked_cb (GtkButton *button,
parent = g_file_get_parent (data->original_file);
uri = g_file_get_uri (data->original_file);
clean_name = clear_name_for_file (gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("name_entry"))));
clean_name = _g_filename_clear_for_file (gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("name_entry"))));
display_name = g_strconcat (clean_name, _g_uri_get_file_extension (uri), NULL);
new_file = g_file_get_child_for_display_name (parent, display_name, NULL);
if ((new_file != NULL) && ! g_file_equal (new_file, data->original_file))
......
......@@ -672,6 +672,8 @@ get_display_name (GFile *file,
}
}
g_free (basename);
return g_string_free (display_name, FALSE);
}
......@@ -705,6 +707,8 @@ get_edit_name (GFile *file,
g_string_append (display_name, name);
}
g_free (basename);
return g_string_free (display_name, FALSE);
}
......@@ -725,6 +729,8 @@ update_standard_attributes (GFile *file,
sort_order_s = gth_datetime_strftime (date_time, "%Y%m%d");
sort_order = atoi (sort_order_s);
g_file_info_set_sort_order (info, sort_order);
g_free (sort_order_s);
}
else if (g_file_info_get_attribute_boolean (info, "gthumb::no-child"))
g_file_info_set_sort_order (info, 99999999);
......@@ -852,6 +858,7 @@ gth_catalog_file_to_gio_file (GFile *file)
full_uri = g_strconcat (base_uri, part ? "/" : NULL, part, NULL);
gio_file = g_file_new_for_uri (full_uri);
g_free (full_uri);
g_free (base_uri);
g_object_unref (base);
}
......@@ -1188,7 +1195,8 @@ gth_catalog_save (GthCatalog *catalog)
gio_file = gth_catalog_file_to_gio_file (file);
gio_parent = g_file_get_parent (gio_file);
g_file_make_directory_with_parents (gio_parent, NULL, NULL);
if (gio_parent != NULL)
g_file_make_directory_with_parents (gio_parent, NULL, NULL);
data = gth_catalog_to_data (catalog, &size);
if (! g_write_file (gio_file,
FALSE,
......@@ -1228,6 +1236,6 @@ gth_catalog_save (GthCatalog *catalog)
}
g_free (data);
g_object_unref (gio_parent);
_g_object_unref (gio_parent);
g_object_unref (gio_file);
}
......@@ -71,14 +71,16 @@ update_file_info (GthFileSource *file_source,
GFile *catalog_file,
GFileInfo *info)
{
char *uri;
char *uri;
GIcon *icon = NULL;
uri = g_file_get_uri (catalog_file);
if (g_str_has_suffix (uri, ".gqv") || g_str_has_suffix (uri, ".catalog")) {
g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY);
g_file_info_set_content_type (info, "gthumb/catalog");
g_file_info_set_icon (info, g_themed_icon_new ("file-catalog"));
icon = g_themed_icon_new ("file-catalog");
g_file_info_set_icon (info, icon);
g_file_info_set_sort_order (info, 1);
g_file_info_set_attribute_boolean (info, "gthumb::no-child", TRUE);
gth_catalog_update_standard_attributes (catalog_file, info);
......@@ -86,7 +88,8 @@ update_file_info (GthFileSource *file_source,
else if (g_str_has_suffix (uri, ".search")) {
g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY);
g_file_info_set_content_type (info, "gthumb/search");
g_file_info_set_icon (info, g_themed_icon_new ("file-search"));
icon = g_themed_icon_new ("file-search");
g_file_info_set_icon (info, icon);
g_file_info_set_sort_order (info, 1);
g_file_info_set_attribute_boolean (info, "gthumb::no-child", TRUE);
gth_catalog_update_standard_attributes (catalog_file, info);
......@@ -94,12 +97,14 @@ update_file_info (GthFileSource *file_source,
else {
g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY);
g_file_info_set_content_type (info, "gthumb/library");
g_file_info_set_icon (info, g_themed_icon_new ("file-library"));
icon = g_themed_icon_new ("file-library");
g_file_info_set_icon (info, icon);
g_file_info_set_sort_order (info, 0);
g_file_info_set_attribute_boolean (info, "gthumb::no-child", FALSE);
gth_catalog_update_standard_attributes (catalog_file, info);
}
_g_object_unref (icon);
g_free (uri);
}
......@@ -410,6 +415,106 @@ gth_file_source_catalogs_read_metadata (GthFileSource *file_source,
}
static void
gth_file_source_catalogs_rename (GthFileSource *file_source,
GFile *file,
const char *edit_name,
ReadyCallback callback,
gpointer data)
{
GFile *parent;
GFile *new_file;
GthCatalog *catalog;
GError *error = NULL;
parent = g_file_get_parent (file);
catalog = gth_catalog_load_from_file (file);
if (catalog != NULL) {
char *uri;
char *clean_name;
char *name;
GFile *gio_new_file;
char *data;
gsize size;
GFileOutputStream *fstream;
uri = g_file_get_uri (file);
clean_name = _g_filename_clear_for_file (edit_name);
name = g_strconcat (clean_name, _g_uri_get_file_extension (uri), NULL);
new_file = g_file_get_child_for_display_name (parent, name, &error);
gth_catalog_set_file (catalog, new_file);
gth_catalog_set_name (catalog, edit_name);
gio_new_file = gth_catalog_file_to_gio_file (new_file);
data = gth_catalog_to_data (catalog, &size);
fstream = g_file_create (gio_new_file,
G_FILE_CREATE_NONE,
gth_file_source_get_cancellable (file_source),
&error);
if (fstream != NULL) {
if (g_output_stream_write_all (G_OUTPUT_STREAM (fstream),
data,
size,
NULL,
gth_file_source_get_cancellable (file_source),
&error))
{
GFile *gio_old_file;
gio_old_file = gth_catalog_file_to_gio_file (file);
if (g_file_delete (gio_old_file, gth_file_source_get_cancellable (file_source), &error))
gth_monitor_file_renamed (gth_main_get_default_monitor (), file, new_file);
g_object_unref (gio_old_file);
}
g_object_unref (fstream);
}
g_free (data);
g_object_unref (gio_new_file);
g_free (clean_name);
g_free (name);
g_free (uri);
}
else {
new_file = g_file_get_child_for_display_name (parent, edit_name, &error);
if (new_file != NULL) {
GFile *gio_file;
GFile *gio_new_file;
gio_file = gth_file_source_to_gio_file (file_source, file);
gio_new_file = gth_file_source_to_gio_file (file_source, new_file);
if (g_file_move (gio_file,
gio_new_file,
0,
gth_file_source_get_cancellable (file_source),
NULL,
NULL,
&error))
{
gth_monitor_file_renamed (gth_main_get_default_monitor (), file, new_file);
}
g_object_unref (gio_new_file);
g_object_unref (gio_file);
}
}
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
g_clear_error (&error);
error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_EXISTS, _("Name already used"));
}
object_ready_with_error (file_source, callback, data, error);
_g_object_unref (new_file);
_g_object_unref (catalog);
}
/* -- gth_file_source_catalogs_for_each_child -- */
......@@ -1437,6 +1542,7 @@ gth_file_source_catalogs_class_init (GthFileSourceCatalogsClass *class)
file_source_class->get_file_data = gth_file_source_catalogs_get_file_data;
file_source_class->write_metadata = gth_file_source_catalogs_write_metadata;
file_source_class->read_metadata = gth_file_source_catalogs_read_metadata;
file_source_class->rename = gth_file_source_catalogs_rename;
file_source_class->for_each_child = gth_file_source_catalogs_for_each_child;
file_source_class->copy = gth_file_source_catalogs_copy;
file_source_class->can_cut = gth_file_source_catalogs_can_cut;
......
......@@ -541,7 +541,7 @@ static void
gth_organize_task_exec (GthTask *base)
{
GthOrganizeTask *self;
const char *attributes;
const char *attributes = NULL;
self = GTH_ORGANIZE_TASK (base);
......
......@@ -2,11 +2,11 @@
<schemalist>
<schema>
<key>/schemas/apps/gthumb/ext/resize_images/width</key>
<applyto>/apps/gthumb/ext/resize_images/width</applyto>
<key>/schemas/apps/gthumb/ext/change_date/set_last_modified_date</key>
<applyto>/apps/gthumb/ext/change_date/set_last_modified_date</applyto>
<owner>gthumb</owner>
<type>int</type>
<default>640</default>
<type>bool</type>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
......@@ -14,11 +14,11 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/resize_images/height</key>
<applyto>/apps/gthumb/ext/resize_images/height</applyto>
<key>/schemas/apps/gthumb/ext/change_date/set_comment_date</key>
<applyto>/apps/gthumb/ext/change_date/set_comment_date</applyto>
<owner>gthumb</owner>
<type>int</type>
<default>480</default>
<type>bool</type>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
......@@ -26,23 +26,47 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/resize_images/unit</key>
<applyto>/apps/gthumb/ext/resize_images/unit</applyto>
<key>/schemas/apps/gthumb/ext/change_date/set_exif_datetimeoriginal_tag</key>
<applyto>/apps/gthumb/ext/change_date/set_exif_datetimeoriginal_tag</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/change_date/to_following_date</key>
<applyto>/apps/gthumb/ext/change_date/to_following_date</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/change_date/date</key>
<applyto>/apps/gthumb/ext/change_date/date</applyto>
<owner>gthumb</owner>
<type>string</type>
<default>%</default>
<default></default>
<locale name="C">
<short>Possible values: pixels, percentage</short>
<short></short>
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/resize_images/keep_aspect_ratio</key>
<applyto>/apps/gthumb/ext/resize_images/keep_aspect_ratio</applyto>
<key>/schemas/apps/gthumb/ext/change_date/to_file_modified_date</key>
<applyto>/apps/gthumb/ext/change_date/to_file_modified_date</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>true</default>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
......@@ -50,11 +74,11 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/resize_images/allow_swap_width_height</key>
<applyto>/apps/gthumb/ext/resize_images/allow_swap_width_height</applyto>
<key>/schemas/apps/gthumb/ext/change_date/to_file_creation_date</key>
<applyto>/apps/gthumb/ext/change_date/to_file_creation_date</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>true</default>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
......@@ -62,11 +86,35 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/resize_images/mime_type</key>
<applyto>/apps/gthumb/ext/resize_images/mime_type</applyto>
<key>/schemas/apps/gthumb/ext/change_date/to_photo_original_date</key>
<applyto>/apps/gthumb/ext/change_date/to_photo_original_date</applyto>
<owner>gthumb</owner>
<type>string</type>
<default></default>
<type>bool</type>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/change_date/adjust_time</key>
<applyto>/apps/gthumb/ext/change_date/adjust_time</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short></short>
<long></long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/change_date/time_adjustment</key>
<applyto>/apps/gthumb/ext/change_date/time_adjustment</applyto>
<owner>gthumb</owner>
<type>int</type>
<default>0</default>
<locale name="C">
<short></short>
<long></long>
......
......@@ -346,6 +346,7 @@ gth_comment_new_for_file (GFile *file,
comment = NULL;
}
g_object_unref (doc);
g_free (buffer);
g_free (zipped_buffer);
......
......@@ -4,8 +4,8 @@
<!-- contact sheet -->
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/header</key>
<applyto>/apps/gthumb/ext/image_wall/header</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/header</key>
<applyto>/apps/gthumb/ext/contact_sheet/header</applyto>
<owner>gthumb</owner>
<type>string</type>
<default></default>
......@@ -17,8 +17,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/footer</key>
<applyto>/apps/gthumb/ext/image_wall/footer</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/footer</key>
<applyto>/apps/gthumb/ext/contact_sheet/footer</applyto>
<owner>gthumb</owner>
<type>string</type>
<default></default>
......@@ -30,8 +30,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/destination</key>
<applyto>/apps/gthumb/ext/image_wall/destination</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/destination</key>
<applyto>/apps/gthumb/ext/contact_sheet/destination</applyto>
<owner>gthumb</owner>
<type>string</type>
<default></default>
......@@ -43,8 +43,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/template</key>
<applyto>/apps/gthumb/ext/image_wall/template</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/template</key>
<applyto>/apps/gthumb/ext/contact_sheet/template</applyto>
<owner>gthumb</owner>
<type>string</type>
<default>###</default>
......@@ -56,8 +56,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/mime_type</key>
<applyto>/apps/gthumb/ext/image_wall/mime_type</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/mime_type</key>
<applyto>/apps/gthumb/ext/contact_sheet/mime_type</applyto>
<owner>gthumb</owner>
<type>string</type>
<default>image/jpeg</default>
......@@ -69,8 +69,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/html_image_map</key>
<applyto>/apps/gthumb/ext/image_wall/html_image_map</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/html_image_map</key>
<applyto>/apps/gthumb/ext/contact_sheet/html_image_map</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>false</default>
......@@ -82,8 +82,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/theme</key>
<applyto>/apps/gthumb/ext/image_wall/theme</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/theme</key>
<applyto>/apps/gthumb/ext/contact_sheet/theme</applyto>
<owner>gthumb</owner>
<type>string</type>
<default>default.cst</default>
......@@ -95,8 +95,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/images_per_page</key>
<applyto>/apps/gthumb/ext/image_wall/images_per_page</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/images_per_page</key>
<applyto>/apps/gthumb/ext/contact_sheet/images_per_page</applyto>
<owner>gthumb</owner>
<type>int</type>
<default>25</default>
......@@ -108,8 +108,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/single_page</key>
<applyto>/apps/gthumb/ext/image_wall/single_page</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/single_page</key>
<applyto>/apps/gthumb/ext/contact_sheet/single_page</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>false</default>
......@@ -121,8 +121,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/columns</key>
<applyto>/apps/gthumb/ext/image_wall/columns</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/columns</key>
<applyto>/apps/gthumb/ext/contact_sheet/columns</applyto>
<owner>gthumb</owner>
<type>int</type>
<default>5</default>
......@@ -134,8 +134,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/sort_type</key>
<applyto>/apps/gthumb/ext/image_wall/sort_type</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/sort_type</key>
<applyto>/apps/gthumb/ext/contact_sheet/sort_type</applyto>
<owner>gthumb</owner>
<type>string</type>
<default>general::unsorted</default>
......@@ -147,8 +147,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/sort_inverse</key>
<applyto>/apps/gthumb/ext/image_wall/sort_inverse</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/sort_inverse</key>
<applyto>/apps/gthumb/ext/contact_sheet/sort_inverse</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>false</default>
......@@ -160,8 +160,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/same_size</key>
<applyto>/apps/gthumb/ext/image_wall/same_size</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/same_size</key>
<applyto>/apps/gthumb/ext/contact_sheet/same_size</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>true</default>
......@@ -173,8 +173,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/thumbnail_size</key>
<applyto>/apps/gthumb/ext/image_wall/thumbnail_size</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/thumbnail_size</key>
<applyto>/apps/gthumb/ext/contact_sheet/thumbnail_size</applyto>
<owner>gthumb</owner>
<type>int</type>
<default>128</default>
......@@ -186,8 +186,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/squared_thumbnail</key>
<applyto>/apps/gthumb/ext/image_wall/squared_thumbnail</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/squared_thumbnail</key>
<applyto>/apps/gthumb/ext/contact_sheet/squared_thumbnail</applyto>
<owner>gthumb</owner>
<type>bool</type>
<default>false</default>
......@@ -199,8 +199,8 @@
</schema>
<schema>
<key>/schemas/apps/gthumb/ext/image_wall/thumbnail_caption</key>
<applyto>/apps/gthumb/ext/image_wall/thumbnail_caption</applyto>
<key>/schemas/apps/gthumb/ext/contact_sheet/thumbnail_caption</key>
<applyto>/apps/gthumb/ext/contact_sheet/thumbnail_caption</applyto>
<owner>gthumb</owner>
<type>string</type>
<default></default>
......
......@@ -140,7 +140,7 @@
<child>
<object class="GtkLabel" id="label100">
<property name="visible">True</property>
<property name="label" translatable="yes"> </property>
<property name="label"> </property>
</object>
<packing>
<property name="top_attach">2</property>
......@@ -170,7 +170,7 @@
<child>
<object class="GtkLabel" id="label101">
<property name="visible">True</property>
<property name="label" translatable="yes"> </property>
<property name="label"> </property>
</object>
<packing>
<property name="top_attach">3</property>
......
......@@ -123,7 +123,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%p</property>
<property name="label">%p</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......@@ -138,7 +138,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%n</property>
<property name="label">%n</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......@@ -413,7 +413,7 @@
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="activates_default">True</property>
<property name="text" translatable="yes">###</property>
<property name="text">###</property>
<property name="secondary_icon_stock">gtk-help</property>
</object>
<packing>
......@@ -462,7 +462,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">#</property>
<property name="label">#</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......
......@@ -83,7 +83,7 @@
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="activates_default">True</property>
<property name="text" translatable="yes">###</property>
<property name="text">###</property>
<property name="secondary_icon_stock">gtk-help</property>
<property name="secondary_icon_activatable">True</property>
<property name="secondary_icon_sensitive">True</property>
......@@ -127,7 +127,7 @@
<object class="GtkLabel" id="label32">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">#</property>
<property name="label">#</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......
......@@ -404,7 +404,7 @@
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">State/Provence:</property>
<property name="label" translatable="yes">State/Province:</property>
</object>
<packing>
<property name="top_attach">4</property>
......
......@@ -32,6 +32,7 @@
#include <string>
#include <sstream>
#include <vector>
#include <iomanip>
#include <exiv2/xmp.hpp>
#include <gthumb.h>
#include "exiv2-utils.h"
......@@ -286,6 +287,23 @@ create_metadata (const char *key,
}
static void
add_string_list_to_metadata (GthMetadata *metadata,
const Exiv2::Metadatum &value)
{
GList *list = NULL;
GthStringList *string_list;
for (int i = 0; i < value.count(); i++)
list = g_list_prepend (list, g_strdup (value.toString(i).c_str()));
string_list = gth_string_list_new (g_list_reverse (list));
g_object_set (metadata, "string-list", string_list, NULL);
g_object_unref (string_list);
_g_string_list_free (list);
}
static void
set_file_info (GFileInfo *info,
const char *key,
......@@ -385,7 +403,6 @@ set_attribute_from_metadata (GFileInfo *info,
const char *attribute,
GObject *metadata)
{
char *key;
char *description;
char *formatted_value;
char *raw_value;
......@@ -395,7 +412,6 @@ set_attribute_from_metadata (GFileInfo *info,
return;
g_object_get (metadata,
"id", &key,
"description", &description,
"formatted", &formatted_value,
"raw", &raw_value,
......@@ -409,6 +425,11 @@ set_attribute_from_metadata (GFileInfo *info,
raw_value,
NULL,
type_name);
g_free (description);
g_free (formatted_value);
g_free (raw_value);
g_free (type_name);
}
......@@ -640,6 +661,13 @@ exiv2_read_metadata (Exiv2::Image::AutoPtr image,
raw_value.str().c_str(),
"Xmp::Embedded",
md->typeName());
if ((g_strcmp0 (md->typeName(), "XmpBag") == 0)
|| (g_strcmp0 (md->typeName(), "XmpSeq") == 0))
{
add_string_list_to_metadata (metadata, *md);
}
add_metadata_to_hash (table, metadata);
_g_object_unref (metadata);
}
......@@ -789,6 +817,13 @@ exiv2_read_sidecar (GFile *file,
raw_value.str().c_str(),
"Xmp::Sidecar",
md->typeName());
if ((g_strcmp0 (md->typeName(), "XmpBag") == 0)
|| (g_strcmp0 (md->typeName(), "XmpSeq") == 0))
{
add_string_list_to_metadata (metadata, *md);
}
add_metadata_to_hash (table, metadata);
_g_object_unref (metadata);
}
......@@ -1097,12 +1132,28 @@ exiv2_write_metadata_private (Exiv2::Image::AutoPtr image,
}
}
else if (GTH_IS_METADATA (metadatum)) {
const char *raw_value;
const char *raw_value;
GthStringList *string_list;
GList *scan;
raw_value = gth_metadata_get_raw (GTH_METADATA (metadatum));
if ((raw_value != NULL) && (strcmp (raw_value, "") != 0)) {
value->read (raw_value);
xd.add (xmp_key, value.get());
switch (gth_metadata_get_data_type (GTH_METADATA (metadatum))) {
case GTH_METADATA_TYPE_STRING:
raw_value = gth_metadata_get_raw (GTH_METADATA (metadatum));
if ((raw_value != NULL) && (strcmp (raw_value, "") != 0)) {
value->read (raw_value);
xd.add (xmp_key, value.get());
}
break;
case GTH_METADATA_TYPE_STRING_LIST:
string_list = gth_metadata_get_string_list (GTH_METADATA (metadatum));
for (scan = gth_string_list_get_list (string_list); scan; scan = scan->next) {
char *single_value = (char *) scan->data;
value->read (single_value);
xd.add (xmp_key, value.get());
}
break;
}
}
}
......
......@@ -31,6 +31,9 @@ G_BEGIN_DECLS
extern const char *_LAST_DATE_TAG_NAMES[];
extern const char *_ORIGINAL_DATE_TAG_NAMES[];
extern const char *_DESCRIPTION_TAG_NAMES[];
extern const char *_TITLE_TAG_NAMES[];
extern const char *_LOCATION_TAG_NAMES[];
extern const char *_KEYWORDS_TAG_NAMES[];
gboolean exiv2_read_metadata_from_file (GFile *file,
GFileInfo *info,
......
......@@ -176,35 +176,35 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
metadata = g_file_info_get_attribute_object (file_data->info, "general::title");
if (metadata != NULL) {
g_object_set (metadata, "value-type", NULL, NULL);
g_file_info_set_attribute_object (file_data->info, "Xmp::dc::title", metadata);
g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Headline", metadata);
for (i = 0; _TITLE_TAG_NAMES[i] != NULL; i++)
g_file_info_set_attribute_object (file_data->info, _TITLE_TAG_NAMES[i], metadata);
}
else {
g_file_info_remove_attribute (file_data->info, "Xmp::dc::title");
g_file_info_remove_attribute (file_data->info, "Iptc::Application2::Headline");
for (i = 0; _TITLE_TAG_NAMES[i] != NULL; i++)
g_file_info_remove_attribute (file_data->info, _TITLE_TAG_NAMES[i]);
}
metadata = g_file_info_get_attribute_object (file_data->info, "general::location");
if (metadata != NULL) {
g_object_set (metadata, "value-type", NULL, NULL);
g_file_info_set_attribute_object (file_data->info, "Xmp::iptc::Location", metadata);
g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::LocationName", metadata);
for (i = 0; _LOCATION_TAG_NAMES[i] != NULL; i++)
g_file_info_set_attribute_object (file_data->info, _LOCATION_TAG_NAMES[i], metadata);
}
else {
g_file_info_remove_attribute (file_data->info, "Xmp::iptc::Location");
g_file_info_remove_attribute (file_data->info, "Iptc::Application2::LocationName");
for (i = 0; _LOCATION_TAG_NAMES[i] != NULL; i++)
g_file_info_remove_attribute (file_data->info, _LOCATION_TAG_NAMES[i]);
}
metadata = g_file_info_get_attribute_object (file_data->info, "general::tags");
if (metadata != NULL) {
if (GTH_IS_METADATA (metadata))
g_object_set (metadata, "value-type", NULL, NULL);
g_file_info_set_attribute_object (file_data->info, "Xmp::iptc::Keywords", metadata);
g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Keywords", metadata);
for (i = 0; _KEYWORDS_TAG_NAMES[i] != NULL; i++)
g_file_info_set_attribute_object (file_data->info, _KEYWORDS_TAG_NAMES[i], metadata);
}
else {
g_file_info_remove_attribute (file_data->info, "Xmp::iptc::Keywords");
g_file_info_remove_attribute (file_data->info, "Iptc::Application2::Keywords");
for (i = 0; _KEYWORDS_TAG_NAMES[i] != NULL; i++)
g_file_info_remove_attribute (file_data->info, _KEYWORDS_TAG_NAMES[i]);
}
metadata = g_file_info_get_attribute_object (file_data->info, "general::datetime");
......
......@@ -285,7 +285,7 @@
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Resize the images if larger then this size</property>
<property name="tooltip_text" translatable="yes">Resize the images if larger than this size</property>
<property name="label" translatable="yes">_Resize to:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">resize_combobox</property>
......
......@@ -531,6 +531,11 @@ gth_browser_activate_action_edit_rename (GtkAction *action,
gth_hook_invoke ("gth-browser-file-list-rename", browser);
return;
}
if (gth_window_get_current_page (GTH_WINDOW (browser)) == GTH_BROWSER_PAGE_VIEWER) {
gth_hook_invoke ("gth-browser-file-list-rename", browser);
return;
}
}
......
......@@ -804,11 +804,6 @@ fm__gth_browser_folder_tree_popup_before_cb (GthBrowser *browser,
g_error_free (error);
}
}
set_action_sensitive (data, "Folder_Create", (folder != NULL) && g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE));
set_action_sensitive (data, "Folder_Rename", (folder != NULL) && g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME));
set_action_sensitive (data, "Folder_Delete", (folder != NULL) && g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE));
set_action_sensitive (data, "Folder_Trash", (folder != NULL) && g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH));
set_action_sensitive (data, "Folder_Cut", (folder != NULL) && g_file_info_get_attribute_boolean (folder->info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE));
fm__gth_browser_update_sensitivity_cb (browser);
}
......@@ -1088,7 +1083,10 @@ _gth_browser_update_open_menu (GthBrowser *browser,
gtk_widget_show (menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
g_object_set_data (G_OBJECT (menu_item), "appinfo", appinfo);
g_object_set_data_full (G_OBJECT (menu_item),
"appinfo",
g_object_ref (appinfo),
g_object_unref);
g_signal_connect (menu_item,
"activate",
G_CALLBACK (activate_open_with_application_item),
......@@ -1111,7 +1109,7 @@ _gth_browser_update_open_menu (GthBrowser *browser,
gtk_widget_show (openwith_item);
g_hash_table_destroy (used_apps);
g_list_free (appinfo_list);
_g_object_list_unref (appinfo_list);
_g_object_list_unref (file_list);
_gtk_tree_path_list_free (items);
}
......
......@@ -214,11 +214,10 @@ adjust_colors_after (GthAsyncTask *task,
GError *error,
gpointer user_data)
{
AdjustData *adjust_data = user_data;
AdjustData *adjust_data = user_data;
GthFileToolAdjustColors *self = adjust_data->self;
if (error == NULL) {
GthFileToolAdjustColors *self = adjust_data->self;
cairo_surface_destroy (self->priv->destination);
self->priv->destination = cairo_surface_reference (adjust_data->destination);
......@@ -228,6 +227,10 @@ adjust_colors_after (GthAsyncTask *task,
}
pixbuf_cache_free (adjust_data->cache);
if (self->priv->image_task == GTH_TASK (task))
self->priv->image_task = NULL;
g_object_unref (task);
}
......
......@@ -54,6 +54,7 @@ struct _GthMediaViewerPagePrivate {
gboolean has_video;
gboolean has_audio;
gulong update_progress_id;
guint set_to_pause_id;
gdouble rate;
GtkWidget *mediabar;
GtkWidget *fullscreen_toolbar;
......@@ -1055,8 +1056,10 @@ set_to_paused (gpointer user_data)
{
GthMediaViewerPage *self = user_data;
self->priv->set_to_pause_id = 0;
if (self->priv->playbin != NULL)
gst_element_set_state (self->priv->playbin, GST_STATE_PAUSED);
return FALSE;
}
......@@ -1089,6 +1092,8 @@ gth_media_viewer_page_real_view (GthViewerPage *base,
self->priv->file_data = gth_file_data_dup (file_data);
self->priv->duration = 0;
self->priv->has_audio = FALSE;
self->priv->has_video = FALSE;
_g_object_unref (self->priv->icon);
self->priv->icon = NULL;
......@@ -1110,7 +1115,9 @@ gth_media_viewer_page_real_view (GthViewerPage *base,
uri = g_file_get_uri (self->priv->file_data->file);
g_object_set (G_OBJECT (self->priv->playbin), "uri", uri, NULL);
gdk_threads_add_idle (set_to_paused, self);
if (self->priv->set_to_pause_id != 0)
g_source_remove (self->priv->set_to_pause_id);
self->priv->set_to_pause_id = gdk_threads_add_idle (set_to_paused, self);
g_free (uri);
}
......@@ -1268,6 +1275,11 @@ gth_media_viewer_page_finalize (GObject *obj)
self = GTH_MEDIA_VIEWER_PAGE (obj);
if (self->priv->set_to_pause_id != 0) {
g_source_remove (self->priv->set_to_pause_id);
self->priv->set_to_pause_id = 0;
}
if (self->priv->update_progress_id != 0) {
g_source_remove (self->priv->update_progress_id);
self->priv->update_progress_id = 0;
......@@ -1325,6 +1337,7 @@ gth_media_viewer_page_instance_init (GthMediaViewerPage *self)
{
self->priv = GTH_MEDIA_VIEWER_PAGE_GET_PRIVATE (self);
self->priv->update_progress_id = 0;
self->priv->set_to_pause_id = 0;
self->priv->xwin_assigned = FALSE;
self->priv->has_video = FALSE;
self->priv->has_audio = FALSE;
......
......@@ -1304,6 +1304,9 @@ _gth_image_viewer_page_set_image (GthImageViewerPage *self,
int height;
char *size;
if (image == NULL)
return;
gth_image_viewer_set_surface (GTH_IMAGE_VIEWER (self->priv->viewer), image, -1, -1);
file_data = gth_browser_get_current_file (GTH_BROWSER (self->priv->browser));
......@@ -1499,10 +1502,15 @@ gth_image_viewer_page_set_image (GthImageViewerPage *self,
cairo_surface_t *image,
gboolean add_to_history)
{
if (gth_image_viewer_page_get_image (self) == image)
return;
if (add_to_history)
gth_image_history_add_image (self->priv->history, image, TRUE);
_gth_image_viewer_page_set_image (self, image, TRUE);
self->priv->image_changed = TRUE;
if (add_to_history)
gth_viewer_page_focus (GTH_VIEWER_PAGE (self));
}
......
......@@ -160,7 +160,7 @@
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%U</property>
<property name="label">%U</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......@@ -174,7 +174,7 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%F</property>
<property name="label">%F</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......@@ -188,7 +188,7 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%B</property>
<property name="label">%B</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......@@ -202,7 +202,7 @@
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%P</property>
<property name="label">%P</property>
<attributes>
<attribute name="size" value="8000"/>
</attributes>
......
......@@ -113,7 +113,7 @@ oauth_account_chooser_dialog_init (OAuthAccountChooserDialog *self)
GtkWidget *content;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, OAUTH_TYPE_ACCOUNT_CHOOSER_DIALOG, OAuthAccountChooserDialogPrivate);
self->priv->builder = _gtk_builder_new_from_file ("flicker-account-chooser.ui", "flicker");
self->priv->builder = _gtk_builder_new_from_file ("oauth-account-chooser.ui", "oauth");
gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 5);
......
......@@ -127,7 +127,7 @@ oauth_account_manager_dialog_init (OAuthAccountManagerDialog *self)
GtkWidget *content;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, OAUTH_TYPE_ACCOUNT_MANAGER_DIALOG, OAuthAccountManagerDialogPrivate);
self->priv->builder = _gtk_builder_new_from_file ("flicker-account-manager.ui", "flicker");
self->priv->builder = _gtk_builder_new_from_file ("oauth-account-manager.ui", "oauth");
gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 5);
......
......@@ -480,7 +480,7 @@ ask_authorization_messagedialog_response_cb (GtkDialog *dialog,
switch (response_id) {
case GTK_RESPONSE_HELP:
show_help_dialog (GTK_WINDOW (dialog), "flicker-ask-authorization");
show_help_dialog (GTK_WINDOW (dialog), "oauth-ask-authorization");
break;
case GTK_RESPONSE_DELETE_EVENT:
......
......@@ -15,7 +15,7 @@ libresize_images_la_SOURCES = \
libresize_images_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb
libresize_images_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
libresize_images_la_LIBADD = $(GTHUMB_LIBS)
libresize_images_la_LIBADD = $(GTHUMB_LIBS) ../image_viewer/libimage_viewer.la
libresize_images_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
extensioninidir = $(extensiondir)
......
......@@ -22,6 +22,7 @@
#include <config.h>
#include <gtk/gtk.h>
#include <gthumb.h>
#include <extensions/image_viewer/gth-metadata-provider-image.h>
#include "dlg-resize-images.h"
#include "preferences.h"
......@@ -55,6 +56,8 @@ typedef struct {
double latest_height_in_pixel;
double latest_width_in_percentage;
double latest_height_in_percentage;
gboolean known_ratio;
double ratio;
} DialogData;
......@@ -256,17 +259,25 @@ width_spinbutton_value_changed_cb (GtkSpinButton *spinbutton,
gpointer user_data)
{
DialogData *data = user_data;
double ratio;
GthUnit unit;
unit = units[gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("unit_combobox")))];
if (unit != GTH_UNIT_PERCENTAGE)
if (! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("keep_ratio_checkbutton"))))
return;
if (! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("keep_ratio_checkbutton"))))
ratio = 0.0;
unit = units[gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("unit_combobox")))];
if ((unit == GTH_UNIT_PIXELS) && data->known_ratio)
ratio = 1.0 / data->ratio;
else if (unit == GTH_UNIT_PERCENTAGE)
ratio = 1.0;
if (ratio == 0.0)
return;
g_signal_handler_block (GET_WIDGET ("height_spinbutton"), data->height_spinbutton_event);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("height_spinbutton")), gtk_spin_button_get_value (spinbutton));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("height_spinbutton")),
ratio * gtk_spin_button_get_value (GTK_SPIN_BUTTON (GET_WIDGET ("width_spinbutton"))));
g_signal_handler_unblock (GET_WIDGET ("height_spinbutton"), data->height_spinbutton_event);
}
......@@ -276,17 +287,25 @@ height_spinbutton_value_changed_cb (GtkSpinButton *spinbutton,
gpointer user_data)
{
DialogData *data = user_data;
double ratio;
GthUnit unit;
unit = units[gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("unit_combobox")))];
if (unit != GTH_UNIT_PERCENTAGE)
if (! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("keep_ratio_checkbutton"))))
return;
if (! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("keep_ratio_checkbutton"))))
ratio = 0.0;
unit = units[gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("unit_combobox")))];
if ((unit == GTH_UNIT_PIXELS) && data->known_ratio)
ratio = data->ratio;
else if (unit == GTH_UNIT_PERCENTAGE)
ratio = 1.0;
if (ratio == 0.0)
return;
g_signal_handler_block (GET_WIDGET ("width_spinbutton"), data->width_spinbutton_event);