@@ -66,7 +66,7 @@ QString DBusInterface::introspect(const QString &path) const
6666 "<interface name=\"com.canonical.Unity.Launcher.Item\">"
6767 "<property name=\"count\" type=\"i\" access=\"readwrite\" />"
6868 "<property name=\"countVisible\" type=\"b\" access=\"readwrite\" />"
69− "<property name=\"alerting\" type=\"b\" access=\"readwrite\" />"
69+ "<method name=\"Alert\" />"
7070 "</interface>";
7171 return nodeiface;
7272}
@@ -127,6 +127,19 @@ bool DBusInterface::handleMessage(const QDBusMessage& message, const QDBusConnec
127127 return false;
128128 }
129129
130+ /* Break down the path to just the app id */
131+ QString pathtemp = message.path();
132+ if (!pathtemp.startsWith("/com/canonical/Unity/Launcher/")) {
133+ return false;
134+ }
135+ pathtemp.remove("/com/canonical/Unity/Launcher/");
136+ if (pathtemp.indexOf('/') >= 0) {
137+ return false;
138+ }
139+
140+ /* Find ourselves an appid */
141+ QString appid = decodeAppId(pathtemp);
142+
130143 // First handle methods of the Launcher interface
131144 if (message.interface() == "com.canonical.Unity.Launcher") {
132145 if (message.member() == "Refresh") {
@@ -134,6 +147,13 @@ bool DBusInterface::handleMessage(const QDBusMessage& message, const QDBusConnec
134147 Q_EMIT refreshCalled();
135148 return connection.send(reply);
136149 }
150+ } else if (message.interface() == "com.canonical.Unity.Launcher.Item") {
151+ // Handle methods of the Launcher-Item interface
152+ if (message.member() == "Alert") {
153+ QDBusMessage reply = message.createReply();
154+ Q_EMIT alertCalled(appid);
155+ return connection.send(reply);
156+ }
137157 }
138158
139159 // Now handle dynamic properties (for launcher emblems)
@@ -145,18 +165,6 @@ bool DBusInterface::handleMessage(const QDBusMessage& message, const QDBusConnec
145165 return false;
146166 }
147167
148− /* Break down the path to just the app id */
149− QString pathtemp = message.path();
150− if (!pathtemp.startsWith("/com/canonical/Unity/Launcher/")) {
151− return false;
152− }
153− pathtemp.remove("/com/canonical/Unity/Launcher/");
154− if (pathtemp.indexOf('/') >= 0) {
155− return false;
156− }
157−
158− /* Find ourselves an appid */
159− QString appid = decodeAppId(pathtemp);
160168 int index = m_launcherModel->findApplication(appid);
161169 LauncherItem *item = static_cast<LauncherItem*>(m_launcherModel->get(index));
162170
@@ -169,8 +177,6 @@ bool DBusInterface::handleMessage(const QDBusMessage& message, const QDBusConnec
169177 retval.append(QVariant::fromValue(QDBusVariant(item->count())));
170178 } else if (message.arguments()[1].toString() == "countVisible") {
171179 retval.append(QVariant::fromValue(QDBusVariant(item->countVisible())));
172− } else if (message.arguments()[1].toString() == "alerting") {
173− retval.append(QVariant::fromValue(QDBusVariant(item->alerting())));
174180 }
175181 } else if (message.member() == "Set") {
176182 if (message.arguments()[1].toString() == "count") {
@@ -185,12 +191,6 @@ bool DBusInterface::handleMessage(const QDBusMessage& message, const QDBusConnec
185191 Q_EMIT countVisibleChanged(appid, newVisible);
186192 notifyPropertyChanged("com.canonical.Unity.Launcher.Item", encodeAppId(appid), "countVisible", newVisible);
187193 }
188− } else if (message.arguments()[1].toString() == "alerting") {
189− bool newAlerting = message.arguments()[2].value<QDBusVariant>().variant().toBool();
190− if (!item || newAlerting != item->alerting()) {
191− Q_EMIT alertingChanged(appid, newAlerting);
192− notifyPropertyChanged("com.canonical.Unity.Launcher.Item", encodeAppId(appid), "alerting", newAlerting);
193− }
194194 }
195195 } else if (message.member() == "GetAll") {
196196 if (item) {