X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=launchable-item.cc;h=53edc679964f48a8c8d96d75d3f62ecac837da6b;hb=0095049cda673a0f8adbd93399813eedd8930a44;hp=b8cae0aadee4a5353ccfaaafe4bad208936f5951;hpb=e14b9b8b700377082d51d4ae059db8bd0d619d31;p=simple-launcher diff --git a/launchable-item.cc b/launchable-item.cc index b8cae0a..53edc67 100644 --- a/launchable-item.cc +++ b/launchable-item.cc @@ -1,6 +1,6 @@ // This file is a part of Simple Launcher // -// Copyright (C) 2006, Mikhail Sobolev +// Copyright (C) 2006, 2007, Mikhail Sobolev // // Simple Launcher is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by @@ -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(), 0) == OSSO_OK; + bool result = false; + + if (getService().empty() || !(result = osso_application_top(context, getService().c_str(), NULL) == OSSO_OK)) { + runApplication(getExec()); + return true; + } else { + return result; + } } // vim:ts=2:sw=2:et