summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/koagendaview.cpp32
-rw-r--r--korganizer/koeditorgeneral.cpp34
3 files changed, 32 insertions, 36 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index c6cd0ae..a8035d4 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1104,7 +1104,7 @@
1104{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1104{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1105{ "Restore","Wiederherstellen" }, 1105{ "Restore","Wiederherstellen" },
1106{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1106{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1107{ "% completed","% komplett" }, 1107{ "% completed","% erledigt" },
1108{ "%d item(s) found.","%d Item(s) gefunden." }, 1108{ "%d item(s) found.","%d Item(s) gefunden." },
1109{ "Set complete","Setze auf erledigt" }, 1109{ "Set complete","Setze auf erledigt" },
1110{ "(cancelled)","(gecancelt)" }, 1110{ "(cancelled)","(gecancelt)" },
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 5508210..f287216 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -127,31 +127,43 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
127 QString suffix; 127 QString suffix;
128 QString fullTime; 128 QString fullTime;
129 int tW = fm.width("24:00i"); 129 int tW = fm.width("24:00i");
130 int timeHeight = fm.height();
131 if ( timeHeight > mCellHeight )
132 timeHeight = mCellHeight-1;
133 int borderWidth = 5;
134 QFont nFont = p->font();
135 QFont sFont = nFont;
136 sFont.setPointSize( sFont.pointSize()/2+2 );
137 if (!KGlobal::locale()->use12Clock())
138 suffix = "00";
139 QFontMetrics fmS( sFont );
140 int sHei = fmS.height();
130 141
131 while (y < cy + ch) { 142 while (y < cy + ch) {
132 p->drawLine(cx,y,cx+tW,y); 143 p->drawLine(cx,y,cx+tW,y);
133 hour.setNum(cell); 144 hour.setNum(cell);
134 suffix = "am";
135 145
136 // handle 24h and am/pm time formats 146 // handle 24h and am/pm time formats
137 if (KGlobal::locale()->use12Clock()) { 147 if (KGlobal::locale()->use12Clock()) {
138 if (cell > 11) suffix = "pm"; 148 if (cell > 11) suffix = "pm";
149 else
150 suffix = "am";
139 if (cell == 0) hour.setNum(12); 151 if (cell == 0) hour.setNum(12);
140 if (cell > 12) hour.setNum(cell - 12); 152 if (cell > 12) hour.setNum(cell - 12);
141 } else {
142 suffix = ":00";
143 } 153 }
144 154
145 // create string in format of "XX:XX" or "XXpm/am" 155 // create string in format of "XX:XX" or "XXpm/am"
146 fullTime = hour + suffix; 156 fullTime = hour;// + suffix;
147 157
148 // center and draw the time label 158 // center and draw the time label
149 int timeWidth = fm.width(fullTime+"i"); 159 int timeWidth = fm.width(fullTime+"i");
150 int offset = this->width() - timeWidth; 160 int tw2 = fm.width(suffix);
151 int borderWidth = 5; 161 int offset = this->width() - timeWidth - tw2;
152 int timeHeight = fm.height(); 162 p->setFont( nFont );
153 timeHeight = timeHeight + 2 - ( timeHeight / 4 ); 163 p->drawText(cx - borderWidth + offset, y+ timeHeight, fullTime);
154 p->drawText(cx -borderWidth + offset, y+ timeHeight, fullTime); 164 p->setFont( sFont );
165 offset += timeWidth;
166 p->drawText(cx - borderWidth + offset, y+ sHei, suffix);
155 167
156 // increment indices 168 // increment indices
157 y += mCellHeight; 169 y += mCellHeight;
@@ -880,8 +892,6 @@ void KOAgendaView::updateConfig()
880 if ( mBlockUpdating ) 892 if ( mBlockUpdating )
881 return; 893 return;
882 894
883
884
885 // update config for children 895 // update config for children
886 mTimeLabels->updateConfig(); 896 mTimeLabels->updateConfig();
887 mAgenda->storePosition(); 897 mAgenda->storePosition();
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 4ee5292..cf0d4ae 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -228,12 +228,8 @@ void KOEditorGeneral::pickAlarmSound()
228 qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); 228 qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
229 //QString prefix = mAlarmSound; 229 //QString prefix = mAlarmSound;
230 if (!mAlarmSoundButton->isOn()) { 230 if (!mAlarmSoundButton->isOn()) {
231 //mAlarmSound = ""; 231 mAlarmSoundButton->setOn(true);
232 QToolTip::remove(mAlarmSoundButton); 232 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
233 QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
234 mAlarmProgramButton->setOn(true);
235 mAlarmSoundButton->setOn(false);
236 pickAlarmProgram();
237 } else { 233 } else {
238 QString fileName(KFileDialog::getOpenFileName(mAlarmSound, 234 QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
239 i18n("*.wav|Wav Files"), 0)); 235 i18n("*.wav|Wav Files"), 0));
@@ -250,22 +246,19 @@ void KOEditorGeneral::pickAlarmSound()
250 246
251 } 247 }
252 } 248 }
253 249#if 0
254 if (mAlarmProgramButton->isOn()) 250 if (mAlarmProgramButton->isOn())
255 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); 251 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
256 if ( mAlarmSoundButton->isOn()) 252 if ( mAlarmSoundButton->isOn())
257 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); 253 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
254#endif
258} 255}
259 256
260void KOEditorGeneral::pickAlarmProgram() 257void KOEditorGeneral::pickAlarmProgram()
261{ 258{
262 if (!mAlarmProgramButton->isOn()) { 259 if (!mAlarmProgramButton->isOn()) {
263 //mAlarmProgram = ""; 260 mAlarmProgramButton->setOn(true);
264 QToolTip::remove(mAlarmProgramButton); 261 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
265 QToolTip::add(mAlarmProgramButton, i18n("No program set"));
266 mAlarmProgramButton->setOn(false);
267 mAlarmSoundButton->setOn(true);
268 pickAlarmSound();
269 } else { 262 } else {
270 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); 263 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0));
271 if (!fileName.isEmpty()) { 264 if (!fileName.isEmpty()) {
@@ -280,10 +273,12 @@ void KOEditorGeneral::pickAlarmProgram()
280 mAlarmSoundButton->setOn(true); 273 mAlarmSoundButton->setOn(true);
281 } 274 }
282 } 275 }
276#if 0
283 if (mAlarmProgramButton->isOn()) 277 if (mAlarmProgramButton->isOn())
284 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); 278 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
285 if ( mAlarmSoundButton->isOn()) 279 if ( mAlarmSoundButton->isOn())
286 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); 280 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
281#endif
287} 282}
288 283
289 284
@@ -314,17 +309,8 @@ void KOEditorGeneral::enableAlarmEdit(bool enable)
314 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; 309 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
315 } 310 }
316 } 311 }
317 if (mAlarmProgramButton->isOn())
318 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
319 if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn())
320 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
321 }
322 else {
323 ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage);
324 //((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Edit item: ") + mSummaryEdit->currentText());
325
326
327 } 312 }
313 ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage);
328 mAlarmTimeEdit->setEnabled(enable); 314 mAlarmTimeEdit->setEnabled(enable);
329 mAlarmSoundButton->setEnabled(enable); 315 mAlarmSoundButton->setEnabled(enable);
330 mAlarmProgramButton->setEnabled(enable); 316 mAlarmProgramButton->setEnabled(enable);
@@ -400,7 +386,7 @@ void KOEditorGeneral::setSecrecy( int num )
400void KOEditorGeneral::readIncidence(Incidence *event) 386void KOEditorGeneral::readIncidence(Incidence *event)
401{ 387{
402 388
403 mAlarmMessage = i18n("Edit") +" "+event->summary(); 389 mAlarmMessage = event->summary();
404 mAlarmIncrCombo->setCurrentItem(0); 390 mAlarmIncrCombo->setCurrentItem(0);
405 mSummaryEdit->setEditText(event->summary()); 391 mSummaryEdit->setEditText(event->summary());
406 mLocationEdit->setEditText(event->location()); 392 mLocationEdit->setEditText(event->location());