summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-17 10:52:04 (UTC)
committer zautrix <zautrix>2005-02-17 10:52:04 (UTC)
commit002e4f8cea2352e4b9a046b98f66be946fbeb5fc (patch) (side-by-side diff)
tree7dde06f92ed54ec8ee40e68eaa312d2a2d379fb1
parentec18172021a9adc0f6fa1fe80aec71e9a905a351 (diff)
downloadkdepimpi-002e4f8cea2352e4b9a046b98f66be946fbeb5fc.zip
kdepimpi-002e4f8cea2352e4b9a046b98f66be946fbeb5fc.tar.gz
kdepimpi-002e4f8cea2352e4b9a046b98f66be946fbeb5fc.tar.bz2
desktop fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kopiemail/germantranslation.txt2
-rw-r--r--kmicromail/composemail.cpp9
2 files changed, 9 insertions, 2 deletions
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt
index 58f4ea8..0d858a8 100644
--- a/bin/kdepim/kopiemail/germantranslation.txt
+++ b/bin/kdepim/kopiemail/germantranslation.txt
@@ -171,104 +171,104 @@
{ "Clear selection","Selektion aufheben" },
{ "Reply","Antworten" },
{ "Forward","Weiterleiten" },
{ "Attachments","Anhang" },
{ "Show Html","Zeige in html" },
{ "Description","Beschreibung" },
{ "Filename","Dateiname" },
{ "E-Mail by %1","E-Mail von %1" },
{ "Cc","Kopie" },
{ "To","An" },
{ "From","Von" },
{ "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" },
{ "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" },
{ "Move/Copie all mails","Verschiebe/kopiere alle Mails" },
{ "Delete all mails","Lösche alle Mails" },
{ "Create new subfolder","Neues Unterverzeichnis" },
{ "Delete folder","Lösche Verzeichnis" },
{ "Refresh folder list","Aktualisiere Liste" },
{ "Create new folder","Neues Verzeichnis" },
{ "Disconnect","Diskonnect" },
{ "Set offline","Gehe offline" },
{ "Select target box","Wähle Ziel Box" },
{ "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" },
{ "Folder:","Verzeichnis:" },
{ "Account:","Zugang:" },
{ "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" },
{ "Move mail(s)","Verschiebe Mail(s)" },
{ "only mails smaller","nur Mails kleiner" },
{ " kB"," kB" },
{ " message %1 of %2"," Nachricht %1 von %2" },
{ "Copying...","Am Kopieren..." },
{ "Copy message %1 of %2","Kopiere Nachricht %1 von %2" },
{ "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" },
{ "Delete All Mails","Lösche alle Mails" },
{ "Deleting ...","Am Löschen..." },
{ "Delete message %1 of %2","Lösche Nachricht %1 von %2" },
{ "Compose Message","Verfasse Nachricht" },
{ "Reply-To","Antwort-An" },
{ "BCC","BCC" },
{ "Signature","Signatur" },
{ "CC","Kopie" },
{ "Options","Optionen" },
{ "Delete File","Lösche Datei" },
{ "Add File","Füge Datei hinzu" },
{ "Attachment","Anhang" },
{ "send later","sende später" },
{ "use:","via:" },
{ "Save","Speichern" },
{ "Name","Name" },
{ "No Receiver spezified","Kein Empfänger angegeben" },
{ "Sending mail","Sende Mail" },
{ "No","Nein" },
{ "Yes","Ja" },
{ "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" },
{ "Store message?","Nachricht speichern?" },
{ "Select Type","Selektiere Typ" },
{ "Select Account Type","Wähle Art des Zugangs" },
{ "IMAP","IMAP (online lesen)" },
{ "POP3","POP3 (holen)" },
{ "SMTP","SMTP (senden)" },
{ "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" },
{ "Question","Eine Frage..." },
{ "Send this message?","Nachricht wirklich senden?" },
{ "Stop editing message","Stop editing message" },
{ "Sending mail %1 of %2","Sende Mail %1 von %2" },
{ "%1 of %2 bytes send","%1 von %2 Bytes gesendet" },
{ "Refresh header list","Aktualisiere Titel Liste" },
{ "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" },
{ "Mail queue flushed","Gespeicherte Mails gesendet!" },
{ "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" },
{ "Show next mail","Zeige nächste Mail" },
{ "End of List","Ende der Liste" },
{ "Language","Sprache" },
{ "Time Format","Zeit Format" },
{ "%1 groups subscribed","%1 Guppen abboniert" },
{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
{ "Save settings","Speichere Einstellungen" },
{ "Save standard","Speichere Standard" },
{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
{ "Data storage path","Daten Speicherpfad" },
{ "userdefined","benutzerdefiniert" },
{ "Reply to this mail","Beantworte diese Mail" },
{ "Su:","Be:" },
{ "Fr:","Vo:" },
{ "To:","An:" },
{ "Download Mail","Mail runterladen" },
{ "View Source","Zeige Source" },
{ "Show "To" field in list view","Zeige "An" Feld in Listenansicht" },
{ "Show info fields at startup","Zeige Info Felder beim Start" },
{ "Show "Subject" info field","Zeige "Betreff" Info Feld" },
{ "Show "From" info field","Zeige "Von" Info Feld" },
{ "Show "To" info field","Zeige "An" Info Feld" },
{ "Mail saved as draft!","Mail als Entwurf gespeichert!" },
-{ "","" },
+{ "Save signature","Speichere Signatur" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 3231b45..7b609fc 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -60,193 +60,200 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo
// this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
settings = sett;
m_replyid = "";
if ( KOPrefs::instance()->mUseKapi) {
KConfig config( locateLocal("config", "kabcrc") );
config.setGroup( "General" );
QString whoami_uid = config.readEntry( "WhoAmI" );
if ( whoami_uid.isEmpty() ) {
QMessageBox::information( 0, i18n( "Hint" ),
i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
i18n( "Ok" ) );
fillSettings();
} else
ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid);
#ifdef DESKTOP_VERSION
KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( );
QStringList mails = con.emails();
QString defmail = con.preferredEmail();
if ( mails.count() == 0)
QMessageBox::information( 0, i18n( "Hint" ),
i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
i18n( "Ok" ) );
if (defmail.length()!=0) {
fromBox->insertItem(defmail);
}
QStringList::ConstIterator sit = mails.begin();
for (;sit!=mails.end();++sit) {
if ( (*sit)==defmail)
continue;
fromBox->insertItem((*sit));
}
senderNameEdit->setText(con.formattedName());
#endif
} else {
fillSettings();
}
checkBoxLater->setChecked( KOPrefs::instance()->mSendLater );
attList->addColumn( i18n( "Name" ) );
attList->addColumn( i18n( "Size" ) );
QList<Account> accounts = settings->getAccounts();
if ( QApplication::desktop()->width() < 320 )
smtpAccountBox->setMaximumWidth( 80 );
Account *it;
for ( it = accounts.first(); it; it = accounts.next() ) {
if ( it->getType()==MAILLIB::A_SMTP ) {
SMTPaccount *smtp = static_cast<SMTPaccount *>(it);
smtpAccountBox->insertItem( smtp->getAccountName() );
smtpAccounts.append( smtp );
}
}
connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) );
connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) );
connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) );
connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) );
connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) );
connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) );
connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) );
mMail = 0;
warnAttach = true;
QIconSet icon;
//icon = SmallIcon("fileexport");
icon = SmallIcon("filesave");
SaveButton->setIconSet (icon ) ;
if ( QApplication::desktop()->width() < 320 ) {
SaveButton->setText ("") ;
SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ;
}
else
SaveButton->setText (i18n("Save"));
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold );
QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold );
QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold );
#endif
message->setFont ( KOPrefs::instance()->mComposeFont );
message->setWordWrap (QMultiLineEdit::WidgetWidth);
if ( smtpAccounts.count() > 0 ) {
fillValues( smtpAccountBox->currentItem() );
} else {
QMessageBox::information( 0, i18n( "Problem" ),
i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ),
i18n( "Ok" ) );
return;
}
connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
connect( SaveSigButton, SIGNAL( clicked() ), SLOT( saveSig()) );
if ( smtpAccountBox->count())
fillValues(0);
-
+#ifdef DESKTOP_VERSION
+ if ( QApplication::desktop()->width() <= 800 ) {
+ resize( QApplication::desktop()->size() );
+ } else
+ resize( 800, 600 );
+ if ( QApplication::desktop()->width() >= 640 )
+ senderNameEdit->setFixedWidth( 200 );
+#endif
}
void ComposeMail::fillSettings()
{
if ( QApplication::desktop()->width() < 320 )
fromBox->setMaximumWidth( 100 );
QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail);
QStringList::ConstIterator sit = mailList.begin();
int pref = 0;
for (;sit!=mailList.end();++sit) {
fromBox->insertItem((*sit));
}
senderNameEdit->setText(KOPrefs::instance()->mName);
}
void ComposeMail::saveSig()
{
if ( smtpAccountBox->count()) {
int cur = smtpAccountBox->currentItem ();
SMTPaccount *smtp = smtpAccounts.at( cur );
if ( smtp )
smtp->setSignature( sigMultiLine->text());
}
}
void ComposeMail::saveAsDraft()
{
Opie::Core::OSmartPointer<Mail> mail= new Mail();
mail->setMail(fromBox->currentText());
mail->setTo( toLine->text() );
mail->setName(senderNameEdit->text());
mail->setCC( ccLine->text() );
mail->setBCC( bccLine->text() );
mail->setReply( replyLine->text() );
mail->setSubject( subjectLine->text() );
if (!m_replyid.isEmpty()) {
QStringList ids;
ids.append(m_replyid);
mail->setInreply(ids);
}
QString txt = message->text();
if ( !sigMultiLine->text().isEmpty() ) {
txt.append( "\n--\n" );
txt.append( sigMultiLine->text() );
}
mail->setMessage( txt );
mail->setCharset (mEncoding);
/* only use the default drafts folder name! */
Storemail wrapper(AbstractMail::draftFolder());
wrapper.storeMail(mail);
AttachViewItem *it = (AttachViewItem *) attList->firstChild();
/* attachments we will ignore! */
if ( it != 0 ) {
if ( warnAttach )
QMessageBox::warning(0,i18n("Store message"),
i18n("<center>Attachments will not be stored in \"Draft\" folder</center>"));
warnAttach = false;
}
setStatus( i18n("Mail saved as draft!") );
}
void ComposeMail::clearStatus()
{
topLevelWidget()->setCaption( i18n("Compose mail") );
}
void ComposeMail::setStatus( QString status )
{
topLevelWidget()->setCaption( status );
QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ;
}
void ComposeMail::pickAddress( )
{
QLineEdit *line = mPickLineEdit;
if ( line == 0 )
return;
#ifdef DESKTOP_VERSION
//qDebug(" ComposeMail::pickAddress ");
QString names ;//= AddressPicker::getNames();
KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
uint i=0;
for (i=0; i < list.count(); i++) {
if ( !list[i].preferredEmail().isEmpty()) {
if ( ! names.isEmpty() )
names+= ",";
names+= "\""+list[i].realName() +"\"<" +list[i].preferredEmail() +">";
}
}
if ( line->text().isEmpty() ) {
line->setText( names );
} else if ( !names.isEmpty() ) {
line->setText( line->text() + ", " + names );
}