summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp8
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp26
2 files changed, 22 insertions, 12 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index c8b68c7..936d052 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -78,67 +78,67 @@ class ExtensionItem : public QCheckListItem
78 KService::Ptr mPtr; 78 KService::Ptr mPtr;
79#else //KAB_EMBEDDED 79#else //KAB_EMBEDDED
80 ExtensionFactory* mFactory; 80 ExtensionFactory* mFactory;
81 QString mName; 81 QString mName;
82 QString mComment; 82 QString mComment;
83 83
84#endif //KAB_EMBEDDED 84#endif //KAB_EMBEDDED
85 85
86}; 86};
87 87
88KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name ) 88KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name )
89 : KPrefsWidget( prefs, parent, name ) 89 : KPrefsWidget( prefs, parent, name )
90{ 90{
91 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 91 QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
92 KDialog::spacingHint() ); 92 KDialog::spacingHint() );
93 93
94 QTabWidget *tabWidget = new QTabWidget( this ); 94 QTabWidget *tabWidget = new QTabWidget( this );
95 topLayout->addWidget( tabWidget ); 95 topLayout->addWidget( tabWidget );
96 96
97 // General page 97 // General page
98 QWidget *generalPage = new QWidget( this ); 98 QWidget *generalPage = new QWidget( this );
99 QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), 99 QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(),
100 KDialog::spacingHintSmall() ); 100 KDialog::spacingHintSmall() );
101 101
102
102 QWidget *hBox = new QWidget( generalPage, "qhbox" ); 103 QWidget *hBox = new QWidget( generalPage, "qhbox" );
103 QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); 104 QHBoxLayout *hboxLayout = new QHBoxLayout( hBox);
104 KPrefsWidFont *detailsFont = 105 KPrefsWidFont *detailsFont =
105 addWidFont(i18n("phone:123"),i18n("Details view font"), 106 addWidFont(i18n("phone:123"),i18n("Details view font"),
106 &(KABPrefs::instance()->mDetailsFont),hBox); 107 &(KABPrefs::instance()->mDetailsFont),hBox);
107 hboxLayout->addWidget(detailsFont->label()); 108 hboxLayout->addWidget(detailsFont->label());
108 hboxLayout->addWidget(detailsFont->preview()); 109 hboxLayout->addWidget(detailsFont->preview());
109 hboxLayout->addWidget(detailsFont->button()); 110 hboxLayout->addWidget(detailsFont->button());
110 hboxLayout->setMargin(KDialog::marginHintSmall() ); 111 hboxLayout->setMargin(KDialog::marginHintSmall() );
111 hboxLayout->setSpacing(KDialog::spacingHintSmall()); 112 hboxLayout->setSpacing(KDialog::spacingHintSmall());
113 //hBox->setBackgroundColor( black);
112 layout->addWidget( hBox ); 114 layout->addWidget( hBox );
113 115
114 //general groupbox 116 //general groupbox
115 QVBox *vBox = new QVBox( generalPage, "qvbox" ); 117 QWidget *vBox = new QWidget( generalPage, "qvbox" );
116 QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); 118 QVBoxLayout *boxLayout = new QVBoxLayout( vBox );
117 boxLayout->setAlignment( Qt::AlignTop ); 119 boxLayout->setAlignment( Qt::AlignTop );
118 boxLayout->setMargin(KDialog::marginHintSmall() ); 120 boxLayout->setMargin(KDialog::marginHintSmall() );
119 vBox->layout()->setMargin(KDialog::marginHintSmall()) ;
120 vBox->layout()->setSpacing(KDialog::spacingHintSmall());
121 boxLayout->setSpacing( KDialog::spacingHintSmall() ); 121 boxLayout->setSpacing( KDialog::spacingHintSmall() );
122 mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); 122 mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" );
123 boxLayout->addWidget( mSearchReturnBox ); 123 boxLayout->addWidget( mSearchReturnBox );
124 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); 124 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" );
125 boxLayout->addWidget( mViewsSingleClickBox ); 125 boxLayout->addWidget( mViewsSingleClickBox );
126 126
127 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); 127 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" );
128 boxLayout->addWidget( mNameParsing ); 128 boxLayout->addWidget( mNameParsing );
129 129
130 mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); 130 mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" );
131 boxLayout->addWidget( mMultipleViewsAtOnce ); 131 boxLayout->addWidget( mMultipleViewsAtOnce );
132 132
133 mAskForQuit = new QCheckBox( i18n( "Ask for quit when closing Ka/Pi" ), vBox, "mquit" ); 133 mAskForQuit = new QCheckBox( i18n( "Ask for quit when closing Ka/Pi" ), vBox, "mquit" );
134 boxLayout->addWidget( mAskForQuit ); 134 boxLayout->addWidget( mAskForQuit );
135 135
136 layout->addWidget( vBox ); 136 layout->addWidget( vBox );
137 137
138 tabWidget->addTab( generalPage, i18n( "General" ) ); 138 tabWidget->addTab( generalPage, i18n( "General" ) );
139 139
140 // Extension page 140 // Extension page
141 QWidget *extensionPage = new QWidget( this ); 141 QWidget *extensionPage = new QWidget( this );
142 QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), 142 QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(),
143 KDialog::spacingHintSmall() ); 143 KDialog::spacingHintSmall() );
144 144
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 332f975..6de60fa 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -108,254 +108,264 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
108void KDEPIMConfigWidget::showTimeZoneTab() 108void KDEPIMConfigWidget::showTimeZoneTab()
109{ 109{
110 tabWidget->setCurrentPage ( 2 ) ; 110 tabWidget->setCurrentPage ( 2 ) ;
111} 111}
112void KDEPIMConfigWidget::setupExternalAppTab() 112void KDEPIMConfigWidget::setupExternalAppTab()
113{ 113{
114 QWidget *externalAppsPage = new QWidget( this ); 114 QWidget *externalAppsPage = new QWidget( this );
115 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), 115 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
116 KDialog::spacingHintSmall() ); 116 KDialog::spacingHintSmall() );
117 117
118 mExternalApps = new QComboBox( externalAppsPage ); 118 mExternalApps = new QComboBox( externalAppsPage );
119 119
120 QMap<ExternalAppHandler::Types, QString>::Iterator it; 120 QMap<ExternalAppHandler::Types, QString>::Iterator it;
121 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) 121 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it )
122 mExternalApps->insertItem( it.data(), it.key() ); 122 mExternalApps->insertItem( it.data(), it.key() );
123 123
124 layout->addWidget( mExternalApps ); 124 layout->addWidget( mExternalApps );
125 125
126 connect( mExternalApps, SIGNAL( activated( int ) ), 126 connect( mExternalApps, SIGNAL( activated( int ) ),
127 this, SLOT (externalapp_changed( int ) ) ); 127 this, SLOT (externalapp_changed( int ) ) );
128 128
129 129
130 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); 130 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
131 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); 131 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
132 132 mExternalAppGroupBox->layout()->setMargin(5);
133 133
134 mClient = new QComboBox( mExternalAppGroupBox ); 134 mClient = new QComboBox( mExternalAppGroupBox );
135 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); 135 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 );
136 136
137 connect( mClient, SIGNAL( activated( int ) ), 137 connect( mClient, SIGNAL( activated( int ) ),
138 this, SLOT (client_changed( int ) ) ); 138 this, SLOT (client_changed( int ) ) );
139 139
140 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); 140 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox);
141 boxLayout->addWidget( lab, 1, 0 ); 141 boxLayout->addWidget( lab, 1, 0 );
142 mChannel = new QLineEdit(mExternalAppGroupBox); 142 mChannel = new QLineEdit(mExternalAppGroupBox);
143 mChannel->setReadOnly(true); 143 mChannel->setReadOnly(true);
144 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); 144 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 );
145 145
146 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); 146 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox);
147 boxLayout->addWidget( lab, 3, 0 ); 147 boxLayout->addWidget( lab, 3, 0 );
148 mMessage = new QLineEdit(mExternalAppGroupBox); 148 mMessage = new QLineEdit(mExternalAppGroupBox);
149 mMessage->setReadOnly(true); 149 mMessage->setReadOnly(true);
150 boxLayout->addWidget( mMessage , 4, 0); 150 boxLayout->addWidget( mMessage , 4, 0);
151 151
152 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); 152 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox);
153 boxLayout->addWidget( lab, 3, 1 ); 153 boxLayout->addWidget( lab, 3, 1 );
154 mParameters = new QLineEdit(mExternalAppGroupBox); 154 mParameters = new QLineEdit(mExternalAppGroupBox);
155 mParameters->setReadOnly(true); 155 mParameters->setReadOnly(true);
156 boxLayout->addWidget( mParameters, 4, 1 ); 156 boxLayout->addWidget( mParameters, 4, 1 );
157 157
158 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); 158 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox);
159 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); 159 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 );
160 160
161
161 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); 162 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox);
162 boxLayout->addWidget( lab, 6, 0 ); 163 boxLayout->addWidget( lab, 6, 0 );
163 mMessage2 = new QLineEdit(mExternalAppGroupBox); 164 mMessage2 = new QLineEdit(mExternalAppGroupBox);
164 mMessage2->setReadOnly(true); 165 mMessage2->setReadOnly(true);
165 boxLayout->addWidget( mMessage2 , 7, 0); 166 boxLayout->addWidget( mMessage2 , 7, 0);
166 167
167 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); 168 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox);
168 boxLayout->addWidget( lab, 6, 1 ); 169 boxLayout->addWidget( lab, 6, 1 );
169 mParameters2 = new QLineEdit(mExternalAppGroupBox); 170 mParameters2 = new QLineEdit(mExternalAppGroupBox);
170 mParameters2->setReadOnly(true); 171 mParameters2->setReadOnly(true);
171 boxLayout->addWidget( mParameters2, 7, 1 ); 172 boxLayout->addWidget( mParameters2, 7, 1 );
172 173
173 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); 174 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox);
174 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); 175 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 );
175 176
176 177
177 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 178 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
178 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 179 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
179 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 180 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
180 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 181 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
181 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 182 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
182 183
183 184
184 layout->addWidget( mExternalAppGroupBox ); 185 layout->addWidget( mExternalAppGroupBox );
185 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); 186 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) );
186 187
187} 188}
188 189
189 190
190void KDEPIMConfigWidget::setupLocaleDateTab() 191void KDEPIMConfigWidget::setupLocaleDateTab()
191{ 192{
192 QWidget *topFrame = new QWidget( this ); 193 QWidget *topFrame = new QWidget( this );
193 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); 194 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2);
194 195
195 topLayout->setSpacing(KDialog::spacingHint()); 196 topLayout->setSpacing(KDialog::spacingHintSmall());
196 topLayout->setMargin(KDialog::marginHint()); 197 topLayout->setMargin(KDialog::marginHintSmall());
197 int iii = 0; 198 int iii = 0;
198 199
199 200
200 KPrefsWidRadios *syncPrefsGroup = 201 KPrefsWidRadios *syncPrefsGroup =
201 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); 202 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame);
202 QString format; 203 QString format;
203 if ( QApplication::desktop()->width() < 480 ) 204 if ( QApplication::desktop()->width() < 480 )
204 format = "(%d.%m.%Y)"; 205 format = "(%d.%m.%Y)";
205 else 206 else
206 format = "(%d.%m.%Y|%A %d %B %Y)"; 207 format = "(%d.%m.%Y|%A %d %B %Y)";
207 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 208 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
208 if ( QApplication::desktop()->width() < 480 ) 209 if ( QApplication::desktop()->width() < 480 )
209 format = "(%m.%d.%Y)"; 210 format = "(%m.%d.%Y)";
210 else 211 else
211 format = "(%m.%d.%Y|%A %B %d %Y)"; 212 format = "(%m.%d.%Y|%A %B %d %Y)";
212 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 213 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
213 if ( QApplication::desktop()->width() < 480 ) 214 if ( QApplication::desktop()->width() < 480 )
214 format = "(%Y-%m-%d)"; 215 format = "(%Y-%m-%d)";
215 else 216 else
216 format = "(%Y-%m-%d|%A %Y %B %d)"; 217 format = "(%Y-%m-%d|%A %Y %B %d)";
217 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 218 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
218 syncPrefsGroup->addRadio(i18n("User defined")); 219 syncPrefsGroup->addRadio(i18n("User defined"));
220 if ( QApplication::desktop()->width() < 480 ) {
221 syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
222 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
223 }
219 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 224 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
220 ++iii; 225 ++iii;
221 ++iii; 226 ++iii;
222 QLabel * lab; 227 QLabel * lab;
223 mUserDateFormatLong = new QLineEdit(topFrame); 228 mUserDateFormatLong = new QLineEdit(topFrame);
224 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 229 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
225 topLayout->addWidget(lab ,iii,0); 230 topLayout->addWidget(lab ,iii,0);
226 topLayout->addWidget(mUserDateFormatLong,iii,1); 231 topLayout->addWidget(mUserDateFormatLong,iii,1);
227 ++iii; 232 ++iii;
228 mUserDateFormatShort = new QLineEdit(topFrame); 233 mUserDateFormatShort = new QLineEdit(topFrame);
229 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 234 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
230 topLayout->addWidget(lab ,iii,0); 235 topLayout->addWidget(lab ,iii,0);
231 topLayout->addWidget(mUserDateFormatShort,iii,1); 236 topLayout->addWidget(mUserDateFormatShort,iii,1);
232 ++iii; 237 ++iii;
233 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 238 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
234 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 239 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
235 ++iii; 240 ++iii;
236 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 241 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
237 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 242 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
238 ++iii; 243 ++iii;
239 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 244 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
240 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 245 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
241 ++iii; 246 ++iii;
242 247
243 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 248 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
244 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 249 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
245 250
246 251
247 tabWidget->addTab( topFrame, i18n( "Date Format" ) ); 252 tabWidget->addTab( topFrame, i18n( "Date Format" ) );
248} 253}
249 254
250void KDEPIMConfigWidget::setupLocaleTab() 255void KDEPIMConfigWidget::setupLocaleTab()
251{ 256{
252 257
253 QWidget *topFrame = new QWidget( this ); 258 QWidget *topFrame = new QWidget( this );
254 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 259 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
255 260
256 topLayout->setSpacing(KDialog::spacingHint()); 261 topLayout->setSpacing(KDialog::spacingHint());
257 topLayout->setMargin(KDialog::marginHint()); 262 topLayout->setMargin(KDialog::marginHint());
258 int iii = 0; 263 int iii = 0;
259 KPrefsWidRadios *syncPrefsGroup = 264 KPrefsWidRadios *syncPrefsGroup =
260 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); 265 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame);
261 syncPrefsGroup->addRadio(i18n("English")); 266 syncPrefsGroup->addRadio(i18n("English"));
262 syncPrefsGroup->addRadio(i18n("German")); 267 syncPrefsGroup->addRadio(i18n("German"));
263 syncPrefsGroup->addRadio(i18n("French")); 268 syncPrefsGroup->addRadio(i18n("French"));
264 syncPrefsGroup->addRadio(i18n("Italian")); 269 syncPrefsGroup->addRadio(i18n("Italian"));
265 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 270 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
266 if ( QApplication::desktop()->width() < 300 ) 271 if ( QApplication::desktop()->width() < 300 ) {
267 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 272 syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
273 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
274 }
268 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 275 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
269 ++iii; 276 ++iii;
270 277
271 syncPrefsGroup = 278 syncPrefsGroup =
272 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); 279 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame);
273 if ( QApplication::desktop()->width() > 300 ) 280 if ( QApplication::desktop()->width() > 300 )
274 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 281 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
275 syncPrefsGroup->addRadio(i18n("24:00")); 282 syncPrefsGroup->addRadio(i18n("24:00"));
276 syncPrefsGroup->addRadio(i18n("12:00am")); 283 syncPrefsGroup->addRadio(i18n("12:00am"));
277 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 284 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
278 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 285 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
279 ++iii; 286 ++iii;
280 287
281 KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), 288 KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"),
282 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); 289 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame);
283 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 290 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
284 ++iii; 291 ++iii;
285 292
286 293
287 tabWidget->addTab( topFrame, i18n( "Locale" ) ); 294 tabWidget->addTab( topFrame, i18n( "Locale" ) );
288 295
289} 296}
290 297
291 298
292void KDEPIMConfigWidget::setupTimeZoneTab() 299void KDEPIMConfigWidget::setupTimeZoneTab()
293{ 300{
294 QWidget *topFrame = new QWidget( this ); 301 QWidget *topFrame = new QWidget( this );
295 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); 302 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2);
296 topLayout->setSpacing(KDialog::spacingHint()); 303 topLayout->setSpacing(KDialog::spacingHintSmall());
297 topLayout->setMargin(KDialog::marginHint()); 304 topLayout->setMargin(KDialog::marginHintSmall());
298 305
299 QHBox *timeZoneBox = new QHBox( topFrame ); 306 QHBox *timeZoneBox = new QHBox( topFrame );
300 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 307 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
301 308
302 new QLabel( i18n("Timezone:"), timeZoneBox ); 309 new QLabel( i18n("Timezone:"), timeZoneBox );
303 mTimeZoneCombo = new QComboBox( timeZoneBox ); 310 mTimeZoneCombo = new QComboBox( timeZoneBox );
304 if ( QApplication::desktop()->width() < 300 ) { 311 if ( QApplication::desktop()->width() < 300 ) {
305 mTimeZoneCombo->setMaximumWidth(150); 312 mTimeZoneCombo->setMaximumWidth(150);
306 } 313 }
307 314
308 QStringList list; 315 QStringList list;
309 list = KGlobal::locale()->timeZoneList(); 316 list = KGlobal::locale()->timeZoneList();
310 mTimeZoneCombo->insertStringList(list); 317 mTimeZoneCombo->insertStringList(list);
311 318
312 // find the currently set time zone and select it 319 // find the currently set time zone and select it
313 QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; 320 QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId;
314 int nCurrentlySet = 11; 321 int nCurrentlySet = 11;
315 for (int i = 0; i < mTimeZoneCombo->count(); i++) 322 for (int i = 0; i < mTimeZoneCombo->count(); i++)
316 { 323 {
317 if (mTimeZoneCombo->text(i) == sCurrentlySet) 324 if (mTimeZoneCombo->text(i) == sCurrentlySet)
318 { 325 {
319 nCurrentlySet = i; 326 nCurrentlySet = i;
320 break; 327 break;
321 } 328 }
322 } 329 }
323 mTimeZoneCombo->setCurrentItem(nCurrentlySet); 330 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
324 int iii = 1; 331 int iii = 1;
325 KPrefsWidBool *sb = 332 KPrefsWidBool *sb =
326 addWidBool(i18n("Add 30 min (+00:30) to selected Timezone"), 333 addWidBool(i18n("Add 30 min (+00:30) to selected Timezone"),
327 &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); 334 &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame);
328 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 335 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
329 ++iii; 336 ++iii;
330 sb = 337 sb =
331 addWidBool(i18n("Timezone has daylight saving"), 338 addWidBool(i18n("Timezone has daylight saving"),
332 &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); 339 &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame);
333 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 340 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
334 ++iii; 341 ++iii;
335 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); 342 QLabel* lab;
343
344 lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
336 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 345 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
337 ++iii; 346 ++iii;
347
338 lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); 348 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
339 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 349 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
340 ++iii; 350 ++iii;
341 lab = new QLabel( i18n("Daylight start:"), topFrame ); 351 lab = new QLabel( i18n("Daylight start:"), topFrame );
342 topLayout->addWidget(lab, iii,0); 352 topLayout->addWidget(lab, iii,0);
343 mStartDateSavingEdit = new KDateEdit(topFrame); 353 mStartDateSavingEdit = new KDateEdit(topFrame);
344 topLayout->addWidget(mStartDateSavingEdit, iii,1); 354 topLayout->addWidget(mStartDateSavingEdit, iii,1);
345 ++iii; 355 ++iii;
346 356
347 lab = new QLabel( i18n("Daylight end:"), topFrame ); 357 lab = new QLabel( i18n("Daylight end:"), topFrame );
348 topLayout->addWidget(lab, iii,0); 358 topLayout->addWidget(lab, iii,0);
349 mEndDateSavingEdit = new KDateEdit(topFrame); 359 mEndDateSavingEdit = new KDateEdit(topFrame);
350 topLayout->addWidget(mEndDateSavingEdit, iii,1); 360 topLayout->addWidget(mEndDateSavingEdit, iii,1);
351 ++iii; 361 ++iii;
352 QDate current ( 2001, 1,1); 362 QDate current ( 2001, 1,1);
353 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); 363 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
354 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); 364 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
355 365
356 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 366 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
357 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 367 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
358 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); 368 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) );
359 369
360 370
361 371