summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp28
-rw-r--r--korganizer/kodaymatrix.cpp8
-rw-r--r--korganizer/koeditordetails.cpp5
-rw-r--r--korganizer/koprefs.cpp25
-rw-r--r--korganizer/koprefsdialog.cpp98
-rw-r--r--korganizer/koprefsdialog.h2
-rw-r--r--korganizer/navigatorbar.cpp2
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp2
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp14
-rw-r--r--microkde/kdialogbase.cpp2
10 files changed, 105 insertions, 81 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 218396d..072d464 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -97,111 +97,112 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
97 97
98 viewport()->setBackgroundMode( PaletteBackground ); 98 viewport()->setBackgroundMode( PaletteBackground );
99} 99}
100 100
101void TimeLabels::setCellHeight(int height) 101void TimeLabels::setCellHeight(int height)
102{ 102{
103 mCellHeight = height; 103 mCellHeight = height;
104} 104}
105 105
106/* 106/*
107 Optimization so that only the "dirty" portion of the scroll view 107 Optimization so that only the "dirty" portion of the scroll view
108 is redrawn. Unfortunately, this is not called by default paintEvent() method. 108 is redrawn. Unfortunately, this is not called by default paintEvent() method.
109*/ 109*/
110void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) 110void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
111{ 111{
112 112
113 // if ( globalFlagBlockAgenda ) 113 // if ( globalFlagBlockAgenda )
114 // return; 114 // return;
115 // bug: the parameters cx, cy, cw, ch are the areas that need to be 115 // bug: the parameters cx, cy, cw, ch are the areas that need to be
116 // redrawn, not the area of the widget. unfortunately, this 116 // redrawn, not the area of the widget. unfortunately, this
117 // code assumes the latter... 117 // code assumes the latter...
118 118
119 // now, for a workaround... 119 // now, for a workaround...
120 // these two assignments fix the weird redraw bug 120 // these two assignments fix the weird redraw bug
121 mRedrawNeeded = true;
121 if ( mRedrawNeeded ) { 122 if ( mRedrawNeeded ) {
122 cx = contentsX() + 2; 123 cx = contentsX() + frameWidth()*2;
123 cw = contentsWidth() - 2; 124 cw = contentsWidth() ;
124 // end of workaround 125 // end of workaround
125 126
126 int cell = ((int)(cy/mCellHeight)); 127 int cell = ((int)(cy/mCellHeight));
127 int y = cell * mCellHeight; 128 int y = cell * mCellHeight;
128 QFontMetrics fm = fontMetrics(); 129 QFontMetrics fm = fontMetrics();
129 QString hour; 130 QString hour;
130 QString suffix; 131 QString suffix;
131 int tW = fm.width("24:00i"); 132 int tW = fm.width("24:00i");
132 int timeHeight = fm.height(); 133 int timeHeight = fm.height();
133 //timeHeight -= (timeHeight/4-2); 134 //timeHeight -= (timeHeight/4-2);
134 int borderWidth = 0; 135 int borderWidth = 0;
135 QFont nFont = p->font(); 136 QFont nFont = p->font();
136 137
137 if (!KGlobal::locale()->use12Clock()) 138 if (!KGlobal::locale()->use12Clock())
138 suffix = "00"; 139 suffix = "00";
139 else 140 else
140 borderWidth = 0; 141 borderWidth = 0;
141 if ( timeHeight > mCellHeight ) { 142 if ( timeHeight > mCellHeight ) {
142 timeHeight = mCellHeight-1; 143 timeHeight = mCellHeight-1;
143 int pointS = nFont.pointSize(); 144 int pointS = nFont.pointSize();
144 while ( pointS > 4 ) { 145 while ( pointS > 4 ) {
145 nFont.setPointSize( pointS ); 146 nFont.setPointSize( pointS );
146 fm = QFontMetrics( nFont ); 147 fm = QFontMetrics( nFont );
147 if ( fm.height() < mCellHeight ) 148 if ( fm.height() < mCellHeight )
148 break; 149 break;
149 -- pointS; 150 -- pointS;
150 } 151 }
151 fm = QFontMetrics( nFont ); 152 fm = QFontMetrics( nFont );
152 borderWidth = 4; 153 borderWidth = 4;
153 timeHeight = fm.height(); 154 timeHeight = fm.height();
154 } 155 }
155 timeHeight -= (timeHeight/4-2); 156 //timeHeight -= (timeHeight/4-2);
156 QFont sFont = nFont; 157 QFont sFont = nFont;
157 sFont.setPointSize( sFont.pointSize()/2+2 ); 158 sFont.setPointSize( sFont.pointSize()/2+2 );
158 QFontMetrics fmS( sFont ); 159 QFontMetrics fmS( sFont );
159 int sHei = fmS.height(); 160 int sHei = fmS.height();
160 sHei -= (sHei/4-2); 161 //sHei -= (sHei/4-2);
161 int startW = this->width() - frameWidth(); 162 int startW = this->width() - frameWidth()-1;
162 while (y < cy + ch) { 163 while (y < cy + ch) {
163 p->drawLine(cx,y,cx+tW,y); 164 p->drawLine(cx,y,cx+tW,y);
164 hour.setNum(cell); 165 hour.setNum(cell);
165 166
166 // handle 24h and am/pm time formats 167 // handle 24h and am/pm time formats
167 if (KGlobal::locale()->use12Clock()) { 168 if (KGlobal::locale()->use12Clock()) {
168 if (cell > 11) suffix = "pm"; 169 if (cell > 11) suffix = "pm";
169 else 170 else
170 suffix = "am"; 171 suffix = "am";
171 if (cell == 0) hour.setNum(12); 172 if (cell == 0) hour.setNum(12);
172 if (cell > 12) hour.setNum(cell - 12); 173 if (cell > 12) hour.setNum(cell - 12);
173 } 174 }
174 175
175 // center and draw the time label 176 // center and draw the time label
176 int timeWidth = fm.width(hour+"i"); 177 int timeWidth = fm.width(hour);
177 int tw2 = fm.width(suffix); 178 int tw2 = fm.width(suffix);
178 int offset = startW - timeWidth - tw2 ; 179 int offset = startW - timeWidth - tw2 ;
179 p->setFont( nFont ); 180 p->setFont( nFont );
180 p->drawText(cx - borderWidth + offset, y+ timeHeight, hour); 181 p->drawText( offset, y+ timeHeight, hour);
181 p->setFont( sFont ); 182 p->setFont( sFont );
182 offset = startW - tw2-1; 183 offset = startW - tw2+1;
183 p->drawText(cx - borderWidth + offset, y+ sHei, suffix); 184 p->drawText( offset, y+ sHei, suffix);
184 185
185 // increment indices 186 // increment indices
186 y += mCellHeight; 187 y += mCellHeight;
187 cell++; 188 cell++;
188 } 189 }
189 } else { 190 } else {
190 //qDebug("NO redraw "); 191 //qDebug("NO redraw ");
191 } 192 }
192 // double buffer not yet implemented 193 // double buffer not yet implemented
193 //bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); 194 //bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP);
194 //mRedrawNeeded = false; 195 //mRedrawNeeded = false;
195} 196}
196 197
197/** 198/**
198 Calculates the minimum width. 199 Calculates the minimum width.
199*/ 200*/
200int TimeLabels::minimumWidth() const 201int TimeLabels::minimumWidth() const
201{ 202{
202 return mMiniWidth; 203 return mMiniWidth;
203} 204}
204 205
205/** updates widget's internal state */ 206/** updates widget's internal state */
206void TimeLabels::updateConfig() 207void TimeLabels::updateConfig()
207{ 208{
@@ -397,50 +398,49 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
397 } 398 }
398 399
399 QBoxLayout *topLayout = new QVBoxLayout(this); 400 QBoxLayout *topLayout = new QVBoxLayout(this);
400 401
401 // Create day name labels for agenda columns 402 // Create day name labels for agenda columns
402 // Create agenda splitter 403 // Create agenda splitter
403 404
404 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); 405 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this);
405 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 406 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
406 topLayout->addWidget( mSplitterAgenda ); 407 topLayout->addWidget( mSplitterAgenda );
407 mAllDayFrame = new QHBox(mSplitterAgenda); 408 mAllDayFrame = new QHBox(mSplitterAgenda);
408 mAllDayFrame->setFocusPolicy(NoFocus); 409 mAllDayFrame->setFocusPolicy(NoFocus);
409 QWidget *agendaFrame = new QWidget(mSplitterAgenda); 410 QWidget *agendaFrame = new QWidget(mSplitterAgenda);
410 agendaFrame->setFocusPolicy(NoFocus); 411 agendaFrame->setFocusPolicy(NoFocus);
411 412
412 // Create all-day agenda widget 413 // Create all-day agenda widget
413 mDummyAllDayLeft = new QVBox( mAllDayFrame ); 414 mDummyAllDayLeft = new QVBox( mAllDayFrame );
414 415
415 mExpandButton = new QPushButton(mDummyAllDayLeft); 416 mExpandButton = new QPushButton(mDummyAllDayLeft);
416 mExpandButton->setPixmap( expandPix ); 417 mExpandButton->setPixmap( expandPix );
417 int widebut = mExpandButton->sizeHint().width()+4; 418 int widebut = mExpandButton->sizeHint().width()+4;
418 int heibut = mExpandButton->sizeHint().height()+4; 419 int heibut = mExpandButton->sizeHint().height()+4;
419 if ( heibut > widebut ) 420 if ( heibut > widebut )
420 widebut = heibut ; 421 widebut = heibut ;
421 if ( QApplication::desktop()->width() < 480 ) 422
422 widebut = widebut*3/2;
423 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, 423 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
424 // QSizePolicy::Fixed ) ); 424 // QSizePolicy::Fixed ) );
425 mExpandButton->setFixedSize( widebut, widebut); 425 mExpandButton->setFixedSize( widebut, widebut);
426 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); 426 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
427 mExpandButton->setFocusPolicy(NoFocus); 427 mExpandButton->setFocusPolicy(NoFocus);
428 mAllDayAgenda = new KOAgenda(1,mAllDayFrame); 428 mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
429 mAllDayAgenda->setFocusPolicy(NoFocus); 429 mAllDayAgenda->setFocusPolicy(NoFocus);
430 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); 430 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame);
431 431
432 // Create event context menu for all day agenda 432 // Create event context menu for all day agenda
433 mAllDayAgendaPopup = eventPopup(); 433 mAllDayAgendaPopup = eventPopup();
434 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 434 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
435 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 435 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
436 436
437 // Create agenda frame 437 // Create agenda frame
438 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); 438 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3);
439 // QHBox *agendaFrame = new QHBox(splitterAgenda); 439 // QHBox *agendaFrame = new QHBox(splitterAgenda);
440 440
441 // create event indicator bars 441 // create event indicator bars
442 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); 442 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
443#ifndef DESKTOP_VERSION 443#ifndef DESKTOP_VERSION
444 // FIX 444 // FIX
445 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 445 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
446#endif 446#endif
@@ -696,49 +696,49 @@ void KOAgendaView::createDayLabels()
696 QFontMetrics f( dlf ); 696 QFontMetrics f( dlf );
697 wid = f.width( "30" ); 697 wid = f.width( "30" );
698 needWid = wid * selCount; 698 needWid = wid * selCount;
699 if ( needWid < maxWid ) 699 if ( needWid < maxWid )
700 break; 700 break;
701 } 701 }
702 maxLen = 2; 702 maxLen = 2;
703 } 703 }
704 //qDebug("Max len %d ", dayTest.length() ); 704 //qDebug("Max len %d ", dayTest.length() );
705 705
706 QFontMetrics tempF( dlf ); 706 QFontMetrics tempF( dlf );
707 newHight = tempF.height(); 707 newHight = tempF.height();
708 mDayLabels->setFont( dlf ); 708 mDayLabels->setFont( dlf );
709 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; 709 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);;
710 // mLayoutDayLabels->addSpacing(mTimeLabels->width()); 710 // mLayoutDayLabels->addSpacing(mTimeLabels->width());
711 //mLayoutDayLabels->addSpacing( 2 ); 711 //mLayoutDayLabels->addSpacing( 2 );
712 // QFont lFont = dlf; 712 // QFont lFont = dlf;
713 bool appendLabels = false; 713 bool appendLabels = false;
714 KOAgendaButton *dayLabel; 714 KOAgendaButton *dayLabel;
715 dayLabel = mDayLabelsList.first(); 715 dayLabel = mDayLabelsList.first();
716 if ( !dayLabel ) { 716 if ( !dayLabel ) {
717 appendLabels = true; 717 appendLabels = true;
718 dayLabel = getNewDaylabel(); 718 dayLabel = getNewDaylabel();
719 } 719 }
720 dayLabel->setFixedWidth( mTimeLabels->width()+2 ); 720 dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() );
721 dayLabel->setFont( dlf ); 721 dayLabel->setFont( dlf );
722 dayLabel->setNum( -1 ); 722 dayLabel->setNum( -1 );
723 //dayLabel->setAlignment(QLabel::AlignHCenter); 723 //dayLabel->setAlignment(QLabel::AlignHCenter);
724 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); 724 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) );
725 dayLabel->show(); 725 dayLabel->show();
726 DateList::ConstIterator dit; 726 DateList::ConstIterator dit;
727 bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); 727 bool oneday = (mSelectedDates.first() == mSelectedDates.last() );
728 int counter = -1; 728 int counter = -1;
729 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 729 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
730 ++counter; 730 ++counter;
731 QDate date = *dit; 731 QDate date = *dit;
732 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); 732 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels);
733 if ( ! appendLabels ) { 733 if ( ! appendLabels ) {
734 dayLabel = mDayLabelsList.next(); 734 dayLabel = mDayLabelsList.next();
735 if ( !dayLabel ) 735 if ( !dayLabel )
736 appendLabels = true; 736 appendLabels = true;
737 } 737 }
738 if ( appendLabels ) { 738 if ( appendLabels ) {
739 dayLabel = getNewDaylabel(); 739 dayLabel = getNewDaylabel();
740 } 740 }
741 dayLabel->setMinimumWidth( 1 ); 741 dayLabel->setMinimumWidth( 1 );
742 dayLabel->setMaximumWidth( 10240 ); 742 dayLabel->setMaximumWidth( 10240 );
743 dayLabel->setFont( dlf ); 743 dayLabel->setFont( dlf );
744 dayLabel->show(); 744 dayLabel->show();
@@ -807,50 +807,50 @@ void KOAgendaView::createDayLabels()
807 QLabel *label = new QLabel(text,mDayLabels); 807 QLabel *label = new QLabel(text,mDayLabels);
808 label->setAlignment(AlignCenter); 808 label->setAlignment(AlignCenter);
809 dayLayout->addWidget(label); 809 dayLayout->addWidget(label);
810 } 810 }
811 } 811 }
812 812
813 for(it = cds.first(); it; it = cds.next()) { 813 for(it = cds.first(); it; it = cds.next()) {
814 QWidget *wid = it->smallWidget(mDayLabels,date); 814 QWidget *wid = it->smallWidget(mDayLabels,date);
815 if ( wid ) { 815 if ( wid ) {
816 // wid->setHeight(20); 816 // wid->setHeight(20);
817 dayLayout->addWidget(wid); 817 dayLayout->addWidget(wid);
818 } 818 }
819 } 819 }
820#endif 820#endif
821 } 821 }
822 if ( ! appendLabels ) { 822 if ( ! appendLabels ) {
823 dayLabel = mDayLabelsList.next(); 823 dayLabel = mDayLabelsList.next();
824 if ( !dayLabel ) 824 if ( !dayLabel )
825 appendLabels = true; 825 appendLabels = true;
826 } 826 }
827 if ( appendLabels ) { 827 if ( appendLabels ) {
828 dayLabel = getNewDaylabel(); 828 dayLabel = getNewDaylabel();
829 } 829 }
830 //dayLabel->hide();//test only 830 //dayLabel->hide();//test only
831 831 qDebug("fremwidd %d ", mAgenda->frameWidth());
832 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; 832 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()- (mAgenda->frameWidth()*2) ) % mSelectedDates.count() ;
833 if ( offset < 0 ) offset = 0; 833 if ( offset < 0 ) offset = 0;
834 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); 834 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 );
835 dayLabel->setText(">");//QString::number ( mSelectedDates.first().month() ) ); 835 dayLabel->setText(">");//QString::number ( mSelectedDates.first().month() ) );
836 dayLabel->setFont( dlf ); 836 dayLabel->setFont( dlf );
837 dayLabel->setAutoRepeat( true ); 837 dayLabel->setAutoRepeat( true );
838 dayLabel->show(); 838 dayLabel->show();
839 dayLabel->setNum( -2 ); 839 dayLabel->setNum( -2 );
840 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset ); 840 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset );
841 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2); 841 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2);
842 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); 842 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2);
843 if ( !appendLabels ) { 843 if ( !appendLabels ) {
844 dayLabel = mDayLabelsList.next(); 844 dayLabel = mDayLabelsList.next();
845 while ( dayLabel ) { 845 while ( dayLabel ) {
846 //qDebug("!dayLabel %d",dayLabel ); 846 //qDebug("!dayLabel %d",dayLabel );
847 dayLabel->hide(); 847 dayLabel->hide();
848 dayLabel = mDayLabelsList.next(); 848 dayLabel = mDayLabelsList.next();
849 } 849 }
850 } 850 }
851 851
852 mDayLabelsFrame->setFixedHeight( newHight + 4 ); 852 mDayLabelsFrame->setFixedHeight( newHight + 4 );
853} 853}
854 854
855int KOAgendaView::maxDatesHint() 855int KOAgendaView::maxDatesHint()
856{ 856{
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index dfc6af7..c55f7d7 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -267,49 +267,50 @@ void KODayMatrix::addSelectedDaysTo(DateList& selDays)
267 for (int i = i0; i < 0; i++) { 267 for (int i = i0; i < 0; i++) {
268 selDays.append(days[0].addDays(i)); 268 selDays.append(days[0].addDays(i));
269 } 269 }
270 i0 = 0; 270 i0 = 0;
271 } 271 }
272 272
273 //cope with selection being out of matrix limits at bottom (> NUMDAYS-1) 273 //cope with selection being out of matrix limits at bottom (> NUMDAYS-1)
274 if (mSelEnd > NUMDAYS-1) { 274 if (mSelEnd > NUMDAYS-1) {
275 for (int i = i0; i <= NUMDAYS-1; i++) { 275 for (int i = i0; i <= NUMDAYS-1; i++) {
276 selDays.append(days[i]); 276 selDays.append(days[i]);
277 } 277 }
278 for (int i = NUMDAYS; i < mSelEnd; i++) { 278 for (int i = NUMDAYS; i < mSelEnd; i++) {
279 selDays.append(days[0].addDays(i)); 279 selDays.append(days[0].addDays(i));
280 } 280 }
281 281
282 // apply normal routine to selection being entirely within matrix limits 282 // apply normal routine to selection being entirely within matrix limits
283 } else { 283 } else {
284 for (int i = i0; i <= mSelEnd; i++) { 284 for (int i = i0; i <= mSelEnd; i++) {
285 selDays.append(days[i]); 285 selDays.append(days[i]);
286 } 286 }
287 } 287 }
288} 288}
289 289
290bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end) 290bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end)
291{ 291{
292 mRedrawNeeded = true;
292 bool noSel = (mSelEnd == NOSELECTION && mSelStart == NOSELECTION ); 293 bool noSel = (mSelEnd == NOSELECTION && mSelStart == NOSELECTION );
293 mSelStart = startdate.daysTo(start); 294 mSelStart = startdate.daysTo(start);
294 if ( mSelStart < 0 ) 295 if ( mSelStart < 0 )
295 mSelStart = 0; 296 mSelStart = 0;
296 mSelEnd = startdate.daysTo(end); 297 mSelEnd = startdate.daysTo(end);
297 if ( mSelEnd > NUMDAYS-1 ) 298 if ( mSelEnd > NUMDAYS-1 )
298 mSelEnd = NUMDAYS-1; 299 mSelEnd = NUMDAYS-1;
299 if ( mSelEnd < 0 || mSelStart > NUMDAYS-1 ) { 300 if ( mSelEnd < 0 || mSelStart > NUMDAYS-1 ) {
300 clearSelection(); 301 clearSelection();
301 if ( noSel ) 302 if ( noSel )
302 return false; 303 return false;
303 } 304 }
304 305
305 return true; 306 return true;
306} 307}
307void KODayMatrix::clearSelection() 308void KODayMatrix::clearSelection()
308{ 309{
309 mSelEnd = mSelStart = NOSELECTION; 310 mSelEnd = mSelStart = NOSELECTION;
310} 311}
311 312
312 313
313void KODayMatrix::recalculateToday() 314void KODayMatrix::recalculateToday()
314{ 315{
315 today = -1; 316 today = -1;
@@ -489,94 +490,97 @@ int KODayMatrix::getDayIndexFrom(int x, int y)
489#if 0 490#if 0
490 return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? 491 return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ?
491 6 - x/daysize.width() : x/daysize.width()); 492 6 - x/daysize.width() : x/daysize.width());
492#endif 493#endif
493 int xVal = (x-colModulo/2-2)/daysize.width(); 494 int xVal = (x-colModulo/2-2)/daysize.width();
494 int yVal = (y-rowModulo/2-2)/daysize.height(); 495 int yVal = (y-rowModulo/2-2)/daysize.height();
495 496
496 497
497 return 7*(yVal) + xVal; 498 return 7*(yVal) + xVal;
498 499
499} 500}
500 501
501// ---------------------------------------------------------------------------- 502// ----------------------------------------------------------------------------
502// M O U S E E V E N T H A N D L I N G 503// M O U S E E V E N T H A N D L I N G
503// ---------------------------------------------------------------------------- 504// ----------------------------------------------------------------------------
504 505
505void KODayMatrix::mousePressEvent (QMouseEvent* e) 506void KODayMatrix::mousePressEvent (QMouseEvent* e)
506{ 507{
507 508
508 if ( e->button() == LeftButton ) 509 if ( e->button() == LeftButton )
509 mouseDown = true; 510 mouseDown = true;
510 mSelStart = getDayIndexFrom(e->x(), e->y()); 511 mSelStart = getDayIndexFrom(e->x(), e->y());
511 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; 512 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1;
512 mSelInit = mSelStart; 513 mSelInit = mSelStart;
513 mSelEnd = mSelStart; 514 mSelEnd = mSelStart;
515 mRedrawNeeded = true;
514 repaint(false); 516 repaint(false);
515} 517}
516 518
517void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) 519void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
518{ 520{
521 mRedrawNeeded = true;
519 if ( e->button() == LeftButton ) 522 if ( e->button() == LeftButton )
520 if ( ! mouseDown ) { 523 if ( ! mouseDown ) {
521 return; 524 return;
522 } 525 }
523 else 526 else
524 mouseDown = false; 527 mouseDown = false;
525 int tmp = getDayIndexFrom(e->x(), e->y()); 528 int tmp = getDayIndexFrom(e->x(), e->y());
526 if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; 529 if (tmp > NUMDAYS-1) tmp=NUMDAYS-1;
527 530
528 if (mSelInit > tmp) { 531 if (mSelInit > tmp) {
529 mSelEnd = mSelInit; 532 mSelEnd = mSelInit;
530 if (tmp != mSelStart) { 533 if (tmp != mSelStart) {
531 mSelStart = tmp; 534 mSelStart = tmp;
532 repaint(false); 535 repaint(false);
533 } 536 }
534 } else { 537 } else {
535 mSelStart = mSelInit; 538 mSelStart = mSelInit;
536 539
537 //repaint only if selection has changed 540 //repaint only if selection has changed
538 if (tmp != mSelEnd) { 541 if (tmp != mSelEnd) {
539 mSelEnd = tmp; 542 mSelEnd = tmp;
540 repaint(false); 543 repaint(false);
541 } 544 }
542 } 545 }
543 546
544 DateList daylist; 547 DateList daylist;
545 if ( mSelStart < 0 ) 548 if ( mSelStart < 0 )
546 mSelStart = 0; 549 mSelStart = 0;
547 for (int i = mSelStart; i <= mSelEnd; i++) { 550 for (int i = mSelStart; i <= mSelEnd; i++) {
548 daylist.append(days[i]); 551 daylist.append(days[i]);
549 } 552 }
550 emit selected((const DateList)daylist); 553 emit selected((const DateList)daylist);
551 554
552} 555}
553 556
554void KODayMatrix::mouseMoveEvent (QMouseEvent* e) 557void KODayMatrix::mouseMoveEvent (QMouseEvent* e)
555{ 558{
556 if ( ! mouseDown ) { 559 if ( ! mouseDown ) {
557 return; 560 return;
558 } 561 }
562 mRedrawNeeded = true;
559 int tmp = getDayIndexFrom(e->x(), e->y()); 563 int tmp = getDayIndexFrom(e->x(), e->y());
560 if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; 564 if (tmp > NUMDAYS-1) tmp=NUMDAYS-1;
561 565
562 if (mSelInit > tmp) { 566 if (mSelInit > tmp) {
563 mSelEnd = mSelInit; 567 mSelEnd = mSelInit;
564 if (tmp != mSelStart) { 568 if (tmp != mSelStart) {
565 mSelStart = tmp; 569 mSelStart = tmp;
566 repaint(false); 570 repaint(false);
567 } 571 }
568 } else { 572 } else {
569 mSelStart = mSelInit; 573 mSelStart = mSelInit;
570 574
571 //repaint only if selection has changed 575 //repaint only if selection has changed
572 if (tmp != mSelEnd) { 576 if (tmp != mSelEnd) {
573 mSelEnd = tmp; 577 mSelEnd = tmp;
574 repaint(false); 578 repaint(false);
575 } 579 }
576 } 580 }
577} 581}
578 582
579// ---------------------------------------------------------------------------- 583// ----------------------------------------------------------------------------
580// D R A G ' N D R O P H A N D L I N G 584// D R A G ' N D R O P H A N D L I N G
581// ---------------------------------------------------------------------------- 585// ----------------------------------------------------------------------------
582 586
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 2fd13bd..802261c 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -66,50 +66,51 @@ void CustomListViewItem<class Attendee *>::updateItem()
66 setText(2,mData->roleStr()); 66 setText(2,mData->roleStr());
67 setText(3,mData->statusStr()); 67 setText(3,mData->statusStr());
68 if (mData->RSVP() && !mData->email().isEmpty()) 68 if (mData->RSVP() && !mData->email().isEmpty())
69 setPixmap(4,SmallIcon("mailappt")); 69 setPixmap(4,SmallIcon("mailappt"));
70 else 70 else
71 setPixmap(4,SmallIcon("nomailappt")); 71 setPixmap(4,SmallIcon("nomailappt"));
72} 72}
73 73
74 74
75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) 75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
76 : QWidget( parent, name), mDisableItemUpdate( false ) 76 : QWidget( parent, name), mDisableItemUpdate( false )
77{ 77{
78 QGridLayout *topLayout = new QGridLayout(this); 78 QGridLayout *topLayout = new QGridLayout(this);
79 topLayout->setSpacing(spacing); 79 topLayout->setSpacing(spacing);
80 80
81 QString organizer = KOPrefs::instance()->email(); 81 QString organizer = KOPrefs::instance()->email();
82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); 82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
83 83
84 mListView = new KListView(this,"mListView"); 84 mListView = new KListView(this,"mListView");
85 mListView->addColumn(i18n("Name"),180); 85 mListView->addColumn(i18n("Name"),180);
86 mListView->addColumn(i18n("Email"),180); 86 mListView->addColumn(i18n("Email"),180);
87 mListView->addColumn(i18n("Role"),60); 87 mListView->addColumn(i18n("Role"),60);
88 mListView->addColumn(i18n("Status"),100); 88 mListView->addColumn(i18n("Status"),100);
89 mListView->addColumn(i18n("RSVP"),35); 89 mListView->addColumn(i18n("RSVP"),35);
90 if ( KOPrefs::instance()->mCompactDialogs ) { 90 if ( QApplication::desktop()->width() <= 320 ) {
91 //mListView->setFixedHeight(78); 91 //mListView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) );
92 mListView->setFixedHeight(80);
92 } 93 }
93 mListView->setAllColumnsShowFocus (true ); 94 mListView->setAllColumnsShowFocus (true );
94 //mListView->setSingleClick( true ); 95 //mListView->setSingleClick( true );
95 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), 96 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
96 SLOT(updateAttendeeInput())); 97 SLOT(updateAttendeeInput()));
97 98
98 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), 99 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )),
99 SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); 100 SLOT(itemClicked(QListViewItem * ,const QPoint& , int )));
100 101
101 mRsvpButton = new QCheckBox(this); 102 mRsvpButton = new QCheckBox(this);
102 mRsvpButton->setText(i18n("Request response")); 103 mRsvpButton->setText(i18n("Request response"));
103 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this); 104 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
104 QLabel *attendeeLabel = new QLabel(this); 105 QLabel *attendeeLabel = new QLabel(this);
105 attendeeLabel->setText(i18n("Name:")); 106 attendeeLabel->setText(i18n("Name:"));
106 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); 107 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() );
107 mNameEdit = new QLineEdit(this); 108 mNameEdit = new QLineEdit(this);
108 connect(mNameEdit,SIGNAL(textChanged(const QString &)), 109 connect(mNameEdit,SIGNAL(textChanged(const QString &)),
109 SLOT(updateAttendeeItem())); 110 SLOT(updateAttendeeItem()));
110 111
111 mUidEdit = new QLineEdit(0); 112 mUidEdit = new QLineEdit(0);
112 mUidEdit->setText(""); 113 mUidEdit->setText("");
113 114
114 QLabel *emailLabel = new QLabel(this); 115 QLabel *emailLabel = new QLabel(this);
115 emailLabel->setText(i18n("Email:")); 116 emailLabel->setText(i18n("Email:"));
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 97ab4e8..5879a2d 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -149,60 +149,61 @@ KOPrefs::KOPrefs() :
149 149
150 addItemInt("Mail Client",&mMailClient,MailClientKMail); 150 addItemInt("Mail Client",&mMailClient,MailClientKMail);
151 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 151 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
152 addItemBool("Bcc",&mBcc,false); 152 addItemBool("Bcc",&mBcc,false);
153 153
154 KPrefs::setCurrentGroup("Time & Date"); 154 KPrefs::setCurrentGroup("Time & Date");
155 155
156 156
157 addItemInt("Default Start Time",&mStartTime,10); 157 addItemInt("Default Start Time",&mStartTime,10);
158 addItemInt("Default Duration",&mDefaultDuration,2); 158 addItemInt("Default Duration",&mDefaultDuration,2);
159 addItemInt("Default Alarm Time",&mAlarmTime,3); 159 addItemInt("Default Alarm Time",&mAlarmTime,3);
160 KPrefs::setCurrentGroup("AlarmSettings"); 160 KPrefs::setCurrentGroup("AlarmSettings");
161 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 161 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
162 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 162 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
163 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 163 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
164 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 164 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
165 165
166 166
167 KPrefs::setCurrentGroup("Calendar"); 167 KPrefs::setCurrentGroup("Calendar");
168 168
169 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 169 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
170 170
171 KPrefs::setCurrentGroup("Fonts"); 171 KPrefs::setCurrentGroup("Fonts");
172 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 172 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
173 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() ); 173 QFont fon = KGlobalSettings::generalFont();
174 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont()); 174 addItemFont("TimeBar Font",&mTimeBarFont,fon );
175 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont()); 175 addItemFont("MonthView Font",&mMonthViewFont,fon);
176 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont()); 176 addItemFont("AgendaView Font",&mAgendaViewFont,fon);
177 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont()); 177 addItemFont("MarcusBains Font",&mMarcusBainsFont,fon);
178 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont()); 178 addItemFont("TimeLabels Font",&mTimeLabelsFont,fon);
179 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont()); 179 addItemFont("TodoView Font",&mTodoViewFont,fon);
180 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont()); 180 addItemFont("ListView Font",&mListViewFont,fon);
181 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont()); 181 addItemFont("DateNavigator Font",&mDateNavigatorFont,fon);
182 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont()); 182 addItemFont("EditBox Font",&mEditBoxFont,fon);
183 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont()); 183 addItemFont("JournalView Font",&mJornalViewFont,fon);
184 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont()); 184 addItemFont("WhatsNextView Font",&mWhatsNextFont,fon);
185 addItemFont("EventView Font",&mEventViewFont,fon);
185 186
186 KPrefs::setCurrentGroup("RemoteSyncing"); 187 KPrefs::setCurrentGroup("RemoteSyncing");
187 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 188 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
188 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 189 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
189 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 190 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
190 addItemInt("LastSyncTime",&mLastSyncTime,0); 191 addItemInt("LastSyncTime",&mLastSyncTime,0);
191 192
192#ifdef _WIN32_ 193#ifdef _WIN32_
193 QString hdp= locateLocal("data","korganizer")+"\\\\"; 194 QString hdp= locateLocal("data","korganizer")+"\\\\";
194#else 195#else
195 QString hdp= locateLocal("data","korganizer")+"/"; 196 QString hdp= locateLocal("data","korganizer")+"/";
196#endif 197#endif
197 198
198 KPrefs::setCurrentGroup("LoadSaveFileNames"); 199 KPrefs::setCurrentGroup("LoadSaveFileNames");
199 200
200 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 201 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
201 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 202 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
202 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 203 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
203 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 204 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
204 205
205 206
206 KPrefs::setCurrentGroup("Locale"); 207 KPrefs::setCurrentGroup("Locale");
207 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 208 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
208 209
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 74037e6..8439b81 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -32,115 +32,120 @@
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kglobalsettings.h>
56 57
57#include <kurlrequester.h> 58#include <kurlrequester.h>
58#include <klineedit.h> 59#include <klineedit.h>
59 60
60#if defined(USE_SOLARIS) 61#if defined(USE_SOLARIS)
61#include <sys/param.h> 62#include <sys/param.h>
62 63
63#define ZONEINFODIR "/usr/share/lib/zoneinfo" 64#define ZONEINFODIR "/usr/share/lib/zoneinfo"
64#define INITFILE "/etc/default/init" 65#define INITFILE "/etc/default/init"
65#endif 66#endif
66 67
67#include "koprefs.h" 68#include "koprefs.h"
68 69
69#include "koprefsdialog.h" 70#include "koprefsdialog.h"
70#include "kpimglobalprefs.h" 71#include "kpimglobalprefs.h"
71 72
72 73
73KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
74 KPrefsDialog(KOPrefs::instance(),parent,name,true) 75 KPrefsDialog(KOPrefs::instance(),parent,name,true)
75{ 76{
76 77
78 setFont( KGlobalSettings::generalFont() );
77 setCaption( i18n("Preferences - some settings need a restart (nr)")); 79 setCaption( i18n("Preferences - some settings need a restart (nr)"));
78 mCategoryDict.setAutoDelete(true); 80 mCategoryDict.setAutoDelete(true);
79 81
80 KGlobal::locale()->insertCatalogue("timezones"); 82 KGlobal::locale()->insertCatalogue("timezones");
83 mSpacingHint = spacingHintSmall();
84 mMarginHint = marginHintSmall();
85#ifndef DESKTOP_VERSION
86 if ( QApplication::desktop()->height() == 480 )
87 hideButtons();
88#endif
81 89
82 setupGlobalTab(); 90 setupGlobalTab();
83 setupMainTab(); 91 setupMainTab();
84 // setupLocaleTab(); 92 // setupLocaleTab();
85 //setupTimeZoneTab(); 93 //setupTimeZoneTab();
86 setupTimeTab(); 94 setupTimeTab();
87 //setupLocaleDateTab(); 95 //setupLocaleDateTab();
88 setupFontsTab(); 96 setupFontsTab();
89 setupColorsTab(); 97 setupColorsTab();
90 setupViewsTab(); 98 setupViewsTab();
91 //setupSyncTab(); 99 //setupSyncTab();
92 //setupSyncAlgTab(); 100 //setupSyncAlgTab();
93 //setupPrinterTab(); 101 //setupPrinterTab();
94 //setupGroupSchedulingTab(); 102 //setupGroupSchedulingTab();
95 //setupGroupAutomationTab(); 103 //setupGroupAutomationTab();
96 104
97#ifndef DESKTOP_VERSION 105
98 if ( QApplication::desktop()->height() == 480 )
99 hideButtons();
100#endif
101} 106}
102 107
103 108
104KOPrefsDialog::~KOPrefsDialog() 109KOPrefsDialog::~KOPrefsDialog()
105{ 110{
106} 111}
107void KOPrefsDialog::setupGlobalTab() 112void KOPrefsDialog::setupGlobalTab()
108{ 113{
109 QFrame *topFrame = addPage(i18n("Global"),0,0); 114 QFrame *topFrame = addPage(i18n("Global"),0,0);
110 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 115 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
111 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 116 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
112 topLayout->addWidget( kdelibcfg ); 117 topLayout->addWidget( kdelibcfg );
113 118
114 119
115} 120}
116void KOPrefsDialog::setupLocaleDateTab() 121void KOPrefsDialog::setupLocaleDateTab()
117{ 122{
118#if 0 123#if 0
119QFrame *topFrame = addPage(i18n("Date Format"),0,0); 124QFrame *topFrame = addPage(i18n("Date Format"),0,0);
120 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 125 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
121 topLayout->setSpacing(spacingHint()); 126 topLayout->setSpacing(mSpacingHint);
122 topLayout->setMargin(marginHint()); 127 topLayout->setMargin(mMarginHint);
123 int iii = 0; 128 int iii = 0;
124 129
125 130
126 KPrefsDialogWidRadios *syncPrefsGroup = 131 KPrefsDialogWidRadios *syncPrefsGroup =
127 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 132 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
128 QString format; 133 QString format;
129 if ( QApplication::desktop()->width() < 480 ) 134 if ( QApplication::desktop()->width() < 480 )
130 format = "(%d.%m.%Y)"; 135 format = "(%d.%m.%Y)";
131 else 136 else
132 format = "(%d.%m.%Y|%A %d %B %Y)"; 137 format = "(%d.%m.%Y|%A %d %B %Y)";
133 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 138 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
134 if ( QApplication::desktop()->width() < 480 ) 139 if ( QApplication::desktop()->width() < 480 )
135 format = "(%m.%d.%Y)"; 140 format = "(%m.%d.%Y)";
136 else 141 else
137 format = "(%m.%d.%Y|%A %B %d %Y)"; 142 format = "(%m.%d.%Y|%A %B %d %Y)";
138 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 143 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
139 if ( QApplication::desktop()->width() < 480 ) 144 if ( QApplication::desktop()->width() < 480 )
140 format = "(%Y-%m-%d)"; 145 format = "(%Y-%m-%d)";
141 else 146 else
142 format = "(%Y-%m-%d|%A %Y %B %d)"; 147 format = "(%Y-%m-%d|%A %Y %B %d)";
143 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 148 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
144 syncPrefsGroup->addRadio(i18n("User defined")); 149 syncPrefsGroup->addRadio(i18n("User defined"));
145 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 150 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
146 ++iii; 151 ++iii;
@@ -153,50 +158,50 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
153 ++iii; 158 ++iii;
154 mUserDateFormatShort = new QLineEdit(topFrame); 159 mUserDateFormatShort = new QLineEdit(topFrame);
155 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 160 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
156 topLayout->addWidget(lab ,iii,0); 161 topLayout->addWidget(lab ,iii,0);
157 topLayout->addWidget(mUserDateFormatShort,iii,1); 162 topLayout->addWidget(mUserDateFormatShort,iii,1);
158 ++iii; 163 ++iii;
159 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 164 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
160 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 165 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
161 ++iii; 166 ++iii;
162 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 167 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
163 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 168 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
164 ++iii; 169 ++iii;
165 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 170 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
166 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 171 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
167 ++iii; 172 ++iii;
168#endif 173#endif
169 174
170} 175}
171 176
172void KOPrefsDialog::setupLocaleTab() 177void KOPrefsDialog::setupLocaleTab()
173{ 178{
174#if 0 179#if 0
175 QFrame *topFrame = addPage(i18n("Locale"),0,0); 180 QFrame *topFrame = addPage(i18n("Locale"),0,0);
176 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 181 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
177 topLayout->setSpacing(spacingHint()); 182 topLayout->setSpacing(mSpacingHint);
178 topLayout->setMargin(marginHint()); 183 topLayout->setMargin(mMarginHint);
179 int iii = 0; 184 int iii = 0;
180 KPrefsDialogWidRadios *syncPrefsGroup = 185 KPrefsDialogWidRadios *syncPrefsGroup =
181 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 186 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
182 syncPrefsGroup->addRadio(i18n("English")); 187 syncPrefsGroup->addRadio(i18n("English"));
183 syncPrefsGroup->addRadio(i18n("German")); 188 syncPrefsGroup->addRadio(i18n("German"));
184 syncPrefsGroup->addRadio(i18n("French")); 189 syncPrefsGroup->addRadio(i18n("French"));
185 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 190 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
186 if ( QApplication::desktop()->width() < 300 ) 191 if ( QApplication::desktop()->width() < 300 )
187 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 192 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
188 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 193 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
189 ++iii; 194 ++iii;
190 195
191 syncPrefsGroup = 196 syncPrefsGroup =
192 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 197 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
193 if ( QApplication::desktop()->width() > 300 ) 198 if ( QApplication::desktop()->width() > 300 )
194 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 199 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
195 syncPrefsGroup->addRadio(i18n("24:00")); 200 syncPrefsGroup->addRadio(i18n("24:00"));
196 syncPrefsGroup->addRadio(i18n("12:00am")); 201 syncPrefsGroup->addRadio(i18n("12:00am"));
197 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 202 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
198 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 203 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
199 ++iii; 204 ++iii;
200 KPrefsDialogWidBool *sb; 205 KPrefsDialogWidBool *sb;
201 if ( QApplication::desktop()->width() < 300 ) { 206 if ( QApplication::desktop()->width() < 300 ) {
202 sb = 207 sb =
@@ -225,141 +230,141 @@ void KOPrefsDialog::setupLocaleTab()
225 } 230 }
226 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION 231 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION
227#if 0 232#if 0
228 ++iii; 233 ++iii;
229 sb = 234 sb =
230 addWidBool(i18n("Quick load/save (w/o Unicode)"), 235 addWidBool(i18n("Quick load/save (w/o Unicode)"),
231 &(KOPrefs::instance()->mUseQuicksave),topFrame); 236 &(KOPrefs::instance()->mUseQuicksave),topFrame);
232 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 237 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
233#endif 238#endif
234#endif 239#endif
235} 240}
236void KOPrefsDialog::showSyncPage() 241void KOPrefsDialog::showSyncPage()
237{ 242{
238 showPage ( 0 ) ; 243 showPage ( 0 ) ;
239 kdelibcfg->showTimeZoneTab() ; 244 kdelibcfg->showTimeZoneTab() ;
240 245
241} 246}
242void KOPrefsDialog::setupSyncAlgTab() 247void KOPrefsDialog::setupSyncAlgTab()
243{ 248{
244#if 0 249#if 0
245 QLabel * lab; 250 QLabel * lab;
246 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 251 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
247 mSetupSyncAlgTab = topFrame; 252 mSetupSyncAlgTab = topFrame;
248 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 253 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
249 topLayout->setSpacing(spacingHint()); 254 topLayout->setSpacing(mSpacingHint);
250 topLayout->setMargin(marginHint()); 255 topLayout->setMargin(mMarginHint);
251 int iii = 0; 256 int iii = 0;
252 257
253 KPrefsDialogWidBool *sb = 258 KPrefsDialogWidBool *sb =
254 addWidBool(i18n("Ask for preferences before syncing"), 259 addWidBool(i18n("Ask for preferences before syncing"),
255 &(KOPrefs::instance()->mAskForPreferences),topFrame); 260 &(KOPrefs::instance()->mAskForPreferences),topFrame);
256 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 261 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
257 262
258 ++iii; 263 ++iii;
259 264
260 KPrefsDialogWidRadios *syncPrefsGroup = 265 KPrefsDialogWidRadios *syncPrefsGroup =
261 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 266 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
262 topFrame); 267 topFrame);
263 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 268 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
264 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 269 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
265 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 270 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
266 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 271 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
267 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 272 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
268 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 273 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
269 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 274 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
270 ++iii; 275 ++iii;
271 sb = 276 sb =
272 addWidBool(i18n("Show summary after syncing"), 277 addWidBool(i18n("Show summary after syncing"),
273 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 278 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
274 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 279 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
275 280
276 ++iii; 281 ++iii;
277#endif 282#endif
278 283
279 284
280 285
281} 286}
282 287
283 288
284void KOPrefsDialog::setupSyncTab() 289void KOPrefsDialog::setupSyncTab()
285{ 290{
286#if 0 291#if 0
287 QLabel * lab; 292 QLabel * lab;
288 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 293 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
289 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 294 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
290 topLayout->setSpacing(spacingHint()); 295 topLayout->setSpacing(mSpacingHint);
291 topLayout->setMargin(marginHint()); 296 topLayout->setMargin(mMarginHint);
292 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 297 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
293 int iii = 0; 298 int iii = 0;
294 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 299 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
295 ++iii; 300 ++iii;
296 301
297 mRemoteIPEdit = new QLineEdit(topFrame); 302 mRemoteIPEdit = new QLineEdit(topFrame);
298 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 303 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
299 topLayout->addWidget(lab ,iii,0); 304 topLayout->addWidget(lab ,iii,0);
300 topLayout->addWidget(mRemoteIPEdit,iii,1); 305 topLayout->addWidget(mRemoteIPEdit,iii,1);
301 ++iii; 306 ++iii;
302 mRemoteUser = new QLineEdit(topFrame); 307 mRemoteUser = new QLineEdit(topFrame);
303 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 308 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
304 topLayout->addWidget(lab ,iii,0); 309 topLayout->addWidget(lab ,iii,0);
305 topLayout->addWidget(mRemoteUser, iii,1); 310 topLayout->addWidget(mRemoteUser, iii,1);
306 ++iii; 311 ++iii;
307 312
308 mRemoteFile = new QLineEdit(topFrame); 313 mRemoteFile = new QLineEdit(topFrame);
309 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 314 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
310 topLayout->addWidget(lab ,iii,0); 315 topLayout->addWidget(lab ,iii,0);
311 topLayout->addWidget(mRemoteFile,iii,1); 316 topLayout->addWidget(mRemoteFile,iii,1);
312 ++iii; 317 ++iii;
313 318
314 mLocalTempFile = new QLineEdit(topFrame); 319 mLocalTempFile = new QLineEdit(topFrame);
315 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 320 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
316 topLayout->addWidget(lab ,iii,0); 321 topLayout->addWidget(lab ,iii,0);
317 topLayout->addWidget(mLocalTempFile,iii,1); 322 topLayout->addWidget(mLocalTempFile,iii,1);
318 ++iii; 323 ++iii;
319 324
320 KPrefsDialogWidBool *wb = 325 KPrefsDialogWidBool *wb =
321 addWidBool(i18n("Write back synced file"), 326 addWidBool(i18n("Write back synced file"),
322 &(KOPrefs::instance()->mWriteBackFile),topFrame); 327 &(KOPrefs::instance()->mWriteBackFile),topFrame);
323 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
324 ++iii; 329 ++iii;
325 wb = 330 wb =
326 addWidBool(i18n("Write back existing entries only"), 331 addWidBool(i18n("Write back existing entries only"),
327 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); 332 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 333 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
329 ++iii; 334 ++iii;
330 335
331#endif 336#endif
332} 337}
333 338
334void KOPrefsDialog::setupMainTab() 339void KOPrefsDialog::setupMainTab()
335{ 340{
336 QFrame *topFrame = addPage(i18n("General"),0,0); 341 QFrame *topFrame = addPage(i18n("General"),0,0);
337 // DesktopIcon("identity",KIcon::SizeMedium)); 342 // DesktopIcon("identity",KIcon::SizeMedium));
338 343
339 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 344 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
340 topLayout->setSpacing(spacingHint()); 345 topLayout->setSpacing(mSpacingHint);
341 topLayout->setMargin(marginHint()); 346 topLayout->setMargin(mMarginHint);
342 347
343 // KPrefsDialogWidBool *emailControlCenter = 348 // KPrefsDialogWidBool *emailControlCenter =
344// addWidBool(i18n("&Use email settings from Control Center"), 349// addWidBool(i18n("&Use email settings from Control Center"),
345// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 350// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
346// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 351// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
347 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 352 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
348 // SLOT(toggleEmailSettings(bool))); 353 // SLOT(toggleEmailSettings(bool)));
349 354
350 mNameEdit = new QLineEdit(topFrame); 355 mNameEdit = new QLineEdit(topFrame);
351 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 356 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
352 topLayout->addWidget(mNameLabel,0,0); 357 topLayout->addWidget(mNameLabel,0,0);
353 topLayout->addWidget(mNameEdit,0,1); 358 topLayout->addWidget(mNameEdit,0,1);
354 359
355 mEmailEdit = new QLineEdit(topFrame); 360 mEmailEdit = new QLineEdit(topFrame);
356 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 361 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
357 topLayout->addWidget(mEmailLabel,1,0); 362 topLayout->addWidget(mEmailLabel,1,0);
358 topLayout->addWidget(mEmailEdit,1,1); 363 topLayout->addWidget(mEmailEdit,1,1);
359 KPrefsDialogWidBool *wb; 364 KPrefsDialogWidBool *wb;
360 365
361 366
362 367
363 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), 368 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"),
364 &(KOPrefs::instance()->mShowFullMenu),topFrame); 369 &(KOPrefs::instance()->mShowFullMenu),topFrame);
365 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); 370 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1);
@@ -377,49 +382,49 @@ void KOPrefsDialog::setupMainTab()
377 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); 382 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1);
378 383
379 384
380 QHBox *dummy = new QHBox(topFrame); 385 QHBox *dummy = new QHBox(topFrame);
381 new QLabel(i18n("Days in Next-X-Days:"),dummy); 386 new QLabel(i18n("Days in Next-X-Days:"),dummy);
382 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 387 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
383 388
384 topLayout->addMultiCellWidget(dummy,5,5,0,1); 389 topLayout->addMultiCellWidget(dummy,5,5,0,1);
385 390
386 391
387 392
388 // KPrefsDialogWidBool *bcc = 393 // KPrefsDialogWidBool *bcc =
389// addWidBool(i18n("Send copy to owner when mailing events"), 394// addWidBool(i18n("Send copy to owner when mailing events"),
390// &(KOPrefs::instance()->mBcc),topFrame); 395// &(KOPrefs::instance()->mBcc),topFrame);
391// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 396// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
392 397
393 398
394 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 399 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
395 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 400 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
396 401
397 // addWidBool(i18n("Enable automatic saving of calendar"), 402 // addWidBool(i18n("Enable automatic saving of calendar"),
398 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 403 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
399 404
400 QHBox *intervalBox = new QHBox(topFrame); 405 QHBox *intervalBox = new QHBox(topFrame);
401 // intervalBox->setSpacing(spacingHint()); 406 // intervalBox->setSpacing(mSpacingHint);
402 topLayout->addMultiCellWidget(intervalBox,6,6,0,1); 407 topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
403 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 408 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
404 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 409 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
405 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 410 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
406 /* 411 /*
407 QHBox * agendasize = new QHBox ( topFrame ); 412 QHBox * agendasize = new QHBox ( topFrame );
408 413
409 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 414 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
410 415
411 416
412 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 417 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
413 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 418 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
414 */ 419 */
415 420
416 421
417 KPrefsDialogWidBool *ask = 422 KPrefsDialogWidBool *ask =
418 addWidBool(i18n("Ask for quit when closing KO/Pi"), 423 addWidBool(i18n("Ask for quit when closing KO/Pi"),
419 &(KOPrefs::instance()->mAskForQuit),topFrame); 424 &(KOPrefs::instance()->mAskForQuit),topFrame);
420 topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1); 425 topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1);
421 426
422 427
423 /* 428 /*
424 KPrefsDialogWidBool *confirmCheck = 429 KPrefsDialogWidBool *confirmCheck =
425 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), 430 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm),
@@ -467,50 +472,50 @@ void KOPrefsDialog::setupMainTab()
467 472
468 KPrefsDialogWidBool *htmlsave = 473 KPrefsDialogWidBool *htmlsave =
469 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), 474 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave),
470 topFrame); 475 topFrame);
471 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); 476 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1);
472 477
473 KPrefsDialogWidRadios *destinationGroup = 478 KPrefsDialogWidRadios *destinationGroup =
474 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), 479 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination),
475 topFrame); 480 topFrame);
476 destinationGroup->addRadio(i18n("be added to the standard resource")); 481 destinationGroup->addRadio(i18n("be added to the standard resource"));
477 destinationGroup->addRadio(i18n("be asked which resource to use")); 482 destinationGroup->addRadio(i18n("be asked which resource to use"));
478 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); 483 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
479 484
480 topLayout->setRowStretch(14,1); 485 topLayout->setRowStretch(14,1);
481 */ 486 */
482} 487}
483 488
484 489
485void KOPrefsDialog::setupTimeTab() 490void KOPrefsDialog::setupTimeTab()
486{ 491{
487 QFrame *topFrame = addPage(i18n("Time"),0,0); 492 QFrame *topFrame = addPage(i18n("Time"),0,0);
488 // DesktopIcon("clock",KIcon::SizeMedium)); 493 // DesktopIcon("clock",KIcon::SizeMedium));
489 494
490 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 495 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
491 topLayout->setSpacing(spacingHint()); 496 topLayout->setSpacing(mSpacingHint);
492 topLayout->setMargin(marginHint()); 497 topLayout->setMargin(mMarginHint);
493 498
494 QHBox *dummy = new QHBox(topFrame); 499 QHBox *dummy = new QHBox(topFrame);
495 KPrefsDialogWidTime *dayBegins = 500 KPrefsDialogWidTime *dayBegins =
496 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 501 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
497 dummy); 502 dummy);
498 //topLayout->addWidget(dayBegins->label(),2,0); 503 //topLayout->addWidget(dayBegins->label(),2,0);
499 504
500 //topLayout->addWidget(dayBegins->spinBox(),2,1); 505 //topLayout->addWidget(dayBegins->spinBox(),2,1);
501 topLayout->addMultiCellWidget(dummy,0,0,0,1); 506 topLayout->addMultiCellWidget(dummy,0,0,0,1);
502 507
503 topLayout->addWidget(new QLabel(i18n("Default appointment time:"), 508 topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
504 topFrame),1,0); 509 topFrame),1,0);
505 mStartTimeSpin = new QSpinBox(0,23,1,topFrame); 510 mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
506 mStartTimeSpin->setSuffix(":00"); 511 mStartTimeSpin->setSuffix(":00");
507 topLayout->addWidget(mStartTimeSpin,1,1); 512 topLayout->addWidget(mStartTimeSpin,1,1);
508 513
509 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), 514 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
510 topFrame),2,0); 515 topFrame),2,0);
511 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); 516 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
512 mDefaultDurationSpin->setSuffix(":00"); 517 mDefaultDurationSpin->setSuffix(":00");
513 topLayout->addWidget(mDefaultDurationSpin,2,1); 518 topLayout->addWidget(mDefaultDurationSpin,2,1);
514 519
515 QStringList alarmList; 520 QStringList alarmList;
516 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") 521 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
@@ -540,201 +545,202 @@ void KOPrefsDialog::setupTimeTab()
540 QVBox *excludeBox = new QVBox(workingHoursGroup); 545 QVBox *excludeBox = new QVBox(workingHoursGroup);
541 //excludeBox->setMargin( 0 ); 546 //excludeBox->setMargin( 0 );
542 addWidBool(i18n("Exclude holidays"), 547 addWidBool(i18n("Exclude holidays"),
543 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 548 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
544 549
545 addWidBool(i18n("Exclude Saturdays"), 550 addWidBool(i18n("Exclude Saturdays"),
546 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); 551 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
547 552
548// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), 553// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
549 // &(KOPrefs::instance()->mMarcusBainsShowSeconds), 554 // &(KOPrefs::instance()->mMarcusBainsShowSeconds),
550 // topFrame); 555 // topFrame);
551// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); 556// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
552 557
553 // topLayout->setRowStretch(6,1); 558 // topLayout->setRowStretch(6,1);
554} 559}
555 560
556 561
557void KOPrefsDialog::setupViewsTab() 562void KOPrefsDialog::setupViewsTab()
558{ 563{
559 564
560 QFrame *topFrame = addPage(i18n("Views"),0,0); 565 QFrame *topFrame = addPage(i18n("Views"),0,0);
561 // DesktopIcon("viewmag",KIcon::SizeMedium)); 566 // DesktopIcon("viewmag",KIcon::SizeMedium));
562 567
563 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 568 QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
564 topLayout->setSpacing(spacingHint()); 569 topLayout->setSpacing(mSpacingHint);
565 topLayout->setMargin(marginHint()); 570 topLayout->setMargin(mMarginHint);
566 571
567// QBoxLayout *dayBeginsLayout = new QHBoxLayout; 572// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
568// topLayout->addLayout(dayBeginsLayout,0,0); 573// topLayout->addLayout(dayBeginsLayout,0,0);
569 574
570// KPrefsDialogWidTime *dayBegins = 575// KPrefsDialogWidTime *dayBegins =
571// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 576// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
572// topFrame); 577// topFrame);
573// dayBeginsLayout->addWidget(dayBegins->label()); 578// dayBeginsLayout->addWidget(dayBegins->label());
574// dayBeginsLayout->addStretch(1); 579// dayBeginsLayout->addStretch(1);
575// dayBeginsLayout->addWidget(dayBegins->spinBox()); 580// dayBeginsLayout->addWidget(dayBegins->spinBox());
576 581
577// QBoxLayout *nextDaysLayout = new QHBoxLayout; 582// QBoxLayout *nextDaysLayout = new QHBoxLayout;
578// topLayout->addLayout(nextDaysLayout,1,0); 583// topLayout->addLayout(nextDaysLayout,1,0);
579// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); 584// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
580// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); 585// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame);
581// nextDaysLayout->addStretch(1); 586// nextDaysLayout->addStretch(1);
582// nextDaysLayout->addWidget(mNextXDaysSpin); 587// nextDaysLayout->addWidget(mNextXDaysSpin);
583 588
584 589
585 int ii = 0; 590 int ii = 0;
586 KPrefsDialogWidBool *dummy = 591 KPrefsDialogWidBool *dummy =
587 addWidBool(i18n("Edit item on doubleclick (if not, show)"), 592 addWidBool(i18n("Edit item on doubleclick (if not, show)"),
588 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); 593 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame);
589 topLayout->addWidget(dummy->checkBox(),ii++,0); 594 topLayout->addWidget(dummy->checkBox(),ii++,0);
590 595
591 596
592 597
593 598
594 599
595 600
596 // topLayout->addWidget(hourSizeGroup,ii++,0); 601 // topLayout->addWidget(hourSizeGroup,ii++,0);
597 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); 602 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
598 //topLayout->setRowStretch(11,1); 603 //topLayout->setRowStretch(11,1);
599 604
600 605
601 606
602 607
603#if 0 608#if 0
604 609
605 topFrame = addPage(i18n("ViewChange"),0,0); 610 topFrame = addPage(i18n("ViewChange"),0,0);
606 // DesktopIcon("viewmag",KIcon::SizeMedium)); 611 // DesktopIcon("viewmag",KIcon::SizeMedium));
607 612
608 topLayout = new QGridLayout(topFrame,6,1); 613 topLayout = new QGridLayout(topFrame,6,1);
609 topLayout->setSpacing(spacingHint()); 614 topLayout->setSpacing(mSpacingHint);
610 topLayout->setMargin(marginHint()); 615 topLayout->setMargin(mMarginHint);
611 ii = 0; 616 ii = 0;
612 617
613#endif 618#endif
614 619
615 dummy = 620 dummy =
616 addWidBool(i18n("Hold fullscreen on view change"), 621 addWidBool(i18n("Hold fullscreen on view change"),
617 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); 622 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame);
618 topLayout->addWidget(dummy->checkBox(),ii++,0); 623 topLayout->addWidget(dummy->checkBox(),ii++,0);
619 624
620 dummy = 625 dummy =
621 addWidBool(i18n("Hold non-fullscreen on view change"), 626 addWidBool(i18n("Hold non-fullscreen on view change"),
622 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); 627 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame);
623 topLayout->addWidget(dummy->checkBox(),ii++,0); 628 topLayout->addWidget(dummy->checkBox(),ii++,0);
624 629
625 630
626 631
627 KPrefsDialogWidBool *fullViewMonth = 632 KPrefsDialogWidBool *fullViewMonth =
628 addWidBool(i18n("Next days view uses full window"), 633 addWidBool(i18n("Next days view uses full window"),
629 &(KOPrefs::instance()->mFullViewMonth),topFrame); 634 &(KOPrefs::instance()->mFullViewMonth),topFrame);
630 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); 635 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0);
631 636
632 637
633 KPrefsDialogWidBool *fullViewTodo = 638 KPrefsDialogWidBool *fullViewTodo =
634 addWidBool(i18n("Event list view uses full window"), 639 addWidBool(i18n("Event list view uses full window"),
635 &(KOPrefs::instance()->mFullViewTodo),topFrame); 640 &(KOPrefs::instance()->mFullViewTodo),topFrame);
636 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); 641 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0);
637 dummy = 642 dummy =
638 addWidBool(i18n("Listview uses monthly timespan"), 643 addWidBool(i18n("Listview uses monthly timespan"),
639 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); 644 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
640 topLayout->addWidget(dummy->checkBox(),ii++,0); 645 topLayout->addWidget(dummy->checkBox(),ii++,0);
641 dummy = 646 dummy =
642 addWidBool(i18n("Highlight selection in Time Edit"), 647 addWidBool(i18n("Highlight selection in Time Edit"),
643 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); 648 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
644 topLayout->addWidget( dummy->checkBox(), ii++,0); 649 topLayout->addWidget( dummy->checkBox(), ii++,0);
645 650
646 KPrefsDialogWidBool *dailyRecur = 651 KPrefsDialogWidBool *dailyRecur =
647 addWidBool(i18n("Show events that recur daily in date nav."), 652 addWidBool(i18n("Show events that recur daily in date nav."),
648 &(KOPrefs::instance()->mDailyRecur),topFrame); 653 &(KOPrefs::instance()->mDailyRecur),topFrame);
649 topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 654 topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
650 655
651 KPrefsDialogWidBool *weeklyRecur = 656 KPrefsDialogWidBool *weeklyRecur =
652 addWidBool(i18n("Show ev. that recur weekly in date nav."), 657 addWidBool(i18n("Show ev. that recur weekly in date nav."),
653 &(KOPrefs::instance()->mWeeklyRecur),topFrame); 658 &(KOPrefs::instance()->mWeeklyRecur),topFrame);
654 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); 659 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
655 660
656 661#ifdef DESKTOP_VERSION
657 KPrefsDialogWidBool *enableToolTips = 662 KPrefsDialogWidBool *enableToolTips =
658 addWidBool(i18n("Enable tooltips displaying summary of ev."), 663 addWidBool(i18n("Enable tooltips displaying summary of ev."),
659 &(KOPrefs::instance()->mEnableToolTips),topFrame); 664 &(KOPrefs::instance()->mEnableToolTips),topFrame);
660 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 665 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
661 666#endif
662 // ********************************************************* 667 // *********************************************************
663 668
664 topFrame = addPage(i18n("Agenda View"),0,0); 669 topFrame = addPage(i18n("Agenda View"),0,0);
665 // DesktopIcon("viewmag",KIcon::SizeMedium)); 670 // DesktopIcon("viewmag",KIcon::SizeMedium));
666 671
667 topLayout = new QGridLayout(topFrame,5,1); 672 topLayout = new QGridLayout(topFrame,5,1);
668 topLayout->setSpacing(spacingHint()); 673 topLayout->setSpacing(mSpacingHint);
669 topLayout->setMargin(marginHint()); 674 topLayout->setMargin(mMarginHint);
670 ii = 0; 675 ii = 0;
671 676
672 677
673 dummy = 678 dummy =
674 addWidBool(i18n("Show time in agenda items"), 679 addWidBool(i18n("Show time in agenda items"),
675 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); 680 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame);
676 topLayout->addWidget(dummy->checkBox(),ii++,0); 681 topLayout->addWidget(dummy->checkBox(),ii++,0);
677 682
678 dummy = 683 dummy =
679 addWidBool(i18n("Highlight current day in agenda"), 684 addWidBool(i18n("Highlight current day in agenda"),
680 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); 685 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame);
681 topLayout->addWidget(dummy->checkBox(),ii++,0); 686 topLayout->addWidget(dummy->checkBox(),ii++,0);
682 687
683 dummy = 688 dummy =
684 addWidBool(i18n("Use light color for highlight current day"), 689 addWidBool(i18n("Use light color for highlight current day"),
685 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); 690 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
686 topLayout->addWidget(dummy->checkBox(),ii++,0); 691 topLayout->addWidget(dummy->checkBox(),ii++,0);
687 692
688 693
689 KPrefsDialogWidBool *marcusBainsEnabled = 694 KPrefsDialogWidBool *marcusBainsEnabled =
690 addWidBool(i18n("Show current time"), 695 addWidBool(i18n("Show current time"),
691 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 696 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
692 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); 697 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
693 698
694 699
695 dummy = 700 dummy =
696 addWidBool(i18n("Set agenda to DayBeginsAt on change"), 701 addWidBool(i18n("Set agenda to DayBeginsAt on change"),
697 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); 702 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame);
698 topLayout->addWidget(dummy->checkBox(),ii++,0); 703 topLayout->addWidget(dummy->checkBox(),ii++,0);
699 704
700 dummy = 705 dummy =
701 addWidBool(i18n("Set agenda to current time on change"), 706 addWidBool(i18n("Set agenda to current time on change"),
702 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); 707 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame);
703 topLayout->addWidget(dummy->checkBox(),ii++,0); 708 topLayout->addWidget(dummy->checkBox(),ii++,0);
704 709
705 710
706 711
707 712
708 713
709 714
710 715
711 topFrame = addPage(i18n("Month View"),0,0); 716 topFrame = addPage(i18n("Month View"),0,0);
712 // DesktopIcon("viewmag",KIcon::SizeMedium)); 717 // DesktopIcon("viewmag",KIcon::SizeMedium));
713 718
714 topLayout = new QGridLayout(topFrame,5,1); 719 topLayout = new QGridLayout(topFrame,5,1);
715 topLayout->setSpacing(spacingHint()); 720 topLayout->setSpacing(mSpacingHint);
716 topLayout->setMargin(marginHint()); 721 topLayout->setMargin(mMarginHint);
722 qDebug("%d %d ",mSpacingHint, mMarginHint );
717 ii = 0; 723 ii = 0;
718 QLabel *lab; 724 QLabel *lab;
719 QHBox *habo = new QHBox( topFrame ); 725 QHBox *habo = new QHBox( topFrame );
720 if ( QApplication::desktop()->width() <= 480 ) { 726 if ( QApplication::desktop()->width() <= 480 ) {
721 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 727 lab = new QLabel ( i18n("Show events that recur "), topFrame );
722 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 728 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
723 ii++; 729 ii++;
724 } else { 730 } else {
725 new QLabel ( i18n("Show events that recur "), habo ); 731 new QLabel ( i18n("Show events that recur "), habo );
726 } 732 }
727 dailyRecur = 733 dailyRecur =
728 addWidBool(i18n("daily"), 734 addWidBool(i18n("daily"),
729 &(KOPrefs::instance()->mMonthDailyRecur),habo); 735 &(KOPrefs::instance()->mMonthDailyRecur),habo);
730 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 736 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
731 737
732 weeklyRecur = 738 weeklyRecur =
733 addWidBool(i18n("weekly"), 739 addWidBool(i18n("weekly"),
734 &(KOPrefs::instance()->mMonthWeeklyRecur),habo); 740 &(KOPrefs::instance()->mMonthWeeklyRecur),habo);
735 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 741 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
736 ii++; 742 ii++;
737 743
738 744
739 habo = new QHBox( topFrame ); 745 habo = new QHBox( topFrame );
740 if ( QApplication::desktop()->width() <= 480 ) { 746 if ( QApplication::desktop()->width() <= 480 ) {
@@ -785,106 +791,106 @@ void KOPrefsDialog::setupViewsTab()
785 791
786 KPrefsDialogWidColor *holidayColor = 792 KPrefsDialogWidColor *holidayColor =
787 addWidColor(i18n("Day color odd months"), 793 addWidColor(i18n("Day color odd months"),
788 &(KOPrefs::instance()->mMonthViewOddColor),topFrame); 794 &(KOPrefs::instance()->mMonthViewOddColor),topFrame);
789 topLayout->addWidget(holidayColor->label(),ii,0); 795 topLayout->addWidget(holidayColor->label(),ii,0);
790 topLayout->addWidget(holidayColor->button(),ii++,1); 796 topLayout->addWidget(holidayColor->button(),ii++,1);
791 797
792 holidayColor = 798 holidayColor =
793 addWidColor(i18n("Day color even months"), 799 addWidColor(i18n("Day color even months"),
794 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); 800 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
795 topLayout->addWidget(holidayColor->label(),ii,0); 801 topLayout->addWidget(holidayColor->label(),ii,0);
796 topLayout->addWidget(holidayColor->button(),ii++,1); 802 topLayout->addWidget(holidayColor->button(),ii++,1);
797 803
798 804
799 holidayColor = 805 holidayColor =
800 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 806 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
801 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 807 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
802 topLayout->addWidget(holidayColor->label(),ii,0); 808 topLayout->addWidget(holidayColor->label(),ii,0);
803 topLayout->addWidget(holidayColor->button(),ii++,1); 809 topLayout->addWidget(holidayColor->button(),ii++,1);
804 // *********************** What'sNext View 810 // *********************** What'sNext View
805 topFrame = addPage(i18n("What's Next View"),0,0); 811 topFrame = addPage(i18n("What's Next View"),0,0);
806 // DesktopIcon("viewmag",KIcon::SizeMedium)); 812 // DesktopIcon("viewmag",KIcon::SizeMedium));
807 813
808 topLayout = new QGridLayout(topFrame,4,1); 814 topLayout = new QGridLayout(topFrame,4,1);
809 topLayout->setSpacing(spacingHint()); 815 topLayout->setSpacing(mSpacingHint);
810 topLayout->setMargin(marginHint()); 816 topLayout->setMargin(mMarginHint);
811 ii = 0; 817 ii = 0;
812 818
813 819
814 QHBox* hdummy = new QHBox(topFrame); 820 QHBox* hdummy = new QHBox(topFrame);
815 new QLabel(i18n("Days in What's Next:"),hdummy); 821 new QLabel(i18n("Days in What's Next:"),hdummy);
816 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); 822 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy);
817 823
818 topLayout->addWidget(hdummy,ii++,0); 824 topLayout->addWidget(hdummy,ii++,0);
819 825
820 QHBox *prioBox = new QHBox(topFrame); 826 QHBox *prioBox = new QHBox(topFrame);
821 // intervalBox->setSpacing(spacingHint()); 827 // intervalBox->setSpacing(mSpacingHint);
822 topLayout->addWidget(prioBox,ii++,0); 828 topLayout->addWidget(prioBox,ii++,0);
823 QString messa = i18n("Show topmost todo prios in What's Next:"); 829 QString messa = i18n("Show topmost todo prios in What's Next:");
824 830
825 if ( QApplication::desktop()->width() < 300 ) 831 if ( QApplication::desktop()->width() < 300 )
826 messa = i18n("Show topmost todo prios in What's N.:"); 832 messa = i18n("Show topmost todo prios in What's N.:");
827 QLabel *prioLabel = new QLabel(messa, prioBox); 833 QLabel *prioLabel = new QLabel(messa, prioBox);
828 mPrioSpin = new QSpinBox(0,5,1,prioBox); 834 mPrioSpin = new QSpinBox(0,5,1,prioBox);
829 if ( QApplication::desktop()->width() < 300 ) 835 if ( QApplication::desktop()->width() < 300 )
830 mPrioSpin->setFixedWidth( 40 ); 836 mPrioSpin->setFixedWidth( 40 );
831 837
832 KPrefsDialogWidBool *passwdk = 838 KPrefsDialogWidBool *passwdk =
833 839
834 addWidBool(i18n("Show events, that are done in \nWhat's Next view"), 840 addWidBool(i18n("Show events, that are done in \nWhat's Next view"),
835 &(KOPrefs::instance()->mWNViewShowsPast),topFrame); 841 &(KOPrefs::instance()->mWNViewShowsPast),topFrame);
836 topLayout->addWidget(passwdk->checkBox(), ii++,0); 842 topLayout->addWidget(passwdk->checkBox(), ii++,0);
837 passwdk = 843 passwdk =
838 addWidBool(i18n("Show parent To-Do's in What's Next view"), 844 addWidBool(i18n("Show parent To-Do's in What's Next view"),
839 &(KOPrefs::instance()->mWNViewShowsParents),topFrame); 845 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
840 topLayout->addWidget(passwdk->checkBox(), ii++,0); 846 topLayout->addWidget(passwdk->checkBox(), ii++,0);
841 847
842 passwdk = 848 passwdk =
843 addWidBool(i18n("Show location in What's Next view"), 849 addWidBool(i18n("Show location in What's Next view"),
844 &(KOPrefs::instance()->mWNViewShowLocation),topFrame); 850 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
845 topLayout->addWidget(passwdk->checkBox(), ii++,0); 851 topLayout->addWidget(passwdk->checkBox(), ii++,0);
846 852
847 passwdk = 853 passwdk =
848 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), 854 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"),
849 &(KOPrefs::instance()->mShowSyncEvents),topFrame); 855 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
850 topLayout->addWidget(passwdk->checkBox(), ii++,0); 856 topLayout->addWidget(passwdk->checkBox(), ii++,0);
851 passwdk = 857 passwdk =
852 addWidBool(i18n("Use short date in \nWhat's Next/Event view"), 858 addWidBool(i18n("Use short date in \nWhat's Next/Event view"),
853 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 859 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
854 topLayout->addWidget(passwdk->checkBox(), ii++,0); 860 topLayout->addWidget(passwdk->checkBox(), ii++,0);
855 861
856 862
857 863
858 864
859 // *********************** Todo View 865 // *********************** Todo View
860 866
861 topFrame = addPage(i18n("Todo View"),0,0); 867 topFrame = addPage(i18n("Todo View"),0,0);
862 // DesktopIcon("viewmag",KIcon::SizeMedium)); 868 // DesktopIcon("viewmag",KIcon::SizeMedium));
863 869
864 topLayout = new QGridLayout(topFrame,4,1); 870 topLayout = new QGridLayout(topFrame,4,1);
865 topLayout->setSpacing(spacingHint()); 871 topLayout->setSpacing(mSpacingHint);
866 topLayout->setMargin(marginHint()); 872 topLayout->setMargin(mMarginHint);
867 ii = 0; 873 ii = 0;
868dummy = 874dummy =
869 addWidBool(i18n("Hide not running Todos in To-do view"), 875 addWidBool(i18n("Hide not running Todos in To-do view"),
870 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); 876 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame);
871 topLayout->addWidget(dummy->checkBox(),ii++,0); 877 topLayout->addWidget(dummy->checkBox(),ii++,0);
872 878
873 879
874 KPrefsDialogWidBool *showCompletedTodo = 880 KPrefsDialogWidBool *showCompletedTodo =
875 addWidBool(i18n("To-do view shows completed Todos"), 881 addWidBool(i18n("To-do view shows completed Todos"),
876 &(KOPrefs::instance()->mShowCompletedTodo),topFrame); 882 &(KOPrefs::instance()->mShowCompletedTodo),topFrame);
877 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); 883 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0);
878 dummy = 884 dummy =
879 addWidBool(i18n("To-do view shows complete as 'xx %'"), 885 addWidBool(i18n("To-do view shows complete as 'xx %'"),
880 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); 886 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame);
881 topLayout->addWidget(dummy->checkBox(),ii++,0); 887 topLayout->addWidget(dummy->checkBox(),ii++,0);
882 888
883 dummy = 889 dummy =
884 addWidBool(i18n("Small To-do view uses smaller font"), 890 addWidBool(i18n("Small To-do view uses smaller font"),
885 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); 891 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame);
886 topLayout->addWidget(dummy->checkBox(),ii++,0); 892 topLayout->addWidget(dummy->checkBox(),ii++,0);
887 893
888 894
889 895
890 dummy = 896 dummy =
@@ -907,85 +913,85 @@ dummy =
907 // Todo overdue color 913 // Todo overdue color
908 wid = new QWidget( topFrame ); 914 wid = new QWidget( topFrame );
909 widLayout = new QHBoxLayout(wid); 915 widLayout = new QHBoxLayout(wid);
910 KPrefsDialogWidColor *todoOverdueColor = 916 KPrefsDialogWidColor *todoOverdueColor =
911 addWidColor(i18n("Todo overdue color:"), 917 addWidColor(i18n("Todo overdue color:"),
912 &(KOPrefs::instance()->mTodoOverdueColor),wid); 918 &(KOPrefs::instance()->mTodoOverdueColor),wid);
913 widLayout->addWidget(todoOverdueColor->label()); 919 widLayout->addWidget(todoOverdueColor->label());
914 widLayout->addWidget(todoOverdueColor->button()); 920 widLayout->addWidget(todoOverdueColor->button());
915 topLayout->addWidget(wid,ii++,0); 921 topLayout->addWidget(wid,ii++,0);
916 922
917 dummy = 923 dummy =
918 addWidBool(i18n("Colors are applied to text"), 924 addWidBool(i18n("Colors are applied to text"),
919 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); 925 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame);
920 topLayout->addWidget(dummy->checkBox(),ii++,0); 926 topLayout->addWidget(dummy->checkBox(),ii++,0);
921 927
922 dummy = 928 dummy =
923 addWidBool(i18n("Allday Agenda view shows todos"), 929 addWidBool(i18n("Allday Agenda view shows todos"),
924 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); 930 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame);
925 topLayout->addWidget(dummy->checkBox(),ii++,0); 931 topLayout->addWidget(dummy->checkBox(),ii++,0);
926 932
927 933
928 topFrame = addPage(i18n("View Options"),0,0); 934 topFrame = addPage(i18n("View Options"),0,0);
929 935
930 topLayout = new QGridLayout(topFrame,4,1); 936 topLayout = new QGridLayout(topFrame,4,1);
931 topLayout->setSpacing(spacingHint()); 937 topLayout->setSpacing(mSpacingHint);
932 topLayout->setMargin(marginHint()); 938 topLayout->setMargin(mMarginHint);
933 ii = 0; 939 ii = 0;
934 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); 940 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame);
935 topLayout->addWidget(lab ,ii++,0); 941 topLayout->addWidget(lab ,ii++,0);
936 942
937 dummy = addWidBool(i18n("Details"), 943 dummy = addWidBool(i18n("Details"),
938 &(KOPrefs::instance()->mEVshowDetails),topFrame); 944 &(KOPrefs::instance()->mEVshowDetails),topFrame);
939 topLayout->addWidget(dummy->checkBox(),ii++,0); 945 topLayout->addWidget(dummy->checkBox(),ii++,0);
940 dummy = addWidBool(i18n("Created time"), 946 dummy = addWidBool(i18n("Created time"),
941 &(KOPrefs::instance()->mEVshowCreated),topFrame); 947 &(KOPrefs::instance()->mEVshowCreated),topFrame);
942 topLayout->addWidget(dummy->checkBox(),ii++,0); 948 topLayout->addWidget(dummy->checkBox(),ii++,0);
943 dummy = addWidBool(i18n("Last modified time"), 949 dummy = addWidBool(i18n("Last modified time"),
944 &(KOPrefs::instance()->mEVshowChanged),topFrame); 950 &(KOPrefs::instance()->mEVshowChanged),topFrame);
945 topLayout->addWidget(dummy->checkBox(),ii++,0); 951 topLayout->addWidget(dummy->checkBox(),ii++,0);
946 952
947 953
948 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); 954 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame);
949 topLayout->addWidget(lab ,ii++,0); 955 topLayout->addWidget(lab ,ii++,0);
950 956
951 dummy = addWidBool(i18n("Details"), 957 dummy = addWidBool(i18n("Details"),
952 &(KOPrefs::instance()->mWTshowDetails),topFrame); 958 &(KOPrefs::instance()->mWTshowDetails),topFrame);
953 topLayout->addWidget(dummy->checkBox(),ii++,0); 959 topLayout->addWidget(dummy->checkBox(),ii++,0);
954 dummy = addWidBool(i18n("Created time"), 960 dummy = addWidBool(i18n("Created time"),
955 &(KOPrefs::instance()->mWTshowCreated),topFrame); 961 &(KOPrefs::instance()->mWTshowCreated),topFrame);
956 topLayout->addWidget(dummy->checkBox(),ii++,0); 962 topLayout->addWidget(dummy->checkBox(),ii++,0);
957 dummy = addWidBool(i18n("Last modified time"), 963 dummy = addWidBool(i18n("Last modified time"),
958 &(KOPrefs::instance()->mWTshowChanged),topFrame); 964 &(KOPrefs::instance()->mWTshowChanged),topFrame);
959 topLayout->addWidget(dummy->checkBox(),ii++,0); 965 topLayout->addWidget(dummy->checkBox(),ii++,0);
960 966
961 967
962 topFrame = addPage(i18n("Alarm"),0,0); 968 topFrame = addPage(i18n("Alarm"),0,0);
963 // DesktopIcon("viewmag",KIcon::SizeMedium)); 969 // DesktopIcon("viewmag",KIcon::SizeMedium));
964 970
965 topLayout = new QGridLayout(topFrame,2,1); 971 topLayout = new QGridLayout(topFrame,2,1);
966 topLayout->setSpacing(spacingHint()); 972 topLayout->setSpacing(mSpacingHint);
967 topLayout->setMargin(marginHint()); 973 topLayout->setMargin(mMarginHint);
968 int iii = 0; 974 int iii = 0;
969 975
970 dummy = 976 dummy =
971 addWidBool(i18n("Use internal alarm notification"), 977 addWidBool(i18n("Use internal alarm notification"),
972 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); 978 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
973 topLayout->addWidget(dummy->checkBox(),iii++,0); 979 topLayout->addWidget(dummy->checkBox(),iii++,0);
974 lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); 980 lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame);
975 981
976 topLayout->addWidget(lab ,iii++,0); 982 topLayout->addWidget(lab ,iii++,0);
977#ifndef DESKTOP_VERSION 983#ifndef DESKTOP_VERSION
978 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 984 lab->setAlignment( AlignLeft|WordBreak|AlignTop);
979#else 985#else
980 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 986 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
981 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 987 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
982#endif 988#endif
983 989
984 QHBox* dummyBox = new QHBox(topFrame); 990 QHBox* dummyBox = new QHBox(topFrame);
985 new QLabel(i18n("Play beeps count:"),dummyBox); 991 new QLabel(i18n("Play beeps count:"),dummyBox);
986 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 992 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
987 topLayout->addWidget(dummyBox,iii++,0); 993 topLayout->addWidget(dummyBox,iii++,0);
988 994
989 dummyBox = new QHBox(topFrame); 995 dummyBox = new QHBox(topFrame);
990 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 996 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
991 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 997 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
@@ -1168,50 +1174,50 @@ void KOPrefsDialog::setupFontsTab()
1168 addWidFont(i18n("Today"),i18n("JournalView:"), 1174 addWidFont(i18n("Today"),i18n("JournalView:"),
1169 &(KOPrefs::instance()->mJornalViewFont),topFrame); 1175 &(KOPrefs::instance()->mJornalViewFont),topFrame);
1170 topLayout->addWidget(tVFont->label(),i,0); 1176 topLayout->addWidget(tVFont->label(),i,0);
1171 topLayout->addWidget(tVFont->preview(),i,1); 1177 topLayout->addWidget(tVFont->preview(),i,1);
1172 topLayout->addWidget(tVFont->button(),i,2); 1178 topLayout->addWidget(tVFont->button(),i,2);
1173 ++i; 1179 ++i;
1174 1180
1175 1181
1176 1182
1177 1183
1178 topLayout->setColStretch(1,1); 1184 topLayout->setColStretch(1,1);
1179 topLayout->setRowStretch(4,1); 1185 topLayout->setRowStretch(4,1);
1180 1186
1181 1187
1182 1188
1183 1189
1184} 1190}
1185 1191
1186void KOPrefsDialog::setupColorsTab() 1192void KOPrefsDialog::setupColorsTab()
1187{ 1193{
1188 QFrame *topFrame = addPage(i18n("Colors"),0,0); 1194 QFrame *topFrame = addPage(i18n("Colors"),0,0);
1189 // DesktopIcon("colorize",KIcon::SizeMedium)); 1195 // DesktopIcon("colorize",KIcon::SizeMedium));
1190 1196
1191 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1197 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1192 // topLayout->setSpacing(spacingHint()); 1198 // topLayout->setSpacing(mSpacingHint);
1193 // topLayout->setMargin(marginHint()); 1199 // topLayout->setMargin(mMarginHint);
1194 1200
1195 topLayout->setSpacing(2); 1201 topLayout->setSpacing(2);
1196 topLayout->setMargin(3); 1202 topLayout->setMargin(3);
1197 1203
1198 int ii = 1; 1204 int ii = 1;
1199 QGroupBox *categoryGroup ; 1205 QGroupBox *categoryGroup ;
1200 1206
1201 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1207 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
1202 topFrame); 1208 topFrame);
1203 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1209 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1204 1210
1205 mCategoryCombo = new QComboBox(categoryGroup); 1211 mCategoryCombo = new QComboBox(categoryGroup);
1206 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1212 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1207 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); 1213 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
1208 1214
1209 mCategoryButton = new KColorButton(categoryGroup); 1215 mCategoryButton = new KColorButton(categoryGroup);
1210 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); 1216 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
1211 updateCategoryColor(); 1217 updateCategoryColor();
1212 1218
1213 1219
1214 // Holiday Color 1220 // Holiday Color
1215 1221
1216 KPrefsDialogWidColor *holidayColor = 1222 KPrefsDialogWidColor *holidayColor =
1217 addWidColor(i18n("Holiday color:"), 1223 addWidColor(i18n("Holiday color:"),
@@ -1277,63 +1283,63 @@ void KOPrefsDialog::setupColorsTab()
1277 1283
1278void KOPrefsDialog::setCategoryColor() 1284void KOPrefsDialog::setCategoryColor()
1279{ 1285{
1280 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); 1286 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
1281} 1287}
1282 1288
1283void KOPrefsDialog::updateCategoryColor() 1289void KOPrefsDialog::updateCategoryColor()
1284{ 1290{
1285 QString cat = mCategoryCombo->currentText(); 1291 QString cat = mCategoryCombo->currentText();
1286 QColor *color = mCategoryDict.find(cat); 1292 QColor *color = mCategoryDict.find(cat);
1287 if (!color) { 1293 if (!color) {
1288 color = KOPrefs::instance()->categoryColor(cat); 1294 color = KOPrefs::instance()->categoryColor(cat);
1289 } 1295 }
1290 if (color) { 1296 if (color) {
1291 mCategoryButton->setColor(*color); 1297 mCategoryButton->setColor(*color);
1292 } 1298 }
1293} 1299}
1294 1300
1295void KOPrefsDialog::setupPrinterTab() 1301void KOPrefsDialog::setupPrinterTab()
1296{ 1302{
1297 mPrinterTab = addPage(i18n("Printing"),0, 1303 mPrinterTab = addPage(i18n("Printing"),0,
1298 DesktopIcon("fileprint",KIcon::SizeMedium)); 1304 DesktopIcon("fileprint",KIcon::SizeMedium));
1299 1305
1300 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1306 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
1301 topLayout->setSpacing(spacingHint()); 1307 topLayout->setSpacing(mSpacingHint);
1302 topLayout->setMargin(marginHint()); 1308 topLayout->setMargin(mMarginHint);
1303 1309
1304 topLayout->setRowStretch(4,1); 1310 topLayout->setRowStretch(4,1);
1305} 1311}
1306 1312
1307void KOPrefsDialog::setupGroupSchedulingTab() 1313void KOPrefsDialog::setupGroupSchedulingTab()
1308{ 1314{
1309#if 0 1315#if 0
1310 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1316 QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
1311 DesktopIcon("personal",KIcon::SizeMedium)); 1317 DesktopIcon("personal",KIcon::SizeMedium));
1312 1318
1313 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1319 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
1314 topLayout->setSpacing(spacingHint()); 1320 topLayout->setSpacing(mSpacingHint);
1315 topLayout->setMargin(marginHint()); 1321 topLayout->setMargin(mMarginHint);
1316 1322
1317#if 0 1323#if 0
1318 KPrefsDialogWidRadios *schedulerGroup = 1324 KPrefsDialogWidRadios *schedulerGroup =
1319 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), 1325 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
1320 topFrame); 1326 topFrame);
1321 schedulerGroup->addRadio("Dummy"); // Only for debugging 1327 schedulerGroup->addRadio("Dummy"); // Only for debugging
1322 schedulerGroup->addRadio(i18n("Mail client")); 1328 schedulerGroup->addRadio(i18n("Mail client"));
1323 1329
1324 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); 1330 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
1325#endif 1331#endif
1326 1332
1327 KPrefsDialogWidRadios *sendGroup = 1333 KPrefsDialogWidRadios *sendGroup =
1328 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), 1334 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend),
1329 topFrame); 1335 topFrame);
1330 sendGroup->addRadio(i18n("Send to outbox")); 1336 sendGroup->addRadio(i18n("Send to outbox"));
1331 sendGroup->addRadio(i18n("Send directly")); 1337 sendGroup->addRadio(i18n("Send directly"));
1332 1338
1333 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1339 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1334 1340
1335 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); 1341 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
1336 mAMails = new QListView(topFrame); 1342 mAMails = new QListView(topFrame);
1337 mAMails->addColumn(i18n("Email"),300); 1343 mAMails->addColumn(i18n("Email"),300);
1338 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1344 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1339 1345
@@ -1341,50 +1347,50 @@ void KOPrefsDialog::setupGroupSchedulingTab()
1341 aEmailsEdit = new QLineEdit(topFrame); 1347 aEmailsEdit = new QLineEdit(topFrame);
1342 aEmailsEdit->setEnabled(false); 1348 aEmailsEdit->setEnabled(false);
1343 topLayout->addWidget(aEmailsEdit,4,1); 1349 topLayout->addWidget(aEmailsEdit,4,1);
1344 1350
1345 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); 1351 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new");
1346 topLayout->addWidget(add,5,0); 1352 topLayout->addWidget(add,5,0);
1347 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); 1353 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove");
1348 topLayout->addWidget(del,5,1); 1354 topLayout->addWidget(del,5,1);
1349 1355
1350 //topLayout->setRowStretch(2,1); 1356 //topLayout->setRowStretch(2,1);
1351 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); 1357 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
1352 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); 1358 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
1353 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); 1359 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
1354 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); 1360 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
1355#endif 1361#endif
1356} 1362}
1357 1363
1358void KOPrefsDialog::setupGroupAutomationTab() 1364void KOPrefsDialog::setupGroupAutomationTab()
1359{ 1365{
1360 return; 1366 return;
1361 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1367 QFrame *topFrame = addPage(i18n("Group Automation"),0,
1362 DesktopIcon("personal",KIcon::SizeMedium)); 1368 DesktopIcon("personal",KIcon::SizeMedium));
1363 1369
1364 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1370 QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
1365 topLayout->setSpacing(spacingHint()); 1371 topLayout->setSpacing(mSpacingHint);
1366 topLayout->setMargin(marginHint()); 1372 topLayout->setMargin(mMarginHint);
1367 1373
1368 KPrefsDialogWidRadios *autoRefreshGroup = 1374 KPrefsDialogWidRadios *autoRefreshGroup =
1369 addWidRadios(i18n("Auto Send Refresh"), 1375 addWidRadios(i18n("Auto Send Refresh"),
1370 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); 1376 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
1371 autoRefreshGroup->addRadio(i18n("Never")); 1377 autoRefreshGroup->addRadio(i18n("Never"));
1372 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); 1378 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook"));
1373 //autoRefreshGroup->addRadio(i18n("selected emails")); 1379 //autoRefreshGroup->addRadio(i18n("selected emails"));
1374 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); 1380 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0);
1375 1381
1376 KPrefsDialogWidRadios *autoInsertGroup = 1382 KPrefsDialogWidRadios *autoInsertGroup =
1377 addWidRadios(i18n("Auto Insert IMIP Replies"), 1383 addWidRadios(i18n("Auto Insert IMIP Replies"),
1378 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); 1384 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame);
1379 autoInsertGroup->addRadio(i18n("Never")); 1385 autoInsertGroup->addRadio(i18n("Never"));
1380 autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); 1386 autoInsertGroup->addRadio(i18n("If attendee is in addressbook"));
1381 //autoInsertGroup->addRadio(i18n("selected emails")); 1387 //autoInsertGroup->addRadio(i18n("selected emails"));
1382 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); 1388 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0);
1383 1389
1384 KPrefsDialogWidRadios *autoRequestGroup = 1390 KPrefsDialogWidRadios *autoRequestGroup =
1385 addWidRadios(i18n("Auto Insert IMIP Requests"), 1391 addWidRadios(i18n("Auto Insert IMIP Requests"),
1386 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); 1392 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame);
1387 autoRequestGroup->addRadio(i18n("Never")); 1393 autoRequestGroup->addRadio(i18n("Never"));
1388 autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); 1394 autoRequestGroup->addRadio(i18n("If organizer is in addressbook"));
1389 //autoInsertGroup->addRadio(i18n("selected emails")); 1395 //autoInsertGroup->addRadio(i18n("selected emails"));
1390 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); 1396 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0);
@@ -1640,50 +1646,50 @@ void KOPrefsDialog::updateTimezoneOffset( int index )
1640 mTimezoneOffsetSpin->setEnabled ( false ); 1646 mTimezoneOffsetSpin->setEnabled ( false );
1641 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); 1647 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 );
1642 1648
1643 1649
1644 } else { 1650 } else {
1645 if ( index == 24 ) { 1651 if ( index == 24 ) {
1646 mTimezoneOffsetSpin->setEnabled ( true ); 1652 mTimezoneOffsetSpin->setEnabled ( true );
1647 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1653 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1648 1654
1649 } else { 1655 } else {
1650 mTimezoneOffsetSpin->setEnabled ( false ); 1656 mTimezoneOffsetSpin->setEnabled ( false );
1651 mTimezoneOffsetSpin->setValue( 0 ); 1657 mTimezoneOffsetSpin->setValue( 0 );
1652 } 1658 }
1653 } 1659 }
1654 */ 1660 */
1655} 1661}
1656 1662
1657void KOPrefsDialog::setupTimeZoneTab() 1663void KOPrefsDialog::setupTimeZoneTab()
1658{ 1664{
1659#if 0 1665#if 0
1660 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1666 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1661 // DesktopIcon("clock",KIcon::SizeMedium)); 1667 // DesktopIcon("clock",KIcon::SizeMedium));
1662 1668
1663 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1669 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1664 topLayout->setSpacing(spacingHint()); 1670 topLayout->setSpacing(mSpacingHint);
1665 topLayout->setMargin(marginHint()); 1671 topLayout->setMargin(mMarginHint);
1666 1672
1667 QHBox *timeZoneBox = new QHBox( topFrame ); 1673 QHBox *timeZoneBox = new QHBox( topFrame );
1668 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 1674 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
1669 1675
1670 new QLabel( i18n("Timezone:"), timeZoneBox ); 1676 new QLabel( i18n("Timezone:"), timeZoneBox );
1671 mTimeZoneCombo = new QComboBox( timeZoneBox ); 1677 mTimeZoneCombo = new QComboBox( timeZoneBox );
1672 if ( QApplication::desktop()->width() < 300 ) { 1678 if ( QApplication::desktop()->width() < 300 ) {
1673 mTimeZoneCombo->setMaximumWidth(150); 1679 mTimeZoneCombo->setMaximumWidth(150);
1674 } 1680 }
1675 1681
1676 QStringList list; 1682 QStringList list;
1677 list = KGlobal::locale()->timeZoneList(); 1683 list = KGlobal::locale()->timeZoneList();
1678 mTimeZoneCombo->insertStringList(list); 1684 mTimeZoneCombo->insertStringList(list);
1679 1685
1680 // find the currently set time zone and select it 1686 // find the currently set time zone and select it
1681 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; 1687 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId;
1682 int nCurrentlySet = 11; 1688 int nCurrentlySet = 11;
1683 for (int i = 0; i < mTimeZoneCombo->count(); i++) 1689 for (int i = 0; i < mTimeZoneCombo->count(); i++)
1684 { 1690 {
1685 if (mTimeZoneCombo->text(i) == sCurrentlySet) 1691 if (mTimeZoneCombo->text(i) == sCurrentlySet)
1686 { 1692 {
1687 nCurrentlySet = i; 1693 nCurrentlySet = i;
1688 break; 1694 break;
1689 } 1695 }
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index e20969a..6892028 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -138,27 +138,29 @@ class KOPrefsDialog : public KPrefsDialog
138 138
139 QSpinBox *mNextXDaysSpin; 139 QSpinBox *mNextXDaysSpin;
140 QSpinBox *mWhatsNextSpin; 140 QSpinBox *mWhatsNextSpin;
141 141
142 QLineEdit * mRemoteIPEdit; 142 QLineEdit * mRemoteIPEdit;
143 QLineEdit * mRemoteUser; 143 QLineEdit * mRemoteUser;
144 QLineEdit * mRemotePassWd; 144 QLineEdit * mRemotePassWd;
145 QLineEdit * mRemoteFile; 145 QLineEdit * mRemoteFile;
146 QLineEdit * mLocalTempFile; 146 QLineEdit * mLocalTempFile;
147 QWidget* mSetupSyncAlgTab; 147 QWidget* mSetupSyncAlgTab;
148 QLineEdit * mUserDateFormatLong; 148 QLineEdit * mUserDateFormatLong;
149 QLineEdit * mUserDateFormatShort; 149 QLineEdit * mUserDateFormatShort;
150 150
151 QSpinBox *mTimezoneOffsetSpin; 151 QSpinBox *mTimezoneOffsetSpin;
152 QSpinBox *mDaylightsavingStart; 152 QSpinBox *mDaylightsavingStart;
153 QSpinBox *mDaylightsavingEnd; 153 QSpinBox *mDaylightsavingEnd;
154 KDateEdit* mStartDateSavingEdit; 154 KDateEdit* mStartDateSavingEdit;
155 KDateEdit* mEndDateSavingEdit; 155 KDateEdit* mEndDateSavingEdit;
156 QSpinBox * mAlarmPlayBeeps; 156 QSpinBox * mAlarmPlayBeeps;
157 QSpinBox * mAlarmSuspendTime; 157 QSpinBox * mAlarmSuspendTime;
158 QSpinBox * mAlarmSuspendCount; 158 QSpinBox * mAlarmSuspendCount;
159 QSpinBox * mAlarmBeepInterval; 159 QSpinBox * mAlarmBeepInterval;
160 160
161 QLineEdit * mDefaultAlarmFile; 161 QLineEdit * mDefaultAlarmFile;
162 int mSpacingHint;
163 int mMarginHint;
162}; 164};
163 165
164#endif 166#endif
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index 0610d55..b03870f 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -195,49 +195,49 @@ void NavigatorBar::resetFont ( QFont fo )
195 tfont.setBold(true); 195 tfont.setBold(true);
196 196
197 mSelectMonth->setFont( tfont ); 197 mSelectMonth->setFont( tfont );
198 // Set minimum width to width of widest month name label 198 // Set minimum width to width of widest month name label
199 int i; 199 int i;
200 int maxwidth = 0; 200 int maxwidth = 0;
201 QFontMetrics fm ( mSelectMonth->font() ); 201 QFontMetrics fm ( mSelectMonth->font() );
202 int width = fm.width("September '00" ); 202 int width = fm.width("September '00" );
203 maxwidth = width+2; 203 maxwidth = width+2;
204 int size = fm.height()+2; 204 int size = fm.height()+2;
205 if ( QApplication::desktop()->width() >= 480 ) { 205 if ( QApplication::desktop()->width() >= 480 ) {
206 size += 6; 206 size += 6;
207 maxwidth+= 6; 207 maxwidth+= 6;
208 } 208 }
209 mSelectMonth->setMinimumWidth( maxwidth ); 209 mSelectMonth->setMinimumWidth( maxwidth );
210 mSelectMonth->setFixedHeight( size ); 210 mSelectMonth->setFixedHeight( size );
211 mPrevYear->setFixedHeight( size ); 211 mPrevYear->setFixedHeight( size );
212 mPrevMonth->setFixedHeight( size ); 212 mPrevMonth->setFixedHeight( size );
213 mPrevWeek->setFixedHeight( size ); 213 mPrevWeek->setFixedHeight( size );
214 mNextMonth->setFixedHeight( size ); 214 mNextMonth->setFixedHeight( size );
215 mNextWeek->setFixedHeight( size ); 215 mNextWeek->setFixedHeight( size );
216 mNextYear->setFixedHeight ( size ); 216 mNextYear->setFixedHeight ( size );
217 mCurrentHei = size +2; 217 mCurrentHei = size +2;
218 mCurrentMinWid = maxwidth+2; 218 mCurrentMinWid = maxwidth+2;
219 mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2; 219 mCurrentButtonMinWid = mPrevYear->sizeHint().width();
220} 220}
221 221
222void NavigatorBar::showButtons( bool left, bool right ) 222void NavigatorBar::showButtons( bool left, bool right )
223{ 223{
224 if ( left ) { 224 if ( left ) {
225 mPrevYear->show(); 225 mPrevYear->show();
226 mPrevMonth->show(); 226 mPrevMonth->show();
227 } else { 227 } else {
228 mPrevYear->hide(); 228 mPrevYear->hide();
229 mPrevMonth->hide(); 229 mPrevMonth->hide();
230 } 230 }
231 231
232 if ( right ) { 232 if ( right ) {
233 mNextYear->show(); 233 mNextYear->show();
234 mNextMonth->show(); 234 mNextMonth->show();
235 } else { 235 } else {
236 mNextYear->hide(); 236 mNextYear->hide();
237 mNextMonth->hide(); 237 mNextMonth->hide();
238 } 238 }
239 if ( !left && !right ) { 239 if ( !left && !right ) {
240 //mSelectMonth->setMaximumWidth( 1024 ); 240 //mSelectMonth->setMaximumWidth( 1024 );
241 mSelectMonth->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); 241 mSelectMonth->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
242 } 242 }
243} 243}
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 4fe1e66..d62d9f9 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -185,49 +185,49 @@ void KDEPIMConfigWidget::saveStoreSettings()
185 mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); 185 mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
186 saveStoreSettings(); 186 saveStoreSettings();
187 } 187 }
188} 188}
189void KDEPIMConfigWidget::setupExternalAppTab() 189void KDEPIMConfigWidget::setupExternalAppTab()
190{ 190{
191 QWidget *externalAppsPage = new QWidget( this ); 191 QWidget *externalAppsPage = new QWidget( this );
192 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), 192 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
193 KDialog::spacingHintSmall() ); 193 KDialog::spacingHintSmall() );
194 194
195 mExternalApps = new QComboBox( externalAppsPage ); 195 mExternalApps = new QComboBox( externalAppsPage );
196 196
197 QMap<ExternalAppHandler::Types, QString>::Iterator it; 197 QMap<ExternalAppHandler::Types, QString>::Iterator it;
198 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) 198 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it )
199 mExternalApps->insertItem( it.data(), it.key() ); 199 mExternalApps->insertItem( it.data(), it.key() );
200 200
201 layout->addWidget( mExternalApps ); 201 layout->addWidget( mExternalApps );
202 202
203 connect( mExternalApps, SIGNAL( activated( int ) ), 203 connect( mExternalApps, SIGNAL( activated( int ) ),
204 this, SLOT (externalapp_changed( int ) ) ); 204 this, SLOT (externalapp_changed( int ) ) );
205 205
206 206
207 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); 207 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
208 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); 208 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
209 mExternalAppGroupBox->layout()->setMargin(5); 209 mExternalAppGroupBox->layout()->setMargin(4);
210 210
211 mClient = new QComboBox( mExternalAppGroupBox ); 211 mClient = new QComboBox( mExternalAppGroupBox );
212 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); 212 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 );
213 213
214 connect( mClient, SIGNAL( activated( int ) ), 214 connect( mClient, SIGNAL( activated( int ) ),
215 this, SLOT (client_changed( int ) ) ); 215 this, SLOT (client_changed( int ) ) );
216 216
217 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); 217 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox);
218 boxLayout->addWidget( lab, 1, 0 ); 218 boxLayout->addWidget( lab, 1, 0 );
219 mChannel = new QLineEdit(mExternalAppGroupBox); 219 mChannel = new QLineEdit(mExternalAppGroupBox);
220 mChannel->setReadOnly(true); 220 mChannel->setReadOnly(true);
221 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); 221 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 );
222 222
223 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); 223 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox);
224 boxLayout->addWidget( lab, 3, 0 ); 224 boxLayout->addWidget( lab, 3, 0 );
225 mMessage = new QLineEdit(mExternalAppGroupBox); 225 mMessage = new QLineEdit(mExternalAppGroupBox);
226 mMessage->setReadOnly(true); 226 mMessage->setReadOnly(true);
227 boxLayout->addWidget( mMessage , 4, 0); 227 boxLayout->addWidget( mMessage , 4, 0);
228 228
229 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); 229 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox);
230 boxLayout->addWidget( lab, 3, 1 ); 230 boxLayout->addWidget( lab, 3, 1 );
231 mParameters = new QLineEdit(mExternalAppGroupBox); 231 mParameters = new QLineEdit(mExternalAppGroupBox);
232 mParameters->setReadOnly(true); 232 mParameters->setReadOnly(true);
233 boxLayout->addWidget( mParameters, 4, 1 ); 233 boxLayout->addWidget( mParameters, 4, 1 );
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index ea3a329..d675517 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -657,66 +657,74 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
657 const int rBord = 3; //Themable???? 657 const int rBord = 3; //Themable????
658#if QT_VERSION >= 0x030000 658#if QT_VERSION >= 0x030000
659 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); 659 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
660#else 660#else
661 int sw = style().splitterWidth(); 661 int sw = style().splitterWidth();
662#endif 662#endif
663 if ( orient == Horizontal ) { 663 if ( orient == Horizontal ) {
664 if ( opaqueOldPos >= 0 ) 664 if ( opaqueOldPos >= 0 )
665 paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(), 665 paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
666 2*rBord, r.height() ); 666 2*rBord, r.height() );
667 if ( p >= 0 ) 667 if ( p >= 0 )
668 paint.drawRect( p + sw/2 - rBord, r.y(), 2*rBord, r.height() ); 668 paint.drawRect( p + sw/2 - rBord, r.y(), 2*rBord, r.height() );
669 } else { 669 } else {
670 if ( opaqueOldPos >= 0 ) 670 if ( opaqueOldPos >= 0 )
671 paint.drawRect( r.x(), opaqueOldPos + sw/2 - rBord, 671 paint.drawRect( r.x(), opaqueOldPos + sw/2 - rBord,
672 r.width(), 2*rBord ); 672 r.width(), 2*rBord );
673 if ( p >= 0 ) 673 if ( p >= 0 )
674 paint.drawRect( r.x(), p + sw/2 - rBord, r.width(), 2*rBord ); 674 paint.drawRect( r.x(), p + sw/2 - rBord, r.width(), 2*rBord );
675 } 675 }
676 opaqueOldPos = p; 676 opaqueOldPos = p;
677#else 677#else
678 if ( !mRubberBand ) { 678 if ( !mRubberBand ) {
679 mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop); 679 mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
680 mRubberBand->setFrameStyle( Box | Raised ); 680 mRubberBand->setFrameStyle( Box | Raised );
681 mRubberBand->setPalette( QPalette ( Qt::green.light(),Qt::green.dark() ) ); 681 mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) );
682 } 682 }
683 QRect r = contentsRect(); 683 QRect r = contentsRect();
684 const int rBord = 5; //Themable???? 684 static int rBord = 0; //Themable????
685 if ( !rBord ) {
686 if (QApplication::desktop()->width() <= 320 )
687 rBord = 4;
688 else
689 rBord = 5;
690 }
685 int sw = style().splitterWidth(); 691 int sw = style().splitterWidth();
686 if ( orient == Horizontal ) { 692 if ( orient == Horizontal ) {
687 if ( p >= 0 ) { 693 if ( p >= 0 ) {
688 QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y())); 694 QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y()));
689 mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() ); 695 mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() );
690 } 696 }
691 } else { 697 } else {
692 if ( p >= 0 ) { 698 if ( p >= 0 ) {
693 QPoint geo = mapToGlobal (QPoint ( r.x(), p + sw/2 - rBord)); 699 QPoint geo = mapToGlobal (QPoint ( r.x(), p + sw/2 - rBord));
694 mRubberBand->setGeometry( geo.x(), geo.y(), r.width(), 2*rBord); 700 mRubberBand->setGeometry( geo.x(), geo.y(), r.width(), 2*rBord);
695 } 701 }
696 } 702 }
697 opaqueOldPos = p; 703 opaqueOldPos = p;
698 mRubberBand->show(); 704 if ( ! mRubberBand->isVisible() ) {
705 mRubberBand->show();
706 }
699#endif 707#endif
700} 708}
701 709
702 710
703/*! \reimp */ 711/*! \reimp */
704bool KDGanttMinimizeSplitter::event( QEvent *e ) 712bool KDGanttMinimizeSplitter::event( QEvent *e )
705{ 713{
706 if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) { 714 if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) {
707 recalc( isVisible() ); 715 recalc( isVisible() );
708 if ( e->type() == QEvent::Show ) 716 if ( e->type() == QEvent::Show )
709 data->firstShow = FALSE; 717 data->firstShow = FALSE;
710 } 718 }
711 return QWidget::event( e ); 719 return QWidget::event( e );
712} 720}
713 721
714 722
715/*! 723/*!
716 \obsolete 724 \obsolete
717 725
718 Draws the splitter handle in the rectangle described by \a x, \a y, 726 Draws the splitter handle in the rectangle described by \a x, \a y,
719 \a w, \a h using painter \a p. 727 \a w, \a h using painter \a p.
720 \sa QStyle::drawPrimitive() 728 \sa QStyle::drawPrimitive()
721*/ 729*/
722void KDGanttMinimizeSplitter::drawSplitter( QPainter *p, 730void KDGanttMinimizeSplitter::drawSplitter( QPainter *p,
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index f453331..e6144de 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -130,48 +130,50 @@ void KDialogBase::hideButtons()
130 if ( mCancelButton ) mCancelButton->hide() ; 130 if ( mCancelButton ) mCancelButton->hide() ;
131 if ( mCloseButton ) mCloseButton->hide() ; 131 if ( mCloseButton ) mCloseButton->hide() ;
132 132
133} 133}
134void KDialogBase::initLayout() 134void KDialogBase::initLayout()
135{ 135{
136 136
137 delete mTopLayout; 137 delete mTopLayout;
138 mTopLayout = new QVBoxLayout( this ); 138 mTopLayout = new QVBoxLayout( this );
139 mTopLayout->setMargin( marginHint() ); 139 mTopLayout->setMargin( marginHint() );
140 mTopLayout->setSpacing( spacingHint() ); 140 mTopLayout->setSpacing( spacingHint() );
141 141
142 mTopLayout->addWidget( mMainWidget ); 142 mTopLayout->addWidget( mMainWidget );
143 143
144 QBoxLayout *buttonLayout = new QHBoxLayout; 144 QBoxLayout *buttonLayout = new QHBoxLayout;
145 mTopLayout->addLayout( buttonLayout ); 145 mTopLayout->addLayout( buttonLayout );
146 146
147 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button ); 147 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button );
148 if ( mUser2Button ) buttonLayout->addWidget( mUser2Button ); 148 if ( mUser2Button ) buttonLayout->addWidget( mUser2Button );
149 if ( mOkButton ) buttonLayout->addWidget( mOkButton ); 149 if ( mOkButton ) buttonLayout->addWidget( mOkButton );
150 if ( mApplyButton ) buttonLayout->addWidget( mApplyButton ); 150 if ( mApplyButton ) buttonLayout->addWidget( mApplyButton );
151 if ( mDefaultButton ) buttonLayout->addWidget( mDefaultButton ); 151 if ( mDefaultButton ) buttonLayout->addWidget( mDefaultButton );
152 if ( mCancelButton ) buttonLayout->addWidget( mCancelButton ); 152 if ( mCancelButton ) buttonLayout->addWidget( mCancelButton );
153 if ( mCloseButton ) buttonLayout->addWidget( mCloseButton ); 153 if ( mCloseButton ) buttonLayout->addWidget( mCloseButton );
154 buttonLayout->setMargin( 0 );
155 buttonLayout->setSpacing( spacingHint() );
154} 156}
155 157
156QFrame *KDialogBase::addPage( const QString &name ) 158QFrame *KDialogBase::addPage( const QString &name )
157{ 159{
158// kdDebug() << "KDialogBase::addPage(): " << name << endl; 160// kdDebug() << "KDialogBase::addPage(): " << name << endl;
159 QFrame *frame = new QFrame( tabWidget() ); 161 QFrame *frame = new QFrame( tabWidget() );
160 tabWidget()->addTab( frame, name ); 162 tabWidget()->addTab( frame, name );
161 return frame; 163 return frame;
162} 164}
163 165
164QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) 166QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & )
165{ 167{
166 return addPage( name ); 168 return addPage( name );
167} 169}
168 170
169 171
170void KDialogBase::setMainWidget( QWidget *widget ) 172void KDialogBase::setMainWidget( QWidget *widget )
171{ 173{
172 kdDebug() << "KDialogBase::setMainWidget()" << endl; 174 kdDebug() << "KDialogBase::setMainWidget()" << endl;
173 175
174 mMainWidget = widget; 176 mMainWidget = widget;
175 initLayout(); 177 initLayout();
176} 178}
177 179