[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    kdeautorun fix
From:       Stanislav Karchebny <berk () upnet ! ru>
Date:       2003-09-29 6:13:23
[Download RAW message or body]

Dunno if this is exactly right or not, but i had problems compiling kdeautorun 
without this fix. Consider this a backport if anything. (for a full backport 
one needs to alter designer versions in ui files, but this is left as an 
excersize to the reader).

Index: arkick/arkick.cpp
===================================================================
RCS file: /home/kde/kdenonbeta/kdeautorun/arkick/arkick.cpp,v
retrieving revision 1.8
diff -u -r1.8 arkick.cpp
--- arkick/arkick.cpp	14 Sep 2003 14:51:08 -0000	1.8
+++ arkick/arkick.cpp	29 Sep 2003 06:09:33 -0000
@@ -85,17 +85,25 @@
 	theParent->slotDoneMount(theId);
 }
 
+class ARTrayIcon : public KSystemTray
+{
+    public:
+	ARTrayIcon(ARKick *parent) : KSystemTray()
+	{
+	contextMenu()->changeTitle(0, "ARKick");
+	contextMenu()->insertItem(i18n("&Configure..."), parent, 
SLOT(slotConfigure()));
+	contextMenu()->insertSeparator();
+	contextMenu()->insertItem(i18n("&Help"), (new KHelpMenu(this, 
KGlobal::instance()->aboutData()))->menu());
+
+	connect(actionCollection()->action("file_quit"), SIGNAL(activated()), 
parent, SLOT(slotQuit()));
+	}
+};
+
 ARKick::ARKick(const QCString &obj) : QObject(), DCOPObject(obj)
 {
-	theTrayIcon = new KSystemTray();
+	theTrayIcon = new ARTrayIcon(this);
 	theTrayIcon->setPixmap(SmallIcon("arkick"));
 	QToolTip::add(theTrayIcon, i18n("KDE Autorun Server: Ready."));
-
-	theTrayIcon->contextMenu()->changeTitle(0, "IRKick");
-	theTrayIcon->contextMenu()->insertItem(i18n("&Configure..."), this, 
SLOT(slotConfigure()));
-	theTrayIcon->contextMenu()->insertSeparator();
-	theTrayIcon->contextMenu()->insertItem(i18n("&Help"), (new 
KHelpMenu(theTrayIcon, KGlobal::instance()->aboutData()))->menu());
-	connect(theTrayIcon->actionCollection()->action("file_quit"), 
SIGNAL(activated()), this, SLOT(slotQuit()));
 
 	slotReloadConfiguration();
 


-- 
keep in touch. berkus. -- http://lye.upnet.ru/

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic