summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-08 21:10:34 (UTC)
committer harlekin <harlekin>2003-03-08 21:10:34 (UTC)
commitd44025daf7b191e1f79fe181b9ad1fcad20f3bdb (patch) (unidiff)
treedfeca99f66ac32be7d7485aaf36b353a8d775dd3
parent9e482f354732a04aebfe8ab9a9eb5cfaad5b3cdb (diff)
downloadopie-d44025daf7b191e1f79fe181b9ad1fcad20f3bdb.zip
opie-d44025daf7b191e1f79fe181b9ad1fcad20f3bdb.tar.gz
opie-d44025daf7b191e1f79fe181b9ad1fcad20f3bdb.tar.bz2
use the opie wide config icon
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp166
-rw-r--r--pics/addressbook/configure.pngbin485 -> 0 bytes
2 files changed, 83 insertions, 83 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 8937227..14e5b3f 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -89,22 +89,22 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
89 // Settings for Main Menu 89 // Settings for Main Menu
90 setToolBarsMovable( true ); 90 setToolBarsMovable( true );
91 setRightJustification( true ); 91 setRightJustification( true );
92 92
93 // Create Toolbar 93 // Create Toolbar
94 listTools = new QPEToolBar( this, "list operations" ); 94 listTools = new QPEToolBar( this, "list operations" );
95 listTools->setHorizontalStretchable( true ); 95 listTools->setHorizontalStretchable( true );
96 addToolBar( listTools ); 96 addToolBar( listTools );
97 moveToolBar( listTools, m_config.getToolBarPos() ); 97 moveToolBar( listTools, m_config.getToolBarPos() );
98 98
99 QPEMenuBar *mbList = new QPEMenuBar( this ); 99 QPEMenuBar *mbList = new QPEMenuBar( this );
100 mbList->setMargin( 0 ); 100 mbList->setMargin( 0 );
101 101
102 QPopupMenu *edit = new QPopupMenu( mbList ); 102 QPopupMenu *edit = new QPopupMenu( mbList );
103 mbList->insertItem( tr( "Contact" ), edit ); 103 mbList->insertItem( tr( "Contact" ), edit );
104 104
105 105
106 // View Icons 106 // View Icons
107 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ), 107 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ),
108 QString::null, 0, this, 0 ); 108 QString::null, 0, this, 0 );
109 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); 109 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) );
110 m_tableViewButton->setToggleAction( true ); 110 m_tableViewButton->setToggleAction( true );
@@ -123,30 +123,30 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
123 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); 123 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
124 a->addTo( edit ); 124 a->addTo( edit );
125 a->addTo( listTools ); 125 a->addTo( listTools );
126 126
127 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 127 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
128 0, this, 0 ); 128 0, this, 0 );
129 actionEdit = a; 129 actionEdit = a;
130 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); 130 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
131 a->addTo( edit ); 131 a->addTo( edit );
132 a->addTo( listTools ); 132 a->addTo( listTools );
133 133
134 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 134 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
135 0, this, 0 ); 135 0, this, 0 );
136 actionTrash = a; 136 actionTrash = a;
137 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); 137 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
138 a->addTo( edit ); 138 a->addTo( edit );
139 a->addTo( listTools ); 139 a->addTo( listTools );
140 140
141 141
142 // make it possible to go directly to businesscard via qcop call 142 // make it possible to go directly to businesscard via qcop call
143 //#if defined(Q_WS_QWS) // Why this ? (se) 143 //#if defined(Q_WS_QWS) // Why this ? (se)
144#if !defined(QT_NO_COP) 144#if !defined(QT_NO_COP)
145 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); 145 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
146 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), 146 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
147 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); 147 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
148#endif 148#endif
149 // #endif 149 // #endif
150 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), 150 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
151 QString::null, 0, this, 0 ); 151 QString::null, 0, this, 0 );
152 actionFind = a; 152 actionFind = a;
@@ -182,7 +182,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
182 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); 182 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
183 a->addTo( edit ); 183 a->addTo( edit );
184 a->addTo( listTools ); 184 a->addTo( listTools );
185 185
186 if ( Ir::supported() ) { 186 if ( Ir::supported() ) {
187 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, 187 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null,
188 0, this, 0 ); 188 0, this, 0 );
@@ -191,23 +191,23 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
191 a->addTo( edit ); 191 a->addTo( edit );
192 a->addTo( listTools ); 192 a->addTo( listTools );
193 } 193 }
194 194
195 edit->insertSeparator(); 195 edit->insertSeparator();
196 196
197 a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null, 197 a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null,
198 0, this, 0); 198 0, this, 0);
199 actionPersonal = a; 199 actionPersonal = a;
200 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); 200 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) );
201 a->addTo( edit ); 201 a->addTo( edit );
202 202
203 edit->insertSeparator(); 203 edit->insertSeparator();
204 204
205 a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ), 205 a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ),
206 QString::null, 0, this, 0 , TRUE ); 206 QString::null, 0, this, 0 , TRUE );
207 actionPersonal = a; 207 actionPersonal = a;
208 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); 208 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) );
209 a->addTo( edit ); 209 a->addTo( edit );
210 210
211 211
212#ifdef __DEBUG_RELEASE 212#ifdef __DEBUG_RELEASE
213 // Remove this function for public Release ! This is only 213 // Remove this function for public Release ! This is only
@@ -216,7 +216,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
216 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); 216 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) );
217 a->addTo( edit ); 217 a->addTo( edit );
218#endif 218#endif
219 a = new QAction( tr( "Config" ), Resource::loadPixmap( "addressbook/configure" ), QString::null, 219 a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null,
220 0, this, 0 ); 220 0, this, 0 );
221 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); 221 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) );
222 a->addTo( edit ); 222 a->addTo( edit );
@@ -224,18 +224,18 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
224 // Create Views 224 // Create Views
225 listContainer = new QWidget( this ); 225 listContainer = new QWidget( this );
226 QVBoxLayout *vb = new QVBoxLayout( listContainer ); 226 QVBoxLayout *vb = new QVBoxLayout( listContainer );
227 227
228 m_abView = new AbView( listContainer, m_config.orderList() ); 228 m_abView = new AbView( listContainer, m_config.orderList() );
229 vb->addWidget( m_abView ); 229 vb->addWidget( m_abView );
230 // abList->setHScrollBarMode( QScrollView::AlwaysOff ); 230 // abList->setHScrollBarMode( QScrollView::AlwaysOff );
231 connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), 231 connect( m_abView, SIGNAL( signalViewSwitched ( int ) ),
232 this, SLOT( slotViewSwitched( int ) ) ); 232 this, SLOT( slotViewSwitched( int ) ) );
233 233
234 234
235 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); 235 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) );
236 236
237 m_abView->load(); 237 m_abView->load();
238 238
239 // Letter Picker 239 // Letter Picker
240 pLabel = new LetterPicker( listContainer ); 240 pLabel = new LetterPicker( listContainer );
241 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); 241 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char)));
@@ -249,16 +249,16 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
249 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); 249 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
250 populateCategories(); 250 populateCategories();
251 mbList->insertItem( tr("View"), catMenu ); 251 mbList->insertItem( tr("View"), catMenu );
252 252
253 defaultFont = new QFont( m_abView->font() ); 253 defaultFont = new QFont( m_abView->font() );
254 slotSetFont(m_config.fontSize()); 254 slotSetFont(m_config.fontSize());
255 m_curFontSize = m_config.fontSize(); 255 m_curFontSize = m_config.fontSize();
256 256
257 setCentralWidget(listContainer); 257 setCentralWidget(listContainer);
258 258
259 // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); 259 // qDebug("adressbook contrsuction: t=%d", t.elapsed() );
260 260
261 261
262 isLoading = false; 262 isLoading = false;
263} 263}
264 264
@@ -283,17 +283,17 @@ void AddressbookWindow::slotConfig()
283} 283}
284 284
285 285
286void AddressbookWindow::slotSetFont( int size ) 286void AddressbookWindow::slotSetFont( int size )
287{ 287{
288 qWarning("void AddressbookWindow::slotSetFont( %d )", size); 288 qWarning("void AddressbookWindow::slotSetFont( %d )", size);
289 289
290 if (size > 2 || size < 0) 290 if (size > 2 || size < 0)
291 size = 1; 291 size = 1;
292 292
293 m_config.setFontSize( size ); 293 m_config.setFontSize( size );
294 294
295 QFont *currentFont; 295 QFont *currentFont;
296 296
297 switch (size) { 297 switch (size) {
298 case 0: 298 case 0:
299 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); 299 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) );
@@ -323,14 +323,14 @@ void AddressbookWindow::importvCard() {
323 if(!str.isEmpty() ){ 323 if(!str.isEmpty() ){
324 setDocument((const QString&) str ); 324 setDocument((const QString&) str );
325 } 325 }
326 326
327} 327}
328 328
329void AddressbookWindow::setDocument( const QString &filename ) 329void AddressbookWindow::setDocument( const QString &filename )
330{ 330{
331 qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); 331 qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() );
332 332
333 if ( filename.find(".vcf") != int(filename.length()) - 4 ){ 333 if ( filename.find(".vcf") != int(filename.length()) - 4 ){
334 334
335 335
336 336
@@ -339,17 +339,17 @@ void AddressbookWindow::setDocument( const QString &filename )
339 tr( "&Yes" ), tr( "&No" ), QString::null, 339 tr( "&Yes" ), tr( "&No" ), QString::null,
340 0, // Enter == button 0 340 0, // Enter == button 0
341 2 ) ) { // Escape == button 2 341 2 ) ) { // Escape == button 2
342 case 0: 342 case 0:
343 qWarning("YES clicked"); 343 qWarning("YES clicked");
344 break; 344 break;
345 case 1: 345 case 1:
346 qWarning("NO clicked"); 346 qWarning("NO clicked");
347 return; 347 return;
348 break; 348 break;
349 } 349 }
350 } 350 }
351 351
352 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 352 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
353 filename ); 353 filename );
354 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 354 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
355 OContactAccess::List allList = access->allRecords(); 355 OContactAccess::List allList = access->allRecords();
@@ -372,11 +372,11 @@ void AddressbookWindow::setDocument( const QString &filename )
372 tr( "&Yes" ), tr( "&No" ), tr( "&All Yes"), 372 tr( "&Yes" ), tr( "&No" ), tr( "&All Yes"),
373 0, // Enter == button 0 373 0, // Enter == button 0
374 2 ) ) { // Escape == button 2 374 2 ) ) { // Escape == button 2
375 case 0: 375 case 0:
376 qWarning("YES clicked"); 376 qWarning("YES clicked");
377 m_abView->addEntry( *it ); 377 m_abView->addEntry( *it );
378 break; 378 break;
379 case 1: 379 case 1:
380 qWarning("NO clicked"); 380 qWarning("NO clicked");
381 break; 381 break;
382 case 2: 382 case 2:
@@ -388,14 +388,14 @@ void AddressbookWindow::setDocument( const QString &filename )
388 m_abView->addEntry( *it ); 388 m_abView->addEntry( *it );
389 389
390 } 390 }
391 391
392 delete access; 392 delete access;
393} 393}
394 394
395void AddressbookWindow::resizeEvent( QResizeEvent *e ) 395void AddressbookWindow::resizeEvent( QResizeEvent *e )
396{ 396{
397 QMainWindow::resizeEvent( e ); 397 QMainWindow::resizeEvent( e );
398 398
399 399
400} 400}
401 401
@@ -437,7 +437,7 @@ void AddressbookWindow::slotListDelete()
437{ 437{
438 if(!syncing) { 438 if(!syncing) {
439 OContact tmpEntry = m_abView ->currentEntry(); 439 OContact tmpEntry = m_abView ->currentEntry();
440 440
441 // get a name, do the best we can... 441 // get a name, do the best we can...
442 QString strName = tmpEntry.fullName(); 442 QString strName = tmpEntry.fullName();
443 if ( strName.isEmpty() ) { 443 if ( strName.isEmpty() ) {
@@ -445,8 +445,8 @@ void AddressbookWindow::slotListDelete()
445 if ( strName.isEmpty() ) 445 if ( strName.isEmpty() )
446 strName = "No Name"; 446 strName = "No Name";
447 } 447 }
448 448
449 449
450 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ), 450 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ),
451 strName ) ) { 451 strName ) ) {
452 m_abView->removeEntry( tmpEntry.uid() ); 452 m_abView->removeEntry( tmpEntry.uid() );
@@ -474,10 +474,10 @@ void AddressbookWindow::slotFindClose()
474void AddressbookWindow::slotFind() 474void AddressbookWindow::slotFind()
475{ 475{
476 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false); 476 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false);
477 477
478 searchEdit->clearFocus(); 478 searchEdit->clearFocus();
479 // m_abView->setFocus(); 479 // m_abView->setFocus();
480 480
481} 481}
482 482
483void AddressbookWindow::slotViewBack() 483void AddressbookWindow::slotViewBack()
@@ -507,14 +507,14 @@ void AddressbookWindow::writeMail()
507 QString name = c.fileAs(); 507 QString name = c.fileAs();
508 QString email = c.defaultEmail(); 508 QString email = c.defaultEmail();
509 509
510 // I prefer the OPIE-Environment variable before the 510 // I prefer the OPIE-Environment variable before the
511 // QPE-one.. 511 // QPE-one..
512 QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); 512 QString basepath = QString::fromLatin1( getenv("OPIEDIR") );
513 if ( basepath.isEmpty() ) 513 if ( basepath.isEmpty() )
514 basepath = QString::fromLatin1( getenv("QPEDIR") ); 514 basepath = QString::fromLatin1( getenv("QPEDIR") );
515 515
516 // Try to access the preferred. If not possible, try to 516 // Try to access the preferred. If not possible, try to
517 // switch to the other one.. 517 // switch to the other one..
518 if ( m_config.useQtMail() ){ 518 if ( m_config.useQtMail() ){
519 qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); 519 qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1());
520 if ( QFile::exists( basepath + "/bin/qtmail" ) ){ 520 if ( QFile::exists( basepath + "/bin/qtmail" ) ){
@@ -548,7 +548,7 @@ void AddressbookWindow::slotBeam()
548 beamFilename = addressbookPersonalVCardName(); 548 beamFilename = addressbookPersonalVCardName();
549 if ( !QFile::exists( beamFilename ) ) 549 if ( !QFile::exists( beamFilename ) )
550 return; // can't beam a non-existent file 550 return; // can't beam a non-existent file
551 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 551 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
552 beamFilename ); 552 beamFilename );
553 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 553 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
554 OContactAccess::List allList = access->allRecords(); 554 OContactAccess::List allList = access->allRecords();
@@ -560,7 +560,7 @@ void AddressbookWindow::slotBeam()
560 unlink( beamfile ); // delete if exists 560 unlink( beamfile ); // delete if exists
561 mkdir("/tmp/obex/", 0755); 561 mkdir("/tmp/obex/", 0755);
562 c = m_abView -> currentEntry(); 562 c = m_abView -> currentEntry();
563 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 563 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
564 beamfile ); 564 beamfile );
565 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 565 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
566 access->add( c ); 566 access->add( c );
@@ -589,7 +589,7 @@ void AddressbookWindow::beamDone( Ir *ir )
589static void parseName( const QString& name, QString *first, QString *middle, 589static void parseName( const QString& name, QString *first, QString *middle,
590 QString * last ) 590 QString * last )
591{ 591{
592 592
593 int comma = name.find ( "," ); 593 int comma = name.find ( "," );
594 QString rest; 594 QString rest;
595 if ( comma > 0 ) { 595 if ( comma > 0 ) {
@@ -610,7 +610,7 @@ static void parseName( const QString& name, QString *first, QString *middle,
610 *first = rest.left( space ); 610 *first = rest.left( space );
611 *middle = rest.mid( space+1 ); 611 *middle = rest.mid( space+1 );
612 } 612 }
613 613
614} 614}
615 615
616 616
@@ -625,7 +625,7 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
625 QDataStream stream(data,IO_ReadOnly); 625 QDataStream stream(data,IO_ReadOnly);
626 QString name, email; 626 QString name, email;
627 stream >> name >> email; 627 stream >> name >> email;
628 628
629 OContact cnt; 629 OContact cnt;
630 QString fn, mn, ln; 630 QString fn, mn, ln;
631 parseName( name, &fn, &mn, &ln ); 631 parseName( name, &fn, &mn, &ln );
@@ -636,9 +636,9 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
636 cnt.insertEmails( email ); 636 cnt.insertEmails( email );
637 cnt.setDefaultEmail( email ); 637 cnt.setDefaultEmail( email );
638 cnt.setFileAs(); 638 cnt.setFileAs();
639 639
640 m_abView -> addEntry( cnt ); 640 m_abView -> addEntry( cnt );
641 641
642 // :SXm_abView()->init( cnt ); 642 // :SXm_abView()->init( cnt );
643 editEntry( EditEntry ); 643 editEntry( EditEntry );
644 } else if ( msg == "beamBusinessCard()" ) { 644 } else if ( msg == "beamBusinessCard()" ) {
@@ -668,9 +668,9 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
668 } 668 }
669 picker.showMaximized(); 669 picker.showMaximized();
670 picker.exec(); 670 picker.exec();
671 671
672 // ###### note: contacts may have been added - save here! 672 // ###### note: contacts may have been added - save here!
673 673
674 setCentralWidget(abList); 674 setCentralWidget(abList);
675 QCopEnvelope e(ch,m); 675 QCopEnvelope e(ch,m);
676 i=0; 676 i=0;
@@ -680,7 +680,7 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
680 } 680 }
681 } 681 }
682#endif 682#endif
683 683
684} 684}
685 685
686void AddressbookWindow::editEntry( EntryMode entryMode ) 686void AddressbookWindow::editEntry( EntryMode entryMode )
@@ -695,7 +695,7 @@ void AddressbookWindow::editEntry( EntryMode entryMode )
695 abEditor->setEntry( entry ); 695 abEditor->setEntry( entry );
696 // other things may change the caption. 696 // other things may change the caption.
697 abEditor->setCaption( tr("Edit Address") ); 697 abEditor->setCaption( tr("Edit Address") );
698 698
699#if defined(Q_WS_QWS) || defined(_WS_QWS_) 699#if defined(Q_WS_QWS) || defined(_WS_QWS_)
700 abEditor->showMaximized(); 700 abEditor->showMaximized();
701#endif 701#endif
@@ -758,21 +758,21 @@ void AddressbookWindow::slotPersonalView()
758 // slotUpdateToolbar(); 758 // slotUpdateToolbar();
759 759
760 m_abView->showPersonal( false ); 760 m_abView->showPersonal( false );
761 761
762 return; 762 return;
763 } 763 }
764 764
765 qWarning("slotPersonalView()-> ON"); 765 qWarning("slotPersonalView()-> ON");
766 // XXX need to disable some QActions. 766 // XXX need to disable some QActions.
767 actionNew->setEnabled(FALSE); 767 actionNew->setEnabled(FALSE);
768 actionTrash->setEnabled(FALSE); 768 actionTrash->setEnabled(FALSE);
769 actionFind->setEnabled(FALSE); 769 actionFind->setEnabled(FALSE);
770 actionMail->setEnabled(FALSE); 770 actionMail->setEnabled(FALSE);
771 771
772 setCaption( tr("Contacts - My Personal Details") ); 772 setCaption( tr("Contacts - My Personal Details") );
773 773
774 m_abView->showPersonal( true ); 774 m_abView->showPersonal( true );
775 775
776} 776}
777 777
778 778
@@ -856,7 +856,7 @@ void AddressbookWindow::slotNotFound()
856 QMessageBox::information( this, tr( "Not Found" ), 856 QMessageBox::information( this, tr( "Not Found" ),
857 tr( "Unable to find a contact for this \n search pattern!" ) ); 857 tr( "Unable to find a contact for this \n search pattern!" ) );
858 858
859 859
860} 860}
861void AddressbookWindow::slotWrapAround() 861void AddressbookWindow::slotWrapAround()
862{ 862{
@@ -864,30 +864,30 @@ void AddressbookWindow::slotWrapAround()
864 // if ( doNotifyWrapAround ) 864 // if ( doNotifyWrapAround )
865 // QMessageBox::information( this, tr( "End of list" ), 865 // QMessageBox::information( this, tr( "End of list" ),
866 // tr( "End of list. Wrap around now...!" ) + "\n" ); 866 // tr( "End of list. Wrap around now...!" ) + "\n" );
867 867
868} 868}
869 869
870void AddressbookWindow::slotSetCategory( int c ) 870void AddressbookWindow::slotSetCategory( int c )
871{ 871{
872 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); 872 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() );
873 873
874 QString cat, book; 874 QString cat, book;
875 AbView::Views view = AbView::TableView; 875 AbView::Views view = AbView::TableView;
876 876
877 if ( c <= 0 ) 877 if ( c <= 0 )
878 return; 878 return;
879 879
880 // Switch view 880 // Switch view
881 if ( c < 3 ) 881 if ( c < 3 )
882 for ( unsigned int i = 1; i < 3; i++ ){ 882 for ( unsigned int i = 1; i < 3; i++ ){
883 if ( catMenu ) 883 if ( catMenu )
884 catMenu->setItemChecked( i, c == (int)i ); 884 catMenu->setItemChecked( i, c == (int)i );
885 } 885 }
886 else 886 else
887 // Checkmark Category Menu Item Selected 887 // Checkmark Category Menu Item Selected
888 for ( unsigned int i = 3; i < catMenu->count(); i++ ) 888 for ( unsigned int i = 3; i < catMenu->count(); i++ )
889 catMenu->setItemChecked( i, c == (int)i ); 889 catMenu->setItemChecked( i, c == (int)i );
890 890
891 // Now switch to the selected category 891 // Now switch to the selected category
892 for ( unsigned int i = 1; i < catMenu->count(); i++ ) { 892 for ( unsigned int i = 1; i < catMenu->count(); i++ ) {
893 if (catMenu->isItemChecked( i )) { 893 if (catMenu->isItemChecked( i )) {
@@ -910,7 +910,7 @@ void AddressbookWindow::slotSetCategory( int c )
910 } 910 }
911 } 911 }
912 } 912 }
913 913
914 // Switch to the selected View 914 // Switch to the selected View
915 slotViewSwitched( view ); 915 slotViewSwitched( view );
916 916
@@ -921,7 +921,7 @@ void AddressbookWindow::slotSetCategory( int c )
921 book = "List"; 921 book = "List";
922 if ( cat.isEmpty() ) 922 if ( cat.isEmpty() )
923 cat = "All"; 923 cat = "All";
924 924
925 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); 925 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) );
926} 926}
927 927
@@ -965,25 +965,25 @@ void AddressbookWindow::slotCardView()
965} 965}
966 966
967void AddressbookWindow::slotSetLetter( char c ) { 967void AddressbookWindow::slotSetLetter( char c ) {
968 968
969 m_abView->setShowByLetter( c ); 969 m_abView->setShowByLetter( c );
970 970
971} 971}
972 972
973 973
974void AddressbookWindow::populateCategories() 974void AddressbookWindow::populateCategories()
975{ 975{
976 catMenu->clear(); 976 catMenu->clear();
977 977
978 int id, rememberId; 978 int id, rememberId;
979 id = 1; 979 id = 1;
980 rememberId = 0; 980 rememberId = 0;
981 981
982 catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); 982 catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ );
983 catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ ); 983 catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ );
984 // catMenu->insertItem( tr( "Personal" ), id++ ); 984 // catMenu->insertItem( tr( "Personal" ), id++ );
985 catMenu->insertSeparator(); 985 catMenu->insertSeparator();
986 986
987 catMenu->insertItem( tr( "All" ), id++ ); 987 catMenu->insertItem( tr( "All" ), id++ );
988 QStringList categories = m_abView->categories(); 988 QStringList categories = m_abView->categories();
989 categories.append( tr( "Unfiled" ) ); 989 categories.append( tr( "Unfiled" ) );
@@ -995,7 +995,7 @@ void AddressbookWindow::populateCategories()
995 ++id; 995 ++id;
996 } 996 }
997 997
998 998
999 if ( m_abView -> showCategory().isEmpty() ) { 999 if ( m_abView -> showCategory().isEmpty() ) {
1000 slotSetCategory( 3 ); 1000 slotSetCategory( 3 );
1001 } 1001 }
diff --git a/pics/addressbook/configure.png b/pics/addressbook/configure.png
deleted file mode 100644
index dd68320..0000000
--- a/pics/addressbook/configure.png
+++ b/dev/null
Binary files differ