summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp16
-rw-r--r--core/pim/today/today.h1
2 files changed, 2 insertions, 15 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 1b31cfd..e6f8c93 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -180,22 +180,20 @@ void Today::loadPlugins() {
180 qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); 180 qDebug( "loading: %s", QString( path + "/" + *it ).latin1() );
181 qDebug( QString(*it) ); 181 qDebug( QString(*it) );
182 182
183 // If plugin is exludes from refresh, get it in the list again here. 183 // If plugin is exludes from refresh, get it in the list again here.
184 184
185 if ( pluginListRefreshExclude.contains( (*it) ) ) { 185 if ( pluginListRefreshExclude.contains( (*it) ) ) {
186 // if its not in allApplets list, add it to a layout 186 // if its not in allApplets list, add it to a layout
187 if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) { 187 if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) {
188 qDebug( "NUGASDA" );
189 layout->addWidget( pluginListRefreshExclude[(*it)].guiBox ); 188 layout->addWidget( pluginListRefreshExclude[(*it)].guiBox );
190 pluginList.append( pluginListRefreshExclude[(*it)] ); 189 pluginList.append( pluginListRefreshExclude[(*it)] );
191 } else { 190 } else {
192 tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] ); 191 tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] );
193 qDebug( "TEST2 " + pluginListRefreshExclude[(*it)].name );
194 } 192 }
195 } else { 193 } else {
196 194
197 TodayPlugin plugin; 195 TodayPlugin plugin;
198 plugin.library = lib; 196 plugin.library = lib;
199 plugin.iface = iface; 197 plugin.iface = iface;
200 plugin.name = QString(*it); 198 plugin.name = QString(*it);
201 199
@@ -350,17 +348,17 @@ void Today::startConfig() {
350 348
351/** 349/**
352 * Refresh for the view. Reload all applets 350 * Refresh for the view. Reload all applets
353 * 351 *
354 */ 352 */
355void Today::refresh() { 353void Today::refresh() {
356 init(); 354 init();
357 355
358 qDebug(" refresh "); 356 // qDebug(" refresh ");
359 // set the date in top label 357 // set the date in top label
360 QDate date = QDate::currentDate(); 358 QDate date = QDate::currentDate();
361 QString time = ( tr( date.toString() ) ); 359 QString time = ( tr( date.toString() ) );
362 360
363 DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); 361 DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) );
364 362
365 if ( layout ) { 363 if ( layout ) {
366 delete layout; 364 delete layout;
@@ -368,33 +366,23 @@ void Today::refresh() {
368 layout = new QVBoxLayout( this ); 366 layout = new QVBoxLayout( this );
369 layout->addWidget( Frame ); 367 layout->addWidget( Frame );
370 layout->addWidget( OwnerField ); 368 layout->addWidget( OwnerField );
371 369
372 loadPlugins(); 370 loadPlugins();
373 draw(); 371 draw();
374} 372}
375 373
376void Today::startAddressbook() {
377 QCopEnvelope e( "QPE/System", "execute(QString)" );
378 e << QString( "addressbook" );
379}
380
381
382void Today::startApplication() { 374void Today::startApplication() {
383 QCopEnvelope e( "QPE/System", "execute(QString)" ); 375 QCopEnvelope e( "QPE/System", "execute(QString)" );
384 e << QString( sender()->name() ); 376 e << QString( sender()->name() );
385} 377}
386 378
387/** 379/**
388 * launch addressbook (personal card) 380 * launch addressbook (personal card)
389 */ 381 */
390void Today::editCard() { 382void Today::editCard() {
391 startAddressbook(); 383 QCopEnvelope env( "QPE/Application/addressbook", "editPersonalAndClose()" );
392 while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) {
393 qApp->processEvents();
394 }
395 QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" );
396} 384}
397 385
398Today::~Today() { 386Today::~Today() {
399} 387}
400 388
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 4485a0b..35b7ee3 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -40,17 +40,16 @@ class Today : public TodayBase {
40 Q_OBJECT 40 Q_OBJECT
41 41
42 public: 42 public:
43 Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 43 Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
44 ~Today(); 44 ~Today();
45 45
46private slots: 46private slots:
47 void startConfig(); 47 void startConfig();
48 void startAddressbook();
49 void startApplication(); 48 void startApplication();
50 void editCard(); 49 void editCard();
51 void refresh(); 50 void refresh();
52 51
53private: 52private:
54 void init(); 53 void init();
55 void setOwnerField(); 54 void setOwnerField();
56 void setOwnerField(QString &string); 55 void setOwnerField(QString &string);