From 0aa1994b67278e8d1e9076f87d7be14ab67b0e21 Mon Sep 17 00:00:00 2001 From: mss Date: Mon, 4 Dec 2006 21:41:40 +0000 Subject: [PATCH] added method to activate corresponding application git-svn-id: file:///svnroot/simple-launcher/trunk@6 3ba93dab-e023-0410-b42a-de7732cf370a --- launcher-item.cc | 4 ++++ launcher-item.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/launcher-item.cc b/launcher-item.cc index 28825a2..12582d1 100644 --- a/launcher-item.cc +++ b/launcher-item.cc @@ -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; +} diff --git a/launcher-item.h b/launcher-item.h index 33e2779..29134c9 100644 --- a/launcher-item.h +++ b/launcher-item.h @@ -5,11 +5,15 @@ #include +#include + class LauncherItem { public: LauncherItem(); ~LauncherItem(); + bool activate(osso_context_t *); + bool load(const std::string&); GdkPixbuf *getIcon(int icon_size) const; -- 1.7.9.5