[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/kdesktop
From: Fred SchÃĪttgen <kde.sch () ttgen ! net>
Date: 2005-06-27 0:57:13
Message-ID: 1119833833.639183.4648.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 429250 by schaettgen:
Tell the kmenu and the quicklauncher about applications
started the hard way to list them among the recently used
applications and flash the their icon in the quicklauncher.
M +16 -0 minicli.cpp
M +3 -0 minicli.h
--- trunk/KDE/kdebase/kdesktop/minicli.cpp #429249:429250
@@ -44,6 +44,7 @@
#include <qwhatsthis.h>
#include <qstylesheet.h>
+#include <dcopclient.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
@@ -521,6 +522,7 @@
KService::Ptr service = KService::serviceByDesktopName(cmd);
if (service && service->isValid() && service->type() == "Application")
{
+ notifyServiceStarted(service);
KRun::run(*service, KURL::List());
return 0;
}
@@ -554,6 +556,7 @@
KService::Ptr service = KService::serviceByDesktopName(cmd);
if (service && service->isValid() && service->type() == "Application")
{
+ notifyServiceStarted(service);
KRun::run(*service, KURL::List());
return 0;
}
@@ -561,6 +564,7 @@
service = KService::serviceByName(cmd);
if (service && service->isValid() && service->type() == "Application")
{
+ notifyServiceStarted(service);
KRun::run(*service, KURL::List());
return 0;
}
@@ -584,6 +588,18 @@
}
}
+void Minicli::notifyServiceStarted(KService::Ptr service)
+{
+ // Inform other applications (like the quickstarter applet)
+ // that an application was started
+ QByteArray params;
+ QDataStream stream(params, IO_WriteOnly);
+ stream << "minicli" << service->storageId();
+ kdDebug() << "minicli appLauncher dcop signal: " << service->storageId() << endl;
+ KApplication::kApplication()->dcopClient()->emitDCOPSignal("appLauncher",
+ "serviceStartedByStorageId(QString,QString)", params);
+}
+
void Minicli::slotCmdChanged(const QString& text)
{
bool isEmpty = text.isEmpty();
--- trunk/KDE/kdebase/kdesktop/minicli.h #429249:429250
@@ -35,6 +35,7 @@
#include <qstringlist.h>
#include <kdialog.h>
+#include <kservice.h>
class QTimer;
class QWidget;
@@ -84,7 +85,9 @@
QString terminalCommand (const QString&, const QString&);
void setMaxCommandBoxWidth();
QString calculate(const QString &exp);
+ void notifyServiceStarted(KService::Ptr service);
+
int m_iPriority;
int m_iScheduler;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic