-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 23 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 2 | ||||
-rw-r--r-- | core/pim/addressbook/opie-addressbook.control | 6 | ||||
-rw-r--r-- | core/pim/addressbook/version.h | 6 |
4 files changed, 21 insertions, 16 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 34bf7f1..6819085 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -1,25 +1,24 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2003 Stefan Eilers (eilers.stefan@epost.de) ** -** This file is part of Qt Palmtop Environment. +** This file is part of the Open Palmtop Environment (see www.opie.info). ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** -** OContact info@trolltech.com if any conditions of this licensing are -** not clear to you. ** **********************************************************************/ #define QTOPIA_INTERNAL_FD #include "contacteditor.h" #include "ablabel.h" #include "abview.h" @@ -108,22 +107,22 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, // Create Toolbar listTools = new QPEToolBar( this, "list operations" ); listTools->setHorizontalStretchable( true ); addToolBar( listTools ); moveToolBar( listTools, m_config.getToolBarPos() ); // View Icons - m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ), + m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/listview" ), QString::null, 0, this, 0 ); connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); m_tableViewButton->setToggleAction( true ); m_tableViewButton->addTo( listTools ); - m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "day" ), QString::null, 0, this, 0 ); + m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "addressbook/cardview" ), QString::null, 0, this, 0 ); connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); m_cardViewButton->setToggleAction( true ); m_cardViewButton->addTo( listTools ); listTools->addSeparator(); // Other Buttons QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, @@ -647,18 +646,20 @@ static void parseName( const QString& name, QString *first, QString *middle, *middle = rest.mid( space+1 ); } } void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) { + bool needShow = FALSE; qWarning("Receiving QCop-Call with message %s", QString( msg ).latin1() ); + if (msg == "editPersonal()") { editPersonal(); } else if (msg == "editPersonalAndClose()") { editPersonal(); close(); } else if ( msg == "addContact(QString,QString)" ) { QDataStream stream(data,IO_ReadOnly); QString name, email; @@ -684,16 +685,17 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) if ( !QFile::exists( beamFilename ) ) return; // can't beam a non-existent file Ir *ir = new Ir( this ); connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); QString description = "mycard.vcf"; ir->send( beamFilename, description, "text/x-vCard" ); } else if ( msg == "show(int)" ) { + raise(); QDataStream stream(data,IO_ReadOnly); int uid; stream >> uid; qWarning( "Showing uid: %d" , uid ); // Deactivate Personal View.. if ( actionPersonal->isOn() ){ @@ -701,18 +703,18 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) slotPersonalView(); } // Reset category and show as card.. m_abView -> setShowByCategory( QString::null ); m_abView -> setCurrentUid( uid ); slotViewSwitched ( AbView::CardView ); - showMaximized(); - qApp->exec(); + needShow = true; + } else if ( msg == "edit(int)" ) { QDataStream stream(data,IO_ReadOnly); int uid; stream >> uid; // Deactivate Personal View.. if ( actionPersonal->isOn() ){ @@ -721,16 +723,19 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) } // Reset category and edit.. m_abView -> setShowByCategory( QString::null ); m_abView -> setCurrentUid( uid ); slotViewEdit(); } + if (needShow) + QPEApplication::setKeepRunning(); + } void AddressbookWindow::editEntry( EntryMode entryMode ) { OContact entry; if ( !abEditor ) { abEditor = new ContactEditor( entry, this, "editor" ); } @@ -895,17 +900,17 @@ void AddressbookWindow::slotSave() } #endif void AddressbookWindow::slotNotFound() { qWarning("Got notfound signal!"); QMessageBox::information( this, tr( "Not Found" ), - tr( "Unable to find a contact for this \n search pattern!" ) ); + "<qt>" + tr( "Unable to find a contact for this search pattern!" ) + "</qt>" ); } void AddressbookWindow::slotWrapAround() { qWarning("Got wrap signal!"); // if ( doNotifyWrapAround ) // QMessageBox::information( this, tr( "End of list" ), @@ -945,17 +950,17 @@ void AddressbookWindow::slotSetCategory( int c ) view = AbView::CardView; // }else if ( i == 3 ){ // book = tr( "Personal" ); // view = AbView:: PersonalView; }else if ( i == 3 ){ // default All Categories cat = QString::null; }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled cat = "Unfiled"; - qWarning ("Unfiled selected!!!"); + qWarning ("Unfiled selected!"); }else{ cat = m_abView->categories()[i - 4]; } } } // Switch to the selected View slotViewSwitched( view ); diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index ce14f98..9d1a1c7 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -592,17 +592,17 @@ void ContactEditor::init() { QStringList::ConstIterator it = slDynamicEntries.begin(); QMap<QString, int> mapStrToID = OContactFields::untrFieldsToId(); QMap<int, QString> mapIdToStr = OContactFields::idToTrFields(); for (i = counter; it != slDynamicEntries.end(); i++, ++it ) { if (((*it) == "Anniversary") || ((*it) == "Birthday")|| ((*it) == "Gender")) continue; - l = new QLabel( mapIdToStr[mapStrToID[*it]].utf8() , container ); + l = new QLabel( mapIdToStr[mapStrToID[*it]], container ); listName.append( l ); gl->addWidget( l, i, 0 ); QLineEdit *e = new QLineEdit( container ); listValue.append( e ); gl->addWidget( e, i, 1); } // Fill labels with names.. // loadFields(); diff --git a/core/pim/addressbook/opie-addressbook.control b/core/pim/addressbook/opie-addressbook.control index f06fa91..d949bd4 100644 --- a/core/pim/addressbook/opie-addressbook.control +++ b/core/pim/addressbook/opie-addressbook.control @@ -1,11 +1,11 @@ Package: opie-addressbook -Files: bin/addressbook apps/1Pim/addressbook.desktop pics/addressbook/*.png +Files: bin/addressbook apps/1Pim/addressbook.desktop Priority: optional Section: opie/applications Conflicts: qpe-tkcaddressbook Maintainer: Stefan Eilers <eilers.stefan@epost.de> Architecture: arm -Version: $QPE_VERSION-$SUB_VERSION -Depends: task-opie-minimal, libopie1 +Depends: task-opie-minimal, libopie1, opie-pics Description: Contacts A simple addressbook for the Opie environment. +Version: $QPE_VERSION$EXTRAVERSION diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h index 4c93584..9621826 100644 --- a/core/pim/addressbook/version.h +++ b/core/pim/addressbook/version.h @@ -1,10 +1,10 @@ #ifndef _VERSION_H_ #define _VERSION_H_ -#define MAINVERSION "0" -#define SUBVERSION "9" -#define PATCHVERSION "5" +#define MAINVERSION "1" +#define SUBVERSION "0" +#define PATCHVERSION "0" #define APPNAME "OPIE_ADDRESSBOOK" #endif |