summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index c504fdd..8eb6d27 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -85,66 +85,68 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
85 85
86 } else { 86 } else {
87 fillSettings(); 87 fillSettings();
88 } 88 }
89 checkBoxLater->setChecked( KOPrefs::instance()->mSendLater ); 89 checkBoxLater->setChecked( KOPrefs::instance()->mSendLater );
90 90
91 attList->addColumn( i18n( "Name" ) ); 91 attList->addColumn( i18n( "Name" ) );
92 attList->addColumn( i18n( "Size" ) ); 92 attList->addColumn( i18n( "Size" ) );
93 QList<Account> accounts = settings->getAccounts(); 93 QList<Account> accounts = settings->getAccounts();
94 94
95 if ( QApplication::desktop()->width() < 320 ) 95 if ( QApplication::desktop()->width() < 320 )
96 smtpAccountBox->setMaximumWidth( 80 ); 96 smtpAccountBox->setMaximumWidth( 80 );
97 Account *it; 97 Account *it;
98 for ( it = accounts.first(); it; it = accounts.next() ) { 98 for ( it = accounts.first(); it; it = accounts.next() ) {
99 if ( it->getType()==MAILLIB::A_SMTP ) { 99 if ( it->getType()==MAILLIB::A_SMTP ) {
100 SMTPaccount *smtp = static_cast<SMTPaccount *>(it); 100 SMTPaccount *smtp = static_cast<SMTPaccount *>(it);
101 smtpAccountBox->insertItem( smtp->getAccountName() ); 101 smtpAccountBox->insertItem( smtp->getAccountName() );
102 smtpAccounts.append( smtp ); 102 smtpAccounts.append( smtp );
103 } 103 }
104 } 104 }
105 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); 105 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) );
106 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); 106 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) );
107 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); 107 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) );
108 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); 108 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) );
109 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); 109 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) );
110 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); 110 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) );
111 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); 111 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) );
112 mMail = 0; 112 mMail = 0;
113 warnAttach = true; 113 warnAttach = true;
114 QIconSet icon; 114 QIconSet icon;
115 //icon = SmallIcon("fileexport"); 115 //icon = SmallIcon("fileexport");
116 icon = SmallIcon("filesave"); 116 icon = SmallIcon("filesave");
117 117 if ( QApplication::desktop()->width() < 320 )
118 SaveButton->setText ("") ; 118 SaveButton->setText ("") ;
119 else
120 SaveButton->setText (i18n("Save")) ;
119 SaveButton->setIconSet (icon ) ; 121 SaveButton->setIconSet (icon ) ;
120 SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ; 122 SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ;
121#ifndef DESKTOP_VERSION 123#ifndef DESKTOP_VERSION
122 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold ); 124 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold );
123 QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold ); 125 QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold );
124 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold ); 126 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold );
125#endif 127#endif
126 message->setFont ( KOPrefs::instance()->mComposeFont ); 128 message->setFont ( KOPrefs::instance()->mComposeFont );
127 message->setWordWrap (QMultiLineEdit::WidgetWidth); 129 message->setWordWrap (QMultiLineEdit::WidgetWidth);
128 if ( smtpAccounts.count() > 0 ) { 130 if ( smtpAccounts.count() > 0 ) {
129 fillValues( smtpAccountBox->currentItem() ); 131 fillValues( smtpAccountBox->currentItem() );
130 } else { 132 } else {
131 QMessageBox::information( 0, i18n( "Problem" ), 133 QMessageBox::information( 0, i18n( "Problem" ),
132 i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ), 134 i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ),
133 i18n( "Ok" ) ); 135 i18n( "Ok" ) );
134 return; 136 return;
135 } 137 }
136 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); 138 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
137 139
138 140
139} 141}
140 142
141void ComposeMail::fillSettings() 143void ComposeMail::fillSettings()
142{ 144{
143 if ( QApplication::desktop()->width() < 320 ) 145 if ( QApplication::desktop()->width() < 320 )
144 fromBox->setMaximumWidth( 100 ); 146 fromBox->setMaximumWidth( 100 );
145 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); 147 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail);
146 QStringList::ConstIterator sit = mailList.begin(); 148 QStringList::ConstIterator sit = mailList.begin();
147 int pref = 0; 149 int pref = 0;
148 for (;sit!=mailList.end();++sit) { 150 for (;sit!=mailList.end();++sit) {
149 fromBox->insertItem((*sit)); 151 fromBox->insertItem((*sit));
150 } 152 }