projects
/
simple-launcher
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mark one item as possibly done :)
[simple-launcher]
/
launchable-item.cc
diff --git
a/launchable-item.cc
b/launchable-item.cc
index
71aab95
..
42bebfc
100644
(file)
--- a/
launchable-item.cc
+++ b/
launchable-item.cc
@@
-1,6
+1,6
@@
// This file is a part of Simple Launcher
//
// 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
//
// 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,18
+16,17
@@
// Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "launchable-item.h"
// Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "launchable-item.h"
+#include "utils.h"
-LaunchableItem::LaunchableItem(LauncherItem *item, bool enabled): myItem(item), myEnabled(enabled) {
-}
+bool LaunchableItem::activate(osso_context_t *context) {
+ bool result = false;
-LaunchableItem::~LaunchableItem() {
- if (myItem != 0) {
- delete myItem;
+ 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;
}
}
}
}
-bool LaunchableItem::activate(osso_context_t *context) {
- return osso_application_top(context, myItem->getService().c_str(), 0) == OSSO_OK;
-}
-
// vim:ts=2:sw=2:et
// vim:ts=2:sw=2:et