Merge lp:~jeremywootten/pantheon-files/fix-1593926-desktop-file-name into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Cody Garver
Approved revision: 2203
Merged at revision: 2214
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1593926-desktop-file-name
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 202 lines (+24/-22)
11 files modified
data/CMakeLists.txt (+3/-3)
data/pantheon-files.service.cmake (+1/-1)
libwidgets/Resources.vala (+2/-0)
pantheon-files-daemon/client.vala (+3/-3)
pantheon-files-daemon/marlind-tagging.vala (+3/-3)
pantheon-files-daemon/miner.vala (+3/-3)
plugins/pantheon-files-ctags/plugin.vala (+3/-3)
src/Application.vala (+1/-1)
src/QuicklistHandler.vala (+1/-1)
src/View/Window.vala (+3/-3)
src/ZeitgeistManager.vala (+1/-1)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1593926-desktop-file-name
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+297829@code.launchpad.net

Commit message

* Make app ID and .desktop a resource constant
* rename dbus service as org.pantheon-files.db
* rename app ID and .desktop as org.pantheon.files

Description of the change

The desktop filename is changed to org.pantheon.files.desktop and this is made a Resource constant in the code instead of being hard coded in several places. The application id "org.pantheon.files" is also made a Resource constant.

The dbus service name used by the ctags plug in is also changed to org.pantheon.files.db for consistency.

The appdata file renamed to org.pantheon.files.appdata.xml.

A number of other consequential changes were made.

To test the branch needs to be installed, the old files removed or renamed and the session restarted. Files will need to be reset as the default file manager.

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Conflicts with trunk

2203. By Jeremy Wootten

Merge trunk to r2210 and resolve conflict

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/CMakeLists.txt'
2--- data/CMakeLists.txt 2015-12-12 18:50:54 +0000
3+++ data/CMakeLists.txt 2016-06-25 12:23:12 +0000
4@@ -1,9 +1,9 @@
5-configure_file(pantheon-files.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.desktop)
6+configure_file(pantheon-files.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/org.pantheon.files.desktop)
7 configure_file(pantheon-files.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service)
8 configure_file(pantheon-files-pkexec.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec)
9 configure_file(net.launchpad.pantheon-files.policy.cmake ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy)
10-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/pantheon-files.appdata.xml DESTINATION share/appdata)
11-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.desktop DESTINATION share/applications)
12+install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.pantheon.files.appdata.xml DESTINATION share/appdata)
13+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/org.pantheon.files.desktop DESTINATION share/applications)
14 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service DESTINATION share/dbus-1/services/)
15 install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec DESTINATION bin)
16 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy DESTINATION share/polkit-1/actions/)
17
18=== renamed file 'data/pantheon-files.appdata.xml' => 'data/org.pantheon.files.appdata.xml'
19=== modified file 'data/pantheon-files.service.cmake'
20--- data/pantheon-files.service.cmake 2014-08-05 20:46:06 +0000
21+++ data/pantheon-files.service.cmake 2016-06-25 12:23:12 +0000
22@@ -1,3 +1,3 @@
23 [D-BUS Service]
24-Name=org.elementary.pantheonfiles.db
25+Name=org.pantheon.files.db
26 Exec=@CMAKE_INSTALL_PREFIX@/bin/pantheon-files-daemon
27
28=== modified file 'libwidgets/Resources.vala'
29--- libwidgets/Resources.vala 2016-05-06 10:36:16 +0000
30+++ libwidgets/Resources.vala 2016-06-25 12:23:12 +0000
31@@ -17,6 +17,8 @@
32 ***/
33
34 namespace Marlin {
35+ public const string APP_ID = "org.pantheon.files";
36+ public const string APP_DESKTOP = APP_ID + ".desktop";
37 public const string APP_TITLE = "Files";
38 public const string COPYRIGHT = APP_YEARS + " elementary LLC (http://launchpad.net/elementary)";
39 public const string APP_YEARS = "2013-2016";
40
41=== modified file 'pantheon-files-daemon/client.vala'
42--- pantheon-files-daemon/client.vala 2014-08-05 20:46:06 +0000
43+++ pantheon-files-daemon/client.vala 2016-06-25 12:23:12 +0000
44@@ -1,4 +1,4 @@
45-[DBus (name = "org.elementary.pantheonfiles.db")]
46+[DBus (name = "org.pantheon.files.db")]
47 interface Demo : Object {
48 public abstract bool showTable (string table) throws IOError;
49 public abstract int getColor (string uri) throws IOError;
50@@ -9,8 +9,8 @@
51
52 void main () {
53 try {
54- Demo demo = Bus.get_proxy_sync (BusType.SESSION, "org.elementary.pantheonfiles.db",
55- "/org/elementary/pantheonfiles/db");
56+ Demo demo = Bus.get_proxy_sync (BusType.SESSION, "org.pantheon.files.db",
57+ "/org/pantheon/files/db");
58
59 demo.showTable ("tags");
60
61
62=== modified file 'pantheon-files-daemon/marlind-tagging.vala'
63--- pantheon-files-daemon/marlind-tagging.vala 2016-05-06 10:36:16 +0000
64+++ pantheon-files-daemon/marlind-tagging.vala 2016-06-25 12:23:12 +0000
65@@ -33,7 +33,7 @@
66
67 */
68
69-[DBus (name = "org.elementary.pantheonfiles.db")]
70+[DBus (name = "org.pantheon.files.db")]
71 public class MarlinTags : Object {
72
73 protected static Sqlite.Database db;
74@@ -355,7 +355,7 @@
75
76 void on_bus_aquired (DBusConnection conn) {
77 try {
78- conn.register_object ("/org/elementary/pantheonfiles/db", new MarlinTags ());
79+ conn.register_object ("/org/pantheon/files/db", new MarlinTags ());
80 } catch (IOError e) {
81 error ("Could not register service");
82 }
83@@ -370,7 +370,7 @@
84 }
85
86 void main () {
87- Bus.own_name (BusType.SESSION, "org.elementary.pantheonfiles.db", BusNameOwnerFlags.NONE,
88+ Bus.own_name (BusType.SESSION, "org.pantheon.files.db", BusNameOwnerFlags.NONE,
89 on_bus_aquired,
90 () => {},
91 on_bus_lost);
92
93=== modified file 'pantheon-files-daemon/miner.vala'
94--- pantheon-files-daemon/miner.vala 2014-08-05 20:46:06 +0000
95+++ pantheon-files-daemon/miner.vala 2016-06-25 12:23:12 +0000
96@@ -1,4 +1,4 @@
97-[DBus (name = "org.elementary.pantheonfiles.db")]
98+[DBus (name = "org.pantheon.files.db")]
99 interface Tags : Object {
100 public abstract bool showTable (string table) throws IOError;
101 public abstract bool record_uris (Variant[] entries, string directory) throws IOError;
102@@ -23,8 +23,8 @@
103 cancellable = new Cancellable ();
104
105 try {
106- tags = Bus.get_proxy_sync (BusType.SESSION, "org.elementary.pantheonfiles.db",
107- "/org/elementary/pantheonfiles/db");
108+ tags = Bus.get_proxy_sync (BusType.SESSION, "org.pantheon.files.db",
109+ "/org/pantheon/files/db");
110 } catch (IOError e) {
111 stderr.printf ("%s\n", e.message);
112 }
113
114=== modified file 'plugins/pantheon-files-ctags/plugin.vala'
115--- plugins/pantheon-files-ctags/plugin.vala 2016-06-05 10:53:33 +0000
116+++ plugins/pantheon-files-ctags/plugin.vala 2016-06-25 12:23:12 +0000
117@@ -15,7 +15,7 @@
118 with this program. If not, see <http://www.gnu.org/licenses/>.
119 ***/
120
121-[DBus (name = "org.elementary.pantheonfiles.db")]
122+[DBus (name = "org.pantheon.files.db")]
123 interface MarlinDaemon : Object {
124 public abstract async Variant get_uri_infos (string raw_uri) throws IOError;
125 public abstract async bool record_uris (Variant[] entries, string directory) throws IOError;
126@@ -40,8 +40,8 @@
127 cancellable = new Cancellable ();
128
129 try {
130- daemon = Bus.get_proxy_sync (BusType.SESSION, "org.elementary.pantheonfiles.db",
131- "/org/elementary/pantheonfiles/db");
132+ daemon = Bus.get_proxy_sync (BusType.SESSION, "org.pantheon.files.db",
133+ "/org/pantheon/files/db");
134 } catch (IOError e) {
135 stderr.printf ("%s\n", e.message);
136 }
137
138=== modified file 'src/Application.vala'
139--- src/Application.vala 2016-05-10 23:20:00 +0000
140+++ src/Application.vala 2016-06-25 12:23:12 +0000
141@@ -40,7 +40,7 @@
142
143 construct {
144 /* Needed by Glib.Application */
145- this.application_id = "org.pantheon.files"; //Ensures an unique instance.
146+ this.application_id = Marlin.APP_ID; //Ensures an unique instance.
147 this.flags = ApplicationFlags.HANDLES_COMMAND_LINE;
148
149 /* Needed by Granite.Application */
150
151=== modified file 'src/QuicklistHandler.vala'
152--- src/QuicklistHandler.vala 2016-05-06 10:36:16 +0000
153+++ src/QuicklistHandler.vala 2016-06-25 12:23:12 +0000
154@@ -30,7 +30,7 @@
155 public List<Marlin.LauncherEntry> launcher_entries = null;
156
157 private QuicklistHandler () {
158- this.entry_add ("pantheon-files.desktop");
159+ this.entry_add (Marlin.APP_DESKTOP);
160
161 if (this.launcher_entries.length () == 0) {
162 error ("Couldn't find a valid Unity launcher entry.");
163
164=== modified file 'src/View/Window.vala'
165--- src/View/Window.vala 2016-06-17 14:06:01 +0000
166+++ src/View/Window.vala 2016-06-25 12:23:12 +0000
167@@ -800,19 +800,19 @@
168 }
169
170 private bool is_marlin_mydefault_fm () {
171- bool foldertype_is_default = ("pantheon-files.desktop" == AppInfo.get_default_for_type("inode/directory", false).get_id());
172+ bool foldertype_is_default = (Marlin.APP_DESKTOP == AppInfo.get_default_for_type("inode/directory", false).get_id());
173
174 bool trash_uri_is_default = false;
175 AppInfo? app_trash_handler = AppInfo.get_default_for_type("x-scheme-handler/trash", true);
176 if (app_trash_handler != null)
177- trash_uri_is_default = ("pantheon-files.desktop" == app_trash_handler.get_id());
178+ trash_uri_is_default = (Marlin.APP_DESKTOP == app_trash_handler.get_id());
179
180 return foldertype_is_default && trash_uri_is_default;
181 }
182
183 private void make_marlin_default_fm (bool active) {
184 if (active) {
185- AppInfo marlin_app = (AppInfo) new DesktopAppInfo ("pantheon-files.desktop");
186+ AppInfo marlin_app = (AppInfo) new DesktopAppInfo (Marlin.APP_DESKTOP);
187
188 if (marlin_app != null) {
189 try {
190
191=== modified file 'src/ZeitgeistManager.vala'
192--- src/ZeitgeistManager.vala 2016-05-06 10:36:16 +0000
193+++ src/ZeitgeistManager.vala 2016-06-25 12:23:12 +0000
194@@ -17,7 +17,7 @@
195 ***/
196 namespace Marlin {
197 public class ZeitgeistManager : Object {
198- const string FILES_ACTOR = "application://pantheon-files.desktop";
199+ const string FILES_ACTOR = "application://" + Marlin.APP_DESKTOP;
200 const string ATTRS = FileAttribute.STANDARD_DISPLAY_NAME + "," + FileAttribute.STANDARD_CONTENT_TYPE;
201
202 public static void report_event (string uri, string interpretation) {

Subscribers

People subscribed via source and target branches

to all changes: