Merge lp:~marcobiscaro2112/unity/fixes-754095 into lp:unity

Proposed by Marco Biscaro
Status: Merged
Approved by: Gord Allott
Approved revision: 1107
Merged at revision: 1135
Proposed branch: lp:~marcobiscaro2112/unity/fixes-754095
Merge into: lp:unity
Diff against target: 40 lines (+6/-4)
1 file modified
src/PlacesHomeView.cpp (+6/-4)
To merge this branch: bzr merge lp:~marcobiscaro2112/unity/fixes-754095
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+57095@code.launchpad.net

Description of the change

The gconf key that reflects the changes on default mail application is /desktop/gnome/url-handlers/mailto/command. So, unity should use this key.

This change fixes bug #754095.

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/PlacesHomeView.cpp'
2--- src/PlacesHomeView.cpp 2011-03-31 16:15:21 +0000
3+++ src/PlacesHomeView.cpp 2011-04-11 00:33:30 +0000
4@@ -48,7 +48,7 @@
5
6 #define DESKTOP_DIR "/desktop/gnome/applications"
7 #define BROWSER_DIR DESKTOP_DIR"/browser"
8-#define CALENDAR_DIR DESKTOP_DIR"/calendar"
9+#define MAIL_DIR "/desktop/gnome/url-handlers/mailto"
10 #define MEDIA_DIR DESKTOP_DIR"/media"
11
12 enum
13@@ -109,7 +109,7 @@
14 GCONF_CLIENT_PRELOAD_NONE,
15 NULL);
16 gconf_client_add_dir (_client,
17- CALENDAR_DIR,
18+ MAIL_DIR,
19 GCONF_CLIENT_PRELOAD_NONE,
20 NULL);
21 gconf_client_add_dir (_client,
22@@ -122,7 +122,7 @@
23 this,
24 NULL, NULL);
25 gconf_client_notify_add(_client,
26- CALENDAR_DIR"/exec",
27+ MAIL_DIR"/command",
28 (GConfClientNotifyFunc)OnKeyChanged,
29 this,
30 NULL, NULL);
31@@ -260,7 +260,9 @@
32 CreateShortcutFromExec ("shotwell", _("View Photos"), _photo_alternatives);
33
34 // Email
35- markup = gconf_client_get_string (_client, CALENDAR_DIR"/exec", NULL);
36+ markup = gconf_client_get_string (_client, MAIL_DIR"/command", NULL);
37+ // get the first word on key (the executable name itself)
38+ markup = g_strsplit (markup, " ", 0)[0];
39 CreateShortcutFromExec (markup, _("Check Email"), _email_alternatives);
40 g_free (markup);
41