X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=launchable-item.cc;h=42bebfc36152e145db1cbd4091e89c7785a576a6;hb=refs%2Fheads%2Fmaster;hp=cf17f2c04df14d4c03a3f0886b600c9b2ab5b809;hpb=6950b9b0ec533750c31a74dc1f1c6ecbb45567cc;p=simple-launcher diff --git a/launchable-item.cc b/launchable-item.cc index cf17f2c..42bebfc 100644 --- a/launchable-item.cc +++ b/launchable-item.cc @@ -16,9 +16,17 @@ // Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "launchable-item.h" +#include "utils.h" bool LaunchableItem::activate(osso_context_t *context) { - return osso_application_top(context, getService().c_str(), NULL) == OSSO_OK; + bool result = false; + + if (getService().empty() || !(result = osso_rpc_run_with_defaults(context, getService().c_str(), "top_application", NULL, DBUS_TYPE_INVALID) == OSSO_OK)) { + runApplication(getExec()); + return true; + } else { + return result; + } } // vim:ts=2:sw=2:et