[gthumb] More path to utf8_path conversions
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] More path to utf8_path conversions
- Date: Fri, 29 May 2009 14:52:26 -0400 (EDT)
commit 71546420f97a09833cb386b90e7cf1af7ad711af
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Fri May 29 14:51:39 2009 -0400
More path to utf8_path conversions
---
libgthumb/comments.c | 2 +-
src/dlg-change-date.c | 14 +++++++-------
src/dlg-convert.c | 6 +++---
src/dlg-jpegtran.c | 2 +-
src/dlg-rename-series.c | 16 ++++++++--------
src/dlg-reset-exif.c | 2 +-
src/dlg-search.c | 4 ++--
src/gth-batch-op.c | 4 ++--
src/gth-browser-actions-callbacks.c | 8 ++++----
src/gth-fullscreen.c | 10 +++++-----
src/gthumb-preloader.c | 8 ++++----
11 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/libgthumb/comments.c b/libgthumb/comments.c
index d2a8a23..209cd07 100644
--- a/libgthumb/comments.c
+++ b/libgthumb/comments.c
@@ -426,7 +426,7 @@ save_comment_to_metadata (const char *uri,
add_metadata = simple_add_metadata (add_metadata, TAG_NAME_SETS[KEYWORD_TAG_NAMES][0], keywords_str);
g_free (keywords_str);
- update_and_save_metadata (file->path, file->path, add_metadata);
+ update_and_save_metadata (file->utf8_path, file->utf8_path, add_metadata);
free_metadata (add_metadata);
file_data_unref (file);
}
diff --git a/src/dlg-change-date.c b/src/dlg-change-date.c
index 602eb5c..b4c938c 100644
--- a/src/dlg-change-date.c
+++ b/src/dlg-change-date.c
@@ -121,7 +121,7 @@ ok_clicked (GtkWidget *button,
FileData *fdata = scan->data;
if (is_active (data->cd_created_radiobutton)) {
- mtime = get_file_ctime (fdata->path);
+ mtime = fdata->ctime;
comment_time = mtime;
} else if (is_active (data->cd_exif_radiobutton)) {
mtime = get_exif_time (fdata);
@@ -139,22 +139,22 @@ ok_clicked (GtkWidget *button,
}
}
if (is_active (data->cd_last_modified_checkbutton))
- mtime = get_file_mtime (fdata->path) + tz;
+ mtime = fdata->mtime + tz;
}
if ((mtime <= 0) && (comment_time <= 0))
continue;
if (is_active (data->cd_last_modified_checkbutton))
- set_file_mtime (fdata->path, mtime);
+ set_file_mtime (fdata->utf8_path, mtime);
if (is_active (data->cd_comment_checkbutton)) {
CommentData *cdata;
- cdata = comments_load_comment (fdata->path, TRUE);
+ cdata = comments_load_comment (fdata->utf8_path, TRUE);
if (cdata == NULL)
cdata = comment_data_new ();
cdata->time = comment_time;
- comments_save_comment (fdata->path, cdata);
+ comments_save_comment (fdata->utf8_path, cdata);
comment_data_free (cdata);
}
@@ -183,13 +183,13 @@ ok_clicked (GtkWidget *button,
if (is_active (data->cd_exif_dig_checkbutton))
add_metadata = simple_add_metadata (add_metadata, "Exif.Photo.DateTimeDigitized", buf);
- update_and_save_metadata (fdata->path, fdata->path, add_metadata);
+ update_and_save_metadata (fdata->utf8_path, fdata->utf8_path, add_metadata);
free_metadata (add_metadata);
g_free (buf);
}
- file_list = g_list_prepend (file_list, fdata->path);
+ file_list = g_list_prepend (file_list, fdata->utf8_path);
}
gth_monitor_notify_update_files (GTH_MONITOR_EVENT_CHANGED, file_list);
diff --git a/src/dlg-convert.c b/src/dlg-convert.c
index a7367e5..837b5e3 100644
--- a/src/dlg-convert.c
+++ b/src/dlg-convert.c
@@ -246,11 +246,11 @@ save_image_and_remove_original (DialogData *data)
}
if (error == NULL) {
- data->saved_list = g_list_prepend (data->saved_list, g_strdup (fd_new->path));
+ data->saved_list = g_list_prepend (data->saved_list, g_strdup (fd_new->utf8_path));
if (data->remove_original && ! file_data_same (fd_old, fd_new)) {
- file_unlink (fd_old->path);
- data->deleted_list = g_list_prepend (data->deleted_list, g_strdup (fd_old->path));
+ file_unlink (fd_old->utf8_path);
+ data->deleted_list = g_list_prepend (data->deleted_list, g_strdup (fd_old->utf8_path));
}
}
}
diff --git a/src/dlg-jpegtran.c b/src/dlg-jpegtran.c
index 20fda5d..aef5d0f 100644
--- a/src/dlg-jpegtran.c
+++ b/src/dlg-jpegtran.c
@@ -246,7 +246,7 @@ apply_transformation_done (gpointer callback_data)
if (at_data->info != NULL)
g_file_set_attributes_from_info (gfile, at_data->info, G_FILE_QUERY_INFO_NONE, NULL, NULL);
- notify_file_changed (at_data->data, file->path, at_data->notify_soon);
+ notify_file_changed (at_data->data, file->utf8_path, at_data->notify_soon);
if (at_data->done_func)
(at_data->done_func) (at_data->done_data);
diff --git a/src/dlg-rename-series.c b/src/dlg-rename-series.c
index 951f7f7..bee9625 100644
--- a/src/dlg-rename-series.c
+++ b/src/dlg-rename-series.c
@@ -130,7 +130,7 @@ ok_clicked_cb (GtkWidget *widget,
for (o_scan = data->file_list, n_scan = data->new_names_list; o_scan && n_scan; o_scan = o_scan->next, n_scan = n_scan->next) {
FileData *fdata = o_scan->data;
- char *old_full_path = fdata->path;
+ char *old_full_path = fdata->utf8_path;
char *new_name = n_scan->data;
char *old_path = remove_level_from_path (old_full_path);
char *new_full_path;
@@ -138,7 +138,7 @@ ok_clicked_cb (GtkWidget *widget,
new_full_path = g_strconcat (old_path, "/", new_name, NULL);
g_free (old_path);
- old_names = g_list_prepend (old_names, g_strdup (fdata->path));
+ old_names = g_list_prepend (old_names, g_strdup (fdata->utf8_path));
new_names = g_list_prepend (new_names, new_full_path);
}
old_names = g_list_reverse (old_names);
@@ -171,7 +171,7 @@ comp_func_size (gconstpointer ptr1,
if ((fd1 == NULL) || (fd2 == NULL))
return 0;
- return gth_sort_by_size_then_name (fd1->size, fd2->size, fd1->path, fd2->path);
+ return gth_sort_by_size_then_name (fd1->size, fd2->size, fd1->utf8_path, fd2->utf8_path);
}
@@ -185,7 +185,7 @@ comp_func_time (gconstpointer ptr1,
return 0;
return gth_sort_by_filetime_then_name (fd1->mtime, fd2->mtime,
- fd1->path, fd2->path);
+ fd1->utf8_path, fd2->utf8_path);
}
@@ -211,7 +211,7 @@ comp_func_path (gconstpointer ptr1,
if ((fd1 == NULL) || (fd2 == NULL))
return 0;
- return gth_sort_by_full_path (fd1->path, fd2->path);
+ return gth_sort_by_full_path (fd1->utf8_path, fd2->utf8_path);
}
@@ -221,7 +221,7 @@ comp_func_comment (gconstpointer ptr1, gconstpointer ptr2)
const FileData *fd1 = ptr1, *fd2 = ptr2;
return gth_sort_by_comment_then_name (fd1->comment, fd2->comment,
- fd1->path, fd2->path);
+ fd1->utf8_path, fd2->utf8_path);
}
@@ -380,13 +380,13 @@ update_list (DialogData *data)
g_free (name_wo_ext);
g_free (utf8_txt);
- cached_date = g_hash_table_lookup (data->date_cache, fdata->path);
+ cached_date = g_hash_table_lookup (data->date_cache, fdata->utf8_path);
if (cached_date != NULL)
image_date = g_strdup (cached_date);
else {
image_date = get_image_date (fdata);
if (image_date != NULL)
- g_hash_table_insert (data->date_cache, g_strdup (fdata->path), g_strdup (image_date));
+ g_hash_table_insert (data->date_cache, g_strdup (fdata->utf8_path), g_strdup (image_date));
}
utf8_txt = g_locale_to_utf8 (image_date, -1, 0, 0, 0);
name3 = _g_substitute_pattern (name2, 'd', utf8_txt);
diff --git a/src/dlg-reset-exif.c b/src/dlg-reset-exif.c
index 97462e1..1cdd27c 100644
--- a/src/dlg-reset-exif.c
+++ b/src/dlg-reset-exif.c
@@ -111,7 +111,7 @@ apply_transformation (BatchTransformation *bt_data)
if (file_data_has_local_path (file, GTK_WINDOW (bt_data->data->window))) {
write_orientation_field (file->local_path, GTH_TRANSFORM_NONE);
bt_data->data->files_changed_list = g_list_prepend (bt_data->data->files_changed_list,
- g_strdup (file->path));
+ g_strdup (file->utf8_path));
}
bt_data->i++;
diff --git a/src/dlg-search.c b/src/dlg-search.c
index ab05b28..9115ee9 100644
--- a/src/dlg-search.c
+++ b/src/dlg-search.c
@@ -378,7 +378,7 @@ view_result_cb (GtkWidget *widget,
for (scan = data->files; scan; scan = scan->next) {
FileData *fd = scan->data;
- catalog_add_item (catalog, fd->path);
+ catalog_add_item (catalog, fd->utf8_path);
}
if (! catalog_write_to_disk (catalog, &gerror))
@@ -412,7 +412,7 @@ save_result_cb (GtkWidget *widget,
catalog_set_search_data (catalog, data->search_data);
for (scan = data->files; scan; scan = scan->next) {
FileData *fd = scan->data;
- catalog_add_item (catalog, fd->path);
+ catalog_add_item (catalog, fd->utf8_path);
}
if (! catalog_write_to_disk (catalog, &gerror))
diff --git a/src/gth-batch-op.c b/src/gth-batch-op.c
index effa0a2..1241d74 100644
--- a/src/gth-batch-op.c
+++ b/src/gth-batch-op.c
@@ -468,8 +468,8 @@ pixbuf_op_done_cb (GthPixbufOp *pixop,
if (! file_data_same (fd_old, fd_new)) {
comment_copy (fd_old->utf8_path, fd_new->utf8_path);
if (PD(bop)->remove_original) {
- file_unlink (fd_old->path);
- PD(bop)->deleted_list = g_list_prepend (PD(bop)->deleted_list, g_strdup (fd_old->path));
+ file_unlink (fd_old->utf8_path);
+ PD(bop)->deleted_list = g_list_prepend (PD(bop)->deleted_list, g_strdup (fd_old->utf8_path));
}
}
}
diff --git a/src/gth-browser-actions-callbacks.c b/src/gth-browser-actions-callbacks.c
index 27de172..7144731 100644
--- a/src/gth-browser-actions-callbacks.c
+++ b/src/gth-browser-actions-callbacks.c
@@ -496,8 +496,8 @@ catalog_rename (GthBrowser *browser,
_gtk_error_dialog_run (GTK_WINDOW (browser),
_("The name \"%s\" is already used. " "Please use a different name."), new_fd->utf8_name);
}
- else if (file_move (old_fd->path,new_fd->path, FALSE, NULL)) {
- gth_monitor_notify_catalog_renamed (old_fd->path,new_fd->path);
+ else if (file_move (old_fd->utf8_path,new_fd->utf8_path, FALSE, NULL)) {
+ gth_monitor_notify_catalog_renamed (old_fd->utf8_path,new_fd->utf8_path);
}
else {
_gtk_error_dialog_run (GTK_WINDOW (browser),
@@ -963,10 +963,10 @@ folder_rename (GtkWindow *window,
else {
gboolean result;
- result = file_move (old_fd->path, new_fd->utf8_path, FALSE, NULL);
+ result = file_move (old_fd->utf8_path, new_fd->utf8_path, FALSE, NULL);
if (result) {
comment_move (old_path, new_path);
- gth_monitor_notify_directory_renamed (old_fd->path, new_fd->path);
+ gth_monitor_notify_directory_renamed (old_fd->utf8_path, new_fd->utf8_path);
}
else {
_gtk_error_dialog_run (window,
diff --git a/src/gth-fullscreen.c b/src/gth-fullscreen.c
index bae80a4..3cf2b68 100644
--- a/src/gth-fullscreen.c
+++ b/src/gth-fullscreen.c
@@ -233,7 +233,7 @@ preloader_requested_done_cb (GThumbPreloader *gploader,
GthFullscreenPrivateData *priv = fullscreen->priv;
ImageLoader *loader;
- loader = gthumb_preloader_get_loader (priv->preloader, priv->requested->path);
+ loader = gthumb_preloader_get_loader (priv->preloader, priv->requested->utf8_path);
if (loader != NULL)
image_viewer_load_from_image_loader (IMAGE_VIEWER (priv->viewer), loader);
}
@@ -522,7 +522,7 @@ int
filedatacmp (FileData *fd1,
FileData *fd2)
{
- return uricmp (fd1->path, fd2->path);
+ return uricmp (fd1->utf8_path, fd2->utf8_path);
}
@@ -1436,7 +1436,7 @@ monitor_update_files_cb (GthMonitor *monitor,
case GTH_MONITOR_EVENT_CHANGED:
if ((fullscreen->priv->file != NULL)
&& (g_list_find_custom (list,
- fullscreen->priv->file->path,
+ fullscreen->priv->file->utf8_path,
(GCompareFunc) uricmp) != NULL))
{
file_data_unref (fullscreen->priv->file);
@@ -1447,7 +1447,7 @@ monitor_update_files_cb (GthMonitor *monitor,
if (fullscreen->priv->current != NULL) {
FileData *current_file = fullscreen->priv->current->data;
if (g_list_find_custom (list,
- current_file->path,
+ current_file->utf8_path,
(GCompareFunc) uricmp) != NULL)
{
load_current_image (fullscreen);
@@ -1857,7 +1857,7 @@ gth_fullscreen_get_file_list_selection (GthWindow *window)
return NULL;
current_file = fullscreen->priv->current->data;
- return g_list_prepend (NULL, g_strdup (current_file->path));
+ return g_list_prepend (NULL, g_strdup (current_file->utf8_path));
}
diff --git a/src/gthumb-preloader.c b/src/gthumb-preloader.c
index 17abe94..f027d83 100644
--- a/src/gthumb-preloader.c
+++ b/src/gthumb-preloader.c
@@ -395,7 +395,7 @@ gthumb_preloader_load__step2 (LoadData *load_data)
g_signal_emit (G_OBJECT (gploader), gthumb_preloader_signals[REQUESTED_DONE], 0);
debug (DEBUG_INFO, "[requested] preloaded");
}
- debug (DEBUG_INFO, "[=] [%d] <- %s", i, file->path);
+ debug (DEBUG_INFO, "[=] [%d] <- %s", i, file->utf8_path);
}
}
}
@@ -425,10 +425,10 @@ gthumb_preloader_load__step2 (LoadData *load_data)
if (file_data_same (file, requested)) {
gploader->requested = k;
- debug (DEBUG_INFO, "[requested] %s", file->path);
+ debug (DEBUG_INFO, "[requested] %s", file->utf8_path);
}
- debug (DEBUG_INFO, "[+] [%d] <- %s", k, file->path);
+ debug (DEBUG_INFO, "[+] [%d] <- %s", k, file->utf8_path);
}
load_data_free (load_data);
@@ -577,7 +577,7 @@ start_next_loader (GThumbPreloader *gploader)
ploader = current_preloader (gploader);
image_loader_start (ploader->loader);
- debug (DEBUG_INFO, "load %s", ploader->file->path);
+ debug (DEBUG_INFO, "load %s", ploader->file->utf8_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]