author | cniehaus <cniehaus> | 2002-12-13 16:17:10 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-12-13 16:17:10 (UTC) |
commit | 33513c771164337da46c65f379c98b06adb6f704 (patch) (side-by-side diff) | |
tree | 425faf58b3921eabf359bf9cbeaf6d2f03aa7708 | |
parent | 841d22f7678efa02bb73476e7f5214e4323ef260 (diff) | |
download | opie-33513c771164337da46c65f379c98b06adb6f704.zip opie-33513c771164337da46c65f379c98b06adb6f704.tar.gz opie-33513c771164337da46c65f379c98b06adb6f704.tar.bz2 |
i18n-fixes
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index a1ce5a0..5ce90a9 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -222,195 +222,195 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, // Create Views listContainer = new QWidget( this ); QVBoxLayout *vb = new QVBoxLayout( listContainer ); m_abView = new AbView( listContainer, m_config.orderList() ); vb->addWidget( m_abView ); // abList->setHScrollBarMode( QScrollView::AlwaysOff ); connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), this, SLOT( slotViewSwitched( int ) ) ); QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); m_abView->load(); // Letter Picker pLabel = new LetterPicker( listContainer ); connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); vb->addWidget( pLabel ); // Category Menu catMenu = new QPopupMenu( this ); catMenu->setCheckable( TRUE ); connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); populateCategories(); mbList->insertItem( tr("View"), catMenu ); defaultFont = new QFont( m_abView->font() ); slotSetFont(m_config.fontSize()); m_curFontSize = m_config.fontSize(); setCentralWidget(listContainer); // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); isLoading = false; } void AddressbookWindow::slotConfig() { ConfigDlg* dlg = new ConfigDlg( this, "Config" ); dlg -> setConfig( m_config ); dlg -> showMaximized(); if ( dlg -> exec() ) { - qWarning ("Config Dialog accepted !"); + qWarning ("Config Dialog accepted!"); m_config = dlg -> getConfig(); if ( m_curFontSize != m_config.fontSize() ){ qWarning("Font was changed!"); m_curFontSize = m_config.fontSize(); emit slotSetFont( m_curFontSize ); } m_abView -> setListOrder( m_config.orderList() ); } delete dlg; } void AddressbookWindow::slotSetFont( int size ) { qWarning("void AddressbookWindow::slotSetFont( %d )", size); if (size > 2 || size < 0) size = 1; m_config.setFontSize( size ); QFont *currentFont; switch (size) { case 0: m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); currentFont = new QFont (m_abView->font()); // abList->resizeRows(currentFont->pixelSize() + 7); :SX // abList->resizeRows(); break; case 1: m_abView->setFont( *defaultFont ); currentFont = new QFont (m_abView->font()); // // abList->resizeRows(currentFont->pixelSize() + 7); // abList->resizeRows(); break; case 2: m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); currentFont = new QFont (m_abView->font()); // //abList->resizeRows(currentFont->pixelSize() + 7); // abList->resizeRows(); break; } } void AddressbookWindow::importvCard() { QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); if(!str.isEmpty() ){ setDocument((const QString&) str ); } } void AddressbookWindow::setDocument( const QString &filename ) { qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); if ( filename.find(".vcf") != int(filename.length()) - 4 ){ switch( QMessageBox::information( this, tr ( "Right file type ?" ), tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ), tr( "&Yes" ), tr( "&No" ), QString::null, 0, // Enter == button 0 2 ) ) { // Escape == button 2 case 0: qWarning("YES clicked"); break; case 1: qWarning("NO clicked"); return; break; } } OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, filename ); OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); OContactAccess::List allList = access->allRecords(); qWarning( "Found number of contacts in File: %d", allList.count() ); if ( !allList.count() ) { QMessageBox::information( this, "Import VCard", "It was impossible to import the VCard.\n" - "The VCard may be corrupted !" ); + "The VCard may be corrupted!" ); } bool doAsk = true; OContactAccess::List::Iterator it; for ( it = allList.begin(); it != allList.end(); ++it ){ qWarning("Adding Contact from: %s", (*it).fullName().latin1() ); if ( doAsk ){ - switch( QMessageBox::information( this, tr ( "Add Contact ?" ), - tr( "Do you really want add contact for \n%1 ?" ) + switch( QMessageBox::information( this, tr ( "Add Contact?" ), + tr( "Do you really want add contact for \n%1?" ) .arg( (*it).fullName().latin1() ), tr( "&Yes" ), tr( "&No" ), tr( "&AllYes"), 0, // Enter == button 0 2 ) ) { // Escape == button 2 case 0: qWarning("YES clicked"); m_abView->addEntry( *it ); break; case 1: qWarning("NO clicked"); break; case 2: qWarning("YesAll clicked"); doAsk = false; break; } }else m_abView->addEntry( *it ); } delete access; } void AddressbookWindow::resizeEvent( QResizeEvent *e ) { QMainWindow::resizeEvent( e ); } AddressbookWindow::~AddressbookWindow() { ToolBarDock dock; int dummy; bool bDummy; getLocation ( listTools, dock, dummy, bDummy, dummy ); m_config.setToolBarDock( dock ); m_config.save(); } void AddressbookWindow::slotUpdateToolbar() { OContact ce = m_abView->currentEntry(); actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); } void AddressbookWindow::slotListNew() @@ -785,105 +785,105 @@ void AddressbookWindow::closeEvent( QCloseEvent *e ) if(syncing) { /* shouldn't we save, I hear you say? well its already been set so that an edit can not occur during a sync, and we flushed at the start of the sync, so there is no need to save Saving however itself would cause problems. */ e->accept(); return; } //################## shouldn't always save // True, but the database handles this automatically ! (se) if ( save() ) e->accept(); else e->ignore(); } /* Returns TRUE if it is OK to exit */ bool AddressbookWindow::save() { if ( !m_abView->save() ) { if ( QMessageBox::critical( 0, tr( "Out of space" ), tr("Unable to save information.\n" "Free up some space\n" "and try again.\n" "\nQuit anyway?"), QMessageBox::Yes|QMessageBox::Escape, QMessageBox::No|QMessageBox::Default ) != QMessageBox::No ) return TRUE; else return FALSE; } return TRUE; } #ifdef __DEBUG_RELEASE void AddressbookWindow::slotSave() { save(); } #endif void AddressbookWindow::slotNotFound() { - qWarning("Got notfound signal !"); + qWarning("Got notfound signal!"); QMessageBox::information( this, tr( "Not Found" ), tr( "Unable to find a contact for this \n search pattern!" ) ); } void AddressbookWindow::slotWrapAround() { - qWarning("Got wrap signal !"); + qWarning("Got wrap signal!"); // if ( doNotifyWrapAround ) // QMessageBox::information( this, tr( "End of list" ), // tr( "End of list. Wrap around now...!" ) + "\n" ); } void AddressbookWindow::slotSetCategory( int c ) { qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); QString cat, book; AbView::Views view = AbView::TableView; if ( c <= 0 ) return; // Switch view if ( c < 3 ) for ( unsigned int i = 1; i < 3; i++ ){ if ( catMenu ) catMenu->setItemChecked( i, c == (int)i ); } else // Checkmark Category Menu Item Selected for ( unsigned int i = 3; i < catMenu->count(); i++ ) catMenu->setItemChecked( i, c == (int)i ); // Now switch to the selected category for ( unsigned int i = 1; i < catMenu->count(); i++ ) { if (catMenu->isItemChecked( i )) { if ( i == 1 ){ // default List view book = QString::null; view = AbView::TableView; }else if ( i == 2 ){ book = tr( "Cards" ); 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!!!"); }else{ cat = m_abView->categories()[i - 4]; } } |