-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 00a07d9..2819ab1 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -1,771 +1,771 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KdePim/Pi. | 2 | This file is part of KdePim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qgroupbox.h> | 34 | #include <qgroupbox.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qbuttongroup.h> | 37 | #include <qbuttongroup.h> |
38 | #include <qfile.h> | 38 | #include <qfile.h> |
39 | 39 | ||
40 | #include <kdialog.h> | 40 | #include <kdialog.h> |
41 | #include <klocale.h> | 41 | #include <klocale.h> |
42 | #include <kdateedit.h> | 42 | #include <kdateedit.h> |
43 | #include <kglobal.h> | 43 | #include <kglobal.h> |
44 | #include <stdlib.h> | 44 | #include <stdlib.h> |
45 | 45 | ||
46 | /*US | 46 | /*US |
47 | #include <qcheckbox.h> | 47 | #include <qcheckbox.h> |
48 | #include <qframe.h> | 48 | #include <qframe.h> |
49 | #include <qpushbutton.h> | 49 | #include <qpushbutton.h> |
50 | #include <qcombobox.h> | 50 | #include <qcombobox.h> |
51 | #include <qlineedit.h> | 51 | #include <qlineedit.h> |
52 | #include <qlabel.h> | 52 | #include <qlabel.h> |
53 | #include <qfile.h> | 53 | #include <qfile.h> |
54 | 54 | ||
55 | #include <kconfig.h> | 55 | #include <kconfig.h> |
56 | #include <kdebug.h> | 56 | #include <kdebug.h> |
57 | #include <kdialog.h> | 57 | #include <kdialog.h> |
58 | #include <klistview.h> | 58 | #include <klistview.h> |
59 | #include <klocale.h> | 59 | #include <klocale.h> |
60 | #include <kglobal.h> | 60 | #include <kglobal.h> |
61 | #include <kmessagebox.h> | 61 | #include <kmessagebox.h> |
62 | #include <kstandarddirs.h> | 62 | #include <kstandarddirs.h> |
63 | 63 | ||
64 | #ifndef KAB_EMBEDDED | 64 | #ifndef KAB_EMBEDDED |
65 | #include <ktrader.h> | 65 | #include <ktrader.h> |
66 | #else // KAB_EMBEDDED | 66 | #else // KAB_EMBEDDED |
67 | #include <mergewidget.h> | 67 | #include <mergewidget.h> |
68 | #include <distributionlistwidget.h> | 68 | #include <distributionlistwidget.h> |
69 | #endif // KAB_EMBEDDED | 69 | #endif // KAB_EMBEDDED |
70 | 70 | ||
71 | #include "addresseewidget.h" | 71 | #include "addresseewidget.h" |
72 | #include "extensionconfigdialog.h" | 72 | #include "extensionconfigdialog.h" |
73 | #include "extensionwidget.h" | 73 | #include "extensionwidget.h" |
74 | */ | 74 | */ |
75 | 75 | ||
76 | #include "qapplication.h" | 76 | #include "qapplication.h" |
77 | 77 | ||
78 | #include "kpimglobalprefs.h" | 78 | #include "kpimglobalprefs.h" |
79 | 79 | ||
80 | #include "kdepimconfigwidget.h" | 80 | #include "kdepimconfigwidget.h" |
81 | 81 | ||
82 | 82 | ||
83 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) | 83 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) |
84 | : KPrefsWidget(prefs, parent, name ) | 84 | : KPrefsWidget(prefs, parent, name ) |
85 | { | 85 | { |
86 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); | 86 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); |
87 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); | 87 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); |
88 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); | 88 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); |
89 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); | 89 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); |
90 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); | 90 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); |
91 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); | 91 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); |
92 | 92 | ||
93 | 93 | ||
94 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 94 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, |
95 | KDialog::spacingHint() ); | 95 | KDialog::spacingHint() ); |
96 | 96 | ||
97 | tabWidget = new QTabWidget( this ); | 97 | tabWidget = new QTabWidget( this ); |
98 | topLayout->addWidget( tabWidget ); | 98 | topLayout->addWidget( tabWidget ); |
99 | 99 | ||
100 | 100 | ||
101 | setupLocaleTab(); | 101 | setupLocaleTab(); |
102 | setupLocaleDateTab(); | 102 | setupLocaleDateTab(); |
103 | setupTimeZoneTab(); | 103 | setupTimeZoneTab(); |
104 | setupExternalAppTab(); | 104 | setupExternalAppTab(); |
105 | 105 | ||
106 | } | 106 | } |
107 | 107 | ||
108 | void KDEPIMConfigWidget::setupExternalAppTab() | 108 | void KDEPIMConfigWidget::setupExternalAppTab() |
109 | { | 109 | { |
110 | QWidget *externalAppsPage = new QWidget( this ); | 110 | QWidget *externalAppsPage = new QWidget( this ); |
111 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 111 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
112 | KDialog::spacingHintSmall() ); | 112 | KDialog::spacingHintSmall() ); |
113 | 113 | ||
114 | mExternalApps = new QComboBox( externalAppsPage ); | 114 | mExternalApps = new QComboBox( externalAppsPage ); |
115 | 115 | ||
116 | QMap<ExternalAppHandler::Types, QString>::Iterator it; | 116 | QMap<ExternalAppHandler::Types, QString>::Iterator it; |
117 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) | 117 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) |
118 | mExternalApps->insertItem( it.data(), it.key() ); | 118 | mExternalApps->insertItem( it.data(), it.key() ); |
119 | 119 | ||
120 | layout->addWidget( mExternalApps ); | 120 | layout->addWidget( mExternalApps ); |
121 | 121 | ||
122 | connect( mExternalApps, SIGNAL( activated( int ) ), | 122 | connect( mExternalApps, SIGNAL( activated( int ) ), |
123 | this, SLOT (externalapp_changed( int ) ) ); | 123 | this, SLOT (externalapp_changed( int ) ) ); |
124 | 124 | ||
125 | 125 | ||
126 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 126 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
127 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 127 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
128 | 128 | ||
129 | 129 | ||
130 | mClient = new QComboBox( mExternalAppGroupBox ); | 130 | mClient = new QComboBox( mExternalAppGroupBox ); |
131 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); | 131 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); |
132 | 132 | ||
133 | connect( mClient, SIGNAL( activated( int ) ), | 133 | connect( mClient, SIGNAL( activated( int ) ), |
134 | this, SLOT (client_changed( int ) ) ); | 134 | this, SLOT (client_changed( int ) ) ); |
135 | 135 | ||
136 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); | 136 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); |
137 | boxLayout->addWidget( lab, 1, 0 ); | 137 | boxLayout->addWidget( lab, 1, 0 ); |
138 | mChannel = new QLineEdit(mExternalAppGroupBox); | 138 | mChannel = new QLineEdit(mExternalAppGroupBox); |
139 | mChannel->setReadOnly(true); | 139 | mChannel->setReadOnly(true); |
140 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); | 140 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); |
141 | 141 | ||
142 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); | 142 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); |
143 | boxLayout->addWidget( lab, 3, 0 ); | 143 | boxLayout->addWidget( lab, 3, 0 ); |
144 | mMessage = new QLineEdit(mExternalAppGroupBox); | 144 | mMessage = new QLineEdit(mExternalAppGroupBox); |
145 | mMessage->setReadOnly(true); | 145 | mMessage->setReadOnly(true); |
146 | boxLayout->addWidget( mMessage , 4, 0); | 146 | boxLayout->addWidget( mMessage , 4, 0); |
147 | 147 | ||
148 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); | 148 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); |
149 | boxLayout->addWidget( lab, 3, 1 ); | 149 | boxLayout->addWidget( lab, 3, 1 ); |
150 | mParameters = new QLineEdit(mExternalAppGroupBox); | 150 | mParameters = new QLineEdit(mExternalAppGroupBox); |
151 | mParameters->setReadOnly(true); | 151 | mParameters->setReadOnly(true); |
152 | boxLayout->addWidget( mParameters, 4, 1 ); | 152 | boxLayout->addWidget( mParameters, 4, 1 ); |
153 | 153 | ||
154 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 154 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); |
155 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 155 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
156 | 156 | ||
157 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 157 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
158 | boxLayout->addWidget( lab, 6, 0 ); | 158 | boxLayout->addWidget( lab, 6, 0 ); |
159 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 159 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
160 | mMessage2->setReadOnly(true); | 160 | mMessage2->setReadOnly(true); |
161 | boxLayout->addWidget( mMessage2 , 7, 0); | 161 | boxLayout->addWidget( mMessage2 , 7, 0); |
162 | 162 | ||
163 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); | 163 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); |
164 | boxLayout->addWidget( lab, 6, 1 ); | 164 | boxLayout->addWidget( lab, 6, 1 ); |
165 | mParameters2 = new QLineEdit(mExternalAppGroupBox); | 165 | mParameters2 = new QLineEdit(mExternalAppGroupBox); |
166 | mParameters2->setReadOnly(true); | 166 | mParameters2->setReadOnly(true); |
167 | boxLayout->addWidget( mParameters2, 7, 1 ); | 167 | boxLayout->addWidget( mParameters2, 7, 1 ); |
168 | 168 | ||
169 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); | 169 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); |
170 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); | 170 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); |
171 | 171 | ||
172 | 172 | ||
173 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 173 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
174 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 174 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
175 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 175 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
176 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 176 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
177 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 177 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
178 | 178 | ||
179 | 179 | ||
180 | layout->addWidget( mExternalAppGroupBox ); | 180 | layout->addWidget( mExternalAppGroupBox ); |
181 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); | 181 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); |
182 | 182 | ||
183 | } | 183 | } |
184 | 184 | ||
185 | 185 | ||
186 | void KDEPIMConfigWidget::setupLocaleDateTab() | 186 | void KDEPIMConfigWidget::setupLocaleDateTab() |
187 | { | 187 | { |
188 | QWidget *topFrame = new QWidget( this ); | 188 | QWidget *topFrame = new QWidget( this ); |
189 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); | 189 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); |
190 | 190 | ||
191 | topLayout->setSpacing(KDialog::spacingHint()); | 191 | topLayout->setSpacing(KDialog::spacingHint()); |
192 | topLayout->setMargin(KDialog::marginHint()); | 192 | topLayout->setMargin(KDialog::marginHint()); |
193 | int iii = 0; | 193 | int iii = 0; |
194 | 194 | ||
195 | 195 | ||
196 | KPrefsWidRadios *syncPrefsGroup = | 196 | KPrefsWidRadios *syncPrefsGroup = |
197 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); | 197 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); |
198 | QString format; | 198 | QString format; |
199 | if ( QApplication::desktop()->width() < 480 ) | 199 | if ( QApplication::desktop()->width() < 480 ) |
200 | format = "(%d.%m.%Y)"; | 200 | format = "(%d.%m.%Y)"; |
201 | else | 201 | else |
202 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 202 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
203 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 203 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
204 | if ( QApplication::desktop()->width() < 480 ) | 204 | if ( QApplication::desktop()->width() < 480 ) |
205 | format = "(%m.%d.%Y)"; | 205 | format = "(%m.%d.%Y)"; |
206 | else | 206 | else |
207 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 207 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
208 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 208 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
209 | if ( QApplication::desktop()->width() < 480 ) | 209 | if ( QApplication::desktop()->width() < 480 ) |
210 | format = "(%Y-%m-%d)"; | 210 | format = "(%Y-%m-%d)"; |
211 | else | 211 | else |
212 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 212 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
213 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 213 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
214 | syncPrefsGroup->addRadio(i18n("User defined")); | 214 | syncPrefsGroup->addRadio(i18n("User defined")); |
215 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 215 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
216 | ++iii; | 216 | ++iii; |
217 | ++iii; | 217 | ++iii; |
218 | QLabel * lab; | 218 | QLabel * lab; |
219 | mUserDateFormatLong = new QLineEdit(topFrame); | 219 | mUserDateFormatLong = new QLineEdit(topFrame); |
220 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 220 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
221 | topLayout->addWidget(lab ,iii,0); | 221 | topLayout->addWidget(lab ,iii,0); |
222 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 222 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
223 | ++iii; | 223 | ++iii; |
224 | mUserDateFormatShort = new QLineEdit(topFrame); | 224 | mUserDateFormatShort = new QLineEdit(topFrame); |
225 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 225 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
226 | topLayout->addWidget(lab ,iii,0); | 226 | topLayout->addWidget(lab ,iii,0); |
227 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 227 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
228 | ++iii; | 228 | ++iii; |
229 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 229 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
230 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 230 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
231 | ++iii; | 231 | ++iii; |
232 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 232 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
233 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 233 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
234 | ++iii; | 234 | ++iii; |
235 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 235 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
236 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 236 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
237 | ++iii; | 237 | ++iii; |
238 | 238 | ||
239 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 239 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
240 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 240 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
241 | 241 | ||
242 | 242 | ||
243 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); | 243 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); |
244 | } | 244 | } |
245 | 245 | ||
246 | void KDEPIMConfigWidget::setupLocaleTab() | 246 | void KDEPIMConfigWidget::setupLocaleTab() |
247 | { | 247 | { |
248 | 248 | ||
249 | QWidget *topFrame = new QWidget( this ); | 249 | QWidget *topFrame = new QWidget( this ); |
250 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 250 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
251 | 251 | ||
252 | topLayout->setSpacing(KDialog::spacingHint()); | 252 | topLayout->setSpacing(KDialog::spacingHint()); |
253 | topLayout->setMargin(KDialog::marginHint()); | 253 | topLayout->setMargin(KDialog::marginHint()); |
254 | int iii = 0; | 254 | int iii = 0; |
255 | KPrefsWidRadios *syncPrefsGroup = | 255 | KPrefsWidRadios *syncPrefsGroup = |
256 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); | 256 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); |
257 | syncPrefsGroup->addRadio(i18n("English")); | 257 | syncPrefsGroup->addRadio(i18n("English")); |
258 | syncPrefsGroup->addRadio(i18n("German")); | 258 | syncPrefsGroup->addRadio(i18n("German")); |
259 | syncPrefsGroup->addRadio(i18n("French")); | 259 | syncPrefsGroup->addRadio(i18n("French")); |
260 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 260 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
261 | if ( QApplication::desktop()->width() < 300 ) | 261 | if ( QApplication::desktop()->width() < 300 ) |
262 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 262 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
263 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 263 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
264 | ++iii; | 264 | ++iii; |
265 | 265 | ||
266 | syncPrefsGroup = | 266 | syncPrefsGroup = |
267 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); | 267 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); |
268 | if ( QApplication::desktop()->width() > 300 ) | 268 | if ( QApplication::desktop()->width() > 300 ) |
269 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 269 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
270 | syncPrefsGroup->addRadio(i18n("24:00")); | 270 | syncPrefsGroup->addRadio(i18n("24:00")); |
271 | syncPrefsGroup->addRadio(i18n("12:00am")); | 271 | syncPrefsGroup->addRadio(i18n("12:00am")); |
272 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 272 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
273 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 273 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
274 | ++iii; | 274 | ++iii; |
275 | 275 | ||
276 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), | 276 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), |
277 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); | 277 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); |
278 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 278 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
279 | ++iii; | 279 | ++iii; |
280 | 280 | ||
281 | 281 | ||
282 | tabWidget->addTab( topFrame, i18n( "Locale" ) ); | 282 | tabWidget->addTab( topFrame, i18n( "Locale" ) ); |
283 | 283 | ||
284 | } | 284 | } |
285 | 285 | ||
286 | 286 | ||
287 | void KDEPIMConfigWidget::setupTimeZoneTab() | 287 | void KDEPIMConfigWidget::setupTimeZoneTab() |
288 | { | 288 | { |
289 | QWidget *topFrame = new QWidget( this ); | 289 | QWidget *topFrame = new QWidget( this ); |
290 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); | 290 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); |
291 | topLayout->setSpacing(KDialog::spacingHint()); | 291 | topLayout->setSpacing(KDialog::spacingHint()); |
292 | topLayout->setMargin(KDialog::marginHint()); | 292 | topLayout->setMargin(KDialog::marginHint()); |
293 | 293 | ||
294 | QHBox *timeZoneBox = new QHBox( topFrame ); | 294 | QHBox *timeZoneBox = new QHBox( topFrame ); |
295 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 295 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
296 | 296 | ||
297 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 297 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
298 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 298 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
299 | if ( QApplication::desktop()->width() < 300 ) { | 299 | if ( QApplication::desktop()->width() < 300 ) { |
300 | mTimeZoneCombo->setMaximumWidth(150); | 300 | mTimeZoneCombo->setMaximumWidth(150); |
301 | } | 301 | } |
302 | 302 | ||
303 | QStringList list; | 303 | QStringList list; |
304 | list = KGlobal::locale()->timeZoneList(); | 304 | list = KGlobal::locale()->timeZoneList(); |
305 | mTimeZoneCombo->insertStringList(list); | 305 | mTimeZoneCombo->insertStringList(list); |
306 | 306 | ||
307 | // find the currently set time zone and select it | 307 | // find the currently set time zone and select it |
308 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; | 308 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; |
309 | int nCurrentlySet = 11; | 309 | int nCurrentlySet = 11; |
310 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 310 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
311 | { | 311 | { |
312 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 312 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
313 | { | 313 | { |
314 | nCurrentlySet = i; | 314 | nCurrentlySet = i; |
315 | break; | 315 | break; |
316 | } | 316 | } |
317 | } | 317 | } |
318 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 318 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
319 | int iii = 1; | 319 | int iii = 1; |
320 | KPrefsWidBool *sb = | 320 | KPrefsWidBool *sb = |
321 | addWidBool(i18n("Timezone has daylight saving"), | 321 | addWidBool(i18n("Timezone has daylight saving"), |
322 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); | 322 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); |
323 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 323 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
324 | ++iii; | 324 | ++iii; |
325 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 325 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
326 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 326 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
327 | ++iii; | 327 | ++iii; |
328 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 328 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
329 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 329 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
330 | ++iii; | 330 | ++iii; |
331 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 331 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
332 | topLayout->addWidget(lab, iii,0); | 332 | topLayout->addWidget(lab, iii,0); |
333 | mStartDateSavingEdit = new KDateEdit(topFrame); | 333 | mStartDateSavingEdit = new KDateEdit(topFrame); |
334 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 334 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
335 | ++iii; | 335 | ++iii; |
336 | 336 | ||
337 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 337 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
338 | topLayout->addWidget(lab, iii,0); | 338 | topLayout->addWidget(lab, iii,0); |
339 | mEndDateSavingEdit = new KDateEdit(topFrame); | 339 | mEndDateSavingEdit = new KDateEdit(topFrame); |
340 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 340 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
341 | ++iii; | 341 | ++iii; |
342 | QDate current ( 2001, 1,1); | 342 | QDate current ( 2001, 1,1); |
343 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); | 343 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); |
344 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); | 344 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); |
345 | 345 | ||
346 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 346 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
347 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 347 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
348 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); | 348 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); |
349 | 349 | ||
350 | 350 | ||
351 | 351 | ||
352 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); | 352 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); |
353 | 353 | ||
354 | } | 354 | } |
355 | 355 | ||
356 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) | 356 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) |
357 | { | 357 | { |
358 | // first store the current data | 358 | // first store the current data |
359 | saveEditFieldSettings(); | 359 | saveEditFieldSettings(); |
360 | 360 | ||
361 | // set mCurrentApp | 361 | // set mCurrentApp |
362 | mCurrentApp = (ExternalAppHandler::Types)newApp; | 362 | mCurrentApp = (ExternalAppHandler::Types)newApp; |
363 | 363 | ||
364 | // set mCurrentClient | 364 | // set mCurrentClient |
365 | switch(mCurrentApp) | 365 | switch(mCurrentApp) |
366 | { | 366 | { |
367 | case(ExternalAppHandler::EMAIL): | 367 | case(ExternalAppHandler::EMAIL): |
368 | mCurrentClient = mEmailClient; | 368 | mCurrentClient = mEmailClient; |
369 | break; | 369 | break; |
370 | case(ExternalAppHandler::PHONE): | 370 | case(ExternalAppHandler::PHONE): |
371 | mCurrentClient = mPhoneClient; | 371 | mCurrentClient = mPhoneClient; |
372 | break; | 372 | break; |
373 | case(ExternalAppHandler::SMS): | 373 | case(ExternalAppHandler::SMS): |
374 | mCurrentClient = mSMSClient; | 374 | mCurrentClient = mSMSClient; |
375 | break; | 375 | break; |
376 | case(ExternalAppHandler::FAX): | 376 | case(ExternalAppHandler::FAX): |
377 | mCurrentClient = mFaxClient; | 377 | mCurrentClient = mFaxClient; |
378 | break; | 378 | break; |
379 | case(ExternalAppHandler::PAGER): | 379 | case(ExternalAppHandler::PAGER): |
380 | mCurrentClient = mPagerClient; | 380 | mCurrentClient = mPagerClient; |
381 | break; | 381 | break; |
382 | case(ExternalAppHandler::SIP): | 382 | case(ExternalAppHandler::SIP): |
383 | mCurrentClient = mSipClient; | 383 | mCurrentClient = mSipClient; |
384 | break; | 384 | break; |
385 | default: | 385 | default: |
386 | return; | 386 | return; |
387 | } | 387 | } |
388 | 388 | ||
389 | // and at last update the widgets | 389 | // and at last update the widgets |
390 | updateClientWidgets(); | 390 | updateClientWidgets(); |
391 | } | 391 | } |
392 | 392 | ||
393 | 393 | ||
394 | 394 | ||
395 | void KDEPIMConfigWidget::client_changed( int newClient ) | 395 | void KDEPIMConfigWidget::client_changed( int newClient ) |
396 | { | 396 | { |
397 | if (newClient == mCurrentClient) | 397 | if (newClient == mCurrentClient) |
398 | return; | 398 | return; |
399 | 399 | ||
400 | // first store the current data | 400 | // first store the current data |
401 | saveEditFieldSettings(); | 401 | saveEditFieldSettings(); |
402 | 402 | ||
403 | 403 | ||
404 | //then reset the clientvariable | 404 | //then reset the clientvariable |
405 | mCurrentClient = newClient; | 405 | mCurrentClient = newClient; |
406 | 406 | ||
407 | // and at last update the widgets | 407 | // and at last update the widgets |
408 | updateClientWidgets(); | 408 | updateClientWidgets(); |
409 | 409 | ||
410 | KPrefsWidget::modified(); | 410 | KPrefsWidget::modified(); |
411 | } | 411 | } |
412 | 412 | ||
413 | void KDEPIMConfigWidget::saveEditFieldSettings() | 413 | void KDEPIMConfigWidget::saveEditFieldSettings() |
414 | { | 414 | { |
415 | 415 | ||
416 | switch(mCurrentApp) | 416 | switch(mCurrentApp) |
417 | { | 417 | { |
418 | case(ExternalAppHandler::EMAIL): | 418 | case(ExternalAppHandler::EMAIL): |
419 | mEmailClient = mClient->currentItem(); | 419 | mEmailClient = mClient->currentItem(); |
420 | break; | 420 | break; |
421 | case(ExternalAppHandler::PHONE): | 421 | case(ExternalAppHandler::PHONE): |
422 | mPhoneClient= mClient->currentItem(); | 422 | mPhoneClient= mClient->currentItem(); |
423 | break; | 423 | break; |
424 | case(ExternalAppHandler::SMS): | 424 | case(ExternalAppHandler::SMS): |
425 | mSMSClient = mClient->currentItem(); | 425 | mSMSClient = mClient->currentItem(); |
426 | break; | 426 | break; |
427 | case(ExternalAppHandler::FAX): | 427 | case(ExternalAppHandler::FAX): |
428 | mFaxClient = mClient->currentItem(); | 428 | mFaxClient = mClient->currentItem(); |
429 | break; | 429 | break; |
430 | case(ExternalAppHandler::PAGER): | 430 | case(ExternalAppHandler::PAGER): |
431 | mPagerClient = mClient->currentItem(); | 431 | mPagerClient = mClient->currentItem(); |
432 | break; | 432 | break; |
433 | case(ExternalAppHandler::SIP): | 433 | case(ExternalAppHandler::SIP): |
434 | mSipClient = mClient->currentItem(); | 434 | mSipClient = mClient->currentItem(); |
435 | break; | 435 | break; |
436 | default: | 436 | default: |
437 | return; | 437 | return; |
438 | } | 438 | } |
439 | 439 | ||
440 | //store the current data back to the apropriate membervariables if we had set it to "other" | 440 | //store the current data back to the apropriate membervariables if we had set it to "other" |
441 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 441 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
442 | { | 442 | { |
443 | mEmailOtherChannel = mChannel->text(); | 443 | mEmailOtherChannel = mChannel->text(); |
444 | mEmailOtherMessage = mMessage->text(); | 444 | mEmailOtherMessage = mMessage->text(); |
445 | mEmailOtherMessageParameters = mParameters->text(); | 445 | mEmailOtherMessageParameters = mParameters->text(); |
446 | mEmailOtherMessage2 = mMessage2->text(); | 446 | mEmailOtherMessage2 = mMessage2->text(); |
447 | mEmailOtherMessageParameters2 = mParameters2->text(); | 447 | mEmailOtherMessageParameters2 = mParameters2->text(); |
448 | } | 448 | } |
449 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 449 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
450 | { | 450 | { |
451 | mPhoneOtherChannel = mChannel->text(); | 451 | mPhoneOtherChannel = mChannel->text(); |
452 | mPhoneOtherMessage = mMessage->text(); | 452 | mPhoneOtherMessage = mMessage->text(); |
453 | mPhoneOtherMessageParameters = mParameters->text(); | 453 | mPhoneOtherMessageParameters = mParameters->text(); |
454 | } | 454 | } |
455 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 455 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
456 | { | 456 | { |
457 | mSMSOtherChannel = mChannel->text(); | 457 | mSMSOtherChannel = mChannel->text(); |
458 | mSMSOtherMessage = mMessage->text(); | 458 | mSMSOtherMessage = mMessage->text(); |
459 | mSMSOtherMessageParameters = mParameters->text(); | 459 | mSMSOtherMessageParameters = mParameters->text(); |
460 | } | 460 | } |
461 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 461 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
462 | { | 462 | { |
463 | mFaxOtherChannel = mChannel->text(); | 463 | mFaxOtherChannel = mChannel->text(); |
464 | mFaxOtherMessage = mMessage->text(); | 464 | mFaxOtherMessage = mMessage->text(); |
465 | mFaxOtherMessageParameters = mParameters->text(); | 465 | mFaxOtherMessageParameters = mParameters->text(); |
466 | } | 466 | } |
467 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 467 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
468 | { | 468 | { |
469 | mPagerOtherChannel = mChannel->text(); | 469 | mPagerOtherChannel = mChannel->text(); |
470 | mPagerOtherMessage = mMessage->text(); | 470 | mPagerOtherMessage = mMessage->text(); |
471 | mPagerOtherMessageParameters = mParameters->text(); | 471 | mPagerOtherMessageParameters = mParameters->text(); |
472 | } | 472 | } |
473 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 473 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
474 | { | 474 | { |
475 | mSipOtherChannel = mChannel->text(); | 475 | mSipOtherChannel = mChannel->text(); |
476 | mSipOtherMessage = mMessage->text(); | 476 | mSipOtherMessage = mMessage->text(); |
477 | mSipOtherMessageParameters = mParameters->text(); | 477 | mSipOtherMessageParameters = mParameters->text(); |
478 | } | 478 | } |
479 | 479 | ||
480 | 480 | ||
481 | } | 481 | } |
482 | 482 | ||
483 | void KDEPIMConfigWidget::updateClientWidgets() | 483 | void KDEPIMConfigWidget::updateClientWidgets() |
484 | { | 484 | { |
485 | bool blocked = signalsBlocked(); | 485 | bool blocked = signalsBlocked(); |
486 | blockSignals( true ); | 486 | blockSignals( true ); |
487 | 487 | ||
488 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display | 488 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display |
489 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); | 489 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); |
490 | if (it == mExternalAppsMap.end()) | 490 | if (it == mExternalAppsMap.end()) |
491 | return; | 491 | return; |
492 | 492 | ||
493 | // update group box | 493 | // update group box |
494 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); | 494 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); |
495 | 495 | ||
496 | //update the entries in the client combobox | 496 | //update the entries in the client combobox |
497 | mClient->clear(); | 497 | mClient->clear(); |
498 | 498 | ||
499 | QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); | 499 | QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); |
500 | DefaultAppItem* dai; | 500 | DefaultAppItem* dai; |
501 | for ( dai=items.first(); dai != 0; dai=items.next() ) | 501 | for ( dai=items.first(); dai != 0; dai=items.next() ) |
502 | { | 502 | { |
503 | mClient->insertItem( i18n(dai->_label), dai->_id ); | 503 | mClient->insertItem( i18n(dai->_label), dai->_id ); |
504 | 504 | ||
505 | if (dai->_id == mCurrentClient) | 505 | if (dai->_id == mCurrentClient) |
506 | { | 506 | { |
507 | //restore the edit fields with the data of the local membervariables if we had set it to "other". | 507 | //restore the edit fields with the data of the local membervariables if we had set it to "other". |
508 | //Otherwise take the default data from externalapphandler. | 508 | //Otherwise take the default data from externalapphandler. |
509 | mChannel->setText(dai->_channel); | 509 | mChannel->setText(dai->_channel); |
510 | mMessage->setText(dai->_message); | 510 | mMessage->setText(dai->_message); |
511 | mParameters->setText(dai->_parameters); | 511 | mParameters->setText(dai->_parameters); |
512 | mMessage2->setText(dai->_message2); | 512 | mMessage2->setText(dai->_message2); |
513 | mParameters2->setText(dai->_parameters2); | 513 | mParameters2->setText(dai->_parameters2); |
514 | 514 | ||
515 | 515 | ||
516 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 516 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
517 | { | 517 | { |
518 | mChannel->setText(mEmailOtherChannel); | 518 | mChannel->setText(mEmailOtherChannel); |
519 | mMessage->setText(mEmailOtherMessage); | 519 | mMessage->setText(mEmailOtherMessage); |
520 | mParameters->setText(mEmailOtherMessageParameters); | 520 | mParameters->setText(mEmailOtherMessageParameters); |
521 | mMessage2->setText(mEmailOtherMessage2); | 521 | mMessage2->setText(mEmailOtherMessage2); |
522 | mParameters2->setText(mEmailOtherMessageParameters2); | 522 | mParameters2->setText(mEmailOtherMessageParameters2); |
523 | } | 523 | } |
524 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 524 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
525 | { | 525 | { |
526 | mChannel->setText(mPhoneOtherChannel); | 526 | mChannel->setText(mPhoneOtherChannel); |
527 | mMessage->setText(mPhoneOtherMessage); | 527 | mMessage->setText(mPhoneOtherMessage); |
528 | mParameters->setText(mPhoneOtherMessageParameters); | 528 | mParameters->setText(mPhoneOtherMessageParameters); |
529 | } | 529 | } |
530 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 530 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
531 | { | 531 | { |
532 | mChannel->setText(mSMSOtherChannel); | 532 | mChannel->setText(mSMSOtherChannel); |
533 | mMessage->setText(mSMSOtherMessage); | 533 | mMessage->setText(mSMSOtherMessage); |
534 | mParameters->setText(mSMSOtherMessageParameters); | 534 | mParameters->setText(mSMSOtherMessageParameters); |
535 | } | 535 | } |
536 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 536 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
537 | { | 537 | { |
538 | mChannel->setText(mFaxOtherChannel); | 538 | mChannel->setText(mFaxOtherChannel); |
539 | mMessage->setText(mFaxOtherMessage); | 539 | mMessage->setText(mFaxOtherMessage); |
540 | mParameters->setText(mFaxOtherMessageParameters); | 540 | mParameters->setText(mFaxOtherMessageParameters); |
541 | } | 541 | } |
542 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 542 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
543 | { | 543 | { |
544 | mChannel->setText(mPagerOtherChannel); | 544 | mChannel->setText(mPagerOtherChannel); |
545 | mMessage->setText(mPagerOtherMessage); | 545 | mMessage->setText(mPagerOtherMessage); |
546 | mParameters->setText(mPagerOtherMessageParameters); | 546 | mParameters->setText(mPagerOtherMessageParameters); |
547 | } | 547 | } |
548 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 548 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
549 | { | 549 | { |
550 | mChannel->setText(mSipOtherChannel); | 550 | mChannel->setText(mSipOtherChannel); |
551 | mMessage->setText(mSipOtherMessage); | 551 | mMessage->setText(mSipOtherMessage); |
552 | mParameters->setText(mSipOtherMessageParameters); | 552 | mParameters->setText(mSipOtherMessageParameters); |
553 | } | 553 | } |
554 | } | 554 | } |
555 | 555 | ||
556 | } | 556 | } |
557 | 557 | ||
558 | bool readonly; | 558 | bool readonly; |
559 | bool enabled; | 559 | bool enabled; |
560 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 560 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
561 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 561 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
562 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 562 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
563 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 563 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
564 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 564 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
565 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) | 565 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) |
566 | { | 566 | { |
567 | readonly = false; | 567 | readonly = false; |
568 | } | 568 | } |
569 | else | 569 | else |
570 | { | 570 | { |
571 | readonly = true; | 571 | readonly = true; |
572 | } | 572 | } |
573 | 573 | ||
574 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) | 574 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) |
575 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) | 575 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) |
576 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) | 576 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) |
577 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) | 577 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) |
578 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) | 578 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) |
579 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) | 579 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) |
580 | { | 580 | { |
581 | enabled = false; | 581 | enabled = false; |
582 | } | 582 | } |
583 | else | 583 | else |
584 | { | 584 | { |
585 | enabled = true; | 585 | enabled = true; |
586 | } | 586 | } |
587 | 587 | ||
588 | 588 | ||
589 | mChannel->setReadOnly(readonly); | 589 | mChannel->setReadOnly(readonly); |
590 | mMessage->setReadOnly(readonly); | 590 | mMessage->setReadOnly(readonly); |
591 | mParameters->setReadOnly(readonly); | 591 | mParameters->setReadOnly(readonly); |
592 | mMessage2->setReadOnly(readonly); | 592 | mMessage2->setReadOnly(readonly); |
593 | mParameters2->setReadOnly(readonly); | 593 | mParameters2->setReadOnly(readonly); |
594 | 594 | ||
595 | mChannel->setEnabled(enabled); | 595 | mChannel->setEnabled(enabled); |
596 | mMessage->setEnabled(enabled); | 596 | mMessage->setEnabled(enabled); |
597 | mParameters->setEnabled(enabled); | 597 | mParameters->setEnabled(enabled); |
598 | mMessage2->setEnabled(enabled); | 598 | mMessage2->setEnabled(enabled); |
599 | mParameters2->setEnabled(enabled); | 599 | mParameters2->setEnabled(enabled); |
600 | 600 | ||
601 | 601 | ||
602 | 602 | ||
603 | mClient->setCurrentItem(mCurrentClient); | 603 | mClient->setCurrentItem(mCurrentClient); |
604 | 604 | ||
605 | 605 | ||
606 | // enable/disable the extra message/parameter field | 606 | // enable/disable the extra message/parameter field |
607 | if (mCurrentApp == ExternalAppHandler::EMAIL) | 607 | if (mCurrentApp == ExternalAppHandler::EMAIL) |
608 | { | 608 | { |
609 | } | 609 | } |
610 | else | 610 | else |
611 | { | 611 | { |
612 | mMessage2->setText( "" ); | 612 | mMessage2->setText( "" ); |
613 | mParameters2->setText( "" ); | 613 | mParameters2->setText( "" ); |
614 | } | 614 | } |
615 | 615 | ||
616 | if (enabled == true) { | 616 | if (enabled == true) { |
617 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 617 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
618 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 618 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
619 | } | 619 | } |
620 | 620 | ||
621 | 621 | ||
622 | blockSignals( blocked ); | 622 | blockSignals( blocked ); |
623 | 623 | ||
624 | } | 624 | } |
625 | 625 | ||
626 | void KDEPIMConfigWidget::usrReadConfig() | 626 | void KDEPIMConfigWidget::usrReadConfig() |
627 | { | 627 | { |
628 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 628 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
629 | 629 | ||
630 | bool blocked = signalsBlocked(); | 630 | bool blocked = signalsBlocked(); |
631 | blockSignals( true ); | 631 | blockSignals( true ); |
632 | 632 | ||
633 | QString dummy = prefs->mUserDateFormatLong; | 633 | QString dummy = prefs->mUserDateFormatLong; |
634 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 634 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
635 | dummy = prefs->mUserDateFormatShort; | 635 | dummy = prefs->mUserDateFormatShort; |
636 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 636 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
637 | 637 | ||
638 | QDate current ( 2001, 1,1); | 638 | QDate current ( 2001, 1,1); |
639 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); | 639 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); |
640 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); | 640 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); |
641 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); | 641 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); |
642 | 642 | ||
643 | 643 | ||
644 | 644 | ||
645 | 645 | ||
646 | mEmailClient = prefs->mEmailClient; | 646 | mEmailClient = prefs->mEmailClient; |
647 | mEmailOtherChannel = prefs->mEmailOtherChannel; | 647 | mEmailOtherChannel = prefs->mEmailOtherChannel; |
648 | mEmailOtherMessage = prefs->mEmailOtherMessage; | 648 | mEmailOtherMessage = prefs->mEmailOtherMessage; |
649 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; | 649 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; |
650 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; | 650 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; |
651 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; | 651 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; |
652 | 652 | ||
653 | mPhoneClient = prefs->mPhoneClient; | 653 | mPhoneClient = prefs->mPhoneClient; |
654 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; | 654 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; |
655 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; | 655 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; |
656 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; | 656 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; |
657 | 657 | ||
658 | mFaxClient = prefs->mFaxClient; | 658 | mFaxClient = prefs->mFaxClient; |
659 | mFaxOtherChannel = prefs->mFaxOtherChannel; | 659 | mFaxOtherChannel = prefs->mFaxOtherChannel; |
660 | mFaxOtherMessage = prefs->mFaxOtherMessage; | 660 | mFaxOtherMessage = prefs->mFaxOtherMessage; |
661 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; | 661 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; |
662 | 662 | ||
663 | mSMSClient = prefs->mSMSClient; | 663 | mSMSClient = prefs->mSMSClient; |
664 | mSMSOtherChannel = prefs->mSMSOtherChannel; | 664 | mSMSOtherChannel = prefs->mSMSOtherChannel; |
665 | mSMSOtherMessage = prefs->mSMSOtherMessage; | 665 | mSMSOtherMessage = prefs->mSMSOtherMessage; |
666 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; | 666 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; |
667 | 667 | ||
668 | mPagerClient = prefs->mPagerClient; | 668 | mPagerClient = prefs->mPagerClient; |
669 | mPagerOtherChannel = prefs->mPagerOtherChannel; | 669 | mPagerOtherChannel = prefs->mPagerOtherChannel; |
670 | mPagerOtherMessage = prefs->mPagerOtherMessage; | 670 | mPagerOtherMessage = prefs->mPagerOtherMessage; |
671 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; | 671 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; |
672 | 672 | ||
673 | mSipClient = prefs->mPagerClient; | 673 | mSipClient = prefs->mPagerClient; |
674 | mSipOtherChannel = prefs->mSipOtherChannel; | 674 | mSipOtherChannel = prefs->mSipOtherChannel; |
675 | mSipOtherMessage = prefs->mSipOtherMessage; | 675 | mSipOtherMessage = prefs->mSipOtherMessage; |
676 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; | 676 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; |
677 | 677 | ||
678 | mCurrentApp = ExternalAppHandler::EMAIL; | 678 | mCurrentApp = ExternalAppHandler::EMAIL; |
679 | mCurrentClient = mEmailClient; | 679 | mCurrentClient = mEmailClient; |
680 | 680 | ||
681 | updateClientWidgets(); | 681 | updateClientWidgets(); |
682 | 682 | ||
683 | blockSignals( blocked ); | 683 | blockSignals( blocked ); |
684 | 684 | ||
685 | } | 685 | } |
686 | 686 | ||
687 | void KDEPIMConfigWidget::usrWriteConfig() | 687 | void KDEPIMConfigWidget::usrWriteConfig() |
688 | { | 688 | { |
689 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 689 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
690 | 690 | ||
691 | saveEditFieldSettings(); | 691 | saveEditFieldSettings(); |
692 | 692 | ||
693 | 693 | ||
694 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 694 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
695 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 695 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
696 | 696 | ||
697 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); | 697 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); |
698 | QDate date; | 698 | QDate date; |
699 | date = mStartDateSavingEdit->date(); | 699 | date = mStartDateSavingEdit->date(); |
700 | int sub = 0; | 700 | int sub = 0; |
701 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 701 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
702 | sub = 1; | 702 | sub = 1; |
703 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; | 703 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; |
704 | date = mEndDateSavingEdit->date(); | 704 | date = mEndDateSavingEdit->date(); |
705 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 705 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
706 | sub = 1; | 706 | sub = 1; |
707 | else | 707 | else |
708 | sub = 0; | 708 | sub = 0; |
709 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; | 709 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; |
710 | 710 | ||
711 | 711 | ||
712 | prefs->mEmailClient = mEmailClient; | 712 | prefs->mEmailClient = mEmailClient; |
713 | prefs->mEmailOtherChannel = mEmailOtherChannel; | 713 | prefs->mEmailOtherChannel = mEmailOtherChannel; |
714 | prefs->mEmailOtherMessage = mEmailOtherMessage; | 714 | prefs->mEmailOtherMessage = mEmailOtherMessage; |
715 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; | 715 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; |
716 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; | 716 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; |
717 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; | 717 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; |
718 | 718 | ||
719 | prefs->mPhoneClient = mPhoneClient; | 719 | prefs->mPhoneClient = mPhoneClient; |
720 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; | 720 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; |
721 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; | 721 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; |
722 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; | 722 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; |
723 | 723 | ||
724 | prefs->mFaxClient = mFaxClient; | 724 | prefs->mFaxClient = mFaxClient; |
725 | prefs->mFaxOtherChannel = mFaxOtherChannel; | 725 | prefs->mFaxOtherChannel = mFaxOtherChannel; |
726 | prefs->mFaxOtherMessage = mFaxOtherMessage; | 726 | prefs->mFaxOtherMessage = mFaxOtherMessage; |
727 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; | 727 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; |
728 | 728 | ||
729 | prefs->mSMSClient = mSMSClient; | 729 | prefs->mSMSClient = mSMSClient; |
730 | prefs->mSMSOtherChannel = mSMSOtherChannel; | 730 | prefs->mSMSOtherChannel = mSMSOtherChannel; |
731 | prefs->mSMSOtherMessage = mSMSOtherMessage; | 731 | prefs->mSMSOtherMessage = mSMSOtherMessage; |
732 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; | 732 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; |
733 | 733 | ||
734 | prefs->mPagerClient = mPagerClient; | 734 | prefs->mPagerClient = mPagerClient; |
735 | prefs->mPagerOtherChannel = mPagerOtherChannel; | 735 | prefs->mPagerOtherChannel = mPagerOtherChannel; |
736 | prefs->mPagerOtherMessage = mPagerOtherMessage; | 736 | prefs->mPagerOtherMessage = mPagerOtherMessage; |
737 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; | 737 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; |
738 | 738 | ||
739 | 739 | ||
740 | prefs->mSipClient = mSipClient; | 740 | prefs->mSipClient = mSipClient; |
741 | prefs->mSipOtherChannel = mSipOtherChannel; | 741 | prefs->mSipOtherChannel = mSipOtherChannel; |
742 | prefs->mSipOtherMessage = mSipOtherMessage; | 742 | prefs->mSipOtherMessage = mSipOtherMessage; |
743 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; | 743 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; |
744 | 744 | ||
745 | //release the cache that other views can access the changed values instantanious | 745 | //release the cache that other views can access the changed values instantanious |
746 | ExternalAppHandler::instance()->loadConfig(); | 746 | ExternalAppHandler::instance()->loadConfig(); |
747 | 747 | KPimGlobalPrefs::instance()->setGlobalConfig(); | |
748 | } | 748 | } |
749 | 749 | ||
750 | 750 | ||
751 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, | 751 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, |
752 | const QStringList *tags) | 752 | const QStringList *tags) |
753 | { | 753 | { |
754 | if (tags) { | 754 | if (tags) { |
755 | int i = tags->findIndex(text); | 755 | int i = tags->findIndex(text); |
756 | if (i > 0) combo->setCurrentItem(i); | 756 | if (i > 0) combo->setCurrentItem(i); |
757 | } else { | 757 | } else { |
758 | for(int i=0;i<combo->count();++i) { | 758 | for(int i=0;i<combo->count();++i) { |
759 | if (combo->text(i) == text) { | 759 | if (combo->text(i) == text) { |
760 | combo->setCurrentItem(i); | 760 | combo->setCurrentItem(i); |
761 | break; | 761 | break; |
762 | } | 762 | } |
763 | } | 763 | } |
764 | } | 764 | } |
765 | } | 765 | } |
766 | 766 | ||
767 | 767 | ||
768 | void KDEPIMConfigWidget::textChanged( const QString& text ) | 768 | void KDEPIMConfigWidget::textChanged( const QString& text ) |
769 | { | 769 | { |
770 | emit changed( true ); | 770 | emit changed( true ); |
771 | } | 771 | } |