-rw-r--r-- | bin/kdepim/WhatsNew.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | kaddressbook/filtereditdialog.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 3 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 3 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 15 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 15 | ||||
-rw-r--r-- | microkde/kglobalsettings.cpp | 8 |
9 files changed, 37 insertions, 14 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 706fb7f..1c2bff8 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,30 +1,32 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.21 ************ | 3 | ********** VERSION 2.0.21 ************ |
4 | 4 | ||
5 | Fixed another SMTP problem in OM/Pi. | 5 | Fixed another SMTP problem in OM/Pi. |
6 | Some small changed in the new datenavigator in KO/Pi. | 6 | Some small changed in the new datenavigator in KO/Pi. |
7 | Changed default setting for new filter in KA/Pi to "exclude categories". | ||
8 | Changed the default font size for 640x480 display | ||
7 | 9 | ||
8 | ********** VERSION 2.0.20 ************ | 10 | ********** VERSION 2.0.20 ************ |
9 | 11 | ||
10 | Two small fixes in OM/Pi. | 12 | Two small fixes in OM/Pi. |
11 | 13 | ||
12 | Better resizing of the new datenavigator in KO/Pi. | 14 | Better resizing of the new datenavigator in KO/Pi. |
13 | 15 | ||
14 | ********** VERSION 2.0.19 ************ | 16 | ********** VERSION 2.0.19 ************ |
15 | KO/Pi: | 17 | KO/Pi: |
16 | Enhancements and bugfixes in the new datenavigator. | 18 | Enhancements and bugfixes in the new datenavigator. |
17 | Bugfix in this changelog: | 19 | Bugfix in this changelog: |
18 | The datenavigator was changed in version 2.0.18, not the datepicker. | 20 | The datenavigator was changed in version 2.0.18, not the datepicker. |
19 | 21 | ||
20 | ********** VERSION 2.0.18 ************ | 22 | ********** VERSION 2.0.18 ************ |
21 | KO/Pi: | 23 | KO/Pi: |
22 | Fixed some minor problems. | 24 | Fixed some minor problems. |
23 | Cleaned up the KO/Pi config dialog. | 25 | Cleaned up the KO/Pi config dialog. |
24 | Fixed problem moving events in aganda view. | 26 | Fixed problem moving events in aganda view. |
25 | Made datepicker scaleable, i.e. if the datenavigator shows now a | 27 | Made datepicker scaleable, i.e. if the datenavigator shows now a |
26 | datenavigator matrix depending on its size. | 28 | datenavigator matrix depending on its size. |
27 | Birthdays are now displayed green in the datenavigator. | 29 | Birthdays are now displayed green in the datenavigator. |
28 | What'sThis Help in datenavigator shows all events of the day. | 30 | What'sThis Help in datenavigator shows all events of the day. |
29 | 31 | ||
30 | OM/Pi: | 32 | OM/Pi: |
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index b976f1b..c6cd0ae 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1281,29 +1281,29 @@ | |||
1281 | { "Created time","Erstellt Zeit" }, | 1281 | { "Created time","Erstellt Zeit" }, |
1282 | { "Last modified time","Geändert Zeit" }, | 1282 | { "Last modified time","Geändert Zeit" }, |
1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1284 | { "View Options","Anzeige Optionen" }, | 1284 | { "View Options","Anzeige Optionen" }, |
1285 | { "<b>Created: ","<b>Erstellt am: " }, | 1285 | { "<b>Created: ","<b>Erstellt am: " }, |
1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1287 | { "Journal: ","Journal: " }, | 1287 | { "Journal: ","Journal: " }, |
1288 | { "yearly","jährlich" }, | 1288 | { "yearly","jährlich" }, |
1289 | { "(%1) ","%1-" }, | 1289 | { "(%1) ","%1-" }, |
1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1293 | { "Summary/Loc.","Titel/Ort" }, | 1293 | { "Summary/Loc.","Titel/Ort" }, |
1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1295 | { "Week Number","Wochennummer" }, | 1295 | { "Week Number","Wochennummer" }, |
1296 | { "Import","Importiere" }, | 1296 | { "Import","Importiere" }, |
1297 | { "Export","Exportiere" }, | 1297 | { "Export","Exportiere" }, |
1298 | { "Beam","Beame" }, | 1298 | { "Beam","Beame" }, |
1299 | { "Export selected","Exportiere Selektierte" }, | 1299 | { "Export selected","Exportiere Selektierte" }, |
1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1302 | { "Journal/Details...","Journale/Details..." }, | 1302 | { "Journal/Details...","Journale/Details..." }, |
1303 | { "Agenda View","Agenda Ansicht" }, | 1303 | { "Agenda View","Agenda Ansicht" }, |
1304 | { "Show current time","Zeige aktuelle Zeit" }, | 1304 | { "Show current time","Zeige aktuelle Zeit" }, |
1305 | { "","" }, | 1305 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1306 | { "","" }, | 1306 | { "","" }, |
1307 | { "","" }, | 1307 | { "","" }, |
1308 | { "","" }, | 1308 | { "","" }, |
1309 | { "","" }, | 1309 | { "","" }, |
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index 1194406..ef9b979 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp | |||
@@ -137,51 +137,51 @@ void FilterEditDialog::initGUI() | |||
137 | resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); | 137 | resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); |
138 | #endif //KAB_EMBEDDED | 138 | #endif //KAB_EMBEDDED |
139 | 139 | ||
140 | 140 | ||
141 | QWidget *page = plainPage(); | 141 | QWidget *page = plainPage(); |
142 | QLabel *label; | 142 | QLabel *label; |
143 | 143 | ||
144 | QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); | 144 | QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); |
145 | 145 | ||
146 | label = new QLabel( i18n( "Name" ), page ); | 146 | label = new QLabel( i18n( "Name" ), page ); |
147 | mNameEdit = new KLineEdit( page ); | 147 | mNameEdit = new KLineEdit( page ); |
148 | mNameEdit->setFocus(); | 148 | mNameEdit->setFocus(); |
149 | topLayout->addWidget( label, 0, 0 ); | 149 | topLayout->addWidget( label, 0, 0 ); |
150 | topLayout->addWidget( mNameEdit, 0, 1 ); | 150 | topLayout->addWidget( mNameEdit, 0, 1 ); |
151 | connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), | 151 | connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), |
152 | SLOT( filterNameTextChanged( const QString&) ) ); | 152 | SLOT( filterNameTextChanged( const QString&) ) ); |
153 | 153 | ||
154 | mCategoriesView = new KListView( page ); | 154 | mCategoriesView = new KListView( page ); |
155 | mCategoriesView->addColumn( i18n( "Categories" ) ); | 155 | mCategoriesView->addColumn( i18n( "Categories" ) ); |
156 | topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); | 156 | topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); |
157 | 157 | ||
158 | mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); | 158 | mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); |
159 | mMatchRuleGroup->setExclusive( true ); | 159 | mMatchRuleGroup->setExclusive( true ); |
160 | QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); | 160 | QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); |
161 | radio->setChecked( true ); | ||
162 | //mMatchRuleGroup->insert( radio ); | 161 | //mMatchRuleGroup->insert( radio ); |
163 | radio = new QRadioButton( i18n( "Exclude categories" ), mMatchRuleGroup ); | 162 | radio = new QRadioButton( i18n( "Exclude categories" ), mMatchRuleGroup ); |
163 | radio->setChecked( true ); | ||
164 | //mMatchRuleGroup->insert( radio ); | 164 | //mMatchRuleGroup->insert( radio ); |
165 | topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); | 165 | topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); |
166 | 166 | ||
167 | QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page ); | 167 | QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page ); |
168 | mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); | 168 | mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); |
169 | mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); | 169 | mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); |
170 | mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup ); | 170 | mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup ); |
171 | mPublic->setChecked( true ); | 171 | mPublic->setChecked( true ); |
172 | mPrivate->setChecked( true ); | 172 | mPrivate->setChecked( true ); |
173 | mConfidential->setChecked( true ); | 173 | mConfidential->setChecked( true ); |
174 | topLayout->addMultiCellWidget( mMatchPPCGroup, 3, 3, 0, 1 ); | 174 | topLayout->addMultiCellWidget( mMatchPPCGroup, 3, 3, 0, 1 ); |
175 | 175 | ||
176 | } | 176 | } |
177 | 177 | ||
178 | void FilterEditDialog::filterNameTextChanged( const QString &text ) | 178 | void FilterEditDialog::filterNameTextChanged( const QString &text ) |
179 | { | 179 | { |
180 | enableButtonOK( !text.isEmpty() ); | 180 | enableButtonOK( !text.isEmpty() ); |
181 | } | 181 | } |
182 | 182 | ||
183 | void FilterEditDialog::slotHelp() | 183 | void FilterEditDialog::slotHelp() |
184 | { | 184 | { |
185 | #ifndef KAB_EMBEDDED | 185 | #ifndef KAB_EMBEDDED |
186 | kapp->invokeHelp( "using-filters" ); | 186 | kapp->invokeHelp( "using-filters" ); |
187 | #endif //KAB_EMBEDDED | 187 | #endif //KAB_EMBEDDED |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index e8f6132..59aa5a5 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -3165,48 +3165,49 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | |||
3165 | bool external = false; | 3165 | bool external = false; |
3166 | bool isXML = false; | 3166 | bool isXML = false; |
3167 | if ( filename.right(4) == ".xml") { | 3167 | if ( filename.right(4) == ".xml") { |
3168 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3168 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3169 | isXML = true; | 3169 | isXML = true; |
3170 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 3170 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
3171 | } else { | 3171 | } else { |
3172 | external = !manager->mIsKapiFile; | 3172 | external = !manager->mIsKapiFile; |
3173 | if ( external ) { | 3173 | if ( external ) { |
3174 | qDebug("KA: Sync::Setting vcf mode to external "); | 3174 | qDebug("KA: Sync::Setting vcf mode to external "); |
3175 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3175 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3176 | AddressBook::Iterator it; | 3176 | AddressBook::Iterator it; |
3177 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 3177 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
3178 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); | 3178 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); |
3179 | (*it).computeCsum( mCurrentSyncDevice ); | 3179 | (*it).computeCsum( mCurrentSyncDevice ); |
3180 | } | 3180 | } |
3181 | } | 3181 | } |
3182 | } | 3182 | } |
3183 | //AddressBook::Iterator it; | 3183 | //AddressBook::Iterator it; |
3184 | //QStringList vcards; | 3184 | //QStringList vcards; |
3185 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 3185 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
3186 | // qDebug("Name %s ", (*it).familyName().latin1()); | 3186 | // qDebug("Name %s ", (*it).familyName().latin1()); |
3187 | //} | 3187 | //} |
3188 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 3188 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
3189 | syncManager->hideProgressBar(); | ||
3189 | if ( syncOK ) { | 3190 | if ( syncOK ) { |
3190 | if ( syncManager->mWriteBackFile ) | 3191 | if ( syncManager->mWriteBackFile ) |
3191 | { | 3192 | { |
3192 | if ( external ) | 3193 | if ( external ) |
3193 | abLocal.removeSyncAddressees( !isXML); | 3194 | abLocal.removeSyncAddressees( !isXML); |
3194 | qDebug("KA: Sync::Saving remote AB "); | 3195 | qDebug("KA: Sync::Saving remote AB "); |
3195 | if ( ! abLocal.saveAB()) | 3196 | if ( ! abLocal.saveAB()) |
3196 | qDebug("KA: sync::Error writing back AB to file "); | 3197 | qDebug("KA: sync::Error writing back AB to file "); |
3197 | if ( external ) { | 3198 | if ( external ) { |
3198 | // afterwrite processing | 3199 | // afterwrite processing |
3199 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); | 3200 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); |
3200 | } | 3201 | } |
3201 | } | 3202 | } |
3202 | } | 3203 | } |
3203 | setModified(); | 3204 | setModified(); |
3204 | 3205 | ||
3205 | } | 3206 | } |
3206 | abLocal.removeResources(); | 3207 | abLocal.removeResources(); |
3207 | if ( syncOK ) | 3208 | if ( syncOK ) |
3208 | mViewManager->refreshView(); | 3209 | mViewManager->refreshView(); |
3209 | return syncOK; | 3210 | return syncOK; |
3210 | 3211 | ||
3211 | } | 3212 | } |
3212 | void KABCore::removeSyncInfo( QString syncProfile) | 3213 | void KABCore::removeSyncInfo( QString syncProfile) |
@@ -3216,95 +3217,97 @@ void KABCore::removeSyncInfo( QString syncProfile) | |||
3216 | setModified(); | 3217 | setModified(); |
3217 | } | 3218 | } |
3218 | 3219 | ||
3219 | 3220 | ||
3220 | //this is a overwritten callbackmethods from the syncinterface | 3221 | //this is a overwritten callbackmethods from the syncinterface |
3221 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 3222 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
3222 | { | 3223 | { |
3223 | if ( resource == "phone" ) | 3224 | if ( resource == "phone" ) |
3224 | return syncPhone(); | 3225 | return syncPhone(); |
3225 | disableBR( true ); | 3226 | disableBR( true ); |
3226 | if ( manager != syncManager ) | 3227 | if ( manager != syncManager ) |
3227 | qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); | 3228 | qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); |
3228 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 3229 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
3229 | 3230 | ||
3230 | AddressBook abLocal( resource,"syncContact"); | 3231 | AddressBook abLocal( resource,"syncContact"); |
3231 | bool syncOK = false; | 3232 | bool syncOK = false; |
3232 | message(i18n("Loading DTM address data..."), false); | 3233 | message(i18n("Loading DTM address data..."), false); |
3233 | if ( abLocal.load() ) { | 3234 | if ( abLocal.load() ) { |
3234 | qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 3235 | qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
3235 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3236 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3236 | message(i18n("Sync preprocessing..."),false); | 3237 | message(i18n("Sync preprocessing..."),false); |
3237 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); | 3238 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); |
3238 | message(i18n("Synchronizing..."),false); | 3239 | message(i18n("Synchronizing..."),false); |
3239 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 3240 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
3241 | syncManager->hideProgressBar(); | ||
3240 | if ( syncOK ) { | 3242 | if ( syncOK ) { |
3241 | if ( syncManager->mWriteBackFile ) { | 3243 | if ( syncManager->mWriteBackFile ) { |
3242 | abLocal.removeSyncAddressees( false ); | 3244 | abLocal.removeSyncAddressees( false ); |
3243 | message(i18n("Saving DTM address data..."),false); | 3245 | message(i18n("Saving DTM address data..."),false); |
3244 | abLocal.saveAB(); | 3246 | abLocal.saveAB(); |
3245 | message(i18n("Sync postprocessing..."),false); | 3247 | message(i18n("Sync postprocessing..."),false); |
3246 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 3248 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
3247 | } | 3249 | } |
3248 | } else | 3250 | } else |
3249 | message( i18n("Sync cancelled or failed.") ); | 3251 | message( i18n("Sync cancelled or failed.") ); |
3250 | setModified(); | 3252 | setModified(); |
3251 | } | 3253 | } |
3252 | abLocal.removeResources(); | 3254 | abLocal.removeResources(); |
3253 | if ( syncOK ) { | 3255 | if ( syncOK ) { |
3254 | mViewManager->refreshView(); | 3256 | mViewManager->refreshView(); |
3255 | message(i18n("DTM syncing finished.")); | 3257 | message(i18n("DTM syncing finished.")); |
3256 | } | 3258 | } |
3257 | disableBR( false ); | 3259 | disableBR( false ); |
3258 | return syncOK; | 3260 | return syncOK; |
3259 | 3261 | ||
3260 | } | 3262 | } |
3261 | void KABCore::message( QString m, bool startTimer) | 3263 | void KABCore::message( QString m, bool startTimer) |
3262 | { | 3264 | { |
3263 | topLevelWidget()->setCaption( m ); | 3265 | topLevelWidget()->setCaption( m ); |
3264 | qApp->processEvents(); | 3266 | qApp->processEvents(); |
3265 | if ( startTimer ) | 3267 | if ( startTimer ) |
3266 | mMessageTimer->start( 15000, true ); | 3268 | mMessageTimer->start( 15000, true ); |
3267 | else | 3269 | else |
3268 | mMessageTimer->stop(); | 3270 | mMessageTimer->stop(); |
3269 | } | 3271 | } |
3270 | bool KABCore::syncPhone() | 3272 | bool KABCore::syncPhone() |
3271 | { | 3273 | { |
3272 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 3274 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
3273 | QString fileName = getPhoneFile(); | 3275 | QString fileName = getPhoneFile(); |
3274 | if ( !PhoneAccess::readFromPhone( fileName) ) { | 3276 | if ( !PhoneAccess::readFromPhone( fileName) ) { |
3275 | message(i18n("Phone access failed!")); | 3277 | message(i18n("Phone access failed!")); |
3276 | return false; | 3278 | return false; |
3277 | } | 3279 | } |
3278 | AddressBook abLocal( fileName,"syncContact"); | 3280 | AddressBook abLocal( fileName,"syncContact"); |
3279 | bool syncOK = false; | 3281 | bool syncOK = false; |
3280 | { | 3282 | { |
3281 | abLocal.importFromFile( fileName ); | 3283 | abLocal.importFromFile( fileName ); |
3282 | qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 3284 | qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
3283 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3285 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3284 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); | 3286 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); |
3285 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 3287 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
3286 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 3288 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
3289 | syncManager->hideProgressBar(); | ||
3287 | if ( syncOK ) { | 3290 | if ( syncOK ) { |
3288 | if ( syncManager->mWriteBackFile ) { | 3291 | if ( syncManager->mWriteBackFile ) { |
3289 | abLocal.removeSyncAddressees( true ); | 3292 | abLocal.removeSyncAddressees( true ); |
3290 | abLocal.saveABphone( fileName ); | 3293 | abLocal.saveABphone( fileName ); |
3291 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); | 3294 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); |
3292 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); | 3295 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); |
3293 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 3296 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
3294 | } | 3297 | } |
3295 | } | 3298 | } |
3296 | setModified(); | 3299 | setModified(); |
3297 | } | 3300 | } |
3298 | abLocal.removeResources(); | 3301 | abLocal.removeResources(); |
3299 | if ( syncOK ) | 3302 | if ( syncOK ) |
3300 | mViewManager->refreshView(); | 3303 | mViewManager->refreshView(); |
3301 | return syncOK; | 3304 | return syncOK; |
3302 | } | 3305 | } |
3303 | void KABCore::getFile( bool success ) | 3306 | void KABCore::getFile( bool success ) |
3304 | { | 3307 | { |
3305 | if ( ! success ) { | 3308 | if ( ! success ) { |
3306 | message( i18n("Error receiving file. Nothing changed!") ); | 3309 | message( i18n("Error receiving file. Nothing changed!") ); |
3307 | return; | 3310 | return; |
3308 | } | 3311 | } |
3309 | int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); | 3312 | int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); |
3310 | if ( count ) | 3313 | if ( count ) |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 5420822..2820ca2 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -527,48 +527,51 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | |||
527 | dY = -dY; | 527 | dY = -dY; |
528 | //qDebug("%d %d %d ", dX, dY , blockmoveDist ); | 528 | //qDebug("%d %d %d ", dX, dY , blockmoveDist ); |
529 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | 529 | if ( dX > blockmoveDist || dY > blockmoveDist ) { |
530 | blockMoving = false; | 530 | blockMoving = false; |
531 | } | 531 | } |
532 | } | 532 | } |
533 | if (object != viewport()) { | 533 | if (object != viewport()) { |
534 | KOAgendaItem *moveItem = (KOAgendaItem *)object; | 534 | KOAgendaItem *moveItem = (KOAgendaItem *)object; |
535 | if (!moveItem->incidence()->isReadOnly() ) { | 535 | if (!moveItem->incidence()->isReadOnly() ) { |
536 | if (!mActionItem) | 536 | if (!mActionItem) |
537 | setNoActionCursor(moveItem,viewportPos); | 537 | setNoActionCursor(moveItem,viewportPos); |
538 | else { | 538 | else { |
539 | if ( !blockMoving ) | 539 | if ( !blockMoving ) |
540 | performItemAction(viewportPos); | 540 | performItemAction(viewportPos); |
541 | } | 541 | } |
542 | } | 542 | } |
543 | } else { // ---------- viewport() | 543 | } else { // ---------- viewport() |
544 | if ( mActionType == SELECT ) { | 544 | if ( mActionType == SELECT ) { |
545 | performSelectAction( viewportPos ); | 545 | performSelectAction( viewportPos ); |
546 | } | 546 | } |
547 | } | 547 | } |
548 | break; | 548 | break; |
549 | 549 | ||
550 | case QEvent::MouseButtonDblClick: | 550 | case QEvent::MouseButtonDblClick: |
551 | blockMoving = false; | ||
552 | leftMouseDown = false; | ||
553 | rightMouseDown = false; | ||
551 | if (object == viewport()) { | 554 | if (object == viewport()) { |
552 | selectItem(0); | 555 | selectItem(0); |
553 | int x,y; | 556 | int x,y; |
554 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 557 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
555 | int gx,gy; | 558 | int gx,gy; |
556 | contentsToGrid(x,y,gx,gy); | 559 | contentsToGrid(x,y,gx,gy); |
557 | emit newEventSignal(gx,gy); | 560 | emit newEventSignal(gx,gy); |
558 | } else { | 561 | } else { |
559 | KOAgendaItem *doubleClickedItem = (KOAgendaItem *)object; | 562 | KOAgendaItem *doubleClickedItem = (KOAgendaItem *)object; |
560 | selectItem(doubleClickedItem); | 563 | selectItem(doubleClickedItem); |
561 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 564 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
562 | emit editIncidenceSignal(doubleClickedItem->incidence()); | 565 | emit editIncidenceSignal(doubleClickedItem->incidence()); |
563 | else | 566 | else |
564 | emit showIncidenceSignal(doubleClickedItem->incidence()); | 567 | emit showIncidenceSignal(doubleClickedItem->incidence()); |
565 | } | 568 | } |
566 | break; | 569 | break; |
567 | 570 | ||
568 | default: | 571 | default: |
569 | break; | 572 | break; |
570 | } | 573 | } |
571 | return true; | 574 | return true; |
572 | } | 575 | } |
573 | 576 | ||
574 | void KOAgenda::newItem( int item ) | 577 | void KOAgenda::newItem( int item ) |
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 496f125..4ee5292 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -204,217 +204,224 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) | |||
204 | mAlarmSoundButton = new QPushButton(parent); | 204 | mAlarmSoundButton = new QPushButton(parent); |
205 | mAlarmSoundButton->setPixmap(SmallIcon("playsound")); | 205 | mAlarmSoundButton->setPixmap(SmallIcon("playsound")); |
206 | mAlarmSoundButton->setToggleButton(true); | 206 | mAlarmSoundButton->setToggleButton(true); |
207 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); | 207 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); |
208 | connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); | 208 | connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); |
209 | alarmLayout->addWidget(mAlarmSoundButton); | 209 | alarmLayout->addWidget(mAlarmSoundButton); |
210 | 210 | ||
211 | mAlarmProgramButton = new QPushButton(parent); | 211 | mAlarmProgramButton = new QPushButton(parent); |
212 | mAlarmProgramButton->setPixmap(SmallIcon("run")); | 212 | mAlarmProgramButton->setPixmap(SmallIcon("run")); |
213 | mAlarmProgramButton->setToggleButton(true); | 213 | mAlarmProgramButton->setToggleButton(true); |
214 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); | 214 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); |
215 | connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); | 215 | connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); |
216 | alarmLayout->addWidget(mAlarmProgramButton); | 216 | alarmLayout->addWidget(mAlarmProgramButton); |
217 | mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); | 217 | mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); |
218 | mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); | 218 | mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); |
219 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 219 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
220 | // mAlarmSoundButton->hide(); | 220 | // mAlarmSoundButton->hide(); |
221 | // mAlarmProgramButton->hide(); | 221 | // mAlarmProgramButton->hide(); |
222 | // } | 222 | // } |
223 | } | 223 | } |
224 | 224 | ||
225 | void KOEditorGeneral::pickAlarmSound() | 225 | void KOEditorGeneral::pickAlarmSound() |
226 | { | 226 | { |
227 | 227 | ||
228 | qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); | ||
228 | //QString prefix = mAlarmSound; | 229 | //QString prefix = mAlarmSound; |
229 | if (!mAlarmSoundButton->isOn()) { | 230 | if (!mAlarmSoundButton->isOn()) { |
230 | //mAlarmSound = ""; | 231 | //mAlarmSound = ""; |
231 | QToolTip::remove(mAlarmSoundButton); | 232 | QToolTip::remove(mAlarmSoundButton); |
232 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); | 233 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); |
233 | mAlarmProgramButton->setOn(true); | 234 | mAlarmProgramButton->setOn(true); |
234 | mAlarmSoundButton->setOn(false); | 235 | mAlarmSoundButton->setOn(false); |
236 | pickAlarmProgram(); | ||
235 | } else { | 237 | } else { |
236 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, | 238 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, |
237 | i18n("*.wav|Wav Files"), 0)); | 239 | i18n("*.wav|Wav Files"), 0)); |
238 | if (!fileName.isEmpty()) { | 240 | if (!fileName.isEmpty()) { |
239 | mAlarmSound = fileName; | 241 | mAlarmSound = fileName; |
240 | QToolTip::remove(mAlarmSoundButton); | 242 | QToolTip::remove(mAlarmSoundButton); |
241 | QString dispStr = i18n("Playing '%1'").arg(fileName); | 243 | QString dispStr = i18n("Playing '%1'").arg(fileName); |
242 | QToolTip::add(mAlarmSoundButton, dispStr); | 244 | QToolTip::add(mAlarmSoundButton, dispStr); |
243 | mAlarmProgramButton->setOn(false); | 245 | mAlarmProgramButton->setOn(false); |
244 | mAlarmSoundButton->setOn(true); | 246 | mAlarmSoundButton->setOn(true); |
245 | } else { | 247 | } else { |
246 | mAlarmProgramButton->setOn(true); | 248 | mAlarmProgramButton->setOn(true); |
247 | mAlarmSoundButton->setOn(false); | 249 | mAlarmSoundButton->setOn(false); |
248 | 250 | ||
249 | } | 251 | } |
250 | } | 252 | } |
251 | 253 | ||
252 | if (mAlarmProgramButton->isOn()) | 254 | if (mAlarmProgramButton->isOn()) |
253 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 255 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
254 | if ( mAlarmSoundButton->isOn()) | 256 | if ( mAlarmSoundButton->isOn()) |
255 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) ); | 257 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
256 | } | 258 | } |
257 | 259 | ||
258 | void KOEditorGeneral::pickAlarmProgram() | 260 | void KOEditorGeneral::pickAlarmProgram() |
259 | { | 261 | { |
260 | if (!mAlarmProgramButton->isOn()) { | 262 | if (!mAlarmProgramButton->isOn()) { |
261 | //mAlarmProgram = ""; | 263 | //mAlarmProgram = ""; |
262 | QToolTip::remove(mAlarmProgramButton); | 264 | QToolTip::remove(mAlarmProgramButton); |
263 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); | 265 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); |
264 | mAlarmProgramButton->setOn(false); | 266 | mAlarmProgramButton->setOn(false); |
265 | mAlarmSoundButton->setOn(true); | 267 | mAlarmSoundButton->setOn(true); |
268 | pickAlarmSound(); | ||
266 | } else { | 269 | } else { |
267 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); | 270 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); |
268 | if (!fileName.isEmpty()) { | 271 | if (!fileName.isEmpty()) { |
269 | mAlarmProgram = fileName; | 272 | mAlarmProgram = fileName; |
270 | QToolTip::remove(mAlarmProgramButton); | 273 | QToolTip::remove(mAlarmProgramButton); |
271 | QString dispStr = i18n("Running '%1'").arg(fileName); | 274 | QString dispStr = i18n("Running '%1'").arg(fileName); |
272 | QToolTip::add(mAlarmProgramButton, dispStr); | 275 | QToolTip::add(mAlarmProgramButton, dispStr); |
273 | mAlarmSoundButton->setOn(false); | 276 | mAlarmSoundButton->setOn(false); |
274 | mAlarmProgramButton->setOn(true); | 277 | mAlarmProgramButton->setOn(true); |
275 | } else { | 278 | } else { |
276 | mAlarmProgramButton->setOn(false); | 279 | mAlarmProgramButton->setOn(false); |
277 | mAlarmSoundButton->setOn(true); | 280 | mAlarmSoundButton->setOn(true); |
278 | } | 281 | } |
279 | } | 282 | } |
280 | if (mAlarmProgramButton->isOn()) | 283 | if (mAlarmProgramButton->isOn()) |
281 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 284 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
282 | if ( mAlarmSoundButton->isOn()) | 285 | if ( mAlarmSoundButton->isOn()) |
283 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) ); | 286 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
284 | } | 287 | } |
285 | 288 | ||
286 | 289 | ||
287 | QString KOEditorGeneral::getFittingPath( const QString s ) | 290 | QString KOEditorGeneral::getFittingPath( const QString s ) |
288 | { | 291 | { |
289 | int maxlen = 50; | 292 | int maxlen = 50; |
290 | if ( QApplication::desktop()->width() < 640 ) { | 293 | if ( QApplication::desktop()->width() < 640 ) { |
291 | if ( QApplication::desktop()->width() < 320 ) | 294 | if ( QApplication::desktop()->width() < 320 ) |
292 | maxlen = 22; | 295 | maxlen = 22; |
293 | else | 296 | else |
294 | maxlen = 35; | 297 | maxlen = 35; |
295 | } | 298 | } |
296 | if ( s.length() > maxlen ) { | 299 | if ( s.length() > maxlen ) { |
297 | return "..."+s.right(maxlen -3); | 300 | return "..."+s.right(maxlen -3); |
298 | } | 301 | } |
299 | return s; | 302 | return s; |
300 | } | 303 | } |
301 | 304 | ||
302 | void KOEditorGeneral::enableAlarmEdit(bool enable) | 305 | void KOEditorGeneral::enableAlarmEdit(bool enable) |
303 | { | 306 | { |
304 | if ( enable ) { | 307 | if ( enable ) { |
305 | if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) { | 308 | if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) { |
306 | mAlarmSoundButton->setOn( true ); | 309 | mAlarmSoundButton->setOn( true ); |
307 | if ( mAlarmSound.isEmpty() ) | 310 | if ( mAlarmSound.isEmpty() ) |
308 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 311 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
309 | else { | 312 | else { |
310 | if ( ! QFile::exists( mAlarmSound ) ) | 313 | if ( ! QFile::exists( mAlarmSound ) ) |
311 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 314 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
312 | } | 315 | } |
313 | } | 316 | } |
314 | if (mAlarmProgramButton->isOn()) | 317 | if (mAlarmProgramButton->isOn()) |
315 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 318 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
316 | if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) | 319 | if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) |
317 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 320 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
318 | } | 321 | } |
319 | else { | 322 | else { |
320 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled for this item")); | 323 | ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage); |
324 | //((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Edit item: ") + mSummaryEdit->currentText()); | ||
325 | |||
321 | 326 | ||
322 | } | 327 | } |
323 | mAlarmTimeEdit->setEnabled(enable); | 328 | mAlarmTimeEdit->setEnabled(enable); |
324 | mAlarmSoundButton->setEnabled(enable); | 329 | mAlarmSoundButton->setEnabled(enable); |
325 | mAlarmProgramButton->setEnabled(enable); | 330 | mAlarmProgramButton->setEnabled(enable); |
326 | mAlarmIncrCombo->setEnabled(enable); | 331 | mAlarmIncrCombo->setEnabled(enable); |
327 | } | 332 | } |
328 | 333 | ||
329 | void KOEditorGeneral::disableAlarmEdit(bool disable) | 334 | void KOEditorGeneral::disableAlarmEdit(bool disable) |
330 | { | 335 | { |
331 | enableAlarmEdit( !disable ); | 336 | enableAlarmEdit( !disable ); |
332 | } | 337 | } |
333 | 338 | ||
334 | void KOEditorGeneral::enableAlarm( bool enable ) | 339 | void KOEditorGeneral::enableAlarm( bool enable ) |
335 | { | 340 | { |
336 | enableAlarmEdit( enable ); | 341 | enableAlarmEdit( enable ); |
337 | } | 342 | } |
338 | 343 | ||
339 | void KOEditorGeneral::alarmDisable(bool disable) | 344 | void KOEditorGeneral::alarmDisable(bool disable) |
340 | { | 345 | { |
341 | if (!disable) { | 346 | if (!disable) { |
342 | //mAlarmBell->setEnabled(true); | 347 | //mAlarmBell->setEnabled(true); |
343 | mAlarmButton->setEnabled(true); | 348 | mAlarmButton->setEnabled(true); |
344 | } else { | 349 | } else { |
345 | //mAlarmBell->setEnabled(false); | 350 | //mAlarmBell->setEnabled(false); |
346 | mAlarmButton->setEnabled(false); | 351 | mAlarmButton->setEnabled(false); |
347 | mAlarmButton->setChecked(false); | 352 | mAlarmButton->setChecked(false); |
348 | mAlarmTimeEdit->setEnabled(false); | 353 | mAlarmTimeEdit->setEnabled(false); |
349 | mAlarmSoundButton->setEnabled(false); | 354 | mAlarmSoundButton->setEnabled(false); |
350 | mAlarmProgramButton->setEnabled(false); | 355 | mAlarmProgramButton->setEnabled(false); |
351 | mAlarmIncrCombo->setEnabled(false); | 356 | mAlarmIncrCombo->setEnabled(false); |
352 | } | 357 | } |
353 | } | 358 | } |
354 | 359 | ||
355 | void KOEditorGeneral::setCategories(const QString &str) | 360 | void KOEditorGeneral::setCategories(const QString &str) |
356 | { | 361 | { |
357 | mCategoriesLabel->setText(str); | 362 | mCategoriesLabel->setText(str); |
358 | } | 363 | } |
359 | 364 | ||
360 | void KOEditorGeneral::setDefaults(bool allDay) | 365 | void KOEditorGeneral::setDefaults(bool allDay) |
361 | { | 366 | { |
362 | #if 0 | 367 | #if 0 |
363 | mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); | 368 | mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); |
364 | #endif | 369 | #endif |
365 | 370 | ||
371 | mAlarmMessage = i18n("Edit new item"); | ||
366 | enableAlarmEdit( !allDay ); | 372 | enableAlarmEdit( !allDay ); |
367 | 373 | ||
368 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. | 374 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. |
369 | int alarmTime; | 375 | int alarmTime; |
370 | int a[] = { 1,5,10,15,30,60,180, 1440 }; | 376 | int a[] = { 1,5,10,15,30,60,180, 1440 }; |
371 | int index = KOPrefs::instance()->mAlarmTime; | 377 | int index = KOPrefs::instance()->mAlarmTime; |
372 | if (index < 0 || index > 7) { | 378 | if (index < 0 || index > 7) { |
373 | alarmTime = 15; | 379 | alarmTime = 15; |
374 | } else { | 380 | } else { |
375 | alarmTime = a[index]; | 381 | alarmTime = a[index]; |
376 | } | 382 | } |
377 | mAlarmButton ->setChecked( false ); | 383 | mAlarmButton ->setChecked( false ); |
378 | mAlarmTimeEdit->setValue(alarmTime); | 384 | mAlarmTimeEdit->setValue(alarmTime); |
379 | mAlarmIncrCombo->setCurrentItem(0); | 385 | mAlarmIncrCombo->setCurrentItem(0); |
380 | enableAlarmEdit( false ); | 386 | enableAlarmEdit( false ); |
381 | //alarmDisable (false); | 387 | //alarmDisable (false); |
382 | mSecrecyCombo->setCurrentItem(Incidence::SecrecyPublic); | 388 | mSecrecyCombo->setCurrentItem(Incidence::SecrecyPublic); |
383 | mCancelBox->setChecked( false ); | 389 | mCancelBox->setChecked( false ); |
384 | mSummaryEdit->setEditText(""); | 390 | mSummaryEdit->setEditText(""); |
385 | mLocationEdit->setEditText(""); | 391 | mLocationEdit->setEditText(""); |
386 | mDescriptionEdit->setText(""); | 392 | mDescriptionEdit->setText(""); |
387 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 393 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
388 | setCategories(""); | 394 | setCategories(""); |
389 | } | 395 | } |
390 | void KOEditorGeneral::setSecrecy( int num ) | 396 | void KOEditorGeneral::setSecrecy( int num ) |
391 | { | 397 | { |
392 | mSecrecyCombo->setCurrentItem(num); | 398 | mSecrecyCombo->setCurrentItem(num); |
393 | } | 399 | } |
394 | void KOEditorGeneral::readIncidence(Incidence *event) | 400 | void KOEditorGeneral::readIncidence(Incidence *event) |
395 | { | 401 | { |
396 | 402 | ||
403 | mAlarmMessage = i18n("Edit") +" "+event->summary(); | ||
397 | mAlarmIncrCombo->setCurrentItem(0); | 404 | mAlarmIncrCombo->setCurrentItem(0); |
398 | mSummaryEdit->setEditText(event->summary()); | 405 | mSummaryEdit->setEditText(event->summary()); |
399 | mLocationEdit->setEditText(event->location()); | 406 | mLocationEdit->setEditText(event->location()); |
400 | mDescriptionEdit->setText(event->description()); | 407 | mDescriptionEdit->setText(event->description()); |
401 | 408 | ||
402 | #if 0 | 409 | #if 0 |
403 | // organizer information | 410 | // organizer information |
404 | mOwnerLabel->setText(i18n("Owner: ") + event->organizer()); | 411 | mOwnerLabel->setText(i18n("Owner: ") + event->organizer()); |
405 | #endif | 412 | #endif |
406 | 413 | ||
407 | enableAlarmEdit( event->isAlarmEnabled() ); | 414 | enableAlarmEdit( event->isAlarmEnabled() ); |
408 | //qDebug("KOEditorGeneral::readIncidence(Incidence *event) "); | 415 | //qDebug("KOEditorGeneral::readIncidence(Incidence *event) "); |
409 | if(!event->isAlarmEnabled()) { | 416 | if(!event->isAlarmEnabled()) { |
410 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. | 417 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. |
411 | int alarmTime; | 418 | int alarmTime; |
412 | int a[] = { 1,5,10,15,30,60,180, 1440 }; | 419 | int a[] = { 1,5,10,15,30,60,180, 1440 }; |
413 | int index = KOPrefs::instance()->mAlarmTime; | 420 | int index = KOPrefs::instance()->mAlarmTime; |
414 | if (index < 0 || index > 7) { | 421 | if (index < 0 || index > 7) { |
415 | alarmTime = 15; | 422 | alarmTime = 15; |
416 | } else { | 423 | } else { |
417 | alarmTime = a[index]; | 424 | alarmTime = a[index]; |
418 | } | 425 | } |
419 | mAlarmTimeEdit->setValue(alarmTime); | 426 | mAlarmTimeEdit->setValue(alarmTime); |
420 | } | 427 | } |
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index de8edaf..f4728c7 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h | |||
@@ -87,27 +87,28 @@ class KOEditorGeneral : public QObject | |||
87 | void allAccepted(); | 87 | void allAccepted(); |
88 | 88 | ||
89 | protected: | 89 | protected: |
90 | //QLineEdit *mSummaryEdit; | 90 | //QLineEdit *mSummaryEdit; |
91 | //QLineEdit *mLocationEdit; | 91 | //QLineEdit *mLocationEdit; |
92 | KOLocationBox *mSummaryEdit; | 92 | KOLocationBox *mSummaryEdit; |
93 | KOLocationBox *mLocationEdit; | 93 | KOLocationBox *mLocationEdit; |
94 | QLabel *mAlarmBell; | 94 | QLabel *mAlarmBell; |
95 | QCheckBox *mAlarmButton; | 95 | QCheckBox *mAlarmButton; |
96 | QSpinBox *mAlarmTimeEdit; | 96 | QSpinBox *mAlarmTimeEdit; |
97 | QPushButton *mAlarmSoundButton; | 97 | QPushButton *mAlarmSoundButton; |
98 | QPushButton *mAlarmProgramButton; | 98 | QPushButton *mAlarmProgramButton; |
99 | QComboBox *mAlarmIncrCombo; | 99 | QComboBox *mAlarmIncrCombo; |
100 | KTextEdit *mDescriptionEdit; | 100 | KTextEdit *mDescriptionEdit; |
101 | QLabel *mOwnerLabel; | 101 | QLabel *mOwnerLabel; |
102 | QComboBox *mSecrecyCombo; | 102 | QComboBox *mSecrecyCombo; |
103 | QCheckBox *mCancelBox; | 103 | QCheckBox *mCancelBox; |
104 | QPushButton *mCategoriesButton; | 104 | QPushButton *mCategoriesButton; |
105 | QLabel *mCategoriesLabel; | 105 | QLabel *mCategoriesLabel; |
106 | 106 | ||
107 | private: | 107 | private: |
108 | QString getFittingPath( const QString ) ; | 108 | QString getFittingPath( const QString ) ; |
109 | QString mAlarmSound; | 109 | QString mAlarmSound; |
110 | QString mAlarmProgram; | 110 | QString mAlarmProgram; |
111 | QString mAlarmMessage; | ||
111 | }; | 112 | }; |
112 | 113 | ||
113 | #endif | 114 | #endif |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 7319285..184cb39 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -44,55 +44,49 @@ | |||
44 | #include <qmessagebox.h> | 44 | #include <qmessagebox.h> |
45 | #include <qapplication.h> | 45 | #include <qapplication.h> |
46 | #include <qlineedit.h> | 46 | #include <qlineedit.h> |
47 | #include <qdialog.h> | 47 | #include <qdialog.h> |
48 | #include <qlayout.h> | 48 | #include <qlayout.h> |
49 | #include <qtextcodec.h> | 49 | #include <qtextcodec.h> |
50 | #include <qlabel.h> | 50 | #include <qlabel.h> |
51 | #include <qcheckbox.h> | 51 | #include <qcheckbox.h> |
52 | 52 | ||
53 | #include <klocale.h> | 53 | #include <klocale.h> |
54 | #include <kglobal.h> | 54 | #include <kglobal.h> |
55 | #include <kconfig.h> | 55 | #include <kconfig.h> |
56 | #include <kfiledialog.h> | 56 | #include <kfiledialog.h> |
57 | 57 | ||
58 | QDateTime KSyncManager::mRequestedSyncEvent; | 58 | QDateTime KSyncManager::mRequestedSyncEvent; |
59 | 59 | ||
60 | 60 | ||
61 | KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) | 61 | KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) |
62 | : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) | 62 | : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) |
63 | { | 63 | { |
64 | mServerSocket = 0; | 64 | mServerSocket = 0; |
65 | bar = new QProgressBar ( 1, 0 ); | 65 | bar = new QProgressBar ( 1, 0 ); |
66 | bar->setCaption (""); | 66 | bar->setCaption (""); |
67 | mWriteBackInPast = 2; | 67 | mWriteBackInPast = 2; |
68 | int w = 300; | 68 | |
69 | if ( QApplication::desktop()->width() < 320 ) | ||
70 | w = 220; | ||
71 | int h = bar->sizeHint().height() ; | ||
72 | int dw = QApplication::desktop()->width(); | ||
73 | int dh = QApplication::desktop()->height(); | ||
74 | bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
75 | 69 | ||
76 | } | 70 | } |
77 | 71 | ||
78 | KSyncManager::~KSyncManager() | 72 | KSyncManager::~KSyncManager() |
79 | { | 73 | { |
80 | delete bar; | 74 | delete bar; |
81 | } | 75 | } |
82 | 76 | ||
83 | void KSyncManager::setDefaultFileName( QString s) | 77 | void KSyncManager::setDefaultFileName( QString s) |
84 | { | 78 | { |
85 | mDefFileName = s ; | 79 | mDefFileName = s ; |
86 | if ( mPrefs->mPassiveSyncAutoStart ) | 80 | if ( mPrefs->mPassiveSyncAutoStart ) |
87 | enableQuick( false ); | 81 | enableQuick( false ); |
88 | } | 82 | } |
89 | 83 | ||
90 | void KSyncManager::fillSyncMenu() | 84 | void KSyncManager::fillSyncMenu() |
91 | { | 85 | { |
92 | if ( mSyncMenu->count() ) | 86 | if ( mSyncMenu->count() ) |
93 | mSyncMenu->clear(); | 87 | mSyncMenu->clear(); |
94 | 88 | ||
95 | mSyncMenu->insertItem( i18n("Configure..."), 0 ); | 89 | mSyncMenu->insertItem( i18n("Configure..."), 0 ); |
96 | mSyncMenu->insertSeparator(); | 90 | mSyncMenu->insertSeparator(); |
97 | QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); | 91 | QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); |
98 | mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); | 92 | mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); |
@@ -988,48 +982,55 @@ bool KSyncManager::syncExternalApplication(QString resource) | |||
988 | if ( !edit_sync_options()) { | 982 | if ( !edit_sync_options()) { |
989 | mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); | 983 | mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); |
990 | return false; | 984 | return false; |
991 | } | 985 | } |
992 | 986 | ||
993 | qDebug("KSM::Sync extern %s", resource.latin1()); | 987 | qDebug("KSM::Sync extern %s", resource.latin1()); |
994 | 988 | ||
995 | bool syncOK = mImplementation->syncExternal(this, resource); | 989 | bool syncOK = mImplementation->syncExternal(this, resource); |
996 | 990 | ||
997 | return syncOK; | 991 | return syncOK; |
998 | 992 | ||
999 | } | 993 | } |
1000 | 994 | ||
1001 | void KSyncManager::syncPhone() | 995 | void KSyncManager::syncPhone() |
1002 | { | 996 | { |
1003 | 997 | ||
1004 | syncExternalApplication("phone"); | 998 | syncExternalApplication("phone"); |
1005 | 999 | ||
1006 | } | 1000 | } |
1007 | 1001 | ||
1008 | void KSyncManager::showProgressBar(int percentage, QString caption, int total) | 1002 | void KSyncManager::showProgressBar(int percentage, QString caption, int total) |
1009 | { | 1003 | { |
1010 | if (!bar->isVisible()) | 1004 | if (!bar->isVisible()) |
1011 | { | 1005 | { |
1006 | int w = 300; | ||
1007 | if ( QApplication::desktop()->width() < 320 ) | ||
1008 | w = 220; | ||
1009 | int h = bar->sizeHint().height() ; | ||
1010 | int dw = QApplication::desktop()->width(); | ||
1011 | int dh = QApplication::desktop()->height(); | ||
1012 | bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
1012 | bar->setCaption (caption); | 1013 | bar->setCaption (caption); |
1013 | bar->setTotalSteps ( total ) ; | 1014 | bar->setTotalSteps ( total ) ; |
1014 | bar->show(); | 1015 | bar->show(); |
1015 | } | 1016 | } |
1016 | bar->raise(); | 1017 | bar->raise(); |
1017 | bar->setProgress( percentage ); | 1018 | bar->setProgress( percentage ); |
1018 | qApp->processEvents(); | 1019 | qApp->processEvents(); |
1019 | } | 1020 | } |
1020 | 1021 | ||
1021 | void KSyncManager::hideProgressBar() | 1022 | void KSyncManager::hideProgressBar() |
1022 | { | 1023 | { |
1023 | bar->hide(); | 1024 | bar->hide(); |
1024 | qApp->processEvents(); | 1025 | qApp->processEvents(); |
1025 | } | 1026 | } |
1026 | 1027 | ||
1027 | bool KSyncManager::isProgressBarCanceled() | 1028 | bool KSyncManager::isProgressBarCanceled() |
1028 | { | 1029 | { |
1029 | return !bar->isVisible(); | 1030 | return !bar->isVisible(); |
1030 | } | 1031 | } |
1031 | 1032 | ||
1032 | QString KSyncManager::syncFileName() | 1033 | QString KSyncManager::syncFileName() |
1033 | { | 1034 | { |
1034 | 1035 | ||
1035 | QString fn = "tempfile"; | 1036 | QString fn = "tempfile"; |
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index e57defe..b6d2feb 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp | |||
@@ -1,36 +1,42 @@ | |||
1 | #include "kglobalsettings.h" | 1 | #include "kglobalsettings.h" |
2 | #include "kconfig.h" | 2 | #include "kconfig.h" |
3 | #include "kglobal.h" | 3 | #include "kglobal.h" |
4 | #include "kconfigbase.h" | 4 | #include "kconfigbase.h" |
5 | 5 | ||
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | 7 | ||
8 | QFont KGlobalSettings::generalFont() | 8 | QFont KGlobalSettings::generalFont() |
9 | { | 9 | { |
10 | int size = 12; | 10 | int size = 12; |
11 | if (QApplication::desktop()->width() < 480 ) | 11 | if (QApplication::desktop()->width() < 480 ) { |
12 | size = 10; | 12 | size = 10; |
13 | } | ||
14 | #ifndef DESKTOP_VERSION | ||
15 | else | ||
16 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | ||
17 | size = 18; | ||
18 | #endif | ||
13 | QFont f = QApplication::font(); | 19 | QFont f = QApplication::font(); |
14 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); | 20 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); |
15 | f.setPointSize( size ); | 21 | f.setPointSize( size ); |
16 | return f; | 22 | return f; |
17 | } | 23 | } |
18 | QFont KGlobalSettings::toolBarFont() | 24 | QFont KGlobalSettings::toolBarFont() |
19 | { | 25 | { |
20 | return QApplication::font(); | 26 | return QApplication::font(); |
21 | } | 27 | } |
22 | 28 | ||
23 | QColor KGlobalSettings::toolBarHighlightColor() | 29 | QColor KGlobalSettings::toolBarHighlightColor() |
24 | { | 30 | { |
25 | return QColor( "black" ); | 31 | return QColor( "black" ); |
26 | } | 32 | } |
27 | 33 | ||
28 | QRect KGlobalSettings::desktopGeometry( QWidget * ) | 34 | QRect KGlobalSettings::desktopGeometry( QWidget * ) |
29 | { | 35 | { |
30 | return QApplication::desktop()->rect(); | 36 | return QApplication::desktop()->rect(); |
31 | } | 37 | } |
32 | 38 | ||
33 | /** | 39 | /** |
34 | * Returns whether KDE runs in single (default) or double click | 40 | * Returns whether KDE runs in single (default) or double click |
35 | * mode. | 41 | * mode. |
36 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html | 42 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html |