added method to activate corresponding application
authormss <noemail>
Mon, 4 Dec 2006 21:41:40 +0000 (21:41 +0000)
committermss <noemail>
Mon, 4 Dec 2006 21:41:40 +0000 (21:41 +0000)
git-svn-id: file:///svnroot/simple-launcher/trunk@6 3ba93dab-e023-0410-b42a-de7732cf370a

launcher-item.cc
launcher-item.h

index 28825a2..12582d1 100644 (file)
@@ -101,3 +101,7 @@ GdkPixbuf *LauncherItem::getIcon(int icon_size) const {
 
   return pixbuf;
 }
+
+bool LauncherItem::activate(osso_context_t *context) {
+  return osso_application_top(context, myService.c_str(), 0) == OSSO_OK;
+}
index 33e2779..29134c9 100644 (file)
@@ -5,11 +5,15 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include <libosso.h>
+
 class LauncherItem {
 public:
   LauncherItem();
  ~LauncherItem();
 
+  bool activate(osso_context_t *);
+
   bool load(const std::string&);
 
   GdkPixbuf *getIcon(int icon_size) const;