From c0fa26aa3b33c293853bdd7d028ddb0545e33c85 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 31 Mar 2005 11:26:51 +0000 Subject: many fixes --- diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 1a045f3..f8f8b96 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1021,13 +1021,13 @@ { "

B: Edit description (details) of selected item

\n","

B: Editiere Beschreibung (Details) des selektierten Items

\n" }, { "

C: Show current time in agenda view

\n","

C: Zeige aktuelle Zeit in Agenda Ansicht

\n" }, { "

+,- : Zoom in/out agenda | A: Toggle allday agenda height

\n","

+,- : Zoom rein/raus Agenda | A: Wechsle Ganztag Agenda Höhe

\n" }, -{ "

S+ctrl: Add sub-todo | X: Toggle datenavigator

\n","

S+ctrl: Füge Sub-Todo hinzu | X: Zeige/verstecke Datumsnavigator

\n" }, +{ "

S+ctrl: Add sub-todo | X+ctrl: Toggle datenavigator

\n","

S+ctrl: Füge Sub-Todo hinzu | X+ctrl: Zeige/verstecke Datumsnavigator

\n" }, { "

T: Goto today | T+ctrl: New Todo

\n","

T: Gehe zu Heute | T+ctrl: Neues Todo

\n" }, { "

E: Edit selected item | E+ctrl: New Event

\n","

E: Editiere selektiertes Item | E+ctrl: Neuer Termin

\n" }, { "

D: One day view | M: Month view

\n","

D: Ein-Tages Ansicht | M: Monatsansicht

\n" }, { "

Z,Y: Work week view | U: Week view

\n","

Z,Y: Arbeitswochenansicht | U: Wochenansicht

\n" }, { "

V: Todo view | L: Event list view

\n","

V: Todo Ansicht | L: Termin Listen Ansicht

\n" }, -{ "

N: Next days view| W: What's next view\n ","

N: Nächste-Tage Ansicht | W: What's Next Ansicht\n " }, +{ "

X: Next X days view| W: What's next view\n ","

X: Nächste-X-Tage Ansicht | W: What's Next Ansicht\n " }, { "

1-0 (+ctrl): Select filter 1-10 (11-20)

\n","

1-0 (+ctrl): Selektiere Filter 1-10 (11-20)

\n" }, { "

O: Filter On/Off | J: Journal view

\n","

O: Filter An/Aus | J: Journal Ansicht

\n" }, { "

F: Toggle filterview |F+ctrl: Edit filter

\n","

F: Zeige/verstecke Filter Ansicht |F+ctrl: Editiere Filter

\n" }, @@ -1326,6 +1326,18 @@ { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, { "Printout Mode","Druck Modus" }, { "Filter menu icon","Filtermenu Icon" }, +{ "

A+(shift or ctrl): Show occurence of next alarm

\n","

A+(shift oder ctrl): Zeige Zeit bis zum nächsten Alarm

\n" }, +{ "

N: Switch to next view which has a toolbar icon

\n","

N: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat

\n" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, { "","" }, { "","" }, { "","" }, \ No newline at end of file diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index abb3b3b..041effc 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp @@ -184,47 +184,43 @@ QString PhoneNumber::typeLabel( int type ) if (!typeString.isEmpty()) typeString += " "; - if ((type & Cell) == Cell) - typeString += i18n("Mobile"); - else if ((type & Fax) == Fax) + typeString += i18n("Mobile") +" "; + if ((type & Sip) == Sip) + typeString += i18n("SIP")+" "; + if ((type & Car) == Car) + typeString += i18n("Car")+" "; + + if ((type & Fax) == Fax) typeString += i18n("Fax"); else if ((type & Msg) == Msg) typeString += i18n("Messenger"); - else if ((type & Voice) == Voice) { -// add nothing in case of the Voice flag -// typeString += i18n("Voice"); - } else if ((type & Video) == Video) typeString += i18n("Video"); else if ((type & Bbs) == Bbs) typeString += i18n("Mailbox"); else if ((type & Modem) == Modem) typeString += i18n("Modem"); - else if ((type & Car) == Car) - typeString += i18n("Car"); else if ((type & Isdn) == Isdn) typeString += i18n("ISDN"); else if ((type & Pcs) == Pcs) typeString += i18n("PCS"); else if ((type & Pager) == Pager) typeString += i18n("Pager"); - else if ((type & Sip) == Sip) - typeString += i18n("SIP"); - // add the prefered flag - if (!typeString.isEmpty()) - typeString += " "; /* if ((type & Pref) == Pref) typeString += i18n("(p)"); */ //if we still have no match, return "other" - if (typeString.isEmpty()) - return i18n("Other"); - - - return typeString; + if (typeString.isEmpty()) { + if ((type & Voice) == Voice) + return i18n("Voice"); + else + return i18n("Other"); + } + + return typeString.stripWhiteSpace(); } QDataStream &KABC::operator<<( QDataStream &s, const PhoneNumber &phone ) diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp index 0e01b02..e72face 100644 --- a/kaddressbook/emaileditwidget.cpp +++ b/kaddressbook/emaileditwidget.cpp @@ -189,6 +189,7 @@ qDebug("EmailEditDialog::EmailEditDialog has to be changed (lowPrio)"); mEmailListBox->insertStringList( items ); // set default state selectionChanged( -1 ); + mEmailEdit->setFocus(); #ifndef KAB_EMBEDDED KAcceleratorManager::manage( this ); @@ -225,6 +226,7 @@ void EmailEditDialog::add() void EmailEditDialog::edit() { mEmailEdit->setText( mEmailListBox->currentText() ); + mEmailListBox->removeItem( mEmailListBox->currentItem() ); mEmailEdit->setFocus(); } diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index 19bb676..a435959 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -213,7 +213,8 @@ void PhoneEditWidget::edit() if ( dlg.exec() ) { if ( dlg.changed() ) { - mPhoneList = dlg.phoneNumbers(); + KABC::PhoneNumber::List list = dlg.phoneNumbers(); + setPhoneNumbers( list ); updateCombos(); updateLineEdits(); emit modified(); @@ -338,7 +339,10 @@ private: PhoneViewItem::PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ) : QListViewItem( parent ), mPhoneNumber( number ) -{ +{ +#ifdef DESKTOP_VERSION + setRenameEnabled ( 0, true ); +#endif makeText(); } @@ -406,11 +410,28 @@ void PhoneEditDialog::slotAddPhoneNumber() PhoneTypeDialog dlg( tmp, this ); if ( dlg.exec() ) { - KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); - mPhoneNumberList.append( phoneNumber ); - new PhoneViewItem( mListView, phoneNumber ); - - mChanged = true; + QListViewItem* i = mListView->firstChild(); + KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); + bool insert = true; + while ( i ) { + PhoneViewItem* p = ( PhoneViewItem* ) i; + KABC::PhoneNumber pn = p->phoneNumber(); + if ( (pn.type() | KABC::PhoneNumber::Pref) == (phoneNumber.type() | KABC::PhoneNumber::Pref) ) { + if ( p->text(0).isEmpty()) { + p->setPhoneNumber( phoneNumber ); + mPhoneNumberList.remove( pn ); + mPhoneNumberList.append( phoneNumber ); + insert = false; + break; + } + } + i = i->nextSibling(); + } + if ( insert ) { + mPhoneNumberList.append( phoneNumber ); + new PhoneViewItem( mListView, phoneNumber ); + } + mChanged = true; } } @@ -504,6 +525,8 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, } mPreferredBox->setChecked( mPhoneNumber.type() & KABC::PhoneNumber::Pref ); + mNumber->setFocus(); + mNumber->setSelection( 0, 1024); } KABC::PhoneNumber PhoneTypeDialog::phoneNumber() diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 09a0880..d98915b 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1439,19 +1439,21 @@ void MainWindow::keyBindings() QString cap = i18n("KO/Pi Keys + Colors"); QString text = i18n("

KO/Pi key shortcuts:

\n") + i18n("

H: This help dialog | S: Search dialog

\n")+ + i18n("

N: Switch to next view which has a toolbar icon

\n") + + i18n("

A+(shift or ctrl): Show occurence of next alarm

\n") + i18n("

I: Show info for selected event/todo

\n") + i18n("

Space: Toggle fullscreen | P: Date picker

\n")+ i18n("

F: Toggle filterview |F+ctrl: Edit filter

\n")+ i18n("

O: Filter On/Off | J: Journal view

\n")+ i18n("

1-0 (+ctrl): Select filter 1-10 (11-20)

\n")+ - i18n("

N: Next days view| W: What's next view\n ")+ + i18n("

X: Next X days view| W: What's next view\n ")+ i18n("

V: Todo view | L: Event list view

\n")+ i18n("

Z,Y: Work week view | U: Week view

\n")+ i18n("

D: One day view | M: Month view

\n")+ i18n("

K: Week view in Month view syle

\n")+ i18n("

E: Edit selected item | E+ctrl: New Event

\n")+ i18n("

T: Goto today | T+ctrl: New Todo

\n")+ - i18n("

S+ctrl: Add sub-todo | X: Toggle datenavigator

\n")+ + i18n("

S+ctrl: Add sub-todo | X+ctrl: Toggle datenavigator

\n")+ i18n("

+,- : Zoom in/out agenda | A: Toggle allday agenda height

\n")+ i18n("

C: Show current time in agenda view

\n")+ i18n("

B: Edit description (details) of selected item

\n")+ @@ -1900,12 +1902,7 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) mView->viewManager()->showListView(); break; case Qt::Key_N: - if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) - mView->viewManager()->showNextView(); - else { - mView->viewManager()->showNextXView(); - showSelectedDates = true; - } + mView->viewManager()->showNextView(); break; case Qt::Key_V: mView->viewManager()->showTodoView(); @@ -1922,8 +1919,13 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) else mView->toggleFilter(); break; - case Qt::Key_X: - mView->toggleDateNavigatorWidget(); + case Qt::Key_X: + if ( e->state() == Qt::ControlButton ) + mView->toggleDateNavigatorWidget(); + else { + mView->viewManager()->showNextXView(); + showSelectedDates = true; + } break; case Qt::Key_Space: mView->toggleExpand(); -- cgit v0.9.0.2