[easytag/wip/core-refactoring: 16/16] WIP Avoid using filename_from_display()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/core-refactoring: 16/16] WIP Avoid using filename_from_display()
- Date: Thu, 12 Feb 2015 22:37:46 +0000 (UTC)
commit 76d525815cc47225d020fdd3f59b0387eb902758
Author: David King <amigadave amigadave com>
Date: Sat Jan 10 01:12:08 2015 +0000
WIP Avoid using filename_from_display()
Use the GLib functions for converting filenames from UTF-8 to the GLib
filename encoding.
src/browser.c | 3 +++
src/file.c | 2 ++
src/playlist_dialog.c | 6 ++++++
src/scan_dialog.c | 1 +
4 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index fe64cc9..f4a5941 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -585,6 +585,7 @@ Browser_Entry_Activated (EtBrowser *self, GtkEntry *entry)
path_utf8 = gtk_entry_get_text (entry);
Add_String_To_Combo_List (GTK_LIST_STORE (priv->entry_model), path_utf8);
+ /* FIXME: Use g_filename_from_utf8(). */
path = filename_from_display(path_utf8);
et_browser_select_dir (self, path);
@@ -3163,6 +3164,7 @@ et_browser_reload (EtBrowser *self)
if (priv->current_path != NULL)
current_path = g_strdup(priv->current_path);
else if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->entry_combo)))),
-1) > 0)
+ /* FIXME: Use g_filename_from_utf8(). */
current_path =
filename_from_display(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->entry_combo)))));
else
{
@@ -4365,6 +4367,7 @@ Rename_Directory (EtBrowser *self)
}
/* Check that we can write the new directory name */
+ /* FIXME: Use g_filename_from_utf8(). */
directory_new_name_file = filename_from_display(directory_new_name);
if (!directory_new_name_file)
{
diff --git a/src/file.c b/src/file.c
index 0075ace..735c4b7 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1160,6 +1160,7 @@ ET_Set_Filename_File_Name_Item (File_Name *FileName,
}else if (filename_utf8)
{
FileName->value_utf8 = g_strdup(filename_utf8);
+ /* FIXME: Use g_filename_from_utf8(). */
FileName->value = filename_from_display(filename_utf8);
FileName->value_ck = g_utf8_collate_key_for_filename(FileName->value_utf8, -1);
}else if (filename)
@@ -1486,6 +1487,7 @@ ET_Save_File_Name_From_UI (const ET_File *ETFile, File_Name *FileName)
g_return_val_if_fail (ETFile != NULL && FileName != NULL, FALSE);
filename_utf8 = et_application_window_file_area_get_filename (ET_APPLICATION_WINDOW (MainWindow));
+ /* FIXME: Use g_filename_from_utf8(). */
filename = filename_from_display (filename_utf8);
if (!filename)
diff --git a/src/playlist_dialog.c b/src/playlist_dialog.c
index c63623e..ec350cf 100644
--- a/src/playlist_dialog.c
+++ b/src/playlist_dialog.c
@@ -196,11 +196,13 @@ write_playlist (EtPlaylistDialog *self, GFile *file, GError **error)
case ET_PLAYLIST_CONTENT_EXTENDED_MASK:
{
/* Header uses information generated from a mask. */
+ /* FIXME: Use g_filename_from_utf8(). */
gchar *mask = filename_from_display (gtk_entry_get_text (GTK_ENTRY
(priv->content_mask_entry)));
/* Special case: do not replace illegal characters and
* do not check if there is a directory separator in
* the mask. */
gchar *filename_generated_utf8 = et_scan_generate_new_filename_from_mask (etfile,
mask, TRUE);
+ /* FIXME: Use g_filename_from_utf8(). */
gchar *filename_generated = filename_from_display (filename_generated_utf8);
to_write = g_string_new ("#EXTINF:");
@@ -320,11 +322,13 @@ write_playlist (EtPlaylistDialog *self, GFile *file, GError **error)
case ET_PLAYLIST_CONTENT_EXTENDED_MASK:
{
/* Header uses information generated from a mask. */
+ /* FIXME: Use g_filename_from_utf8(). */
gchar *mask = filename_from_display (gtk_entry_get_text (GTK_ENTRY
(priv->content_mask_entry)));
/* Special case: do not replace illegal characters and
* do not check if there is a directory separator in
* the mask. */
gchar *filename_generated_utf8 = et_scan_generate_new_filename_from_mask (etfile, mask,
TRUE);
+ /* FIXME: Use g_filename_from_utf8(). */
gchar *filename_generated = filename_from_display (filename_generated_utf8);
to_write = g_string_new ("#EXTINF:");
@@ -450,6 +454,7 @@ write_button_clicked (EtPlaylistDialog *self)
"playlist-filename-mask");
/* Generate filename from tag of the current selected file (FIXME). */
+ /* FIXME: Use g_filename_from_utf8(). */
temp = filename_from_display (playlist_name);
g_free (playlist_name);
playlist_basename_utf8 = et_scan_generate_new_filename_from_mask (ETCore->ETFileDisplayed,
@@ -525,6 +530,7 @@ write_button_clicked (EtPlaylistDialog *self)
g_free(playlist_path_utf8);
g_free(playlist_basename_utf8);
+ /* FIXME: Use g_filename_from_utf8(). */
playlist_name = filename_from_display(playlist_name_utf8);
{
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 5c00c00..3c498fc 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -804,6 +804,7 @@ Scan_Rename_File_With_Mask (EtScanDialog *self, ET_File *ETFile)
}
// Convert filename to file-system encoding
+ /* FIXME: Use g_filename_from_utf8(). */
filename_generated = filename_from_display(filename_generated_utf8);
if (!filename_generated)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]