summaryrefslogtreecommitdiff
authoreilers <eilers>2003-02-24 09:33:19 (UTC)
committer eilers <eilers>2003-02-24 09:33:19 (UTC)
commit6696e7855b81581d964db64dc7b886c3f58d94ea (patch) (side-by-side diff)
tree504994d669cb119dda5e2c55bc5bb92b7afdff17
parentd5746c625ebf540711179ef01a7bb99bc3b2c3d6 (diff)
downloadopie-6696e7855b81581d964db64dc7b886c3f58d94ea.zip
opie-6696e7855b81581d964db64dc7b886c3f58d94ea.tar.gz
opie-6696e7855b81581d964db64dc7b886c3f58d94ea.tar.bz2
Change default settings of combos for contacteditor
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO1
-rw-r--r--core/pim/addressbook/contacteditor.cpp8
-rw-r--r--core/pim/addressbook/version.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index 906b462..719b720 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -1,118 +1,119 @@
Stuff todo until OPIE 1.0 :
===========================
Feature requests:
-----------------
- Dial by mobile phone by tapping the number..
(Maybe using gsmtool. And we may
add a library class for this)
- dial with dtmfdial in case it's installed and there's no mobile
- 3rd column for 2. Contact
- Implementing additional Views (Phonebook, ...)
- Birthday & Anniversary Reminder
- Beaming of multiple contacts (current list/ by search or by category)
- Configure the letter-picker: lastname/fullname search
- User center of the joypad to switch back from card to listview !
- Cursor-UP/Down: Should additionally scroll cardview if it is too large
(behaviour should be selectable by configuration)
Known Bugs:
-----------
- Default Email-button: A lot of problems:
If on second tab: The combo chooser is on the top left of the screen ! :(
- Default Email-Button: Sometimes not hiding the textfields completely
Bugs but not in addressbook:
-----------------------------
- VCARD: If umlaut (äöüß) in address, the parser gets confused..
- Exporting and reimporting of Jobtitle was reported to fail (Could not reproduce this ! (se))
Urgent:
--------
ContactEditor:
- Contact-Editor is temporarely reenabled. Wait for replacement.
- Redesign of Contacteditor
- Category is on the wrong position after changing to personal and back to normal
( Temporarily workaround: Category is never deactivated.. :S )
+- Fix handling of 3 Firstnames
Important:
----------
- If new contact is added (contacteditor closed): focus (table, card) to
this entry !
- After search (Started with Return): KeyFocus should be on Tabelle
- "What's this" should be added (Deleyed after Feature Freeze)
Less important:
---------------
- Reload if contacts were changed externally
- The picker (alphabetical sort widget) should be
placed verticaly or horizontally (configurable)
- Find a smart solution for activating/deactivating the "send email" event
Should be Fixed (not absolute sure, need further validation):
-------------------------------------------------------------
Fixed/Ready:
-------
- Syncing: abtable not reloaded after sync.
- Find widget should be replaced by something like
qpdf has.
- Adding a configuration dialog
- Picker: Activated letter schould be more visible
- Advanced handling of cursor keys (search..)
- Mail-Icon is missing
- Use opie-mail insted of qt-mail if possible.
- Font menu is invisible using german translation
- Personal contact editor: Disable categories
- "Nonenglish" translation bug has to be fixed.
- contacteditor: Birthday, annyversary, ... : Use Dateselector
- The names of the countries are sorted by there english names, only..
Even if they are translated.. :S
- Cursor keys should work in detail-view (ablabel)
-> Ablabel should be removed and Abtable should be increased with
different views (as started by darwin zins)..
- Use advanced database functions in abtable to decrease
memory footprint and to make everything more easy !
(abtable should store Iterator for selected Category)
- Abtable: Configure Contact column (internally already available,
need configuration)
- Select of primary contact (see #274 on mantis)
- Category-select does not work completely: "Unfiled" is always in listview ..
- Return from Contacteditor: Category resettet to all
- Personal Details not working
- If category changed, the letterpicker should be resetted
- There should be some icons for List and Cardview
- If in Cardview and a category change removes all entries:
There are already entries in Cardview after up/down
- Personal Details: Anniversary zeigt Fantasie-Werte
- Unfiled shown just in Category "All" and "Unfiled".
- After finising search and after Edit: Clear Picker
- After Edit: Table position back to edited entry.
- Optimize Table Update...
- Change MyDialog to Config
- Store position and state of toolbar
- Searchwidget closed: Selected user is jumping
- Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist)
zu lange..
- VCARD: Import of Anniversary does not work correctly (currently disabled)
- Name order selected in "contacteditor" not used in list view.
- OK-Key does not switch from Detailview (ablable) to Listview
- Receiving of beams should open a dialog
- Fix start of opie-mail
- Implement Button Pics
- Add a dialog to accept and optionally edit received contacts by IRDA.
- Language not English (tested with german opie-translation):
1. Configure nicht übersetzt (alles leer).
2. Contacteditor nur teilweise übersetzt.
3. Kategorie-Picker geht nicht.
- Plugin for Today for Birthdays and Anniversaries
- Implement a picker/combo for the default email.
- Overview window cleanup needed..
- Store last settings of combo-boxes
- Personal and Business Web-page is not editable
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 97573af..b60f2dd 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -1302,388 +1302,388 @@ void ContactEditor::setEntry( const OContact &entry ) {
initializing = true;
cleanupFields();
ent = entry;
emails = QStringList(ent.emailList());
defaultEmail = ent.defaultEmail();
if (defaultEmail.isEmpty()) defaultEmail = emails[0];
qDebug("default email=%s",defaultEmail.latin1());
useFullName = false;
txtFirstName->setText( ent.firstName() );
txtMiddleName->setText( ent.middleName() );
txtLastName->setText( ent.lastName() );
txtSuffix->setText( ent.suffix() );
QString *tmpString = new QString;
*tmpString = ent.firstName() + " " + ent.middleName() +
+ " " + ent.lastName() + " " + ent.suffix();
txtFullName->setText( tmpString->simplifyWhiteSpace() );
cmbFileAs->setEditText( ent.fileAs() );
// if (hasTitle)
txtJobTitle->setText( ent.jobTitle() );
// if (hasCompany)
txtOrganization->setText( ent.company() );
// if (hasNotes)
txtNote->setText( ent.notes() );
// if (hasStreet) {
slHomeAddress[0] = ent.homeStreet();
slBusinessAddress[0] = ent.businessStreet();
// }
// if (hasCity) {
slHomeAddress[3] = ent.homeCity();
slBusinessAddress[3] = ent.businessCity();
//}
//if (hasState) {
slHomeAddress[4] = ent.homeState();
slBusinessAddress[4] = ent.businessState();
//}
//if (hasZip) {
slHomeAddress[5] = ent.homeZip();
slBusinessAddress[5] = ent.businessZip();
//}
//if (hasCountry) {
slHomeAddress[6] = ent.homeCountry();
slBusinessAddress[6] = ent.businessCountry();
//}
QStringList::ConstIterator it;
QListIterator<QLineEdit> itLE( listValue );
for ( it = slDynamicEntries.begin(); itLE.current()/* != slDynamicEntries.end()*/; ++it, ++itLE) {
qWarning(" Filling dynamic Field: %s", (*it).latin1() );
if ( *it == "Department" )
(*itLE)->setText( ent.department() );
if ( *it == "Company" )
(*itLE)->setText( ent.company() );
if ( *it == "Office" )
(*itLE)->setText( ent.office() );
if ( *it == "Profession" )
(*itLE)->setText( ent.profession() );
if ( *it == "Assistant" )
(*itLE)->setText( ent.assistant() );
if ( *it == "Manager" )
(*itLE)->setText( ent.manager() );
if ( *it == "Spouse" )
(*itLE)->setText( ent.spouse() );
if ( *it == "Nickname" ){
qWarning("**** Nichname: %s", ent.nickname().latin1() );
(*itLE)->setText( ent.nickname() );
}
if ( *it == "Children" )
(*itLE)->setText( ent.children() );
}
QStringList::Iterator itV;
for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) {
if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) )
*itV = ent.businessPhone();
/*
if ( *it == "Business 2 Phone" )
*itV = ent.business2Phone();
*/
if ( ( *it == "Business Fax") || ( *it == "Work Fax" ) )
*itV = ent.businessFax();
if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) )
*itV = ent.businessMobile();
/*
if ( *it == "Company Phone" )
*itV = ent.companyPhone();
*/
if ( *it == "Default Email" )
*itV = ent.defaultEmail();
if ( *it == "Emails" )
*itV = ent.emailList().join(", "); // :SX
if ( *it == "Home Phone" )
*itV = ent.homePhone();
/*
if ( *it == "Home 2 Phone" )
*itV = ent.home2Phone();
*/
if ( *it == "Home Fax" )
*itV = ent.homeFax();
if ( *it == "Home Mobile" )
*itV = ent.homeMobile();
/*
if ( *it == "Car Phone" )
*itV = ent.carPhone();
if ( *it == "ISDN Phone" )
*itV = ent.ISDNPhone();
if ( *it == "Other Phone" )
*itV = ent.otherPhone();
*/
if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) )
*itV = ent.businessPager();
/*
if ( *it == "Home Pager")
*itV = ent.homePager();
if ( *it == "AIM IM" )
*itV = ent.AIMIM();
if ( *it == "ICQ IM" )
*itV = ent.ICQIM();
if ( *it == "Jabber IM" )
*itV = ent.jabberIM();
if ( *it == "MSN IM" )
*itV = ent.MSNIM();
if ( *it == "Yahoo IM" )
*itV = ent.yahooIM();
*/
if ( *it == "Home Web Page" )
*itV = ent.homeWebpage();
if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) )
*itV = ent.businessWebpage();
}
cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") );
QString gender = ent.gender();
cmbGender->setCurrentItem( gender.toInt() );
txtNote->setText( ent.notes() );
slotAddressTypeChange( cmbAddress->currentItem() );
// Calling "show()" to arrange all widgets. Otherwise we will get
// a wrong position of the textfields and are unable to put our
// default-email combo over it.. This is very ugly !
// Does anybody has a better solution ?
// Basically we should rethink the strategy to hide
// a textfield with overwriting.. (se)
show();
// Get combo-settings from contact and set preset..
contactfields.loadFromRecord( ent );
- cmbChooserField1->setCurrentItem( contactfields.getFieldOrder(0, 0) );
- cmbChooserField2->setCurrentItem( contactfields.getFieldOrder(1, 1) );
- cmbChooserField3->setCurrentItem( contactfields.getFieldOrder(2, 2) );
- cmbChooserField4->setCurrentItem( contactfields.getFieldOrder(3, 5) );
+ cmbChooserField1->setCurrentItem( contactfields.getFieldOrder(0, 7) );
+ cmbChooserField2->setCurrentItem( contactfields.getFieldOrder(1, 9) );
+ cmbChooserField3->setCurrentItem( contactfields.getFieldOrder(2, 0) );
+ cmbChooserField4->setCurrentItem( contactfields.getFieldOrder(3, 6) );
cmbAddress->setCurrentItem( contactfields.getFieldOrder(4, 1) );
slotCmbChooser1Change( cmbChooserField1->currentItem() );
slotCmbChooser2Change( cmbChooserField2->currentItem() );
slotCmbChooser3Change( cmbChooserField3->currentItem() );
slotCmbChooser4Change( cmbChooserField4->currentItem() );
slotAddressTypeChange( cmbAddress->currentItem() );
updateDatePicker();
initializing = false;
}
void ContactEditor::updateDatePicker()
{
// Set DatePicker
if ( !ent.birthday().isNull() ){
birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) );
birthdayPicker->setDate( ent.birthday() );
} else
birthdayButton->setText( tr ("Unknown") );
if ( !ent.anniversary().isNull() ){
anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) );
anniversaryPicker->setDate( ent.anniversary() );
} else
anniversaryButton->setText( tr ("Unknown") );
}
void ContactEditor::saveEntry() {
// Store current combo into contact
contactfields.saveToRecord( ent );
if ( useFullName ) {
txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) );
txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) );
txtLastName->setText( parseName( txtFullName->text(), NAME_L ) );
txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) );
useFullName = false;
}
ent.setFirstName( txtFirstName->text() );
ent.setLastName( txtLastName->text() );
ent.setMiddleName( txtMiddleName->text() );
ent.setSuffix( txtSuffix->text() );
ent.setFileAs( cmbFileAs->currentText() );
ent.setCategories( cmbCat->currentCategories() );
//if (hasTitle)
ent.setJobTitle( txtJobTitle->text() );
//if (hasCompany)
ent.setCompany( txtOrganization->text() );
// if (hasNotes)
ent.setNotes( txtNote->text() );
//if (hasStreet) {
ent.setHomeStreet( slHomeAddress[0] );
ent.setBusinessStreet( slBusinessAddress[0] );
// }
// if (hasCity) {
ent.setHomeCity( slHomeAddress[3] );
ent.setBusinessCity( slBusinessAddress[3] );
// }
// if (hasState) {
ent.setHomeState( slHomeAddress[4] );
ent.setBusinessState( slBusinessAddress[4] );
// }
// if (hasZip) {
ent.setHomeZip( slHomeAddress[5] );
ent.setBusinessZip( slBusinessAddress[5] );
// }
// if (hasCountry) {
ent.setHomeCountry( slHomeAddress[6] );
ent.setBusinessCountry( slBusinessAddress[6] );
// }
QStringList::ConstIterator it;
QListIterator<QLineEdit> itLE( listValue );
for ( it = slDynamicEntries.begin(); itLE.current() && it != slDynamicEntries.end(); ++it, ++itLE) {
if ( *it == "Department" )
ent.setDepartment( (*itLE)->text() );
if ( *it == "Company" )
ent.setCompany( (*itLE)->text() );
if ( *it == "Office" )
ent.setOffice( (*itLE)->text() );
if ( *it == "Profession" )
ent.setProfession( (*itLE)->text() );
if ( *it == "Assistant" )
ent.setAssistant( (*itLE)->text() );
if ( *it == "Manager" )
ent.setManager( (*itLE)->text() );
if ( *it == "Spouse" )
ent.setSpouse( (*itLE)->text() );
if ( *it == "Nickname" )
ent.setNickname( (*itLE)->text() );
if ( *it == "Children" )
ent.setChildren( (*itLE)->text() );
}
QStringList::ConstIterator itV;
for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) {
if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) )
ent.setBusinessPhone( *itV );
if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) )
ent.setBusinessFax( *itV );
if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) )
ent.setBusinessMobile( *itV );
if ( *it == "Emails" ){
QString allemail;
QString defaultmail;
parseEmailFrom( emails.join(","), defaultmail, allemail );
if ( defaultEmail.isEmpty() ){
qWarning("Default email was not set by user!");
qWarning("Using first email in list: %s", defaultmail.latin1());
ent.setDefaultEmail( defaultmail );
}
ent.setEmails( allemail );
}
if ( *it == "Default Email")
ent.setDefaultEmail( defaultEmail /* *itV */ );
if ( *it == "Home Phone" )
ent.setHomePhone( *itV );
if ( *it == "Home Fax" )
ent.setHomeFax( *itV );
if ( *it == "Home Mobile" )
ent.setHomeMobile( *itV );
if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) )
ent.setBusinessPager( *itV );
if ( *it == "Home Web Page" )
ent.setHomeWebpage( *itV );
if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) )
ent.setBusinessWebpage( *itV );
}
int gender = cmbGender->currentItem();
ent.setGender( QString::number( gender ) );
QString str = txtNote->text();
if ( !str.isNull() )
ent.setNotes( str );
}
void parseEmailFrom( const QString &txt, QString &strDefaultEmail,
QString &strAll )
{
int where,
start;
if ( txt.isEmpty() )
return;
// find the first
where = txt.find( ',' );
if ( where < 0 ) {
strDefaultEmail = txt;
strAll = txt;
} else {
strDefaultEmail = txt.left( where ).stripWhiteSpace();
strAll = strDefaultEmail;
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h
index e716fe4..3c1e5ee 100644
--- a/core/pim/addressbook/version.h
+++ b/core/pim/addressbook/version.h
@@ -1,10 +1,10 @@
#ifndef _VERSION_H_
#define _VERSION_H_
#define MAINVERSION "0"
#define SUBVERSION "2"
-#define PATCHVERSION "0"
+#define PATCHVERSION "1"
#define APPNAME "OPIE_ADDRESSBOOK"
#endif