changed defaults: non-transparent, iconsize = 48
[simple-launcher] / launchable-item.cc
index 4f0902a..42bebfc 100644 (file)
@@ -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
 // 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