Merge lp:~junrrein/pantheon-files/fix-1009208 into lp:~elementary-apps/pantheon-files/trunk

Proposed by Julián Unrrein
Status: Merged
Approved by: Cody Garver
Approved revision: 1244
Merged at revision: 1247
Proposed branch: lp:~junrrein/pantheon-files/fix-1009208
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 22 lines (+8/-1)
1 file modified
src/marlin-places-sidebar.c (+8/-1)
To merge this branch: bzr merge lp:~junrrein/pantheon-files/fix-1009208
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+171702@code.launchpad.net

Commit message

[Sidebar] Convert item names to UTF-8 to fix bug #1009208.

Description of the change

[Sidebar] Convert item names to UTF-8 to fix bug #1009208.

I just implemented what Victor said here -> https://bugs.launchpad.net/pantheon-files/+bug/1009208/comments/5.

I can't test if this works or not, as the problem isn't present in my machine.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/marlin-places-sidebar.c'
2--- src/marlin-places-sidebar.c 2013-06-20 20:11:39 +0000
3+++ src/marlin-places-sidebar.c 2013-06-27 01:54:25 +0000
4@@ -187,10 +187,17 @@
5 eject = NULL;
6 }
7
8+ GError* error = NULL;
9+ gchar* converted_name = g_locale_to_utf8 (name, -1, NULL, NULL, &error);
10+ if (error != NULL) {
11+ g_warning ("Couldn't convert the bookmark name: %s With error: %s", name, error->message);
12+ converted_name = name;
13+ }
14+
15 gtk_tree_store_append (MARLIN_ABSTRACT_SIDEBAR(sidebar)->store, &iter, parent);
16 gtk_tree_store_set (MARLIN_ABSTRACT_SIDEBAR(sidebar)->store, &iter,
17 PLACES_SIDEBAR_COLUMN_ICON, pixbuf,
18- PLACES_SIDEBAR_COLUMN_NAME, name,
19+ PLACES_SIDEBAR_COLUMN_NAME, converted_name,
20 PLACES_SIDEBAR_COLUMN_URI, uri,
21 PLACES_SIDEBAR_COLUMN_DRIVE, drive,
22 PLACES_SIDEBAR_COLUMN_VOLUME, volume,

Subscribers

People subscribed via source and target branches

to all changes: