~ps-jenkins/unity-lens-files/latestsnapshot-7.0daily13.05.07ubuntu.unity.experimental.certified-0ubuntu1

« back to all changes in this revision

Viewing changes to src/main.vala

  • Committer: Michal Hruby
  • Date: 2013-03-12 13:43:11 UTC
  • Revision ID: michal.mhr@gmail.com-20130312134311-e0cdn2bd241gxsm6
Make sure everything works with latest libunity

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
namespace Unity.FilesLens {
24
24
 
 
25
  static const string DBUS_NAME = "com.canonical.Unity.Scope.LocalFiles";
25
26
  static Application? app = null;
26
27
  static Daemon? daemon = null;
27
28
 
71
72
     * making it race against GDBus' worker thread to export our
72
73
     * objects on the bus before/after owning our name and receiving
73
74
     * method calls on our objects (which may not yet be up!)*/
74
 
    if (dbus_name_has_owner ("com.canonical.Unity.Lens.Files"))
 
75
    if (dbus_name_has_owner (DBUS_NAME))
75
76
      {
76
77
        print ("Another instance of the Unity Files Daemon " +
77
78
               "already appears to be running.\nBailing out.\n");
83
84
    daemon = new Daemon ();
84
85
  
85
86
    /* Use GApplication directly for single instance app functionality */
86
 
    app = new Application ("com.canonical.Unity.Lens.Files",
87
 
                           ApplicationFlags.IS_SERVICE);
 
87
    app = new Application (DBUS_NAME, ApplicationFlags.IS_SERVICE);
88
88
    try {
89
89
      app.register ();
90
90
    } catch (Error e) {