[easytag] Fix input of filenames in the file area
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Fix input of filenames in the file area
- Date: Tue, 26 Jan 2016 23:13:02 +0000 (UTC)
commit 02650510e0c3f3dcf73544bc9379ce4306fb96c8
Author: David King <amigadave amigadave com>
Date: Wed Jan 27 00:06:17 2016 +0100
Fix input of filenames in the file area
When showing the edit name in the file area, show the new
(as-yet-unsaved) filename, rather than using the old name.
src/file_area.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/file_area.c b/src/file_area.c
index a0cca16..d002861 100644
--- a/src/file_area.c
+++ b/src/file_area.c
@@ -223,8 +223,7 @@ et_file_area_set_file_fields (EtFileArea *self,
file = g_file_new_for_path (cur_filename);
info = g_file_query_info (file, G_FILE_ATTRIBUTE_ACCESS_CAN_READ ","
- G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE ","
- G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME,
+ G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE,
G_FILE_QUERY_INFO_NONE, NULL, &error);
/* Show/hide 'AccessStatusIcon' */
@@ -300,12 +299,13 @@ et_file_area_set_file_fields (EtFileArea *self,
_("File not found"));
g_object_unref (emblem_icon);
}
+
+ g_object_unref (info);
}
- /* Set filename into name_entry. */
- basename_utf8 = g_strdup (g_file_info_get_edit_name (info));
- g_object_unref (info);
+ /* Set new filename into name_entry. This matches the GFile edit name. */
+ basename_utf8 = g_filename_display_basename (((File_Name *)((GList *)ETFile->FileNameNew)->data)->value);
/* Remove the extension. */
if ((pos = strrchr (basename_utf8, '.')) != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]