author | cniehaus <cniehaus> | 2002-11-22 13:23:40 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-11-22 13:23:40 (UTC) |
commit | 2539ce3dc66bfc3702a0366af78f25f7afa23889 (patch) (unidiff) | |
tree | 8274d216c7920aadcbba8a0baf9fc6d845291aaa | |
parent | 8dafc6100114c30a1735de2e34e97ff30b138daa (diff) | |
download | opie-2539ce3dc66bfc3702a0366af78f25f7afa23889.zip opie-2539ce3dc66bfc3702a0366af78f25f7afa23889.tar.gz opie-2539ce3dc66bfc3702a0366af78f25f7afa23889.tar.bz2 |
More i18n-fixes
@@ -333,9 +333,7 @@ void AddressbookWindow::setDocument( con
switch( QMessageBox::information( this, tr ( "Right file type ?" ),
- tr( "The selected File" ) + ( "\n" ) +
- tr ("does not end with \".vcf\" ") + ( "\n" ) +
- tr ( "Do you really want to open it?" ),
+ 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
@@ -809,7 +807,7 @@ void AddressbookWindow::slotWrapAround()
qWarning("Got wrap signal !");
// if ( doNotifyWrapAround )
// QMessageBox::information( this, tr( "End of list" ),
-// tr( "End of list. Wrap around now.. !" ) + "\n" );
+// tr( "End of list. Wrap around now...!" ) + "\n" );
}
@@ -24,10 +24,6 @@
</sizepolicy>
</property>
<property stdset="1">
- <name>caption</name>
- <string>MyDialog1</string>
- </property>
- <property stdset="1">
<name>sizeGripEnabled</name>
<bool>true</bool>
</property>
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 6 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg_base.ui | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index c506e98..58fbccf 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -288,99 +288,97 @@ void AddressbookWindow::slotSetFont( int size ) | |||
288 | if (size > 2 || size < 0) | 288 | if (size > 2 || size < 0) |
289 | size = 1; | 289 | size = 1; |
290 | 290 | ||
291 | m_config.setFontSize( size ); | 291 | m_config.setFontSize( size ); |
292 | 292 | ||
293 | QFont *currentFont; | 293 | QFont *currentFont; |
294 | 294 | ||
295 | switch (size) { | 295 | switch (size) { |
296 | case 0: | 296 | case 0: |
297 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); | 297 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); |
298 | currentFont = new QFont (m_abView->font()); | 298 | currentFont = new QFont (m_abView->font()); |
299 | // abList->resizeRows(currentFont->pixelSize() + 7); :SX | 299 | // abList->resizeRows(currentFont->pixelSize() + 7); :SX |
300 | // abList->resizeRows(); | 300 | // abList->resizeRows(); |
301 | break; | 301 | break; |
302 | case 1: | 302 | case 1: |
303 | m_abView->setFont( *defaultFont ); | 303 | m_abView->setFont( *defaultFont ); |
304 | currentFont = new QFont (m_abView->font()); | 304 | currentFont = new QFont (m_abView->font()); |
305 | // // abList->resizeRows(currentFont->pixelSize() + 7); | 305 | // // abList->resizeRows(currentFont->pixelSize() + 7); |
306 | // abList->resizeRows(); | 306 | // abList->resizeRows(); |
307 | break; | 307 | break; |
308 | case 2: | 308 | case 2: |
309 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); | 309 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); |
310 | currentFont = new QFont (m_abView->font()); | 310 | currentFont = new QFont (m_abView->font()); |
311 | // //abList->resizeRows(currentFont->pixelSize() + 7); | 311 | // //abList->resizeRows(currentFont->pixelSize() + 7); |
312 | // abList->resizeRows(); | 312 | // abList->resizeRows(); |
313 | break; | 313 | break; |
314 | } | 314 | } |
315 | } | 315 | } |
316 | 316 | ||
317 | 317 | ||
318 | 318 | ||
319 | void AddressbookWindow::importvCard() { | 319 | void AddressbookWindow::importvCard() { |
320 | QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); | 320 | QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); |
321 | if(!str.isEmpty() ){ | 321 | if(!str.isEmpty() ){ |
322 | setDocument((const QString&) str ); | 322 | setDocument((const QString&) str ); |
323 | } | 323 | } |
324 | 324 | ||
325 | } | 325 | } |
326 | 326 | ||
327 | void AddressbookWindow::setDocument( const QString &filename ) | 327 | void AddressbookWindow::setDocument( const QString &filename ) |
328 | { | 328 | { |
329 | qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); | 329 | qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); |
330 | 330 | ||
331 | if ( filename.find(".vcf") != int(filename.length()) - 4 ){ | 331 | if ( filename.find(".vcf") != int(filename.length()) - 4 ){ |
332 | 332 | ||
333 | 333 | ||
334 | 334 | ||
335 | switch( QMessageBox::information( this, tr ( "Right file type ?" ), | 335 | switch( QMessageBox::information( this, tr ( "Right file type ?" ), |
336 | tr( "The selected File" ) + ( "\n" ) + | 336 | tr( "The selected file \n does not end with \".vcf\" \n. Do you really want to open it?" ), |
337 | tr ("does not end with \".vcf\" ") + ( "\n" ) + | ||
338 | tr ( "Do you really want to open it?" ), | ||
339 | tr( "&Yes" ), tr( "&No" ), QString::null, | 337 | tr( "&Yes" ), tr( "&No" ), QString::null, |
340 | 0, // Enter == button 0 | 338 | 0, // Enter == button 0 |
341 | 2 ) ) { // Escape == button 2 | 339 | 2 ) ) { // Escape == button 2 |
342 | case 0: | 340 | case 0: |
343 | qWarning("YES clicked"); | 341 | qWarning("YES clicked"); |
344 | break; | 342 | break; |
345 | case 1: | 343 | case 1: |
346 | qWarning("NO clicked"); | 344 | qWarning("NO clicked"); |
347 | return; | 345 | return; |
348 | break; | 346 | break; |
349 | } | 347 | } |
350 | } | 348 | } |
351 | 349 | ||
352 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 350 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
353 | filename ); | 351 | filename ); |
354 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 352 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
355 | OContactAccess::List allList = access->allRecords(); | 353 | OContactAccess::List allList = access->allRecords(); |
356 | 354 | ||
357 | OContactAccess::List::Iterator it; | 355 | OContactAccess::List::Iterator it; |
358 | for ( it = allList.begin(); it != allList.end(); ++it ){ | 356 | for ( it = allList.begin(); it != allList.end(); ++it ){ |
359 | m_abView->addEntry( *it ); | 357 | m_abView->addEntry( *it ); |
360 | } | 358 | } |
361 | 359 | ||
362 | delete access; | 360 | delete access; |
363 | } | 361 | } |
364 | 362 | ||
365 | void AddressbookWindow::resizeEvent( QResizeEvent *e ) | 363 | void AddressbookWindow::resizeEvent( QResizeEvent *e ) |
366 | { | 364 | { |
367 | QMainWindow::resizeEvent( e ); | 365 | QMainWindow::resizeEvent( e ); |
368 | 366 | ||
369 | 367 | ||
370 | } | 368 | } |
371 | 369 | ||
372 | AddressbookWindow::~AddressbookWindow() | 370 | AddressbookWindow::~AddressbookWindow() |
373 | { | 371 | { |
374 | ToolBarDock dock; | 372 | ToolBarDock dock; |
375 | int dummy; | 373 | int dummy; |
376 | bool bDummy; | 374 | bool bDummy; |
377 | getLocation ( listTools, dock, dummy, bDummy, dummy ); | 375 | getLocation ( listTools, dock, dummy, bDummy, dummy ); |
378 | m_config.setToolBarDock( dock ); | 376 | m_config.setToolBarDock( dock ); |
379 | m_config.save(); | 377 | m_config.save(); |
380 | } | 378 | } |
381 | 379 | ||
382 | void AddressbookWindow::slotUpdateToolbar() | 380 | void AddressbookWindow::slotUpdateToolbar() |
383 | { | 381 | { |
384 | OContact ce = m_abView->currentEntry(); | 382 | OContact ce = m_abView->currentEntry(); |
385 | actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); | 383 | actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); |
386 | } | 384 | } |
@@ -764,97 +762,97 @@ void AddressbookWindow::closeEvent( QCloseEvent *e ) | |||
764 | e->accept(); | 762 | e->accept(); |
765 | else | 763 | else |
766 | e->ignore(); | 764 | e->ignore(); |
767 | } | 765 | } |
768 | 766 | ||
769 | /* | 767 | /* |
770 | Returns TRUE if it is OK to exit | 768 | Returns TRUE if it is OK to exit |
771 | */ | 769 | */ |
772 | 770 | ||
773 | bool AddressbookWindow::save() | 771 | bool AddressbookWindow::save() |
774 | { | 772 | { |
775 | if ( !m_abView->save() ) { | 773 | if ( !m_abView->save() ) { |
776 | if ( QMessageBox::critical( 0, tr( "Out of space" ), | 774 | if ( QMessageBox::critical( 0, tr( "Out of space" ), |
777 | tr("Unable to save information.\n" | 775 | tr("Unable to save information.\n" |
778 | "Free up some space\n" | 776 | "Free up some space\n" |
779 | "and try again.\n" | 777 | "and try again.\n" |
780 | "\nQuit anyway?"), | 778 | "\nQuit anyway?"), |
781 | QMessageBox::Yes|QMessageBox::Escape, | 779 | QMessageBox::Yes|QMessageBox::Escape, |
782 | QMessageBox::No|QMessageBox::Default ) | 780 | QMessageBox::No|QMessageBox::Default ) |
783 | != QMessageBox::No ) | 781 | != QMessageBox::No ) |
784 | return TRUE; | 782 | return TRUE; |
785 | else | 783 | else |
786 | return FALSE; | 784 | return FALSE; |
787 | } | 785 | } |
788 | return TRUE; | 786 | return TRUE; |
789 | } | 787 | } |
790 | 788 | ||
791 | #ifdef __DEBUG_RELEASE | 789 | #ifdef __DEBUG_RELEASE |
792 | void AddressbookWindow::slotSave() | 790 | void AddressbookWindow::slotSave() |
793 | { | 791 | { |
794 | save(); | 792 | save(); |
795 | } | 793 | } |
796 | #endif | 794 | #endif |
797 | 795 | ||
798 | 796 | ||
799 | void AddressbookWindow::slotNotFound() | 797 | void AddressbookWindow::slotNotFound() |
800 | { | 798 | { |
801 | qWarning("Got notfound signal !"); | 799 | qWarning("Got notfound signal !"); |
802 | QMessageBox::information( this, tr( "Not Found" ), | 800 | QMessageBox::information( this, tr( "Not Found" ), |
803 | tr( "Unable to find a contact for this \n search pattern!" ) ); | 801 | tr( "Unable to find a contact for this \n search pattern!" ) ); |
804 | 802 | ||
805 | 803 | ||
806 | } | 804 | } |
807 | void AddressbookWindow::slotWrapAround() | 805 | void AddressbookWindow::slotWrapAround() |
808 | { | 806 | { |
809 | qWarning("Got wrap signal !"); | 807 | qWarning("Got wrap signal !"); |
810 | // if ( doNotifyWrapAround ) | 808 | // if ( doNotifyWrapAround ) |
811 | // QMessageBox::information( this, tr( "End of list" ), | 809 | // QMessageBox::information( this, tr( "End of list" ), |
812 | // tr( "End of list. Wrap around now.. !" ) + "\n" ); | 810 | // tr( "End of list. Wrap around now...!" ) + "\n" ); |
813 | 811 | ||
814 | } | 812 | } |
815 | 813 | ||
816 | void AddressbookWindow::slotSetCategory( int c ) | 814 | void AddressbookWindow::slotSetCategory( int c ) |
817 | { | 815 | { |
818 | qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); | 816 | qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); |
819 | 817 | ||
820 | QString cat, book; | 818 | QString cat, book; |
821 | AbView::Views view = AbView::TableView; | 819 | AbView::Views view = AbView::TableView; |
822 | 820 | ||
823 | if ( c <= 0 ) | 821 | if ( c <= 0 ) |
824 | return; | 822 | return; |
825 | 823 | ||
826 | // Checkmark Book Menu Item Selected | 824 | // Checkmark Book Menu Item Selected |
827 | if ( c < 3 ) | 825 | if ( c < 3 ) |
828 | for ( unsigned int i = 1; i < 3; i++ ) | 826 | for ( unsigned int i = 1; i < 3; i++ ) |
829 | catMenu->setItemChecked( i, c == (int)i ); | 827 | catMenu->setItemChecked( i, c == (int)i ); |
830 | // Checkmark Category Menu Item Selected | 828 | // Checkmark Category Menu Item Selected |
831 | else | 829 | else |
832 | for ( unsigned int i = 3; i < catMenu->count(); i++ ) | 830 | for ( unsigned int i = 3; i < catMenu->count(); i++ ) |
833 | catMenu->setItemChecked( i, c == (int)i ); | 831 | catMenu->setItemChecked( i, c == (int)i ); |
834 | 832 | ||
835 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) { | 833 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) { |
836 | if (catMenu->isItemChecked( i )) { | 834 | if (catMenu->isItemChecked( i )) { |
837 | if ( i == 1 ){ // default List view | 835 | if ( i == 1 ){ // default List view |
838 | book = QString::null; | 836 | book = QString::null; |
839 | view = AbView::TableView; | 837 | view = AbView::TableView; |
840 | }else if ( i == 2 ){ | 838 | }else if ( i == 2 ){ |
841 | book = tr( "Cards" ); | 839 | book = tr( "Cards" ); |
842 | view = AbView::CardView; | 840 | view = AbView::CardView; |
843 | // }else if ( i == 3 ){ | 841 | // }else if ( i == 3 ){ |
844 | // book = tr( "Personal" ); | 842 | // book = tr( "Personal" ); |
845 | // view = AbView:: PersonalView; | 843 | // view = AbView:: PersonalView; |
846 | }else if ( i == 3 ){ // default All Categories | 844 | }else if ( i == 3 ){ // default All Categories |
847 | cat = QString::null; | 845 | cat = QString::null; |
848 | }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled | 846 | }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled |
849 | cat = "Unfiled"; | 847 | cat = "Unfiled"; |
850 | qWarning ("Unfiled selected!!!"); | 848 | qWarning ("Unfiled selected!!!"); |
851 | }else{ | 849 | }else{ |
852 | cat = m_abView->categories()[i - 4]; | 850 | cat = m_abView->categories()[i - 4]; |
853 | } | 851 | } |
854 | } | 852 | } |
855 | } | 853 | } |
856 | 854 | ||
857 | slotViewSwitched( view ); | 855 | slotViewSwitched( view ); |
858 | 856 | ||
859 | m_abView -> setShowByCategory( view, cat ); | 857 | m_abView -> setShowByCategory( view, cat ); |
860 | 858 | ||
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui index 66414f5..408bfa6 100644 --- a/core/pim/addressbook/configdlg_base.ui +++ b/core/pim/addressbook/configdlg_base.ui | |||
@@ -1,78 +1,74 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>ConfigDlg_Base</class> | 2 | <class>ConfigDlg_Base</class> |
3 | <author>Stefan Eilers</author> | 3 | <author>Stefan Eilers</author> |
4 | <widget> | 4 | <widget> |
5 | <class>QDialog</class> | 5 | <class>QDialog</class> |
6 | <property stdset="1"> | 6 | <property stdset="1"> |
7 | <name>name</name> | 7 | <name>name</name> |
8 | <cstring>Configuration</cstring> | 8 | <cstring>Configuration</cstring> |
9 | </property> | 9 | </property> |
10 | <property stdset="1"> | 10 | <property stdset="1"> |
11 | <name>geometry</name> | 11 | <name>geometry</name> |
12 | <rect> | 12 | <rect> |
13 | <x>0</x> | 13 | <x>0</x> |
14 | <y>0</y> | 14 | <y>0</y> |
15 | <width>276</width> | 15 | <width>276</width> |
16 | <height>327</height> | 16 | <height>327</height> |
17 | </rect> | 17 | </rect> |
18 | </property> | 18 | </property> |
19 | <property stdset="1"> | 19 | <property stdset="1"> |
20 | <name>sizePolicy</name> | 20 | <name>sizePolicy</name> |
21 | <sizepolicy> | 21 | <sizepolicy> |
22 | <hsizetype>5</hsizetype> | 22 | <hsizetype>5</hsizetype> |
23 | <vsizetype>5</vsizetype> | 23 | <vsizetype>5</vsizetype> |
24 | </sizepolicy> | 24 | </sizepolicy> |
25 | </property> | 25 | </property> |
26 | <property stdset="1"> | 26 | <property stdset="1"> |
27 | <name>caption</name> | ||
28 | <string>MyDialog1</string> | ||
29 | </property> | ||
30 | <property stdset="1"> | ||
31 | <name>sizeGripEnabled</name> | 27 | <name>sizeGripEnabled</name> |
32 | <bool>true</bool> | 28 | <bool>true</bool> |
33 | </property> | 29 | </property> |
34 | <property> | 30 | <property> |
35 | <name>layoutMargin</name> | 31 | <name>layoutMargin</name> |
36 | </property> | 32 | </property> |
37 | <vbox> | 33 | <vbox> |
38 | <property stdset="1"> | 34 | <property stdset="1"> |
39 | <name>margin</name> | 35 | <name>margin</name> |
40 | <number>1</number> | 36 | <number>1</number> |
41 | </property> | 37 | </property> |
42 | <property stdset="1"> | 38 | <property stdset="1"> |
43 | <name>spacing</name> | 39 | <name>spacing</name> |
44 | <number>6</number> | 40 | <number>6</number> |
45 | </property> | 41 | </property> |
46 | <widget> | 42 | <widget> |
47 | <class>QTabWidget</class> | 43 | <class>QTabWidget</class> |
48 | <property stdset="1"> | 44 | <property stdset="1"> |
49 | <name>name</name> | 45 | <name>name</name> |
50 | <cstring>configDlg_base</cstring> | 46 | <cstring>configDlg_base</cstring> |
51 | </property> | 47 | </property> |
52 | <property stdset="1"> | 48 | <property stdset="1"> |
53 | <name>sizePolicy</name> | 49 | <name>sizePolicy</name> |
54 | <sizepolicy> | 50 | <sizepolicy> |
55 | <hsizetype>7</hsizetype> | 51 | <hsizetype>7</hsizetype> |
56 | <vsizetype>7</vsizetype> | 52 | <vsizetype>7</vsizetype> |
57 | </sizepolicy> | 53 | </sizepolicy> |
58 | </property> | 54 | </property> |
59 | <property> | 55 | <property> |
60 | <name>layoutMargin</name> | 56 | <name>layoutMargin</name> |
61 | </property> | 57 | </property> |
62 | <property> | 58 | <property> |
63 | <name>layoutSpacing</name> | 59 | <name>layoutSpacing</name> |
64 | </property> | 60 | </property> |
65 | <widget> | 61 | <widget> |
66 | <class>QWidget</class> | 62 | <class>QWidget</class> |
67 | <property stdset="1"> | 63 | <property stdset="1"> |
68 | <name>name</name> | 64 | <name>name</name> |
69 | <cstring>Widget5</cstring> | 65 | <cstring>Widget5</cstring> |
70 | </property> | 66 | </property> |
71 | <attribute> | 67 | <attribute> |
72 | <name>title</name> | 68 | <name>title</name> |
73 | <string>Misc</string> | 69 | <string>Misc</string> |
74 | </attribute> | 70 | </attribute> |
75 | <vbox> | 71 | <vbox> |
76 | <property stdset="1"> | 72 | <property stdset="1"> |
77 | <name>margin</name> | 73 | <name>margin</name> |
78 | <number>5</number> | 74 | <number>5</number> |