author | zautrix <zautrix> | 2005-03-29 17:05:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-29 17:05:50 (UTC) |
commit | a7c827aa0e555206b60dec3bc07f7afab4352883 (patch) (side-by-side diff) | |
tree | 56dbda15314f27ffabd143d09ea036b092444198 | |
parent | 3116f249fc6ccd0e067213e826d3d924f6986972 (diff) | |
download | kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.zip kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.gz kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.bz2 |
fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | kabc/addresseedialog.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 40 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 13 | ||||
-rw-r--r-- | libkdepim/externalapphandler.cpp | 9 | ||||
-rw-r--r-- | libkdepim/externalapphandler.h | 1 |
7 files changed, 59 insertions, 12 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index b3a406c..1a045f3 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1304,28 +1304,28 @@ { "Show current time","Zeige aktuelle Zeit" }, { "Edit new item","Bearbeite neuen Eintrag" }, { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, { "%1 days\n","%1 Tagen\n" }, { "1 day\n","1 Tag\n" }, { "%1 hours\n","%1 Stunden\n" }, { "1 hour\n","1 Stunde\n" }, { "%1 minutes\n","%1 Minuten\n" }, { "1 minute\n","1 Minute\n" }, { "Only one toolbar","Nur eine Toolbar" }, { "Print","Drucke" }, { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, { "There is nothing selected!","Es ist nichts ausgewählt!" }, { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, { "KO/Pi Printout","KO/Pi Ausdruck" }, { "Print unscaled","Drucke unskaliert" }, { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, { "Printout Mode","Druck Modus" }, -{ "","" }, +{ "Filter menu icon","Filtermenu Icon" }, { "","" }, { "","" }, { "","" },
\ No newline at end of file diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index b3429e3..648e780 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -43,48 +43,49 @@ AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : mAddressee( addressee ) { QString name = addressee.familyName()+", "+ addressee.givenName(); if ( name.length() == 2 ) name = addressee.organization(); setText( Name,name); setText( Email, addressee.preferredEmail() ); } QString AddresseeItem::key( int column, bool ) const { if (column == Email) { QString value = text(Email); int val = value.findRev("@"); return value.mid( val) + value.left( val ); } return text(column).lower(); } AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), Ok|Cancel, No, parent ), mMultiple( multiple ) { + qDebug("NEW AddresseeDialog "); QWidget *topWidget = plainPage(); QBoxLayout *topLayout = new QHBoxLayout( topWidget ); KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); topLayout->addWidget(mMiniSplitter ); QWidget *listWidget = new QWidget( mMiniSplitter ); QBoxLayout *listLayout = new QVBoxLayout (listWidget) ; //topLayout->addLayout( listLayout ); mAddresseeList = new KListView( listWidget ); mAddresseeList->addColumn( i18n("Name") ); mAddresseeList->addColumn( i18n("Email") ); mAddresseeList->setAllColumnsShowFocus( true ); mAddresseeList->setFullWidth( true ); listLayout->addWidget( mAddresseeList ); connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), SLOT( slotOk() ) ); @@ -116,48 +117,49 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) ); connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), SLOT( addSelected( QListViewItem * ) ) ); connect( mAddresseeList, SIGNAL( returnPressed( QListViewItem * ) ), SLOT( selectNextItem( QListViewItem * ) ) ); } mAddressBook = StdAddressBook::self( true ); connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), SLOT( addressBookChanged() ) ); connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ), SLOT( addressBookChanged() ) ); loadAddressBook(); QValueList<int> splitterSize; splitterSize.append( ( width() / 5 ) * 3 ); splitterSize.append( ( width() / 5 ) *2 ); mMiniSplitter->setSizes( splitterSize ); } AddresseeDialog::~AddresseeDialog() { + qDebug("DELETE AddresseeDialog "); } void AddresseeDialog::loadAddressBook() { mAddresseeList->clear(); mItemDict.clear(); if ( mAddresseeEdit->text().isEmpty() ) { AddressBook::Iterator it; for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) continue; new AddresseeItem( mAddresseeList, (*it) ); } return; } //mAddresseeEdit->completionObject()->clear(); QRegExp re; re.setWildcard(true); // most people understand these better. re.setCaseSensitive(false); re.setPattern( "*"+ mAddresseeEdit->text() + "*"); AddressBook::Iterator it; for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 27aca2d..3f9b546 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -353,48 +353,49 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const connect( mViewManager, SIGNAL( deleteRequest( ) ), SLOT( deleteContacts( ) ) ); connect( mViewManager, SIGNAL( modified() ), SLOT( setModified() ) ); connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); connect( mXXPortManager, SIGNAL( modified() ), SLOT( setModified() ) ); connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), SLOT( incrementalSearch( const QString& ) ) ); connect( mIncSearchWidget, SIGNAL( fieldChanged() ), mJumpButtonBar, SLOT( recreateButtons() ) ); connect( mDetails, SIGNAL( sendEmail( const QString& ) ), SLOT( sendMail( const QString& ) ) ); connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); + connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); #ifndef KAB_EMBEDDED connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), mXXPortManager, SLOT( importVCard( const KURL& ) ) ); connect( mDetails, SIGNAL( browse( const QString& ) ), SLOT( browse( const QString& ) ) ); mAddressBookService = new KAddressBookService( this ); #endif //KAB_EMBEDDED mMessageTimer = new QTimer( this ); connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); mEditorDialog = 0; createAddresseeEditorDialog( this ); setModified( false ); mBRdisabled = false; #ifndef DESKTOP_VERSION infrared = 0; #endif //toggleBeamReceive( ); @@ -814,74 +815,76 @@ void KABCore::beamMySelf() beamVCard(uids); } else { KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); } } void KABCore::updateMainWindow() { mMainWindow->showMaximized(); mMainWindow->update(); } void KABCore::resizeEvent(QResizeEvent* e ) { if ( !mMiniSplitter ) return; //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); if ( QApplication::desktop()->width() >= 480 ) { if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 if ( mMiniSplitter->orientation() == Qt::Vertical ) { mMiniSplitter->setOrientation( Qt::Horizontal); mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); } if ( QApplication::desktop()->width() <= 640 ) { + mMainWindow->showMinimized(); //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); mViewManager->getFilterAction()->setComboWidth( 150 ); if ( mIncSearchWidget ) mIncSearchWidget->setSize(); QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); } } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 if ( mMiniSplitter->orientation() == Qt::Horizontal ) { mMiniSplitter->setOrientation( Qt::Vertical ); mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); } if ( QApplication::desktop()->width() <= 640 ) { //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); mMainWindow->showMinimized(); if ( KABPrefs::instance()->mHideSearchOnSwitch ) { if ( mIncSearchWidget ) { mIncSearchWidget->setSize(); } } else { mViewManager->getFilterAction()->setComboWidth( 0 ); } QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); } } } + QWidget::resizeEvent( e ); } void KABCore::export2phone() { QStringList uids; XXPortSelectDialog dlg( this, false, this ); if ( dlg.exec() ) uids = dlg.uids(); else return; if ( uids.isEmpty() ) return; // qDebug("count %d ", uids.count()); KAex2phonePrefs ex2phone; ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); if ( !ex2phone.exec() ) { return; } KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); @@ -2484,78 +2487,99 @@ void KABCore::configureKeyBindings() #ifndef KAB_EMBEDDED KKeyDialog::configure( actionCollection(), true ); #else //KAB_EMBEDDED qDebug("KABCore::configureKeyBindings() not implemented"); #endif //KAB_EMBEDDED } #ifdef KAB_EMBEDDED void KABCore::configureResources() { KRES::KCMKResources dlg( this, "" , 0 ); if ( !dlg.exec() ) return; KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); } #endif //KAB_EMBEDDED /* this method will be called through the QCop interface from Ko/Pi to select addresses * for the attendees list of an event. */ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) { - QStringList nameList; - QStringList emailList; - QStringList uidList; + bool ok = false; + mEmailSourceChannel = sourceChannel; int wid = uid.toInt( &ok ); + qDebug("UID %s ", uid.latin1()); if ( ok ) { if ( wid != QApplication::desktop()->width() ) { qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); message( i18n("Resizing, please wait...") ); - raise(); - qApp->processEvents(); + mMainWindow->showMinimized(); + /* + { + QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); + } + */ + QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); + return; } } else { qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); } - + callContactdialog(); + //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); + +} +void KABCore::resizeAndCallContactdialog() +{ + updateMainWindow(); + QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); +} + +void KABCore::callContactdialog() +{ + QStringList nameList; + QStringList emailList; + QStringList uidList; + qDebug("WIDTH %d ", QApplication::desktop()->width() ); KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); uint i=0; for (i=0; i < list.count(); i++) { nameList.append(list[i].realName()); emailList.append(list[i].preferredEmail()); uidList.append(list[i].uid()); } + QString uid = "unnamed"; //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); - bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); + bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); } - /* this method will be called through the QCop interface from Ko/Pi to select birthdays * to put them into the calendar. */ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) { // qDebug("KABCore::requestForBirthdayList"); QStringList birthdayList; QStringList anniversaryList; QStringList realNameList; QStringList preferredEmailList; QStringList assembledNameList; QStringList uidList; KABC::AddressBook::Iterator it; int count = 0; for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { ++count; } QProgressBar bar(count,0 ); int w = 300; if ( QApplication::desktop()->width() < 320 ) w = 220; int h = bar.sizeHint().height() ; diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index c185117..47ea152 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -347,65 +347,69 @@ class KABCore : public QWidget, public KSyncInterface void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); signals: void contactSelected( const QString &name ); void contactSelected( const QPixmap &pixmap ); public slots: void recieve(QString cmsg ); void getFile( bool success ); void syncFileRequest(); void setDetailsVisible( bool visible ); void setDetailsToState(); void saveSettings(); private slots: void updateToolBar(); void updateMainWindow(); void receive( const QCString& cmsg, const QByteArray& data ); void toggleBeamReceive( ); void disableBR(bool); void setJumpButtonBarVisible( bool visible ); void setJumpButtonBar( bool visible ); void setCaptionBack(); + void resizeAndCallContactdialog(); + void callContactdialog(); + void importFromOL(); void extensionModified( const KABC::Addressee::List &list ); void extensionChanged( int id ); void clipboardDataChanged(); void updateActionMenu(); void configureKeyBindings(); void removeVoice(); void setFormattedName(); #ifdef KAB_EMBEDDED void configureResources(); #endif //KAB_EMBEDDED void slotEditorDestroyed( const QString &uid ); void configurationChanged(); void addressBookChanged(); private: + QString mEmailSourceChannel; void resizeEvent(QResizeEvent* e ); bool mBRdisabled; #ifndef DESKTOP_VERSION QCopChannel* infrared; #endif QTimer *mMessageTimer; void initGUI(); void initActions(); QString getPhoneFile(); AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, const char *name = 0 ); KXMLGUIClient *mGUIClient; KABC::AddressBook *mAddressBook; ViewManager *mViewManager; // QSplitter *mDetailsSplitter; KDGanttMinimizeSplitter *mExtensionBarSplitter; ViewContainer *mDetails; KDGanttMinimizeSplitter* mMiniSplitter; XXPortManager *mXXPortManager; JumpButtonBar *mJumpButtonBar; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 8a4c7eb..6ddced0 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -723,83 +723,92 @@ void MainWindow::initActions() today_action->addTo( viewMenu ); connect( today_action, SIGNAL( activated() ), mView, SLOT( goToday() ) ); viewMenu->insertSeparator(); // *********************** if ( KOPrefs::instance()->mVerticalScreen ) { icon = SmallIcon( "1updownarrow" ); } else { icon = SmallIcon("1leftrightarrow" ); } configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); FSaction->addTo( viewMenu ); connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); icon = loadPixmap( pathString + "navi" ); configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleDateNavigatorWidget() ) ); mToggleNav = action ; icon = loadPixmap( pathString + "filter" ); - configureToolBarMenu->insertItem(icon, i18n("Toggle FilterView"), 26 ); + configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleFilter() ) ); mToggleFilter = action; icon = loadPixmap( pathString + "allday" ); configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleAllDaySize() ) ); mToggleAllday = action; connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), mToggleNav, SLOT( setEnabled ( bool ) ) ); connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), mToggleFilter, SLOT( setEnabled ( bool ) ) ); connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), mToggleAllday, SLOT( setEnabled ( bool ) ) ); viewMenu->insertSeparator(); icon = loadPixmap( pathString + "picker" ); action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( showDatePicker() ) ); action->addTo( iconToolBar ); viewMenu->insertSeparator(); if ( p-> mShowIconToggleFull ) FSaction->addTo( iconToolBar ); if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); - if ( p->mShowIconFilterview ) mToggleFilter->addTo( iconToolBar ); + if ( p->mShowIconFilterview ) { + icon = loadPixmap( pathString + "filter" ); + QPEMenuBar *menuBar111 = new QPEMenuBar( iconToolBar ); + menuBar111->insertItem( icon.pixmap(), selectFilterMenu); + int isi = 24; + if ( QApplication::desktop()->width() < 480 ) + isi = 18; + menuBar111->setFixedSize( QSize( isi, isi )) ; + } + //******************** if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); icon = loadPixmap( pathString + "whatsnext" ); configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); whatsnext_action->addTo( viewMenu ); connect( whatsnext_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showWhatsNextView() ) ); icon = loadPixmap( pathString + "xdays" ); configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); xdays_action->addTo( viewMenu ); connect( xdays_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showNextXView() ) ); icon = loadPixmap( pathString + "journal" ); configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); viewjournal_action->addTo( viewMenu ); connect( viewjournal_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showJournalView() ) ); diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index f8f4c8a..0d66a5a 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -1114,69 +1114,76 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete } } if (useValMap == true) (*e) << valmap; #endif } /************************************************************************** * **************************************************************************/ void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) { if ( cmsg == "nextView()" ) { qDebug("nextView()"); emit nextView(); return; } - + if ( cmsg == "callContactdialog()" ) { + qDebug("callContactdialog()"); + emit callContactdialog(); + return; + } + bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); if (!res) res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); if (!res) res = mDisplayDetails->appMessage( cmsg, data ); // if (!res) // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); } bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) { mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); // maybe we are sending to KA/Pi fom a different worldd... // it may be that the QAplication::desktop()->width() values in KA/Pi are not the same as in our application // for that reason we send the current QApplication::desktop()->width() to KA/Pi + //qDebug("UID %s ", sessionuid.latin1()); return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(QString::number ( QApplication::desktop()->width() )); + //return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); } bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) { QStringList list4, list5, list6; mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); } bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) { mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); } bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) { QStringList list4, list5, list6; mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); } diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index 52a64e1..097f306 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h @@ -212,48 +212,49 @@ class ExternalAppHandler : public QObject bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& birthdayList, const QStringList& anniversaryList, const QStringList& realNameList, const QStringList& emailList, const QStringList& assembledNameList, const QStringList& uidList); //loadConfig clears the cache and checks again if the applications are available or not void loadConfig(); QList<DefaultAppItem> getAvailableDefaultItems(Types); DefaultAppItem* getDefaultItem(Types, int); public slots: void appMessage( const QCString& msg, const QByteArray& data ); signals: + void callContactdialog(); void nextView(); // Emmitted when the target app receives a request from the source app void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi // The first parameter is a uniqueid. It can be used to identify the event void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); // Emmitted when the target app receives a request from the source app void requestForBirthdayList(const QString& sourceChannel, const QString& uid); // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi // The first parameter is a uniqueid. It can be used to identify the event void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, const QStringList& anniversaryList, const QStringList& realNameList, const QStringList& emailList, const QStringList& assembledNameList, const QStringList& uidList); |