summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-05 23:31:44 (UTC)
committer zautrix <zautrix>2005-04-05 23:31:44 (UTC)
commitcf4848d972efe96640f2d5f5d52704306d0cbe4c (patch) (unidiff)
tree123a2075927def5f7f59a20949d6b59174ae79b6
parent6add774cf9841377f32613c7aa23161a823aa1da (diff)
downloadkdepimpi-cf4848d972efe96640f2d5f5d52704306d0cbe4c.zip
kdepimpi-cf4848d972efe96640f2d5f5d52704306d0cbe4c.tar.gz
kdepimpi-cf4848d972efe96640f2d5f5d52704306d0cbe4c.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/details/look_details.cpp2
-rw-r--r--kmicromail/koprefsdialog.cpp2
-rw-r--r--korganizer/datenavigatorcontainer.cpp3
-rw-r--r--korganizer/kodaymatrix.cpp8
-rw-r--r--korganizer/koeventviewerdialog.cpp16
-rw-r--r--korganizer/koeventviewerdialog.h1
-rw-r--r--korganizer/koprefsdialog.cpp3
-rw-r--r--korganizer/mainwindow.cpp4
-rw-r--r--microkde/kglobalsettings.cpp16
-rw-r--r--microkde/kglobalsettings.h1
-rw-r--r--microkde/kutils/kcmultidialog.cpp2
11 files changed, 38 insertions, 20 deletions
diff --git a/kaddressbook/details/look_details.cpp b/kaddressbook/details/look_details.cpp
index 51ec0c0..11d06e9 100644
--- a/kaddressbook/details/look_details.cpp
+++ b/kaddressbook/details/look_details.cpp
@@ -34,65 +34,65 @@
34#include <qpopupmenu.h> 34#include <qpopupmenu.h>
35 35
36#include "global.h" 36#include "global.h"
37#include "kabentrypainter.h" 37#include "kabentrypainter.h"
38 38
39#include "look_details.h" 39#include "look_details.h"
40 40
41#define GRID 5 41#define GRID 5
42 42
43const QString KABDetailedView::mBorderedBGDir = "kab3part/backgrounds/bordered/"; 43const QString KABDetailedView::mBorderedBGDir = "kab3part/backgrounds/bordered/";
44const QString KABDetailedView::mTiledBGDir = "kab3part/backgrounds/tiled/"; 44const QString KABDetailedView::mTiledBGDir = "kab3part/backgrounds/tiled/";
45 45
46KABDetailedView::KABDetailedView( QWidget *parent, const char *name ) 46KABDetailedView::KABDetailedView( QWidget *parent, const char *name )
47 : KABBasicLook( parent, name ), mPainter( 0 ), mBackgroundStyle( None ), 47 : KABBasicLook( parent, name ), mPainter( 0 ), mBackgroundStyle( None ),
48 mDefaultBGColor( white ), mHeadLineBGColor( darkBlue ), 48 mDefaultBGColor( white ), mHeadLineBGColor( darkBlue ),
49 mHeadLineTextColor( yellow ), mGrid( 3 ), mMenuBorderedBG( 0 ), 49 mHeadLineTextColor( yellow ), mGrid( 3 ), mMenuBorderedBG( 0 ),
50 mMenuTiledBG( 0 ) 50 mMenuTiledBG( 0 )
51{ 51{
52 KToggleAction** actions[] = { 52 KToggleAction** actions[] = {
53 &mActionShowAddresses, 53 &mActionShowAddresses,
54 &mActionShowEmails, 54 &mActionShowEmails,
55 &mActionShowPhones, 55 &mActionShowPhones,
56 &mActionShowURLs 56 &mActionShowURLs
57 }; 57 };
58 58
59 QString actionTexts[] = { 59 QString actionTexts[] = {
60 i18n( "Show Postal Addresses" ), 60 i18n( "Show Postal Addresses" ),
61 i18n( "Show Email Addresses" ), 61 i18n( "Show Email Addresses" ),
62 i18n( "Show Telephone Numbers" ), 62 i18n( "Show Telephone Numbers" ),
63 i18n( "Show Web Pages (URLs)" ) 63 i18n( "Show Web Pages (URLs)" )
64 }; 64 };
65 65
66 QFont general = KGlobalSettings::generalFont(); 66 QFont general = KGlobalSettings::generalMaxFont();
67 QFont fixed = KGlobalSettings::fixedFont(); 67 QFont fixed = KGlobalSettings::fixedFont();
68 QString gfont = general.family(); 68 QString gfont = general.family();
69 QString ffont = fixed.family(); 69 QString ffont = fixed.family();
70 70
71 int gpointsize = general.pixelSize(); 71 int gpointsize = general.pixelSize();
72 if ( gpointsize == -1 ) 72 if ( gpointsize == -1 )
73 gpointsize = general.pointSize(); 73 gpointsize = general.pointSize();
74 74
75 int fpointsize = fixed.pixelSize(); 75 int fpointsize = fixed.pixelSize();
76 if ( fpointsize == -1 ) 76 if ( fpointsize == -1 )
77 fpointsize = fixed.pointSize(); 77 fpointsize = fixed.pointSize();
78 78
79 mPainter = new KABEntryPainter; 79 mPainter = new KABEntryPainter;
80 80
81 mPainter->setForegroundColor( black ); 81 mPainter->setForegroundColor( black );
82 mPainter->setHeaderColor( mHeadLineTextColor ); 82 mPainter->setHeaderColor( mHeadLineTextColor );
83 mPainter->setUseHeaderColor( mUseHeadLineBGColor ); 83 mPainter->setUseHeaderColor( mUseHeadLineBGColor );
84 mPainter->setBackgroundColor( mHeadLineBGColor ); 84 mPainter->setBackgroundColor( mHeadLineBGColor );
85 85
86 mPainter->setHeaderFont( QFont( gfont, gpointsize + 4, QFont::Bold, true ) ); 86 mPainter->setHeaderFont( QFont( gfont, gpointsize + 4, QFont::Bold, true ) );
87 mPainter->setHeadLineFont( QFont( gfont, gpointsize + 2, QFont::Bold, true ) ); 87 mPainter->setHeadLineFont( QFont( gfont, gpointsize + 2, QFont::Bold, true ) );
88 mPainter->setBodyFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); 88 mPainter->setBodyFont( QFont( gfont, gpointsize, QFont::Normal, false ) );
89 mPainter->setFixedFont( QFont( ffont, fpointsize, QFont::Normal, false ) ); 89 mPainter->setFixedFont( QFont( ffont, fpointsize, QFont::Normal, false ) );
90 mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); 90 mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) );
91 91
92 const int numActions = sizeof( actions ) / sizeof( actions[ 0 ] ); 92 const int numActions = sizeof( actions ) / sizeof( actions[ 0 ] );
93 93
94 for ( int count = 0; count < numActions; ++count ) { 94 for ( int count = 0; count < numActions; ++count ) {
95 *actions[ count ] = new KToggleAction( actionTexts[ count ] ); 95 *actions[ count ] = new KToggleAction( actionTexts[ count ] );
96 (*actions[ count ])->setChecked( true ); 96 (*actions[ count ])->setChecked( true );
97 } 97 }
98 98
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 9cde5cf..7de7064 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -39,65 +39,65 @@
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#include <kglobalsettings.h>
57 57
58#include <klineedit.h> 58#include <klineedit.h>
59 59
60 60
61#include "koprefs.h" 61#include "koprefs.h"
62 62
63#include "koprefsdialog.h" 63#include "koprefsdialog.h"
64//#include <kprefswidget.h> 64//#include <kprefswidget.h>
65 65
66 66
67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
68 KPrefsDialog(KOPrefs::instance(),parent,name,true) 68 KPrefsDialog(KOPrefs::instance(),parent,name,true)
69{ 69{
70 70
71 setFont( KGlobalSettings::generalFont() ); 71 setFont( KGlobalSettings::generalMaxFont() );
72 setCaption( i18n("Settings - some need a restart (nr)")); 72 setCaption( i18n("Settings - some need a restart (nr)"));
73 setupGlobalTab(); 73 setupGlobalTab();
74 setupMainTab(); 74 setupMainTab();
75 setupMailTab();; 75 setupMailTab();;
76 setupFontsTab(); 76 setupFontsTab();
77 readConfig(); 77 readConfig();
78#ifndef DESKTOP_VERSION 78#ifndef DESKTOP_VERSION
79 if ( QApplication::desktop()->height() == 480 ) 79 if ( QApplication::desktop()->height() == 480 )
80 hideButtons(); 80 hideButtons();
81#endif 81#endif
82 82
83#if 0 83#if 0
84 84
85 setupMainTab(); 85 setupMainTab();
86 setupLocaleTab(); 86 setupLocaleTab();
87 setupTimeZoneTab(); 87 setupTimeZoneTab();
88 setupTimeTab(); 88 setupTimeTab();
89 setupLocaleDateTab(); 89 setupLocaleDateTab();
90 setupFontsTab(); 90 setupFontsTab();
91 setupColorsTab(); 91 setupColorsTab();
92 setupViewsTab(); 92 setupViewsTab();
93 //setupSyncTab(); 93 //setupSyncTab();
94 //setupSyncAlgTab(); 94 //setupSyncAlgTab();
95 //setupPrinterTab(); 95 //setupPrinterTab();
96 //setupGroupSchedulingTab(); 96 //setupGroupSchedulingTab();
97 //setupGroupAutomationTab(); 97 //setupGroupAutomationTab();
98#endif 98#endif
99} 99}
100 100
101#include "kpimglobalprefs.h" 101#include "kpimglobalprefs.h"
102 102
103KOPrefsDialog::~KOPrefsDialog() 103KOPrefsDialog::~KOPrefsDialog()
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index e57daa4..f9c8b73 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -90,78 +90,77 @@ void DateNavigatorContainer::slotgoNextYear()
90 emit goNextYear(); 90 emit goNextYear();
91 91
92} 92}
93void DateNavigatorContainer::slotgoPrevYear() 93void DateNavigatorContainer::slotgoPrevYear()
94{ 94{
95 jumpMonth( -12 ); 95 jumpMonth( -12 );
96 emit goPrevYear(); 96 emit goPrevYear();
97 97
98} 98}
99void DateNavigatorContainer::slotgoPrevMonth() 99void DateNavigatorContainer::slotgoPrevMonth()
100{ 100{
101 jumpMonth( -1 ); 101 jumpMonth( -1 );
102 emit goPrevMonth(); 102 emit goPrevMonth();
103 103
104} 104}
105void DateNavigatorContainer::slotgoNextMonth() 105void DateNavigatorContainer::slotgoNextMonth()
106{ 106{
107 jumpMonth( 1 ); 107 jumpMonth( 1 );
108 emit goNextMonth(); 108 emit goNextMonth();
109} 109}
110void DateNavigatorContainer::jumpMonth( int month ) 110void DateNavigatorContainer::jumpMonth( int month )
111{ 111{
112 112
113 QDate baseDate = mNavigatorView->baseDate(); 113 QDate baseDate = mNavigatorView->baseDate();
114 computeMonthSelected( baseDate.month() + month, false ); 114 computeMonthSelected( baseDate.month() + month, false );
115} 115}
116void DateNavigatorContainer::slotMonthSelected( int month ) 116void DateNavigatorContainer::slotMonthSelected( int month )
117{ 117{
118 computeMonthSelected( month, true ); 118 computeMonthSelected( month, true );
119} 119}
120void DateNavigatorContainer::computeMonthSelected( int month , bool forceEmit ) 120void DateNavigatorContainer::computeMonthSelected( int month , bool forceEmit )
121{ 121{
122 //qDebug("slotMonthSelected %d ", month); 122 //qDebug("slotMonthSelected %d ", month);
123 QDate baseDate = mNavigatorView->baseDate(); 123 QDate baseDate = mNavigatorView->baseDate();
124 if ( baseDate.month() == month ) 124 if ( baseDate.month() == month )
125 return; 125 return;
126 //qDebug("month %d %d ",baseDate.month(),month); 126 //qDebug("month %d %d ",baseDate.month(),month);
127 QDate date = QDate ( baseDate.year(), baseDate.month() , 15 ); 127 QDate date = QDate ( baseDate.year(), baseDate.month() , 15 );
128 date = date.addDays( -(baseDate.month()-month ) *30 ); 128 date = date.addDays( -(baseDate.month()-month ) *30 );
129 QDate newBase = QDate ( date.year(), date.month() ,1 ); 129 QDate newBase = QDate ( date.year(), date.month() ,1 );
130 130
131 //qDebug("NEW BASE %s", newBase.toString().latin1()); 131 //qDebug("NEW BASE %s", newBase.toString().latin1());
132 mNavigatorView->setBaseDate( newBase ); 132 mNavigatorView->setBaseDate( newBase );
133 QDate last = lastAvailableDate(); 133 QDate last = lastAvailableDate();
134 QDate first = firstAvailableDate(); 134 QDate first = firstAvailableDate();
135
136 QDate selFirst = mFirstSelectedDate; 135 QDate selFirst = mFirstSelectedDate;
137 QDate selLast = selFirst.addDays( mSelectedDateCount-1 ); 136 QDate selLast = selFirst.addDays( mSelectedDateCount-1 );
138 if ( selFirst >= first && selLast <= last ) { 137 if ( selFirst >= first && selLast <= last ) {
139 setBaseDates(); 138 setBaseDates();
140 if ( forceEmit ) 139 if ( forceEmit )
141 updateDayMatrixDates(); 140 updateDayMatrixDates();
142 } 141 }
143 else { 142 else {
144 setBaseDates(); 143 setBaseDates();
145 if ( forceEmit ) 144 if ( forceEmit )
146 updateDayMatrixDates(); 145 updateDayMatrixDates();
147 if ( forceEmit ) 146 if ( forceEmit )
148 emit monthSelected( month ); 147 emit monthSelected( month );
149 } 148 }
150} 149}
151void DateNavigatorContainer::setCalendar( Calendar *cal ) 150void DateNavigatorContainer::setCalendar( Calendar *cal )
152{ 151{
153 mCalendar = cal; 152 mCalendar = cal;
154 mNavigatorView->setCalendar( cal ); 153 mNavigatorView->setCalendar( cal );
155 for( uint i = 0; i < mLastDisplayedDN; ++i ) { 154 for( uint i = 0; i < mLastDisplayedDN; ++i ) {
156 KDateNavigator *n = mExtraViews.at( i ); 155 KDateNavigator *n = mExtraViews.at( i );
157 n->setCalendar( cal ); 156 n->setCalendar( cal );
158 } 157 }
159} 158}
160void DateNavigatorContainer::checkUpdateDayMatrixDates() 159void DateNavigatorContainer::checkUpdateDayMatrixDates()
161{ 160{
162 //qDebug("KODNC: wid %d hei %d ", width(), height()); 161 //qDebug("KODNC: wid %d hei %d ", width(), height());
163 mUpdateTimer->stop(); 162 mUpdateTimer->stop();
164 //return; 163 //return;
165 if ( width() < 3 || height() < 3 ) 164 if ( width() < 3 || height() < 3 )
166 return; 165 return;
167 static int lastWid = 0; 166 static int lastWid = 0;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 322131f..ecca374 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -311,68 +311,68 @@ bool KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end)
311} 311}
312void KODayMatrix::clearSelection() 312void KODayMatrix::clearSelection()
313{ 313{
314 mSelEnd = mSelStart = NOSELECTION; 314 mSelEnd = mSelStart = NOSELECTION;
315} 315}
316 316
317 317
318void KODayMatrix::recalculateToday() 318void KODayMatrix::recalculateToday()
319{ 319{
320 today = -1; 320 today = -1;
321 for (int i=0; i<NUMDAYS; i++) { 321 for (int i=0; i<NUMDAYS; i++) {
322 //events[i] = 0; 322 //events[i] = 0;
323 days[i] = startdate.addDays(i); 323 days[i] = startdate.addDays(i);
324 daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] )); 324 daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] ));
325 325
326 // if today is in the currently displayed month, hilight today 326 // if today is in the currently displayed month, hilight today
327 if (days[i].year() == QDate::currentDate().year() && 327 if (days[i].year() == QDate::currentDate().year() &&
328 days[i].month() == QDate::currentDate().month() && 328 days[i].month() == QDate::currentDate().month() &&
329 days[i].day() == QDate::currentDate().day()) { 329 days[i].day() == QDate::currentDate().day()) {
330 today = i; 330 today = i;
331 } 331 }
332 } 332 }
333 // qDebug(QString("Today is visible at %1.").arg(today)); 333 // qDebug(QString("Today is visible at %1.").arg(today));
334} 334}
335 335
336void KODayMatrix::updateView() 336void KODayMatrix::updateView()
337{ 337{
338 updateView(startdate); 338 updateView(startdate);
339} 339}
340void KODayMatrix::repaintViewTimed() 340void KODayMatrix::repaintViewTimed()
341{ 341{
342 mRedrawNeeded = true; 342 mRedrawNeeded = true;
343 bDays.fill( false); 343 // bDays.fill( false);
344 pDays.fill( false); 344 //pDays.fill( false);
345 hDays.fill( false); 345 //hDays.fill( false);
346 eDays.fill( false); 346 //eDays.fill( false);
347 mRepaintTimer->stop(); 347 mRepaintTimer->stop();
348 int startDay = days[0].dayOfWeek(); // 1...7 7 = sunday 348 int startDay = days[0].dayOfWeek(); // 1...7 7 = sunday
349 int i; 349 int i;
350 for(i = 0; i < NUMDAYS; i++) { 350 for(i = 0; i < NUMDAYS; i++) {
351 if ( ( (i+startDay) % 7 == 0 ) ) { 351 if ( ( (i+startDay) % 7 == 0 ) ) {
352 pDays.setBit(i); 352 pDays.setBit(i);
353 } 353 }
354 } 354 }
355 repaint(false); 355 repaint(false);
356} 356}
357void KODayMatrix::computeEvent(Event *event, int i ) 357void KODayMatrix::computeEvent(Event *event, int i )
358{ 358{
359 QString holiStr = mHolidays[i]; 359 QString holiStr = mHolidays[i];
360 if ( event->isHoliday()) { 360 if ( event->isHoliday()) {
361 pDays.setBit(i); 361 pDays.setBit(i);
362 hDays.setBit(i); 362 hDays.setBit(i);
363 if ( !holiStr.isEmpty() ) 363 if ( !holiStr.isEmpty() )
364 holiStr += "\n"; 364 holiStr += "\n";
365 holiStr += event->summary(); 365 holiStr += event->summary();
366 if ( !event->location().isEmpty() ) 366 if ( !event->location().isEmpty() )
367 holiStr += " (" + event->location() + ")"; 367 holiStr += " (" + event->location() + ")";
368 mHolidays[i] =holiStr ; 368 mHolidays[i] =holiStr ;
369 } 369 }
370 if ( event->isBirthday()) { 370 if ( event->isBirthday()) {
371 pDays.setBit(i); 371 pDays.setBit(i);
372 if ( !holiStr.isEmpty() ) 372 if ( !holiStr.isEmpty() )
373 holiStr += "\n"; 373 holiStr += "\n";
374 holiStr += i18n("Birthday") + ": "+event->summary(); 374 holiStr += i18n("Birthday") + ": "+event->summary();
375 if ( !event->location().isEmpty() ) 375 if ( !event->location().isEmpty() )
376 holiStr += " (" + event->location() + ")"; 376 holiStr += " (" + event->location() + ")";
377 bDays.setBit(i); 377 bDays.setBit(i);
378 mHolidays[i] =holiStr ; 378 mHolidays[i] =holiStr ;
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 35d084d..1dce841 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -53,73 +53,78 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
53 SLOT(showIncidence())); 53 SLOT(showIncidence()));
54 mIncidence = 0; 54 mIncidence = 0;
55 // TODO: Set a sensible size (based on the content?). 55 // TODO: Set a sensible size (based on the content?).
56 //showMaximized(); 56 //showMaximized();
57 //qDebug("++++++++++++KOEventViewerDialog() "); 57 //qDebug("++++++++++++KOEventViewerDialog() ");
58 // if ( KOPrefs::instance()->mCompactDialogs ) { 58 // if ( KOPrefs::instance()->mCompactDialogs ) {
59// setFixedSize( 240,284 ); 59// setFixedSize( 240,284 );
60// move( 0, 15 ); 60// move( 0, 15 );
61// } else { 61// } else {
62// setMinimumSize(300,200); 62// setMinimumSize(300,200);
63// resize(320,300); 63// resize(320,300);
64// } 64// }
65 mSyncMode = false; 65 mSyncMode = false;
66 mSyncResult = 0; 66 mSyncResult = 0;
67 67
68} 68}
69 69
70KOEventViewerDialog::~KOEventViewerDialog() 70KOEventViewerDialog::~KOEventViewerDialog()
71{ 71{
72 //qDebug("-------~KOEventViewerDialog() "); 72 //qDebug("-------~KOEventViewerDialog() ");
73} 73}
74void KOEventViewerDialog::showMe() 74void KOEventViewerDialog::showMe()
75{ 75{
76 76
77#ifdef DESKTOP_VERSION 77#ifdef DESKTOP_VERSION
78 int x,y,w,h; 78 int x,y,w,h;
79 x = geometry().x(); 79 x = geometry().x();
80 y = geometry().y(); 80 y = geometry().y();
81 w = width(); 81 w = width();
82 h = height(); 82 h = height();
83 show(); 83 show();
84 setGeometry(x,y,w,h); 84 setGeometry(x,y,w,h);
85 raise();
85#else 86#else
86 showMaximized(); 87 showMaximized();
87#endif 88#endif
88 raise(); 89 QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) );
89 setActiveWindow();
90 mEventViewer->setFocus();
91 //raise();
92 90
93} 91}
92void KOEventViewerDialog::setMyFocus()
93{
94
95 setActiveWindow();
96 mEventViewer->setFocus();
97
98}
94void KOEventViewerDialog::print() 99void KOEventViewerDialog::print()
95{ 100{
96 mEventViewer->printMe(); 101 mEventViewer->printMe();
97 102
98} 103}
99void KOEventViewerDialog::setSyncMode( bool b ) 104void KOEventViewerDialog::setSyncMode( bool b )
100{ 105{
101 mSyncMode = b; 106 mSyncMode = b;
102 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); 107 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode );
103 if ( mSyncMode ) { 108 if ( mSyncMode ) {
104 findButton( Close )->setText( i18n("Cancel Sync")); 109 findButton( Close )->setText( i18n("Cancel Sync"));
105 findButton( Ok )->setText( i18n("Remote")); 110 findButton( Ok )->setText( i18n("Remote"));
106 findButton( User1 )->setText( i18n("Local")); 111 findButton( User1 )->setText( i18n("Local"));
107 } else { 112 } else {
108 findButton( Close )->setText( i18n("Close")); 113 findButton( Close )->setText( i18n("Close"));
109 findButton( Ok )->setText( i18n("Edit")); 114 findButton( Ok )->setText( i18n("Edit"));
110 findButton( User1 )->setText( i18n("Agenda")); 115 findButton( User1 )->setText( i18n("Agenda"));
111 } 116 }
112 mEventViewer->setSyncMode( b ); 117 mEventViewer->setSyncMode( b );
113} 118}
114void KOEventViewerDialog::setColorMode( int m ) 119void KOEventViewerDialog::setColorMode( int m )
115{ 120{
116 mEventViewer->setColorMode( m ); 121 mEventViewer->setColorMode( m );
117} 122}
118int KOEventViewerDialog::executeS( bool local ) 123int KOEventViewerDialog::executeS( bool local )
119{ 124{
120 mSyncResult = 3; 125 mSyncResult = 3;
121 if ( local ) 126 if ( local )
122 findButton( User1 )->setFocus(); 127 findButton( User1 )->setFocus();
123 else 128 else
124 findButton( Ok )->setFocus(); 129 findButton( Ok )->setFocus();
125 exec(); 130 exec();
@@ -183,65 +188,66 @@ void KOEventViewerDialog::setTodo(Todo *event)
183 //findButton( Close )->setFocus(); 188 //findButton( Close )->setFocus();
184 if ( !mSyncMode ) { 189 if ( !mSyncMode ) {
185 findButton( User1 )->setText( i18n("Set complete")); 190 findButton( User1 )->setText( i18n("Set complete"));
186 } 191 }
187} 192}
188void KOEventViewerDialog::setJournal(Journal *j) 193void KOEventViewerDialog::setJournal(Journal *j)
189{ 194{
190 mEventViewer->setJournal(j); 195 mEventViewer->setJournal(j);
191 mIncidence = (Incidence*)j; 196 mIncidence = (Incidence*)j;
192 mEventViewer->setFocus(); 197 mEventViewer->setFocus();
193 //findButton( Close )->setFocus(); 198 //findButton( Close )->setFocus();
194 if ( !mSyncMode ) { 199 if ( !mSyncMode ) {
195 findButton( User1 )->setText( i18n("Agenda")); 200 findButton( User1 )->setText( i18n("Agenda"));
196 } 201 }
197} 202}
198 203
199void KOEventViewerDialog::addText(QString text) 204void KOEventViewerDialog::addText(QString text)
200{ 205{
201 mEventViewer->addText(text); 206 mEventViewer->addText(text);
202 mEventViewer->setFocus(); 207 mEventViewer->setFocus();
203 //findButton( Close )->setFocus(); 208 //findButton( Close )->setFocus();
204} 209}
205void KOEventViewerDialog::editIncidence() 210void KOEventViewerDialog::editIncidence()
206{ 211{
207 sendSignalViewerClosed = false; 212 sendSignalViewerClosed = false;
208 if ( mSyncMode ) { 213 if ( mSyncMode ) {
209 mSyncResult = 2; 214 mSyncResult = 2;
210 accept(); 215 accept();
211 return; 216 return;
212 } 217 }
213 if ( mIncidence ){ 218 if ( mIncidence ){
214#ifndef DESKTOP_VERSION 219#ifndef DESKTOP_VERSION
215 hide(); 220 //hide();
221 close();
216#endif 222#endif
217 emit editIncidence( mIncidence ); 223 emit editIncidence( mIncidence );
218 } 224 }
219} 225}
220void KOEventViewerDialog::showIncidence() 226void KOEventViewerDialog::showIncidence()
221{ 227{
222 sendSignalViewerClosed = false; 228 sendSignalViewerClosed = false;
223 if ( mSyncMode ) { 229 if ( mSyncMode ) {
224 mSyncResult = 1; 230 mSyncResult = 1;
225 accept(); 231 accept();
226 return; 232 return;
227 } 233 }
228 234
229 if ( mIncidence ){ 235 if ( mIncidence ){
230#ifndef DESKTOP_VERSION 236#ifndef DESKTOP_VERSION
231 hide(); 237 hide();
232#endif 238#endif
233 QDate date; 239 QDate date;
234 if ( mIncidence->type() == "Todo" ) { 240 if ( mIncidence->type() == "Todo" ) {
235 /* 241 /*
236 if ( ((Todo*)mIncidence)->hasDueDate() ) 242 if ( ((Todo*)mIncidence)->hasDueDate() )
237 date = ((Todo*)mIncidence)->dtDue().date(); 243 date = ((Todo*)mIncidence)->dtDue().date();
238 else { 244 else {
239 globalFlagBlockAgenda = 2; 245 globalFlagBlockAgenda = 2;
240 emit showAgendaView( false ); 246 emit showAgendaView( false );
241 return; 247 return;
242 } 248 }
243 */ 249 */
244 ((Todo*)mIncidence)->setCompleted( true ); 250 ((Todo*)mIncidence)->setCompleted( true );
245 ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); 251 ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() );
246 hide(); 252 hide();
247 emit todoCompleted(((Todo*)mIncidence)); 253 emit todoCompleted(((Todo*)mIncidence));
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 8e1cd44..29fee49 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -23,54 +23,55 @@
23// 23//
24 24
25#include <qtextview.h> 25#include <qtextview.h>
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28 28
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30 30
31using namespace KCal; 31using namespace KCal;
32 32
33class KOEventViewer; 33class KOEventViewer;
34 34
35class KOEventViewerDialog : public KDialogBase { 35class KOEventViewerDialog : public KDialogBase {
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 KOEventViewerDialog(QWidget *parent=0,const char *name=0); 38 KOEventViewerDialog(QWidget *parent=0,const char *name=0);
39 virtual ~KOEventViewerDialog(); 39 virtual ~KOEventViewerDialog();
40 40
41 void setEvent(Event *event); 41 void setEvent(Event *event);
42 void addEvent(Event *event); 42 void addEvent(Event *event);
43 void setTodo(Todo *event); 43 void setTodo(Todo *event);
44 void setJournal(Journal *journal); 44 void setJournal(Journal *journal);
45 void setIncidence(Incidence *inc); 45 void setIncidence(Incidence *inc);
46 void addIncidence(Incidence *inc); 46 void addIncidence(Incidence *inc);
47 void addText(QString text); 47 void addText(QString text);
48 void showMe(); 48 void showMe();
49 void setSyncMode( bool ); 49 void setSyncMode( bool );
50 void setColorMode( int m ); 50 void setColorMode( int m );
51 int executeS( bool ); 51 int executeS( bool );
52 public slots: 52 public slots:
53 void updateConfig(); 53 void updateConfig();
54 void print(); 54 void print();
55 void setMyFocus();
55 signals: 56 signals:
56 void editIncidence( Incidence* ); 57 void editIncidence( Incidence* );
57 void jumpToTime( const QDate &); 58 void jumpToTime( const QDate &);
58 void showAgendaView( bool ); 59 void showAgendaView( bool );
59 void todoCompleted(Todo*); 60 void todoCompleted(Todo*);
60 void signalViewerClosed(); 61 void signalViewerClosed();
61private slots: 62private slots:
62 void slotViewerClosed(); 63 void slotViewerClosed();
63 void editIncidence(); 64 void editIncidence();
64 void showIncidence(); 65 void showIncidence();
65 protected: 66 protected:
66 void hideEvent ( QHideEvent * e ); 67 void hideEvent ( QHideEvent * e );
67 private: 68 private:
68 bool sendSignalViewerClosed; 69 bool sendSignalViewerClosed;
69 bool mSyncMode; 70 bool mSyncMode;
70 int mSyncResult; 71 int mSyncResult;
71 KOEventViewer *mEventViewer; 72 KOEventViewer *mEventViewer;
72 Incidence* mIncidence; 73 Incidence* mIncidence;
73 void keyPressEvent ( QKeyEvent * e ); 74 void keyPressEvent ( QKeyEvent * e );
74}; 75};
75 76
76#endif 77#endif
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index e72f94b..0bbb3bf 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -46,65 +46,65 @@
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#include <kglobalsettings.h>
57 57
58#include <kurlrequester.h> 58#include <kurlrequester.h>
59#include <klineedit.h> 59#include <klineedit.h>
60 60
61#if defined(USE_SOLARIS) 61#if defined(USE_SOLARIS)
62#include <sys/param.h> 62#include <sys/param.h>
63 63
64#define ZONEINFODIR "/usr/share/lib/zoneinfo" 64#define ZONEINFODIR "/usr/share/lib/zoneinfo"
65#define INITFILE "/etc/default/init" 65#define INITFILE "/etc/default/init"
66#endif 66#endif
67 67
68#include "koprefs.h" 68#include "koprefs.h"
69 69
70#include "koprefsdialog.h" 70#include "koprefsdialog.h"
71#include "kpimglobalprefs.h" 71#include "kpimglobalprefs.h"
72 72
73 73
74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
75 KPrefsDialog(KOPrefs::instance(),parent,name,true) 75 KPrefsDialog(KOPrefs::instance(),parent,name,true)
76{ 76{
77 77
78 setFont( KGlobalSettings::generalFont() ); 78 setFont( KGlobalSettings::generalMaxFont() );
79 setCaption( i18n("Preferences - some settings need a restart (nr)")); 79 setCaption( i18n("Preferences - some settings need a restart (nr)"));
80 mCategoryDict.setAutoDelete(true); 80 mCategoryDict.setAutoDelete(true);
81 81
82 KGlobal::locale()->insertCatalogue("timezones"); 82 KGlobal::locale()->insertCatalogue("timezones");
83 mSpacingHint = spacingHintSmall(); 83 mSpacingHint = spacingHintSmall();
84 mMarginHint = marginHintSmall(); 84 mMarginHint = marginHintSmall();
85#ifndef DESKTOP_VERSION 85#ifndef DESKTOP_VERSION
86 if ( QApplication::desktop()->height() == 480 ) 86 if ( QApplication::desktop()->height() == 480 )
87 hideButtons(); 87 hideButtons();
88#endif 88#endif
89 89
90 setupGlobalTab(); 90 setupGlobalTab();
91 setupMainTab(); 91 setupMainTab();
92 // setupLocaleTab(); 92 // setupLocaleTab();
93 //setupTimeZoneTab(); 93 //setupTimeZoneTab();
94 setupTimeTab(); 94 setupTimeTab();
95 //setupLocaleDateTab(); 95 //setupLocaleDateTab();
96 setupFontsTab(); 96 setupFontsTab();
97 setupColorsTab(); 97 setupColorsTab();
98 setupViewsTab(); 98 setupViewsTab();
99 //setupSyncTab(); 99 //setupSyncTab();
100 //setupSyncAlgTab(); 100 //setupSyncAlgTab();
101 //setupPrinterTab(); 101 //setupPrinterTab();
102 //setupGroupSchedulingTab(); 102 //setupGroupSchedulingTab();
103 //setupGroupAutomationTab(); 103 //setupGroupAutomationTab();
104 104
105 105
106} 106}
107 107
108 108
109KOPrefsDialog::~KOPrefsDialog() 109KOPrefsDialog::~KOPrefsDialog()
110{ 110{
@@ -690,65 +690,64 @@ void KOPrefsDialog::setupViewsTab()
690 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); 690 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
691 topLayout->addWidget(dummy->checkBox(),ii++,0); 691 topLayout->addWidget(dummy->checkBox(),ii++,0);
692 692
693 693
694 KPrefsDialogWidBool *marcusBainsEnabled = 694 KPrefsDialogWidBool *marcusBainsEnabled =
695 addWidBool(i18n("Show current time"), 695 addWidBool(i18n("Show current time"),
696 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 696 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
697 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); 697 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
698 698
699 699
700 dummy = 700 dummy =
701 addWidBool(i18n("Set agenda to DayBeginsAt on change"), 701 addWidBool(i18n("Set agenda to DayBeginsAt on change"),
702 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); 702 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame);
703 topLayout->addWidget(dummy->checkBox(),ii++,0); 703 topLayout->addWidget(dummy->checkBox(),ii++,0);
704 704
705 dummy = 705 dummy =
706 addWidBool(i18n("Set agenda to current time on change"), 706 addWidBool(i18n("Set agenda to current time on change"),
707 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); 707 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame);
708 topLayout->addWidget(dummy->checkBox(),ii++,0); 708 topLayout->addWidget(dummy->checkBox(),ii++,0);
709 709
710 710
711 711
712 712
713 713
714 714
715 715
716 topFrame = addPage(i18n("Month View"),0,0); 716 topFrame = addPage(i18n("Month View"),0,0);
717 // DesktopIcon("viewmag",KIcon::SizeMedium)); 717 // DesktopIcon("viewmag",KIcon::SizeMedium));
718 718
719 topLayout = new QGridLayout(topFrame,5,1); 719 topLayout = new QGridLayout(topFrame,5,1);
720 topLayout->setSpacing(mSpacingHint); 720 topLayout->setSpacing(mSpacingHint);
721 topLayout->setMargin(mMarginHint); 721 topLayout->setMargin(mMarginHint);
722 qDebug("%d %d ",mSpacingHint, mMarginHint );
723 ii = 0; 722 ii = 0;
724 QLabel *lab; 723 QLabel *lab;
725 QHBox *habo = new QHBox( topFrame ); 724 QHBox *habo = new QHBox( topFrame );
726 if ( QApplication::desktop()->width() <= 480 ) { 725 if ( QApplication::desktop()->width() <= 480 ) {
727 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 726 lab = new QLabel ( i18n("Show events that recur "), topFrame );
728 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 727 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
729 ii++; 728 ii++;
730 } else { 729 } else {
731 new QLabel ( i18n("Show events that recur "), habo ); 730 new QLabel ( i18n("Show events that recur "), habo );
732 } 731 }
733 dailyRecur = 732 dailyRecur =
734 addWidBool(i18n("daily"), 733 addWidBool(i18n("daily"),
735 &(KOPrefs::instance()->mMonthDailyRecur),habo); 734 &(KOPrefs::instance()->mMonthDailyRecur),habo);
736 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 735 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
737 736
738 weeklyRecur = 737 weeklyRecur =
739 addWidBool(i18n("weekly"), 738 addWidBool(i18n("weekly"),
740 &(KOPrefs::instance()->mMonthWeeklyRecur),habo); 739 &(KOPrefs::instance()->mMonthWeeklyRecur),habo);
741 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 740 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
742 ii++; 741 ii++;
743 742
744 743
745 habo = new QHBox( topFrame ); 744 habo = new QHBox( topFrame );
746 if ( QApplication::desktop()->width() <= 480 ) { 745 if ( QApplication::desktop()->width() <= 480 ) {
747 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 746 lab = new QLabel (i18n("Show in every cell ") , topFrame );
748 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 747 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
749 ii++; 748 ii++;
750 749
751 } else { 750 } else {
752 new QLabel ( i18n("Show in every cell "), habo ); 751 new QLabel ( i18n("Show in every cell "), habo );
753 } 752 }
754 weeklyRecur = 753 weeklyRecur =
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9505d06..94f4677 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1745,68 +1745,64 @@ void MainWindow::saveOnClose()
1745 if ( filterToolBar ) { 1745 if ( filterToolBar ) {
1746 if ( p->mToolBarHorF ) 1746 if ( p->mToolBarHorF )
1747 p->mToolBarUpF = filterToolBar->y() > height()/2; 1747 p->mToolBarUpF = filterToolBar->y() > height()/2;
1748 else 1748 else
1749 p->mToolBarUpF = filterToolBar->x() > width()/2 ; 1749 p->mToolBarUpF = filterToolBar->x() > width()/2 ;
1750 } 1750 }
1751#endif 1751#endif
1752 1752
1753 1753
1754 mView->writeSettings(); 1754 mView->writeSettings();
1755 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) 1755 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
1756 save(); 1756 save();
1757} 1757}
1758void MainWindow::slotModifiedChanged( bool changed ) 1758void MainWindow::slotModifiedChanged( bool changed )
1759{ 1759{
1760 if ( mBlockAtStartup ) 1760 if ( mBlockAtStartup )
1761 return; 1761 return;
1762 1762
1763 int msec; 1763 int msec;
1764 // we store the changes after 1 minute, 1764 // we store the changes after 1 minute,
1765 // and for safety reasons after 10 minutes again 1765 // and for safety reasons after 10 minutes again
1766 if ( !mSyncManager->blockSave() ) 1766 if ( !mSyncManager->blockSave() )
1767 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1767 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1768 else 1768 else
1769 msec = 1000 * 600; 1769 msec = 1000 * 600;
1770 mSaveTimer.start( msec, true ); // 1 minute 1770 mSaveTimer.start( msec, true ); // 1 minute
1771 qDebug("KO: Saving File in %d secs!", msec/1000); 1771 qDebug("KO: Saving File in %d secs!", msec/1000);
1772 mCalendarModifiedFlag = true; 1772 mCalendarModifiedFlag = true;
1773} 1773}
1774void MainWindow::saveStopTimer() 1774void MainWindow::saveStopTimer()
1775{ 1775{
1776 mSaveTimer.stop(); 1776 mSaveTimer.stop();
1777 if (mSaveTimer.isActive() )
1778 qDebug("ti active ");
1779 else
1780 qDebug("KO: Save timer stopped");
1781} 1777}
1782void MainWindow::save() 1778void MainWindow::save()
1783{ 1779{
1784 if ( !mCalendarModifiedFlag ) { 1780 if ( !mCalendarModifiedFlag ) {
1785 qDebug("KO: Calendar not modified. Nothing saved."); 1781 qDebug("KO: Calendar not modified. Nothing saved.");
1786 return; 1782 return;
1787 } 1783 }
1788 if ( mSyncManager->blockSave() ) 1784 if ( mSyncManager->blockSave() )
1789 return; 1785 return;
1790 mSyncManager->setBlockSave(true); 1786 mSyncManager->setBlockSave(true);
1791 if ( mView->checkFileVersion( defaultFileName()) ) { 1787 if ( mView->checkFileVersion( defaultFileName()) ) {
1792 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1788 QTime neededSaveTime = QDateTime::currentDateTime().time();
1793 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 1789 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
1794 qDebug("KO: Start saving data to file!"); 1790 qDebug("KO: Start saving data to file!");
1795 mView->saveCalendar( defaultFileName() ); 1791 mView->saveCalendar( defaultFileName() );
1796 mCalendarModifiedFlag = false; 1792 mCalendarModifiedFlag = false;
1797 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1793 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
1798 qDebug("KO: Needed %d ms for saving.",msNeeded ); 1794 qDebug("KO: Needed %d ms for saving.",msNeeded );
1799 QString savemes; 1795 QString savemes;
1800 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 1796 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
1801 setCaption(savemes); 1797 setCaption(savemes);
1802 } else 1798 } else
1803 setCaption(i18n("Saving cancelled!")); 1799 setCaption(i18n("Saving cancelled!"));
1804 mSyncManager->setBlockSave( false ); 1800 mSyncManager->setBlockSave( false );
1805} 1801}
1806 1802
1807void MainWindow::keyReleaseEvent ( QKeyEvent * e) 1803void MainWindow::keyReleaseEvent ( QKeyEvent * e)
1808{ 1804{
1809 if ( !e->isAutoRepeat() ) { 1805 if ( !e->isAutoRepeat() ) {
1810 mFlagKeyPressed = false; 1806 mFlagKeyPressed = false;
1811 } 1807 }
1812} 1808}
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index b6d2feb..b837b23 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -1,50 +1,66 @@
1#include "kglobalsettings.h" 1#include "kglobalsettings.h"
2#include "kconfig.h" 2#include "kconfig.h"
3#include "kglobal.h" 3#include "kglobal.h"
4#include "kconfigbase.h" 4#include "kconfigbase.h"
5 5
6#include <qapplication.h> 6#include <qapplication.h>
7 7
8QFont KGlobalSettings::generalFont() 8QFont KGlobalSettings::generalFont()
9{ 9{
10 int size = 12; 10 int size = 12;
11 if (QApplication::desktop()->width() < 480 ) { 11 if (QApplication::desktop()->width() < 480 ) {
12 size = 10; 12 size = 10;
13 } 13 }
14#ifndef DESKTOP_VERSION 14#ifndef DESKTOP_VERSION
15 else 15 else
16 if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) 16 if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 )
17 size = 18; 17 size = 18;
18#endif 18#endif
19 QFont f = QApplication::font(); 19 QFont f = QApplication::font();
20 //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); 20 //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1());
21 f.setPointSize( size ); 21 f.setPointSize( size );
22 return f; 22 return f;
23} 23}
24QFont KGlobalSettings::generalMaxFont()
25{
26 int size = 12;
27 if (QApplication::desktop()->width() < 480 ) {
28 size = 10;
29 }
30#ifndef DESKTOP_VERSION
31 else
32 if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 )
33 size = 18;
34#endif
35 QFont f = QApplication::font();
36 if ( f.pointSize() > size )
37 f.setPointSize( size );
38 return f;
39}
24QFont KGlobalSettings::toolBarFont() 40QFont KGlobalSettings::toolBarFont()
25{ 41{
26 return QApplication::font(); 42 return QApplication::font();
27} 43}
28 44
29QColor KGlobalSettings::toolBarHighlightColor() 45QColor KGlobalSettings::toolBarHighlightColor()
30{ 46{
31 return QColor( "black" ); 47 return QColor( "black" );
32} 48}
33 49
34QRect KGlobalSettings::desktopGeometry( QWidget * ) 50QRect KGlobalSettings::desktopGeometry( QWidget * )
35{ 51{
36 return QApplication::desktop()->rect(); 52 return QApplication::desktop()->rect();
37} 53}
38 54
39 /** 55 /**
40 * Returns whether KDE runs in single (default) or double click 56 * Returns whether KDE runs in single (default) or double click
41 * mode. 57 * mode.
42 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 58 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
43 * @return true if single click mode, or false if double click mode. 59 * @return true if single click mode, or false if double click mode.
44 **/ 60 **/
45bool KGlobalSettings::singleClick() 61bool KGlobalSettings::singleClick()
46{ 62{
47 KConfig *c = KGlobal::config(); 63 KConfig *c = KGlobal::config();
48 KConfigGroupSaver cgs( c, "KDE" ); 64 KConfigGroupSaver cgs( c, "KDE" );
49 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); 65 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK);
50} 66}
diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h
index 7df8012..075bb1c 100644
--- a/microkde/kglobalsettings.h
+++ b/microkde/kglobalsettings.h
@@ -1,30 +1,31 @@
1#ifndef MICROKDE_KGLOBALSETTINGS_H 1#ifndef MICROKDE_KGLOBALSETTINGS_H
2#define MICROKDE_KGLOBALSETTINGS_H 2#define MICROKDE_KGLOBALSETTINGS_H
3 3
4#include <qfont.h> 4#include <qfont.h>
5#include <qrect.h> 5#include <qrect.h>
6 6
7 7
8#define KDE_DEFAULT_SINGLECLICK true 8#define KDE_DEFAULT_SINGLECLICK true
9 9
10 10
11class KGlobalSettings 11class KGlobalSettings
12{ 12{
13 public: 13 public:
14 static QFont generalFont(); 14 static QFont generalFont();
15 static QFont generalMaxFont();
15 static QFont toolBarFont(); 16 static QFont toolBarFont();
16 17
17 static QColor toolBarHighlightColor(); 18 static QColor toolBarHighlightColor();
18 static QRect desktopGeometry( QWidget * ); 19 static QRect desktopGeometry( QWidget * );
19 20
20 /** 21 /**
21 * Returns whether KDE runs in single (default) or double click 22 * Returns whether KDE runs in single (default) or double click
22 * mode. 23 * mode.
23 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 24 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
24 * @return true if single click mode, or false if double click mode. 25 * @return true if single click mode, or false if double click mode.
25 **/ 26 **/
26 static bool singleClick(); 27 static bool singleClick();
27 28
28}; 29};
29 30
30#endif 31#endif
diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp
index bb41b18..9c87682 100644
--- a/microkde/kutils/kcmultidialog.cpp
+++ b/microkde/kutils/kcmultidialog.cpp
@@ -13,65 +13,65 @@
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19 19
20*/ 20*/
21 21
22#include <qhbox.h> 22#include <qhbox.h>
23#include <qvbox.h> 23#include <qvbox.h>
24#include <qcursor.h> 24#include <qcursor.h>
25#include <qlayout.h> 25#include <qlayout.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
28#include <kglobal.h> 28#include <kglobal.h>
29#include <kdebug.h> 29#include <kdebug.h>
30#include <kiconloader.h> 30#include <kiconloader.h>
31#include <kmessagebox.h> 31#include <kmessagebox.h>
32//US #include <klibloader.h> 32//US #include <klibloader.h>
33#include <krun.h> 33#include <krun.h>
34#include <kprocess.h> 34#include <kprocess.h>
35#include <kglobalsettings.h> 35#include <kglobalsettings.h>
36 36
37#include "kcmultidialog.h" 37#include "kcmultidialog.h"
38//US #include "kcmultidialog.moc" 38//US #include "kcmultidialog.moc"
39//US #include "kcmoduleloader.h" 39//US #include "kcmoduleloader.h"
40 40
41KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const char *name, bool modal) 41KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const char *name, bool modal)
42 : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok, 42 : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok,
43 parent, name, modal, true), d(0L) 43 parent, name, modal, true), d(0L)
44{ 44{
45 setFont( KGlobalSettings::generalFont() ); 45 setFont( KGlobalSettings::generalMaxFont() );
46 enableButton(Apply, false); 46 enableButton(Apply, false);
47 //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); 47 //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *)));
48 48
49 connect( this, SIGNAL( defaultClicked() ), SLOT( slotDefault() ) ); 49 connect( this, SIGNAL( defaultClicked() ), SLOT( slotDefault() ) );
50 50
51 _baseGroup = baseGroup; 51 _baseGroup = baseGroup;
52 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); 52 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed );
53 setMainWidget(mMainWidget ); 53 setMainWidget(mMainWidget );
54#ifdef DESKTOP_VERSION 54#ifdef DESKTOP_VERSION
55 resize(640,480); 55 resize(640,480);
56#else 56#else
57 //resize(640,480); 57 //resize(640,480);
58 //setMaximumSize( KMIN(KGlobal::getDesktopWidth()-5, 640), KMIN(KGlobal::getDesktopHeight()-20, 480)); 58 //setMaximumSize( KMIN(KGlobal::getDesktopWidth()-5, 640), KMIN(KGlobal::getDesktopHeight()-20, 480));
59 resize(800,800); 59 resize(800,800);
60 setMaximumSize( 800, 800 ); 60 setMaximumSize( 800, 800 );
61 //showMaximized(); 61 //showMaximized();
62#endif 62#endif
63 63
64} 64}
65 65
66KCMultiDialog::~KCMultiDialog() 66KCMultiDialog::~KCMultiDialog()
67{ 67{
68//US moduleDict.setAutoDelete(true); 68//US moduleDict.setAutoDelete(true);
69} 69}
70 70
71void KCMultiDialog::slotDefault() 71void KCMultiDialog::slotDefault()
72{ 72{
73 73
74 int curPageIndex = activePageIndex(); 74 int curPageIndex = activePageIndex();
75 75
76 QPtrListIterator<KCModule> it(modules); 76 QPtrListIterator<KCModule> it(modules);
77 for (; it.current(); ++it) 77 for (; it.current(); ++it)