summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-11-22 13:01:03 (UTC)
committer cniehaus <cniehaus>2002-11-22 13:01:03 (UTC)
commit8dafc6100114c30a1735de2e34e97ff30b138daa (patch) (unidiff)
treede33f270d176a235c36350aa97ef52bf62786ce3
parent28f41e51ab748a0525385e64dab1423f366b317c (diff)
downloadopie-8dafc6100114c30a1735de2e34e97ff30b138daa.zip
opie-8dafc6100114c30a1735de2e34e97ff30b138daa.tar.gz
opie-8dafc6100114c30a1735de2e34e97ff30b138daa.tar.bz2
i18n-bug. With the other way you can't translate in all languages
@@ -800,8 +800,7 @@ void AddressbookWindow::slotNotFound() { qWarning("Got notfound signal !"); QMessageBox::information( this, tr( "Not Found" ), - tr( "Unable to find a contact for this" ) + "\n" - + tr( "search pattern !" ) ); + tr( "Unable to find a contact for this \n search pattern!" ) ); }
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index e5addec..c506e98 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -739,130 +739,129 @@ void AddressbookWindow::reload()
739 m_abView->clear(); 739 m_abView->clear();
740 m_abView->reload(); 740 m_abView->reload();
741} 741}
742 742
743void AddressbookWindow::flush() 743void AddressbookWindow::flush()
744{ 744{
745 syncing = TRUE; 745 syncing = TRUE;
746 m_abView->save(); 746 m_abView->save();
747} 747}
748 748
749 749
750void AddressbookWindow::closeEvent( QCloseEvent *e ) 750void AddressbookWindow::closeEvent( QCloseEvent *e )
751{ 751{
752 752
753 if(syncing) { 753 if(syncing) {
754 /* shouldn't we save, I hear you say? well its already been set 754 /* shouldn't we save, I hear you say? well its already been set
755 so that an edit can not occur during a sync, and we flushed 755 so that an edit can not occur during a sync, and we flushed
756 at the start of the sync, so there is no need to save 756 at the start of the sync, so there is no need to save
757 Saving however itself would cause problems. */ 757 Saving however itself would cause problems. */
758 e->accept(); 758 e->accept();
759 return; 759 return;
760 } 760 }
761 //################## shouldn't always save 761 //################## shouldn't always save
762 // True, but the database handles this automatically ! (se) 762 // True, but the database handles this automatically ! (se)
763 if ( save() ) 763 if ( save() )
764 e->accept(); 764 e->accept();
765 else 765 else
766 e->ignore(); 766 e->ignore();
767} 767}
768 768
769/* 769/*
770 Returns TRUE if it is OK to exit 770 Returns TRUE if it is OK to exit
771*/ 771*/
772 772
773bool AddressbookWindow::save() 773bool AddressbookWindow::save()
774{ 774{
775 if ( !m_abView->save() ) { 775 if ( !m_abView->save() ) {
776 if ( QMessageBox::critical( 0, tr( "Out of space" ), 776 if ( QMessageBox::critical( 0, tr( "Out of space" ),
777 tr("Unable to save information.\n" 777 tr("Unable to save information.\n"
778 "Free up some space\n" 778 "Free up some space\n"
779 "and try again.\n" 779 "and try again.\n"
780 "\nQuit anyway?"), 780 "\nQuit anyway?"),
781 QMessageBox::Yes|QMessageBox::Escape, 781 QMessageBox::Yes|QMessageBox::Escape,
782 QMessageBox::No|QMessageBox::Default ) 782 QMessageBox::No|QMessageBox::Default )
783 != QMessageBox::No ) 783 != QMessageBox::No )
784 return TRUE; 784 return TRUE;
785 else 785 else
786 return FALSE; 786 return FALSE;
787 } 787 }
788 return TRUE; 788 return TRUE;
789} 789}
790 790
791#ifdef __DEBUG_RELEASE 791#ifdef __DEBUG_RELEASE
792void AddressbookWindow::slotSave() 792void AddressbookWindow::slotSave()
793{ 793{
794 save(); 794 save();
795} 795}
796#endif 796#endif
797 797
798 798
799void AddressbookWindow::slotNotFound() 799void AddressbookWindow::slotNotFound()
800{ 800{
801 qWarning("Got notfound signal !"); 801 qWarning("Got notfound signal !");
802 QMessageBox::information( this, tr( "Not Found" ), 802 QMessageBox::information( this, tr( "Not Found" ),
803 tr( "Unable to find a contact for this" ) + "\n" 803 tr( "Unable to find a contact for this \n search pattern!" ) );
804 + tr( "search pattern !" ) );
805 804
806 805
807} 806}
808void AddressbookWindow::slotWrapAround() 807void AddressbookWindow::slotWrapAround()
809{ 808{
810 qWarning("Got wrap signal !"); 809 qWarning("Got wrap signal !");
811 // if ( doNotifyWrapAround ) 810 // if ( doNotifyWrapAround )
812 // QMessageBox::information( this, tr( "End of list" ), 811 // QMessageBox::information( this, tr( "End of list" ),
813 // tr( "End of list. Wrap around now.. !" ) + "\n" ); 812 // tr( "End of list. Wrap around now.. !" ) + "\n" );
814 813
815} 814}
816 815
817void AddressbookWindow::slotSetCategory( int c ) 816void AddressbookWindow::slotSetCategory( int c )
818{ 817{
819 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); 818 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() );
820 819
821 QString cat, book; 820 QString cat, book;
822 AbView::Views view = AbView::TableView; 821 AbView::Views view = AbView::TableView;
823 822
824 if ( c <= 0 ) 823 if ( c <= 0 )
825 return; 824 return;
826 825
827 // Checkmark Book Menu Item Selected 826 // Checkmark Book Menu Item Selected
828 if ( c < 3 ) 827 if ( c < 3 )
829 for ( unsigned int i = 1; i < 3; i++ ) 828 for ( unsigned int i = 1; i < 3; i++ )
830 catMenu->setItemChecked( i, c == (int)i ); 829 catMenu->setItemChecked( i, c == (int)i );
831 // Checkmark Category Menu Item Selected 830 // Checkmark Category Menu Item Selected
832 else 831 else
833 for ( unsigned int i = 3; i < catMenu->count(); i++ ) 832 for ( unsigned int i = 3; i < catMenu->count(); i++ )
834 catMenu->setItemChecked( i, c == (int)i ); 833 catMenu->setItemChecked( i, c == (int)i );
835 834
836 for ( unsigned int i = 1; i < catMenu->count(); i++ ) { 835 for ( unsigned int i = 1; i < catMenu->count(); i++ ) {
837 if (catMenu->isItemChecked( i )) { 836 if (catMenu->isItemChecked( i )) {
838 if ( i == 1 ){ // default List view 837 if ( i == 1 ){ // default List view
839 book = QString::null; 838 book = QString::null;
840 view = AbView::TableView; 839 view = AbView::TableView;
841 }else if ( i == 2 ){ 840 }else if ( i == 2 ){
842 book = tr( "Cards" ); 841 book = tr( "Cards" );
843 view = AbView::CardView; 842 view = AbView::CardView;
844 // }else if ( i == 3 ){ 843 // }else if ( i == 3 ){
845 // book = tr( "Personal" ); 844 // book = tr( "Personal" );
846 // view = AbView:: PersonalView; 845 // view = AbView:: PersonalView;
847 }else if ( i == 3 ){ // default All Categories 846 }else if ( i == 3 ){ // default All Categories
848 cat = QString::null; 847 cat = QString::null;
849 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled 848 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled
850 cat = "Unfiled"; 849 cat = "Unfiled";
851 qWarning ("Unfiled selected!!!"); 850 qWarning ("Unfiled selected!!!");
852 }else{ 851 }else{
853 cat = m_abView->categories()[i - 4]; 852 cat = m_abView->categories()[i - 4];
854 } 853 }
855 } 854 }
856 } 855 }
857 856
858 slotViewSwitched( view ); 857 slotViewSwitched( view );
859 858
860 m_abView -> setShowByCategory( view, cat ); 859 m_abView -> setShowByCategory( view, cat );
861 860
862 if ( book.isEmpty() ) 861 if ( book.isEmpty() )
863 book = "List"; 862 book = "List";
864 if ( cat.isEmpty() ) 863 if ( cat.isEmpty() )
865 cat = "All"; 864 cat = "All";
866 865
867 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); 866 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) );
868} 867}