summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-29 17:05:50 (UTC)
committer zautrix <zautrix>2005-03-29 17:05:50 (UTC)
commita7c827aa0e555206b60dec3bc07f7afab4352883 (patch) (side-by-side diff)
tree56dbda15314f27ffabd143d09ea036b092444198
parent3116f249fc6ccd0e067213e826d3d924f6986972 (diff)
downloadkdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.zip
kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.gz
kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.bz2
fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--kabc/addresseedialog.cpp2
-rw-r--r--kaddressbook/kabcore.cpp38
-rw-r--r--kaddressbook/kabcore.h4
-rw-r--r--korganizer/mainwindow.cpp13
-rw-r--r--libkdepim/externalapphandler.cpp7
-rw-r--r--libkdepim/externalapphandler.h1
7 files changed, 57 insertions, 10 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
@@ -1316,16 +1316,16 @@
{ "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
@@ -55,24 +55,25 @@ 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 );
@@ -128,24 +129,25 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
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) );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 27aca2d..3f9b546 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -365,24 +365,25 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
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 );
@@ -826,24 +827,25 @@ void KABCore::updateMainWindow()
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 );
}
@@ -852,24 +854,25 @@ void KABCore::resizeEvent(QResizeEvent* e )
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() )
@@ -2496,54 +2499,75 @@ void KABCore::configureResources()
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;
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index c185117..47ea152 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -359,41 +359,45 @@ class KABCore : public QWidget, public KSyncInterface
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 );
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8a4c7eb..6ddced0 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -735,25 +735,25 @@ void MainWindow::initActions()
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;
@@ -769,25 +769,34 @@ void MainWindow::initActions()
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 );
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index f8f4c8a..0d66a5a 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -1126,45 +1126,52 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
/**************************************************************************
*
**************************************************************************/
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)
{
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 52a64e1..097f306 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -224,24 +224,25 @@ class ExternalAppHandler : public QObject
//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);