[gnome-calendar] source-dialog: Convert filename to utf8 before displaying it
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] source-dialog: Convert filename to utf8 before displaying it
- Date: Thu, 9 Nov 2017 01:57:58 +0000 (UTC)
commit 4b3351d54954e514b36512bc8242fd4ba0a1ead1
Author: Florian Brosch <flo brosch gmail com>
Date: Tue Nov 7 18:42:38 2017 +0100
source-dialog: Convert filename to utf8 before displaying it
src/gcal-source-dialog.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 1317d02..2dd9351 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -976,7 +976,8 @@ static void
calendar_file_selected (GtkFileChooser *button,
gpointer user_data)
{
- g_autofree gchar* display_name = NULL;
+ g_autofree gchar *unencoded_display_name = NULL;
+ g_autofree gchar *display_name = NULL;
g_autoptr (ESource) source = NULL;
g_autoptr (GFile) file = NULL;
GcalSourceDialog *self;
@@ -1002,7 +1003,8 @@ calendar_file_selected (GtkFileChooser *button,
e_source_local_set_custom_file (E_SOURCE_LOCAL (ext), file);
/* update the source properties */
- display_name = g_file_get_basename (file);
+ unencoded_display_name = g_file_get_basename (file);
+ display_name = g_filename_display_name (unencoded_display_name);
e_source_set_display_name (source, display_name);
/* Jump to the edit page */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]