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
=== modified file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2015-12-12 18:50:54 +0000
+++ data/CMakeLists.txt 2016-06-25 12:23:12 +0000
@@ -1,9 +1,9 @@
1configure_file(pantheon-files.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.desktop)1configure_file(pantheon-files.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/org.pantheon.files.desktop)
2configure_file(pantheon-files.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service)2configure_file(pantheon-files.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service)
3configure_file(pantheon-files-pkexec.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec)3configure_file(pantheon-files-pkexec.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec)
4configure_file(net.launchpad.pantheon-files.policy.cmake ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy)4configure_file(net.launchpad.pantheon-files.policy.cmake ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy)
5install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/pantheon-files.appdata.xml DESTINATION share/appdata)5install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.pantheon.files.appdata.xml DESTINATION share/appdata)
6install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.desktop DESTINATION share/applications)6install (FILES ${CMAKE_CURRENT_BINARY_DIR}/org.pantheon.files.desktop DESTINATION share/applications)
7install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service DESTINATION share/dbus-1/services/)7install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service DESTINATION share/dbus-1/services/)
8install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec DESTINATION bin)8install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec DESTINATION bin)
9install (FILES ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy DESTINATION share/polkit-1/actions/)9install (FILES ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy DESTINATION share/polkit-1/actions/)
1010
=== renamed file 'data/pantheon-files.appdata.xml' => 'data/org.pantheon.files.appdata.xml'
=== modified file 'data/pantheon-files.service.cmake'
--- data/pantheon-files.service.cmake 2014-08-05 20:46:06 +0000
+++ data/pantheon-files.service.cmake 2016-06-25 12:23:12 +0000
@@ -1,3 +1,3 @@
1[D-BUS Service]1[D-BUS Service]
2Name=org.elementary.pantheonfiles.db2Name=org.pantheon.files.db
3Exec=@CMAKE_INSTALL_PREFIX@/bin/pantheon-files-daemon3Exec=@CMAKE_INSTALL_PREFIX@/bin/pantheon-files-daemon
44
=== modified file 'libwidgets/Resources.vala'
--- libwidgets/Resources.vala 2016-05-06 10:36:16 +0000
+++ libwidgets/Resources.vala 2016-06-25 12:23:12 +0000
@@ -17,6 +17,8 @@
17***/17***/
1818
19namespace Marlin {19namespace Marlin {
20 public const string APP_ID = "org.pantheon.files";
21 public const string APP_DESKTOP = APP_ID + ".desktop";
20 public const string APP_TITLE = "Files";22 public const string APP_TITLE = "Files";
21 public const string COPYRIGHT = APP_YEARS + " elementary LLC (http://launchpad.net/elementary)";23 public const string COPYRIGHT = APP_YEARS + " elementary LLC (http://launchpad.net/elementary)";
22 public const string APP_YEARS = "2013-2016";24 public const string APP_YEARS = "2013-2016";
2325
=== modified file 'pantheon-files-daemon/client.vala'
--- pantheon-files-daemon/client.vala 2014-08-05 20:46:06 +0000
+++ pantheon-files-daemon/client.vala 2016-06-25 12:23:12 +0000
@@ -1,4 +1,4 @@
1[DBus (name = "org.elementary.pantheonfiles.db")]1[DBus (name = "org.pantheon.files.db")]
2interface Demo : Object {2interface Demo : Object {
3 public abstract bool showTable (string table) throws IOError;3 public abstract bool showTable (string table) throws IOError;
4 public abstract int getColor (string uri) throws IOError;4 public abstract int getColor (string uri) throws IOError;
@@ -9,8 +9,8 @@
99
10void main () {10void main () {
11 try {11 try {
12 Demo demo = Bus.get_proxy_sync (BusType.SESSION, "org.elementary.pantheonfiles.db",12 Demo demo = Bus.get_proxy_sync (BusType.SESSION, "org.pantheon.files.db",
13 "/org/elementary/pantheonfiles/db");13 "/org/pantheon/files/db");
14 14
15 demo.showTable ("tags");15 demo.showTable ("tags");
1616
1717
=== modified file 'pantheon-files-daemon/marlind-tagging.vala'
--- pantheon-files-daemon/marlind-tagging.vala 2016-05-06 10:36:16 +0000
+++ pantheon-files-daemon/marlind-tagging.vala 2016-06-25 12:23:12 +0000
@@ -33,7 +33,7 @@
3333
34*/34*/
3535
36[DBus (name = "org.elementary.pantheonfiles.db")]36[DBus (name = "org.pantheon.files.db")]
37public class MarlinTags : Object {37public class MarlinTags : Object {
3838
39 protected static Sqlite.Database db;39 protected static Sqlite.Database db;
@@ -355,7 +355,7 @@
355355
356void on_bus_aquired (DBusConnection conn) {356void on_bus_aquired (DBusConnection conn) {
357 try {357 try {
358 conn.register_object ("/org/elementary/pantheonfiles/db", new MarlinTags ());358 conn.register_object ("/org/pantheon/files/db", new MarlinTags ());
359 } catch (IOError e) {359 } catch (IOError e) {
360 error ("Could not register service");360 error ("Could not register service");
361 }361 }
@@ -370,7 +370,7 @@
370}370}
371371
372void main () {372void main () {
373 Bus.own_name (BusType.SESSION, "org.elementary.pantheonfiles.db", BusNameOwnerFlags.NONE,373 Bus.own_name (BusType.SESSION, "org.pantheon.files.db", BusNameOwnerFlags.NONE,
374 on_bus_aquired,374 on_bus_aquired,
375 () => {},375 () => {},
376 on_bus_lost);376 on_bus_lost);
377377
=== modified file 'pantheon-files-daemon/miner.vala'
--- pantheon-files-daemon/miner.vala 2014-08-05 20:46:06 +0000
+++ pantheon-files-daemon/miner.vala 2016-06-25 12:23:12 +0000
@@ -1,4 +1,4 @@
1[DBus (name = "org.elementary.pantheonfiles.db")]1[DBus (name = "org.pantheon.files.db")]
2interface Tags : Object {2interface Tags : Object {
3 public abstract bool showTable (string table) throws IOError;3 public abstract bool showTable (string table) throws IOError;
4 public abstract bool record_uris (Variant[] entries, string directory) throws IOError;4 public abstract bool record_uris (Variant[] entries, string directory) throws IOError;
@@ -23,8 +23,8 @@
23 cancellable = new Cancellable ();23 cancellable = new Cancellable ();
2424
25 try {25 try {
26 tags = Bus.get_proxy_sync (BusType.SESSION, "org.elementary.pantheonfiles.db",26 tags = Bus.get_proxy_sync (BusType.SESSION, "org.pantheon.files.db",
27 "/org/elementary/pantheonfiles/db");27 "/org/pantheon/files/db");
28 } catch (IOError e) {28 } catch (IOError e) {
29 stderr.printf ("%s\n", e.message);29 stderr.printf ("%s\n", e.message);
30 }30 }
3131
=== modified file 'plugins/pantheon-files-ctags/plugin.vala'
--- plugins/pantheon-files-ctags/plugin.vala 2016-06-05 10:53:33 +0000
+++ plugins/pantheon-files-ctags/plugin.vala 2016-06-25 12:23:12 +0000
@@ -15,7 +15,7 @@
15 with this program. If not, see <http://www.gnu.org/licenses/>.15 with this program. If not, see <http://www.gnu.org/licenses/>.
16***/16***/
1717
18[DBus (name = "org.elementary.pantheonfiles.db")]18[DBus (name = "org.pantheon.files.db")]
19interface MarlinDaemon : Object {19interface MarlinDaemon : Object {
20 public abstract async Variant get_uri_infos (string raw_uri) throws IOError;20 public abstract async Variant get_uri_infos (string raw_uri) throws IOError;
21 public abstract async bool record_uris (Variant[] entries, string directory) throws IOError;21 public abstract async bool record_uris (Variant[] entries, string directory) throws IOError;
@@ -40,8 +40,8 @@
40 cancellable = new Cancellable ();40 cancellable = new Cancellable ();
4141
42 try {42 try {
43 daemon = Bus.get_proxy_sync (BusType.SESSION, "org.elementary.pantheonfiles.db",43 daemon = Bus.get_proxy_sync (BusType.SESSION, "org.pantheon.files.db",
44 "/org/elementary/pantheonfiles/db");44 "/org/pantheon/files/db");
45 } catch (IOError e) {45 } catch (IOError e) {
46 stderr.printf ("%s\n", e.message);46 stderr.printf ("%s\n", e.message);
47 }47 }
4848
=== modified file 'src/Application.vala'
--- src/Application.vala 2016-05-10 23:20:00 +0000
+++ src/Application.vala 2016-06-25 12:23:12 +0000
@@ -40,7 +40,7 @@
4040
41 construct {41 construct {
42 /* Needed by Glib.Application */42 /* Needed by Glib.Application */
43 this.application_id = "org.pantheon.files"; //Ensures an unique instance.43 this.application_id = Marlin.APP_ID; //Ensures an unique instance.
44 this.flags = ApplicationFlags.HANDLES_COMMAND_LINE;44 this.flags = ApplicationFlags.HANDLES_COMMAND_LINE;
4545
46 /* Needed by Granite.Application */46 /* Needed by Granite.Application */
4747
=== modified file 'src/QuicklistHandler.vala'
--- src/QuicklistHandler.vala 2016-05-06 10:36:16 +0000
+++ src/QuicklistHandler.vala 2016-06-25 12:23:12 +0000
@@ -30,7 +30,7 @@
30 public List<Marlin.LauncherEntry> launcher_entries = null;30 public List<Marlin.LauncherEntry> launcher_entries = null;
3131
32 private QuicklistHandler () {32 private QuicklistHandler () {
33 this.entry_add ("pantheon-files.desktop");33 this.entry_add (Marlin.APP_DESKTOP);
3434
35 if (this.launcher_entries.length () == 0) {35 if (this.launcher_entries.length () == 0) {
36 error ("Couldn't find a valid Unity launcher entry.");36 error ("Couldn't find a valid Unity launcher entry.");
3737
=== modified file 'src/View/Window.vala'
--- src/View/Window.vala 2016-06-17 14:06:01 +0000
+++ src/View/Window.vala 2016-06-25 12:23:12 +0000
@@ -800,19 +800,19 @@
800 }800 }
801801
802 private bool is_marlin_mydefault_fm () {802 private bool is_marlin_mydefault_fm () {
803 bool foldertype_is_default = ("pantheon-files.desktop" == AppInfo.get_default_for_type("inode/directory", false).get_id());803 bool foldertype_is_default = (Marlin.APP_DESKTOP == AppInfo.get_default_for_type("inode/directory", false).get_id());
804804
805 bool trash_uri_is_default = false;805 bool trash_uri_is_default = false;
806 AppInfo? app_trash_handler = AppInfo.get_default_for_type("x-scheme-handler/trash", true);806 AppInfo? app_trash_handler = AppInfo.get_default_for_type("x-scheme-handler/trash", true);
807 if (app_trash_handler != null)807 if (app_trash_handler != null)
808 trash_uri_is_default = ("pantheon-files.desktop" == app_trash_handler.get_id());808 trash_uri_is_default = (Marlin.APP_DESKTOP == app_trash_handler.get_id());
809809
810 return foldertype_is_default && trash_uri_is_default;810 return foldertype_is_default && trash_uri_is_default;
811 }811 }
812812
813 private void make_marlin_default_fm (bool active) {813 private void make_marlin_default_fm (bool active) {
814 if (active) {814 if (active) {
815 AppInfo marlin_app = (AppInfo) new DesktopAppInfo ("pantheon-files.desktop");815 AppInfo marlin_app = (AppInfo) new DesktopAppInfo (Marlin.APP_DESKTOP);
816816
817 if (marlin_app != null) {817 if (marlin_app != null) {
818 try {818 try {
819819
=== modified file 'src/ZeitgeistManager.vala'
--- src/ZeitgeistManager.vala 2016-05-06 10:36:16 +0000
+++ src/ZeitgeistManager.vala 2016-06-25 12:23:12 +0000
@@ -17,7 +17,7 @@
17***/17***/
18namespace Marlin {18namespace Marlin {
19 public class ZeitgeistManager : Object {19 public class ZeitgeistManager : Object {
20 const string FILES_ACTOR = "application://pantheon-files.desktop";20 const string FILES_ACTOR = "application://" + Marlin.APP_DESKTOP;
21 const string ATTRS = FileAttribute.STANDARD_DISPLAY_NAME + "," + FileAttribute.STANDARD_CONTENT_TYPE;21 const string ATTRS = FileAttribute.STANDARD_DISPLAY_NAME + "," + FileAttribute.STANDARD_CONTENT_TYPE;
2222
23 public static void report_event (string uri, string interpretation) {23 public static void report_event (string uri, string interpretation) {

Subscribers

People subscribed via source and target branches

to all changes: