| ereslibre ( @ 2007-01-05 14:41:00 |
Actions support: almost finished
I'm very glad to announce I've almost finished (faster than I expected) the actions support on the kio_uiserver.
Right now, slots are not really called when buttons are clicked, but I hope that will be easy. I have to leave right now ;)
The given screenshot was taken with some added code to Kopete. This is the change for having it working in Kopete (for example):
Index: kopete/kopete/kopeteapplication.cpp
======================================== ===========================
--- kopete/kopete/kopeteapplication.cpp (revisión: 619499)
+++ kopete/kopete/kopeteapplication.cpp (copia de trabajo)
@@ -50,10 +50,16 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-
+#include <kio/observer.h>
KopeteApplication::KopeteApplicatio n()
: KUniqueApplication( true, true )
{
+ int newJob = Observer::self()->newJob();
+ Observer::self()->slotInfoMessage(newJob, "Receiving file");
+ Observer::self()->slotPercent(newJob, 75);
+ Observer::self()->addAction(newJob, "Cancel transfer", this, SLOT(quitKopete()));
+ Observer::self()->addAction(newJob, "Pause transfer", this, SLOT(quitKopete()));
+
m_isShuttingDown = false;
m_mainWindow = new KopeteWindow( 0, "mainWindow" );
I'm very glad to announce I've almost finished (faster than I expected) the actions support on the kio_uiserver.
Right now, slots are not really called when buttons are clicked, but I hope that will be easy. I have to leave right now ;)
The given screenshot was taken with some added code to Kopete. This is the change for having it working in Kopete (for example):
Index: kopete/kopete/kopeteapplication.cpp
========================================
--- kopete/kopete/kopeteapplication.cpp (revisión: 619499)
+++ kopete/kopete/kopeteapplication.cpp (copia de trabajo)
@@ -50,10 +50,16 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-
+#include <kio/observer.h>
KopeteApplication::KopeteApplicatio
: KUniqueApplication( true, true )
{
+ int newJob = Observer::self()->newJob();
+ Observer::self()->slotInfoMessage(newJob,
+ Observer::self()->slotPercent(newJob, 75);
+ Observer::self()->addAction(newJob, "Cancel transfer", this, SLOT(quitKopete()));
+ Observer::self()->addAction(newJob, "Pause transfer", this, SLOT(quitKopete()));
+
m_isShuttingDown = false;
m_mainWindow = new KopeteWindow( 0, "mainWindow" );