summaryrefslogtreecommitdiffabout
path: root/kmicromail/editaccounts.cpp
authorzautrix <zautrix>2004-10-31 16:54:47 (UTC)
committer zautrix <zautrix>2004-10-31 16:54:47 (UTC)
commit3964a158be731f1bb244ca861262df5fa8d04cf3 (patch) (unidiff)
treefa4a8e9af345c144562be480f21df6e3d8d609c7 /kmicromail/editaccounts.cpp
parentbed831cc1a38d38a4c5b9329bf37b1c663142c23 (diff)
downloadkdepimpi-3964a158be731f1bb244ca861262df5fa8d04cf3.zip
kdepimpi-3964a158be731f1bb244ca861262df5fa8d04cf3.tar.gz
kdepimpi-3964a158be731f1bb244ca861262df5fa8d04cf3.tar.bz2
changed showmaximized for desktop
Diffstat (limited to 'kmicromail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/editaccounts.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 0d30097..48c3963 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -62,97 +62,100 @@ EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool
62 62
63 connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); 63 connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) );
64 connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); 64 connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) );
65 connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); 65 connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) );
66 connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); 66 connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) );
67 connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); 67 connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) );
68 connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); 68 connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) );
69 69
70 slotFillLists(); 70 slotFillLists();
71} 71}
72 72
73void EditAccounts::slotFillLists() 73void EditAccounts::slotFillLists()
74{ 74{
75 mailList->clear(); 75 mailList->clear();
76 newsList->clear(); 76 newsList->clear();
77 77
78 QList<Account> accounts = settings->getAccounts(); 78 QList<Account> accounts = settings->getAccounts();
79 Account *it; 79 Account *it;
80 for ( it = accounts.first(); it; it = accounts.next() ) 80 for ( it = accounts.first(); it; it = accounts.next() )
81 { 81 {
82 if ( it->getType()==MAILLIB::A_NNTP ) 82 if ( it->getType()==MAILLIB::A_NNTP )
83 { 83 {
84 (void) new AccountListItem( newsList, it ); 84 (void) new AccountListItem( newsList, it );
85 } 85 }
86 else 86 else
87 { 87 {
88 (void) new AccountListItem( mailList, it ); 88 (void) new AccountListItem( mailList, it );
89 } 89 }
90 } 90 }
91} 91}
92 92
93void EditAccounts::slotNewMail() 93void EditAccounts::slotNewMail()
94{ 94{
95 QString *selection = new QString(); 95 QString *selection = new QString();
96 SelectMailType selType( selection, this, 0, true ); 96 SelectMailType selType( selection, this, 0, true );
97 selType.show(); 97 selType.show();
98 if ( QDialog::Accepted == selType.exec() ) 98 if ( QDialog::Accepted == selType.exec() )
99 { 99 {
100 slotNewAccount( *selection ); 100 slotNewAccount( *selection );
101 } 101 }
102} 102}
103 103
104void EditAccounts::slotNewAccount( const QString &type ) 104void EditAccounts::slotNewAccount( const QString &type )
105{ 105{
106 if ( type.compare( i18n("IMAP") ) == 0 ) 106 if ( type.compare( i18n("IMAP") ) == 0 )
107 { 107 {
108 IMAPaccount *account = new IMAPaccount(); 108 IMAPaccount *account = new IMAPaccount();
109 IMAPconfig imap( account, this, 0, true ); 109 IMAPconfig imap( account, this, 0, true );
110
111#ifndef DESKTOP_VERSION
110 imap.showMaximized(); 112 imap.showMaximized();
113#endif
111 if ( QDialog::Accepted == imap.exec() ) 114 if ( QDialog::Accepted == imap.exec() )
112 { 115 {
113 settings->addAccount( account ); 116 settings->addAccount( account );
114 account->save(); 117 account->save();
115 slotFillLists(); 118 slotFillLists();
116 } 119 }
117 else 120 else
118 { 121 {
119 account->remove(); 122 account->remove();
120 } 123 }
121 } 124 }
122 else if ( type.compare( i18n("POP3") ) == 0 ) 125 else if ( type.compare( i18n("POP3") ) == 0 )
123 { 126 {
124 POP3account *account = new POP3account(); 127 POP3account *account = new POP3account();
125 POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); 128 POP3config pop3( account, this, 0, true, WStyle_ContextHelp );
126 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) 129 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) )
127 { 130 {
128 settings->addAccount( account ); 131 settings->addAccount( account );
129 account->save(); 132 account->save();
130 slotFillLists(); 133 slotFillLists();
131 } 134 }
132 else 135 else
133 { 136 {
134 account->remove(); 137 account->remove();
135 } 138 }
136 } 139 }
137 else if ( type.compare( i18n("SMTP") ) == 0 ) 140 else if ( type.compare( i18n("SMTP") ) == 0 )
138 { 141 {
139 SMTPaccount *account = new SMTPaccount(); 142 SMTPaccount *account = new SMTPaccount();
140 SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); 143 SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp );
141 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) 144 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) )
142 { 145 {
143 settings->addAccount( account ); 146 settings->addAccount( account );
144 account->save(); 147 account->save();
145 slotFillLists(); 148 slotFillLists();
146 149
147 } 150 }
148 else 151 else
149 { 152 {
150 account->remove(); 153 account->remove();
151 } 154 }
152 } 155 }
153 else if ( type.compare( i18n("NNTP") ) == 0 ) 156 else if ( type.compare( i18n("NNTP") ) == 0 )
154 { 157 {
155 NNTPaccount *account = new NNTPaccount(); 158 NNTPaccount *account = new NNTPaccount();
156 NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); 159 NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp );
157 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) 160 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) )
158 { 161 {