summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodialogmanager.cpp3
-rw-r--r--korganizer/koeditordetails.cpp2
-rw-r--r--korganizer/koeditorgeneral.cpp2
-rw-r--r--korganizer/koprefsdialog.cpp50
-rw-r--r--korganizer/mainwindow.cpp2
-rw-r--r--korganizer/searchdialog.cpp23
-rw-r--r--korganizer/searchdialog.h3
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp91
-rw-r--r--microkde/kcolorbutton.cpp2
9 files changed, 131 insertions, 47 deletions
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index 3dfa344..5455098 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -59,97 +59,98 @@ KODialogManager::KODialogManager( CalendarView *mainView ) :
59 59
60KODialogManager::~KODialogManager() 60KODialogManager::~KODialogManager()
61{ 61{
62 delete mOutgoingDialog; 62 delete mOutgoingDialog;
63 delete mIncomingDialog; 63 delete mIncomingDialog;
64 delete mOptionsDialog; 64 delete mOptionsDialog;
65 delete mSearchDialog; 65 delete mSearchDialog;
66#ifndef KORG_NOARCHIVE 66#ifndef KORG_NOARCHIVE
67 delete mArchiveDialog; 67 delete mArchiveDialog;
68#endif 68#endif
69 delete mFilterEditDialog; 69 delete mFilterEditDialog;
70#ifndef KORG_NOPLUGINS 70#ifndef KORG_NOPLUGINS
71 delete mPluginDialog; 71 delete mPluginDialog;
72#endif 72#endif
73} 73}
74 74
75OutgoingDialog *KODialogManager::outgoingDialog() 75OutgoingDialog *KODialogManager::outgoingDialog()
76{ 76{
77 createOutgoingDialog(); 77 createOutgoingDialog();
78 return mOutgoingDialog; 78 return mOutgoingDialog;
79} 79}
80 80
81void KODialogManager::createOutgoingDialog() 81void KODialogManager::createOutgoingDialog()
82{ 82{
83 if (!mOutgoingDialog) { 83 if (!mOutgoingDialog) {
84 mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); 84 mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView);
85 if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); 85 if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog);
86 connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), 86 connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)),
87 mMainView,SIGNAL(numOutgoingChanged(int))); 87 mMainView,SIGNAL(numOutgoingChanged(int)));
88 } 88 }
89} 89}
90 90
91void KODialogManager::showGlobalOptionsDialog( bool showSync ) 91void KODialogManager::showGlobalOptionsDialog( bool showSync )
92{ 92{
93 KPimPrefsGlobalDialog gc ( mMainView ); 93 KPimPrefsGlobalDialog gc ( mMainView );
94 if ( showSync ) 94 if ( showSync )
95 gc.showTZconfig(); 95 gc.showTZconfig();
96 gc.exec(); 96 gc.exec();
97} 97}
98void KODialogManager::showOptionsDialog( bool showSync ) 98void KODialogManager::showOptionsDialog( bool showSync )
99{ 99{
100 100
101 if (!mOptionsDialog) { 101 if (!mOptionsDialog) {
102 mOptionsDialog = new KOPrefsDialog(mMainView); 102 mOptionsDialog = new KOPrefsDialog(mMainView);
103 connect(mOptionsDialog,SIGNAL(configChanged()), 103 connect(mOptionsDialog,SIGNAL(configChanged()),
104 mMainView,SLOT(updateConfig())); 104 mMainView,SLOT(updateConfig()));
105 } 105 }
106 mOptionsDialog->readConfig(); 106 mOptionsDialog->readConfig();
107#ifndef DESKTOP_VERSION 107#ifndef DESKTOP_VERSION
108 mOptionsDialog->hideButtons();
108 mOptionsDialog->showMaximized(); 109 mOptionsDialog->showMaximized();
109#else 110#else
110 mOptionsDialog->show(); 111 mOptionsDialog->show();
111#endif 112#endif
112 113
113 mOptionsDialog->exec(); 114 mOptionsDialog->exec();
114 delete mOptionsDialog; 115 delete mOptionsDialog;
115 mOptionsDialog = 0; 116 mOptionsDialog = 0;
116} 117}
117void KODialogManager::showSyncOptions() 118void KODialogManager::showSyncOptions()
118{ 119{
119 showGlobalOptionsDialog( true ); 120 showGlobalOptionsDialog( true );
120 121
121} 122}
122void KODialogManager::showOutgoingDialog() 123void KODialogManager::showOutgoingDialog()
123{ 124{
124 createOutgoingDialog(); 125 createOutgoingDialog();
125 mOutgoingDialog->show(); 126 mOutgoingDialog->show();
126 mOutgoingDialog->raise(); 127 mOutgoingDialog->raise();
127} 128}
128 129
129IncomingDialog *KODialogManager::incomingDialog() 130IncomingDialog *KODialogManager::incomingDialog()
130{ 131{
131 createOutgoingDialog(); 132 createOutgoingDialog();
132 if (!mIncomingDialog) { 133 if (!mIncomingDialog) {
133 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); 134 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView);
134 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), 135 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)),
135 mMainView,SIGNAL(numIncomingChanged(int))); 136 mMainView,SIGNAL(numIncomingChanged(int)));
136 connect(mIncomingDialog,SIGNAL(calendarUpdated()), 137 connect(mIncomingDialog,SIGNAL(calendarUpdated()),
137 mMainView,SLOT(updateView())); 138 mMainView,SLOT(updateView()));
138 } 139 }
139 return mIncomingDialog; 140 return mIncomingDialog;
140} 141}
141 142
142void KODialogManager::createIncomingDialog() 143void KODialogManager::createIncomingDialog()
143{ 144{
144 createOutgoingDialog(); 145 createOutgoingDialog();
145 if (!mIncomingDialog) { 146 if (!mIncomingDialog) {
146 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); 147 mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView);
147 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), 148 connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)),
148 mMainView,SIGNAL(numIncomingChanged(int))); 149 mMainView,SIGNAL(numIncomingChanged(int)));
149 connect(mIncomingDialog,SIGNAL(calendarUpdated()), 150 connect(mIncomingDialog,SIGNAL(calendarUpdated()),
150 mMainView,SLOT(updateView())); 151 mMainView,SLOT(updateView()));
151 } 152 }
152} 153}
153 154
154void KODialogManager::showIncomingDialog() 155void KODialogManager::showIncomingDialog()
155{ 156{
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index bdfc637..6ecf978 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -42,97 +42,97 @@
42#include <kabc/addresseedialog.h> 42#include <kabc/addresseedialog.h>
43#else //DESKTOP_VERSION 43#else //DESKTOP_VERSION
44#include <externalapphandler.h> 44#include <externalapphandler.h>
45#endif //DESKTOP_VERSION 45#endif //DESKTOP_VERSION
46 46
47#endif 47#endif
48 48
49#include <libkcal/incidence.h> 49#include <libkcal/incidence.h>
50 50
51#include "koprefs.h" 51#include "koprefs.h"
52 52
53#include "koeditordetails.h" 53#include "koeditordetails.h"
54 54
55template <> 55template <>
56CustomListViewItem<class Attendee *>::~CustomListViewItem() 56CustomListViewItem<class Attendee *>::~CustomListViewItem()
57{ 57{
58 delete mData; 58 delete mData;
59} 59}
60 60
61template <> 61template <>
62void CustomListViewItem<class Attendee *>::updateItem() 62void CustomListViewItem<class Attendee *>::updateItem()
63{ 63{
64 setText(0,mData->name()); 64 setText(0,mData->name());
65 setText(1,mData->email()); 65 setText(1,mData->email());
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 ( QApplication::desktop()->width() <= 320 ) { 90 if ( QApplication::desktop()->width() <= 320 || QApplication::desktop()->height() <= 240) {
91 int hei = 80; 91 int hei = 80;
92 if ( QApplication::desktop()->height() <= 240 ) 92 if ( QApplication::desktop()->height() <= 240 )
93 hei = 60; 93 hei = 60;
94 mListView->setFixedHeight(hei); 94 mListView->setFixedHeight(hei);
95 } 95 }
96 mListView->setAllColumnsShowFocus (true ); 96 mListView->setAllColumnsShowFocus (true );
97 //mListView->setSingleClick( true ); 97 //mListView->setSingleClick( true );
98 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), 98 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
99 SLOT(updateAttendeeInput())); 99 SLOT(updateAttendeeInput()));
100 100
101 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), 101 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )),
102 SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); 102 SLOT(itemClicked(QListViewItem * ,const QPoint& , int )));
103 103
104 mRsvpButton = new QCheckBox(this); 104 mRsvpButton = new QCheckBox(this);
105 mRsvpButton->setText(i18n("Request response")); 105 mRsvpButton->setText(i18n("Request response"));
106 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this); 106 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
107 QLabel *attendeeLabel = new QLabel(this); 107 QLabel *attendeeLabel = new QLabel(this);
108 attendeeLabel->setText(i18n("Name:")); 108 attendeeLabel->setText(i18n("Name:"));
109 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); 109 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() );
110 mNameEdit = new QLineEdit(this); 110 mNameEdit = new QLineEdit(this);
111 connect(mNameEdit,SIGNAL(textChanged(const QString &)), 111 connect(mNameEdit,SIGNAL(textChanged(const QString &)),
112 SLOT(updateAttendeeItem())); 112 SLOT(updateAttendeeItem()));
113 113
114 mUidEdit = new QLineEdit(0); 114 mUidEdit = new QLineEdit(0);
115 mUidEdit->setText(""); 115 mUidEdit->setText("");
116 116
117 QLabel *emailLabel = new QLabel(this); 117 QLabel *emailLabel = new QLabel(this);
118 emailLabel->setText(i18n("Email:")); 118 emailLabel->setText(i18n("Email:"));
119 mEmailEdit = new QLineEdit(this); 119 mEmailEdit = new QLineEdit(this);
120 connect(mEmailEdit,SIGNAL(textChanged(const QString &)), 120 connect(mEmailEdit,SIGNAL(textChanged(const QString &)),
121 SLOT(updateAttendeeItem())); 121 SLOT(updateAttendeeItem()));
122 122
123 QLabel *attendeeRoleLabel = new QLabel(this); 123 QLabel *attendeeRoleLabel = new QLabel(this);
124 attendeeRoleLabel->setText(i18n("Role:")); 124 attendeeRoleLabel->setText(i18n("Role:"));
125 mRoleCombo = new QComboBox(false,this); 125 mRoleCombo = new QComboBox(false,this);
126 mRoleCombo->insertStringList(Attendee::roleList()); 126 mRoleCombo->insertStringList(Attendee::roleList());
127 connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); 127 connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
128 128
129 QLabel *statusLabel = new QLabel(this); 129 QLabel *statusLabel = new QLabel(this);
130 statusLabel->setText( i18n("Status:") ); 130 statusLabel->setText( i18n("Status:") );
131 131
132 mStatusCombo = new QComboBox(false,this); 132 mStatusCombo = new QComboBox(false,this);
133 mStatusCombo->insertStringList(Attendee::statusList()); 133 mStatusCombo->insertStringList(Attendee::statusList());
134 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); 134 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
135 135
136 136
137 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); 137 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
138 QWidget *buttonBox = new QWidget(this); 138 QWidget *buttonBox = new QWidget(this);
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index bfe0aec..915c7ec 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -55,97 +55,97 @@
55#include <qpe/qpeapplication.h> 55#include <qpe/qpeapplication.h>
56#else 56#else
57#include <qapplication.h> 57#include <qapplication.h>
58#endif 58#endif
59 59
60KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : 60KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) :
61 QObject( parent, name) 61 QObject( parent, name)
62{ 62{
63 mNextFocus = 0; 63 mNextFocus = 0;
64} 64}
65 65
66KOEditorGeneral::~KOEditorGeneral() 66KOEditorGeneral::~KOEditorGeneral()
67{ 67{
68} 68}
69 69
70void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) 70void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
71{ 71{
72 QGridLayout *headerLayout = new QGridLayout(topLayout); 72 QGridLayout *headerLayout = new QGridLayout(topLayout);
73 73
74#if 0 74#if 0
75 mOwnerLabel = new QLabel(i18n("Owner:"),parent); 75 mOwnerLabel = new QLabel(i18n("Owner:"),parent);
76 headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); 76 headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1);
77#endif 77#endif
78 78
79 QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent); 79 QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent);
80 headerLayout->addWidget(summaryLabel,1,0); 80 headerLayout->addWidget(summaryLabel,1,0);
81 81
82 mSummaryEdit = new KOLocationBox(TRUE,parent, 10); 82 mSummaryEdit = new KOLocationBox(TRUE,parent, 10);
83 mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); 83 mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
84 //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) ); 84 //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) );
85 //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() ); 85 //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() );
86 int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2; 86 int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2;
87 if ( QApplication::desktop()->width() > 320 ) 87 if ( QApplication::desktop()->width() > 320 )
88 mSummaryEdit->setMaximumHeight( hei +6 ); 88 mSummaryEdit->setMaximumHeight( hei +6 );
89 //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding ); 89 //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding );
90 // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink } 90 // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink }
91 // mSummaryEdit = new QLineEdit(parent); 91 // mSummaryEdit = new QLineEdit(parent);
92 headerLayout->addWidget(mSummaryEdit,1,1); 92 headerLayout->addWidget(mSummaryEdit,1,1);
93 connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); 93 connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
94 94
95 QLabel *locationLabel = new QLabel(i18n("Location:"),parent); 95 QLabel *locationLabel = new QLabel(i18n("Location:"),parent);
96 if ( QApplication::desktop()->height() < 320 ) 96 if ( QApplication::desktop()->height() < 320 )
97 headerLayout->addWidget(locationLabel,1,2); 97 headerLayout->addWidget(locationLabel,1,2);
98 else 98 else
99 headerLayout->addWidget(locationLabel,2,0); 99 headerLayout->addWidget(locationLabel,2,0);
100 100
101 mLocationEdit = new KOLocationBox(TRUE,parent,10); 101 mLocationEdit = new KOLocationBox(TRUE,parent,10);
102 mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); 102 mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
103 if ( QApplication::desktop()->width() > 320 ) 103 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->height() > 240 )
104 mLocationEdit->setMaximumHeight( hei + 6); 104 mLocationEdit->setMaximumHeight( hei + 6);
105 105
106 // mLocationEdit = new QLineEdit(parent); 106 // mLocationEdit = new QLineEdit(parent);
107 connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); 107 connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
108 if ( QApplication::desktop()->height() < 320 ) { 108 if ( QApplication::desktop()->height() < 320 ) {
109 headerLayout->addWidget(mLocationEdit,1,3); 109 headerLayout->addWidget(mLocationEdit,1,3);
110 headerLayout->setColStretch( 1, 10); 110 headerLayout->setColStretch( 1, 10);
111 headerLayout->setColStretch( 3, 10); 111 headerLayout->setColStretch( 3, 10);
112 } 112 }
113 else { 113 else {
114 headerLayout->addWidget(mLocationEdit,2,1); 114 headerLayout->addWidget(mLocationEdit,2,1);
115 headerLayout->setColStretch( 1, 10); 115 headerLayout->setColStretch( 1, 10);
116 } 116 }
117} 117}
118void KOEditorGeneral::setFocusOn( int i ) 118void KOEditorGeneral::setFocusOn( int i )
119{ 119{
120 mNextFocus = i; 120 mNextFocus = i;
121 QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() )); 121 QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() ));
122} 122}
123void KOEditorGeneral::slotSetFocusOn() 123void KOEditorGeneral::slotSetFocusOn()
124{ 124{
125 mNextFocus; 125 mNextFocus;
126 if ( mNextFocus == 1 ) { 126 if ( mNextFocus == 1 ) {
127 mDescriptionEdit->setFocus(); 127 mDescriptionEdit->setFocus();
128 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); 128 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
129 } 129 }
130 if ( mNextFocus == 2 ) { 130 if ( mNextFocus == 2 ) {
131 mSummaryEdit->setFocus(); 131 mSummaryEdit->setFocus();
132 } 132 }
133} 133}
134void KOEditorGeneral::editCategories() 134void KOEditorGeneral::editCategories()
135{ 135{
136 // qDebug("KOEditorGeneral::editCategories() "); 136 // qDebug("KOEditorGeneral::editCategories() ");
137 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); 137 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
138 connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); 138 connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &)));
139 //KOGlobals::fitDialogToScreen( csd ); 139 //KOGlobals::fitDialogToScreen( csd );
140 csd->setColorEnabled(); 140 csd->setColorEnabled();
141 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); 141 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) );
142 csd->exec(); 142 csd->exec();
143 delete csd; 143 delete csd;
144} 144}
145void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) 145void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
146{ 146{
147 QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); 147 QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout );
148 148
149 mCategoriesButton = new QPushButton(parent); 149 mCategoriesButton = new QPushButton(parent);
150 mCategoriesButton->setText(i18n("Categories...")); 150 mCategoriesButton->setText(i18n("Categories..."));
151 connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() )); 151 connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() ));
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index b782bb1..3ee9a22 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -240,96 +240,103 @@ void KOPrefsDialog::setupMainTab()
240 // DesktopIcon("identity",KIcon::SizeMedium)); 240 // DesktopIcon("identity",KIcon::SizeMedium));
241 241
242 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 242 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
243 topLayout->setSpacing(mSpacingHint); 243 topLayout->setSpacing(mSpacingHint);
244 topLayout->setMargin(mMarginHint); 244 topLayout->setMargin(mMarginHint);
245 245
246 // KPrefsDialogWidBool *emailControlCenter = 246 // KPrefsDialogWidBool *emailControlCenter =
247// addWidBool(i18n("&Use email settings from Control Center"), 247// addWidBool(i18n("&Use email settings from Control Center"),
248// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 248// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
249// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 249// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
250 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 250 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
251 // SLOT(toggleEmailSettings(bool))); 251 // SLOT(toggleEmailSettings(bool)));
252 252
253 mNameEdit = new QLineEdit(topFrame); 253 mNameEdit = new QLineEdit(topFrame);
254 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 254 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
255 topLayout->addWidget(mNameLabel,0,0); 255 topLayout->addWidget(mNameLabel,0,0);
256 topLayout->addWidget(mNameEdit,0,1); 256 topLayout->addWidget(mNameEdit,0,1);
257 257
258 mEmailEdit = new QLineEdit(topFrame); 258 mEmailEdit = new QLineEdit(topFrame);
259 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 259 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
260 topLayout->addWidget(mEmailLabel,1,0); 260 topLayout->addWidget(mEmailLabel,1,0);
261 topLayout->addWidget(mEmailEdit,1,1); 261 topLayout->addWidget(mEmailEdit,1,1);
262 KPrefsDialogWidBool *wb; 262 KPrefsDialogWidBool *wb;
263 263
264 264
265 265
266 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), 266 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"),
267 &(KOPrefs::instance()->mShowFullMenu),topFrame); 267 &(KOPrefs::instance()->mShowFullMenu),topFrame);
268 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); 268 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1);
269 269
270 270
271 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), 271 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"),
272 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); 272 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame);
273 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); 273 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1);
274 274
275 275
276 KPrefsDialogWidBool *verticalScreen = 276 KPrefsDialogWidBool *verticalScreen =
277 addWidBool(i18n("Show vertical screen (Needs restart)"), 277 addWidBool(i18n("Show vertical screen (Needs restart)"),
278 &(KOPrefs::instance()->mVerticalScreen),topFrame); 278 &(KOPrefs::instance()->mVerticalScreen),topFrame);
279 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); 279 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
280 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); 280 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1);
281 281
282 282
283 int iii = 5; 283 int iii = 5;
284 widbool = addWidBool(i18n("Block popup until mouse button release"), 284 widbool = addWidBool(i18n("Block popup until mouse button release"),
285 &(KOPrefs::instance()->mBlockPopupMenu),topFrame); 285 &(KOPrefs::instance()->mBlockPopupMenu),topFrame);
286 topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); 286 topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1);
287 ++iii; 287 ++iii;
288 if ( QApplication::desktop()->height() <= 240 ) {
289 topFrame = addPage(i18n("General") +" 2",0,0);
290 topLayout = new QGridLayout(topFrame,4,2);
291 topLayout->setSpacing(2);
292 topLayout->setMargin(3);
293 iii = 0;
294 }
288 QHBox *dummy = new QHBox(topFrame); 295 QHBox *dummy = new QHBox(topFrame);
289 new QLabel(i18n("Days in Next-X-Days:"),dummy); 296 new QLabel(i18n("Days in Next-X-Days:"),dummy);
290 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 297 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
291 298
292 topLayout->addMultiCellWidget(dummy,iii,iii,0,1); 299 topLayout->addMultiCellWidget(dummy,iii,iii,0,1);
293 300
294 ++iii; 301 ++iii;
295 302
296 303
297 // KPrefsDialogWidBool *bcc = 304 // KPrefsDialogWidBool *bcc =
298// addWidBool(i18n("Send copy to owner when mailing events"), 305// addWidBool(i18n("Send copy to owner when mailing events"),
299// &(KOPrefs::instance()->mBcc),topFrame); 306// &(KOPrefs::instance()->mBcc),topFrame);
300// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 307// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
301 308
302 309
303 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 310 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
304 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 311 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
305 312
306 // addWidBool(i18n("Enable automatic saving of calendar"), 313 // addWidBool(i18n("Enable automatic saving of calendar"),
307 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 314 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
308 315
309 QHBox *intervalBox = new QHBox(topFrame); 316 QHBox *intervalBox = new QHBox(topFrame);
310 // intervalBox->setSpacing(mSpacingHint); 317 // intervalBox->setSpacing(mSpacingHint);
311 topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); 318 topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1);
312 ++iii; 319 ++iii;
313 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 320 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
314 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 321 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
315 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 322 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
316 /* 323 /*
317 QHBox * agendasize = new QHBox ( topFrame ); 324 QHBox * agendasize = new QHBox ( topFrame );
318 325
319 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 326 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
320 327
321 328
322 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 329 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
323 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 330 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
324 */ 331 */
325 332
326 333
327 KPrefsDialogWidBool *ask = 334 KPrefsDialogWidBool *ask =
328 addWidBool(i18n("Ask for quit when closing KO/Pi"), 335 addWidBool(i18n("Ask for quit when closing KO/Pi"),
329 &(KOPrefs::instance()->mAskForQuit),topFrame); 336 &(KOPrefs::instance()->mAskForQuit),topFrame);
330 topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); 337 topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1);
331 ++iii; 338 ++iii;
332 339
333 340
334 /* 341 /*
335 KPrefsDialogWidBool *confirmCheck = 342 KPrefsDialogWidBool *confirmCheck =
@@ -386,102 +393,109 @@ void KOPrefsDialog::setupMainTab()
386 topFrame); 393 topFrame);
387 destinationGroup->addRadio(i18n("be added to the standard resource")); 394 destinationGroup->addRadio(i18n("be added to the standard resource"));
388 destinationGroup->addRadio(i18n("be asked which resource to use")); 395 destinationGroup->addRadio(i18n("be asked which resource to use"));
389 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); 396 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
390 397
391 topLayout->setRowStretch(14,1); 398 topLayout->setRowStretch(14,1);
392 */ 399 */
393} 400}
394 401
395 402
396void KOPrefsDialog::setupTimeTab() 403void KOPrefsDialog::setupTimeTab()
397{ 404{
398 QFrame *topFrame = addPage(i18n("Time"),0,0); 405 QFrame *topFrame = addPage(i18n("Time"),0,0);
399 // DesktopIcon("clock",KIcon::SizeMedium)); 406 // DesktopIcon("clock",KIcon::SizeMedium));
400 407
401 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 408 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
402 topLayout->setSpacing(mSpacingHint); 409 topLayout->setSpacing(mSpacingHint);
403 topLayout->setMargin(mMarginHint); 410 topLayout->setMargin(mMarginHint);
404 411
405 QHBox *dummy = new QHBox(topFrame); 412 QHBox *dummy = new QHBox(topFrame);
406 KPrefsDialogWidTime *dayBegins = 413 KPrefsDialogWidTime *dayBegins =
407 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 414 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
408 dummy); 415 dummy);
409 //topLayout->addWidget(dayBegins->label(),2,0); 416 //topLayout->addWidget(dayBegins->label(),2,0);
410 417
411 //topLayout->addWidget(dayBegins->spinBox(),2,1); 418 //topLayout->addWidget(dayBegins->spinBox(),2,1);
412 topLayout->addMultiCellWidget(dummy,0,0,0,1); 419 topLayout->addMultiCellWidget(dummy,0,0,0,1);
413 420
414 topLayout->addWidget(new QLabel(i18n("Default appointment time:"), 421 topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
415 topFrame),1,0); 422 topFrame),1,0);
416 mStartTimeSpin = new QSpinBox(0,23,1,topFrame); 423 mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
417 mStartTimeSpin->setSuffix(":00"); 424 mStartTimeSpin->setSuffix(":00");
418 topLayout->addWidget(mStartTimeSpin,1,1); 425 topLayout->addWidget(mStartTimeSpin,1,1);
419 426
420 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), 427 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
421 topFrame),2,0); 428 topFrame),2,0);
422 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); 429 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
423 mDefaultDurationSpin->setSuffix(":00"); 430 mDefaultDurationSpin->setSuffix(":00");
424 topLayout->addWidget(mDefaultDurationSpin,2,1); 431 topLayout->addWidget(mDefaultDurationSpin,2,1);
425 432
426 QStringList alarmList; 433 QStringList alarmList;
427 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") 434 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
428 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; 435 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ;
429 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), 436 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame),
430 3,0); 437 3,0);
431 mAlarmTimeCombo = new QComboBox(topFrame); 438 mAlarmTimeCombo = new QComboBox(topFrame);
432 mAlarmTimeCombo->insertStringList(alarmList); 439 mAlarmTimeCombo->insertStringList(alarmList);
433 topLayout->addWidget(mAlarmTimeCombo,3,1); 440 topLayout->addWidget(mAlarmTimeCombo,3,1);
434 441 int iii = 4;
442 if ( QApplication::desktop()->height() <= 240 ) {
443 topFrame = addPage(i18n("Time") +" 2",0,0);
444 topLayout = new QGridLayout(topFrame,1,2);
445 topLayout->setSpacing(2);
446 topLayout->setMargin(3);
447 iii = 0;
448 }
435 449
436 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 450 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
437 i18n("Working Hours"), 451 i18n("Working Hours"),
438 topFrame); 452 topFrame);
439 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); 453 topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1);
440 workingHoursGroup->layout()->setSpacing( 0 ); 454 workingHoursGroup->layout()->setSpacing( 0 );
441 workingHoursGroup->layout()->setMargin( 4 ); 455 workingHoursGroup->layout()->setMargin( 4 );
442 QHBox *workStartBox = new QHBox(workingHoursGroup); 456 QHBox *workStartBox = new QHBox(workingHoursGroup);
443 // workStartBox->setMargin( 0 ); 457 // workStartBox->setMargin( 0 );
444 addWidTime(i18n("Daily starting hour:"), 458 addWidTime(i18n("Daily starting hour:"),
445 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 459 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
446 460
447 QHBox *workEndBox = new QHBox(workingHoursGroup); 461 QHBox *workEndBox = new QHBox(workingHoursGroup);
448 //workEndBox->setMargin( 0 ); 462 //workEndBox->setMargin( 0 );
449 addWidTime(i18n("Daily ending hour:"), 463 addWidTime(i18n("Daily ending hour:"),
450 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 464 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
451 QVBox *excludeBox = new QVBox(workingHoursGroup); 465 QVBox *excludeBox = new QVBox(workingHoursGroup);
452 //excludeBox->setMargin( 0 ); 466 //excludeBox->setMargin( 0 );
453 addWidBool(i18n("Exclude holidays"), 467 addWidBool(i18n("Exclude holidays"),
454 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 468 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
455 469
456 addWidBool(i18n("Exclude Saturdays"), 470 addWidBool(i18n("Exclude Saturdays"),
457 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); 471 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
458 472
459// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), 473// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
460 // &(KOPrefs::instance()->mMarcusBainsShowSeconds), 474 // &(KOPrefs::instance()->mMarcusBainsShowSeconds),
461 // topFrame); 475 // topFrame);
462// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); 476// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
463 477
464 // topLayout->setRowStretch(6,1); 478 // topLayout->setRowStretch(6,1);
465} 479}
466 480
467 481
468void KOPrefsDialog::setupViewsTab() 482void KOPrefsDialog::setupViewsTab()
469{ 483{
470 484
471 QFrame *topFrame = addPage(i18n("Views"),0,0); 485 QFrame *topFrame = addPage(i18n("Views"),0,0);
472 // DesktopIcon("viewmag",KIcon::SizeMedium)); 486 // DesktopIcon("viewmag",KIcon::SizeMedium));
473 487
474 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 488 QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
475 topLayout->setSpacing(mSpacingHint); 489 topLayout->setSpacing(mSpacingHint);
476 topLayout->setMargin(mMarginHint); 490 topLayout->setMargin(mMarginHint);
477 491
478// QBoxLayout *dayBeginsLayout = new QHBoxLayout; 492// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
479// topLayout->addLayout(dayBeginsLayout,0,0); 493// topLayout->addLayout(dayBeginsLayout,0,0);
480 494
481// KPrefsDialogWidTime *dayBegins = 495// KPrefsDialogWidTime *dayBegins =
482// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 496// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
483// topFrame); 497// topFrame);
484// dayBeginsLayout->addWidget(dayBegins->label()); 498// dayBeginsLayout->addWidget(dayBegins->label());
485// dayBeginsLayout->addStretch(1); 499// dayBeginsLayout->addStretch(1);
486// dayBeginsLayout->addWidget(dayBegins->spinBox()); 500// dayBeginsLayout->addWidget(dayBegins->spinBox());
487 501
@@ -657,96 +671,108 @@ void KOPrefsDialog::setupViewsTab()
657 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 671 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
658 ii++; 672 ii++;
659 673
660 674
661 habo = new QHBox( topFrame ); 675 habo = new QHBox( topFrame );
662 if ( QApplication::desktop()->width() <= 480 ) { 676 if ( QApplication::desktop()->width() <= 480 ) {
663 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 677 lab = new QLabel (i18n("Show in every cell ") , topFrame );
664 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 678 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
665 ii++; 679 ii++;
666 680
667 } else { 681 } else {
668 new QLabel ( i18n("Show in every cell "), habo ); 682 new QLabel ( i18n("Show in every cell "), habo );
669 } 683 }
670 weeklyRecur = 684 weeklyRecur =
671 addWidBool(i18n("short month"), 685 addWidBool(i18n("short month"),
672 &(KOPrefs::instance()->mMonthShowShort),habo); 686 &(KOPrefs::instance()->mMonthShowShort),habo);
673 weeklyRecur = 687 weeklyRecur =
674 addWidBool(i18n("icons"), 688 addWidBool(i18n("icons"),
675 &(KOPrefs::instance()->mMonthShowIcons),habo); 689 &(KOPrefs::instance()->mMonthShowIcons),habo);
676 weeklyRecur = 690 weeklyRecur =
677 addWidBool(i18n("times"), 691 addWidBool(i18n("times"),
678 &(KOPrefs::instance()->mMonthShowTimes),habo); 692 &(KOPrefs::instance()->mMonthShowTimes),habo);
679 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 693 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
680 ii++; 694 ii++;
681#ifdef DESKTOP_VERSION 695#ifdef DESKTOP_VERSION
682 KPrefsDialogWidBool *enableMonthScroll = 696 KPrefsDialogWidBool *enableMonthScroll =
683 addWidBool(i18n("Enable scrollbars in month view cells"), 697 addWidBool(i18n("Enable scrollbars in month view cells"),
684 &(KOPrefs::instance()->mEnableMonthScroll),topFrame); 698 &(KOPrefs::instance()->mEnableMonthScroll),topFrame);
685 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); 699 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
686#endif 700#endif
687 dummy = 701 dummy =
688 addWidBool(i18n("Week view mode uses bigger font"), 702 addWidBool(i18n("Week view mode uses bigger font"),
689 &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); 703 &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame);
690 topLayout->addWidget(dummy->checkBox(),ii++,0); 704 topLayout->addWidget(dummy->checkBox(),ii++,0);
691 dummy = 705 dummy =
692 addWidBool(i18n("Show Sat/Sun together"), 706 addWidBool(i18n("Show Sat/Sun together"),
693 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); 707 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame);
694 topLayout->addWidget(dummy->checkBox(),ii++,0); 708 topLayout->addWidget(dummy->checkBox(),ii++,0);
695 709
696 KPrefsDialogWidBool *coloredCategoriesInMonthView = 710 KPrefsDialogWidBool *coloredCategoriesInMonthView =
697 addWidBool(i18n("Month view uses category colors"), 711 addWidBool(i18n("Month view uses category colors"),
698 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); 712 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame);
699 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 713 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
700 714
701 dummy = 715 dummy =
702 addWidBool(i18n("Category colors are applied to text"), 716 addWidBool(i18n("Category colors are applied to text"),
703 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); 717 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame);
704 topLayout->addWidget(dummy->checkBox(),ii++,0); 718 topLayout->addWidget(dummy->checkBox(),ii++,0);
719
720
721
722 if ( QApplication::desktop()->height() <= 240 ) {
723 topFrame = addPage(i18n("Month View") +" 2",0,0);
724 topLayout = new QGridLayout(topFrame,4,1);
725 topLayout->setSpacing(2);
726 topLayout->setMargin(1);
727 ii = 0;
728 }
729
730
705 coloredCategoriesInMonthView = 731 coloredCategoriesInMonthView =
706 addWidBool(i18n("Month view uses day colors"), 732 addWidBool(i18n("Month view uses day colors"),
707 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); 733 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame);
708 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 734 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
709 735
710 KPrefsDialogWidColor *holidayColor = 736 KPrefsDialogWidColor *holidayColor =
711 addWidColor(i18n("Day color odd months"), 737 addWidColor(i18n("Day color odd months"),
712 &(KOPrefs::instance()->mMonthViewOddColor),topFrame); 738 &(KOPrefs::instance()->mMonthViewOddColor),topFrame);
713 topLayout->addWidget(holidayColor->label(),ii,0); 739 topLayout->addWidget(holidayColor->label(),ii,0);
714 topLayout->addWidget(holidayColor->button(),ii++,1); 740 topLayout->addWidget(holidayColor->button(),ii++,1);
715 741
716 holidayColor = 742 holidayColor =
717 addWidColor(i18n("Day color even months"), 743 addWidColor(i18n("Day color even months"),
718 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); 744 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
719 topLayout->addWidget(holidayColor->label(),ii,0); 745 topLayout->addWidget(holidayColor->label(),ii,0);
720 topLayout->addWidget(holidayColor->button(),ii++,1); 746 topLayout->addWidget(holidayColor->button(),ii++,1);
721 747
722 748
723 holidayColor = 749 holidayColor =
724 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 750 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
725 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 751 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
726 topLayout->addWidget(holidayColor->label(),ii,0); 752 topLayout->addWidget(holidayColor->label(),ii,0);
727 topLayout->addWidget(holidayColor->button(),ii++,1); 753 topLayout->addWidget(holidayColor->button(),ii++,1);
728 // *********************** What'sNext View 754 // *********************** What'sNext View
729 topFrame = addPage(i18n("What's Next View"),0,0); 755 topFrame = addPage(i18n("What's Next View"),0,0);
730 // DesktopIcon("viewmag",KIcon::SizeMedium)); 756 // DesktopIcon("viewmag",KIcon::SizeMedium));
731 757
732 topLayout = new QGridLayout(topFrame,4,1); 758 topLayout = new QGridLayout(topFrame,4,1);
733 topLayout->setSpacing(mSpacingHint); 759 topLayout->setSpacing(mSpacingHint);
734 topLayout->setMargin(mMarginHint); 760 topLayout->setMargin(mMarginHint);
735 ii = 0; 761 ii = 0;
736 762
737 763
738 QHBox* hdummy = new QHBox(topFrame); 764 QHBox* hdummy = new QHBox(topFrame);
739 new QLabel(i18n("Days in What's Next:"),hdummy); 765 new QLabel(i18n("Days in What's Next:"),hdummy);
740 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); 766 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy);
741 767
742 topLayout->addWidget(hdummy,ii++,0); 768 topLayout->addWidget(hdummy,ii++,0);
743 769
744 QHBox *prioBox = new QHBox(topFrame); 770 QHBox *prioBox = new QHBox(topFrame);
745 // intervalBox->setSpacing(mSpacingHint); 771 // intervalBox->setSpacing(mSpacingHint);
746 topLayout->addWidget(prioBox,ii++,0); 772 topLayout->addWidget(prioBox,ii++,0);
747 773
748 QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); 774 QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox);
749 mPrioSpin = new QSpinBox(0,5,1,prioBox); 775 mPrioSpin = new QSpinBox(0,5,1,prioBox);
750 if ( QApplication::desktop()->width() < 300 ) 776 if ( QApplication::desktop()->width() < 300 )
751 mPrioSpin->setFixedWidth( 40 ); 777 mPrioSpin->setFixedWidth( 40 );
752 778
@@ -856,99 +882,103 @@ dummy =
856 topLayout->setMargin(mMarginHint); 882 topLayout->setMargin(mMarginHint);
857 ii = 0; 883 ii = 0;
858 884
859 dummy = 885 dummy =
860 addWidBool(i18n("Show Sync Events"), 886 addWidBool(i18n("Show Sync Events"),
861 &(KOPrefs::instance()->mShowSyncEvents),topFrame); 887 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
862 topLayout->addWidget(dummy->checkBox(), ii++,0); 888 topLayout->addWidget(dummy->checkBox(), ii++,0);
863 889
864 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); 890 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame);
865 topLayout->addWidget(lab ,ii++,0); 891 topLayout->addWidget(lab ,ii++,0);
866 892
867 dummy = addWidBool(i18n("Details"), 893 dummy = addWidBool(i18n("Details"),
868 &(KOPrefs::instance()->mEVshowDetails),topFrame); 894 &(KOPrefs::instance()->mEVshowDetails),topFrame);
869 topLayout->addWidget(dummy->checkBox(),ii++,0); 895 topLayout->addWidget(dummy->checkBox(),ii++,0);
870 dummy = addWidBool(i18n("Created time"), 896 dummy = addWidBool(i18n("Created time"),
871 &(KOPrefs::instance()->mEVshowCreated),topFrame); 897 &(KOPrefs::instance()->mEVshowCreated),topFrame);
872 topLayout->addWidget(dummy->checkBox(),ii++,0); 898 topLayout->addWidget(dummy->checkBox(),ii++,0);
873 dummy = addWidBool(i18n("Last modified time"), 899 dummy = addWidBool(i18n("Last modified time"),
874 &(KOPrefs::instance()->mEVshowChanged),topFrame); 900 &(KOPrefs::instance()->mEVshowChanged),topFrame);
875 topLayout->addWidget(dummy->checkBox(),ii++,0); 901 topLayout->addWidget(dummy->checkBox(),ii++,0);
876 902
877 903
878 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); 904 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame);
879 topLayout->addWidget(lab ,ii++,0); 905 topLayout->addWidget(lab ,ii++,0);
880 906
881 dummy = addWidBool(i18n("Details"), 907 dummy = addWidBool(i18n("Details"),
882 &(KOPrefs::instance()->mWTshowDetails),topFrame); 908 &(KOPrefs::instance()->mWTshowDetails),topFrame);
883 topLayout->addWidget(dummy->checkBox(),ii++,0); 909 topLayout->addWidget(dummy->checkBox(),ii++,0);
884 dummy = addWidBool(i18n("Created time"), 910 dummy = addWidBool(i18n("Created time"),
885 &(KOPrefs::instance()->mWTshowCreated),topFrame); 911 &(KOPrefs::instance()->mWTshowCreated),topFrame);
886 topLayout->addWidget(dummy->checkBox(),ii++,0); 912 topLayout->addWidget(dummy->checkBox(),ii++,0);
887 dummy = addWidBool(i18n("Last modified time"), 913 dummy = addWidBool(i18n("Last modified time"),
888 &(KOPrefs::instance()->mWTshowChanged),topFrame); 914 &(KOPrefs::instance()->mWTshowChanged),topFrame);
889 topLayout->addWidget(dummy->checkBox(),ii++,0); 915 topLayout->addWidget(dummy->checkBox(),ii++,0);
890 916
891 917
892 topFrame = addPage(i18n("Alarm"),0,0); 918 topFrame = addPage(i18n("Alarm"),0,0);
893 // DesktopIcon("viewmag",KIcon::SizeMedium)); 919 // DesktopIcon("viewmag",KIcon::SizeMedium));
894 920
895 topLayout = new QGridLayout(topFrame,2,1); 921 topLayout = new QGridLayout(topFrame,2,1);
896 topLayout->setSpacing(mSpacingHint); 922 topLayout->setSpacing(mSpacingHint);
897 topLayout->setMargin(mMarginHint); 923 topLayout->setMargin(mMarginHint);
898 int iii = 0; 924 int iii = 0;
899 925
900 dummy = 926 dummy =
901 addWidBool(i18n("Use internal alarm notification"), 927 addWidBool(i18n("Use internal alarm notification"),
902 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); 928 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
903 topLayout->addWidget(dummy->checkBox(),iii++,0); 929 topLayout->addWidget(dummy->checkBox(),iii++,0);
904 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);
905 930
906 topLayout->addWidget(lab ,iii++,0); 931 if ( QApplication::desktop()->height() > 240 ) {
932
933 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);
934
935 topLayout->addWidget(lab ,iii++,0);
936 }
907#ifndef DESKTOP_VERSION 937#ifndef DESKTOP_VERSION
908 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 938 lab->setAlignment( AlignLeft|WordBreak|AlignTop);
909#else 939#else
910 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 940 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
911 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 941 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
912#endif 942#endif
913 943
914 QHBox* dummyBox = new QHBox(topFrame); 944 QHBox* dummyBox = new QHBox(topFrame);
915 new QLabel(i18n("Play beeps count:"),dummyBox); 945 new QLabel(i18n("Play beeps count:"),dummyBox);
916 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 946 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
917 topLayout->addWidget(dummyBox,iii++,0); 947 topLayout->addWidget(dummyBox,iii++,0);
918 948
919 dummyBox = new QHBox(topFrame); 949 dummyBox = new QHBox(topFrame);
920 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 950 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
921 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 951 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
922 topLayout->addWidget(dummyBox,iii++,0); 952 topLayout->addWidget(dummyBox,iii++,0);
923 953
924 dummyBox = new QHBox(topFrame); 954 dummyBox = new QHBox(topFrame);
925 new QLabel(i18n("Default suspend time in min:"),dummyBox); 955 new QLabel(i18n("Default suspend time in min:"),dummyBox);
926 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 956 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
927 topLayout->addWidget(dummyBox,iii++,0); 957 topLayout->addWidget(dummyBox,iii++,0);
928 958
929 dummyBox = new QHBox(topFrame); 959 dummyBox = new QHBox(topFrame);
930 new QLabel(i18n("Auto suspend count:"),dummyBox); 960 new QLabel(i18n("Auto suspend count:"),dummyBox);
931 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 961 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
932 topLayout->addWidget(dummyBox,iii++,0); 962 topLayout->addWidget(dummyBox,iii++,0);
933 963
934 964
935 965
936 QHBox* hbo = new QHBox ( topFrame ); 966 QHBox* hbo = new QHBox ( topFrame );
937 mDefaultAlarmFile = new QLineEdit(hbo); 967 mDefaultAlarmFile = new QLineEdit(hbo);
938 QPushButton * loadTemplate = new QPushButton(hbo); 968 QPushButton * loadTemplate = new QPushButton(hbo);
939 QPixmap icon; 969 QPixmap icon;
940 if ( QApplication::desktop()->width() < 321 ) 970 if ( QApplication::desktop()->width() < 321 )
941 icon = SmallIcon("fileimport16"); 971 icon = SmallIcon("fileimport16");
942 else 972 else
943 icon = SmallIcon("fileimport"); 973 icon = SmallIcon("fileimport");
944 loadTemplate->setIconSet (icon ) ; 974 loadTemplate->setIconSet (icon ) ;
945 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); 975 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
946 int size = loadTemplate->sizeHint().height(); 976 int size = loadTemplate->sizeHint().height();
947 loadTemplate->setFixedSize( size, size ); 977 loadTemplate->setFixedSize( size, size );
948 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); 978 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame);
949 // topLayout->addWidget(lab ,iii++,0); 979 // topLayout->addWidget(lab ,iii++,0);
950 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); 980 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame);
951 topLayout->addWidget(lab ,iii++,0); 981 topLayout->addWidget(lab ,iii++,0);
952 topLayout->addWidget(hbo,iii++,0); 982 topLayout->addWidget(hbo,iii++,0);
953 // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); 983 // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame);
954 984
@@ -1119,96 +1149,108 @@ void KOPrefsDialog::setupColorsTab()
1119 // topLayout->setMargin(mMarginHint); 1149 // topLayout->setMargin(mMarginHint);
1120 1150
1121 topLayout->setSpacing(2); 1151 topLayout->setSpacing(2);
1122 topLayout->setMargin(3); 1152 topLayout->setMargin(3);
1123 1153
1124 int ii = 1; 1154 int ii = 1;
1125 QGroupBox *categoryGroup ; 1155 QGroupBox *categoryGroup ;
1126 1156
1127 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1157 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
1128 topFrame); 1158 topFrame);
1129 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1159 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1130 1160
1131 mCategoryCombo = new QComboBox(categoryGroup); 1161 mCategoryCombo = new QComboBox(categoryGroup);
1132 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1162 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1133 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); 1163 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
1134 1164
1135 mCategoryButton = new KColorButton(categoryGroup); 1165 mCategoryButton = new KColorButton(categoryGroup);
1136 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); 1166 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
1137 updateCategoryColor(); 1167 updateCategoryColor();
1138 1168
1139 1169
1140 // Holiday Color 1170 // Holiday Color
1141 1171
1142 KPrefsDialogWidColor *holidayColor = 1172 KPrefsDialogWidColor *holidayColor =
1143 addWidColor(i18n("Holiday color:"), 1173 addWidColor(i18n("Holiday color:"),
1144 &(KOPrefs::instance()->mHolidayColor),topFrame); 1174 &(KOPrefs::instance()->mHolidayColor),topFrame);
1145 topLayout->addWidget(holidayColor->label(),ii,0); 1175 topLayout->addWidget(holidayColor->label(),ii,0);
1146 topLayout->addWidget(holidayColor->button(),ii++,1); 1176 topLayout->addWidget(holidayColor->button(),ii++,1);
1147 1177
1148 // Highlight Color 1178 // Highlight Color
1149 KPrefsDialogWidColor *highlightColor = 1179 KPrefsDialogWidColor *highlightColor =
1150 addWidColor(i18n("Highlight color:"), 1180 addWidColor(i18n("Highlight color:"),
1151 &(KOPrefs::instance()->mHighlightColor),topFrame); 1181 &(KOPrefs::instance()->mHighlightColor),topFrame);
1152 topLayout->addWidget(highlightColor->label(),ii,0); 1182 topLayout->addWidget(highlightColor->label(),ii,0);
1153 topLayout->addWidget(highlightColor->button(),ii++,1); 1183 topLayout->addWidget(highlightColor->button(),ii++,1);
1154 1184
1155 // Event color 1185 // Event color
1156 KPrefsDialogWidColor *eventColor = 1186 KPrefsDialogWidColor *eventColor =
1157 addWidColor(i18n("Default event color:"), 1187 addWidColor(i18n("Default event color:"),
1158 &(KOPrefs::instance()->mEventColor),topFrame); 1188 &(KOPrefs::instance()->mEventColor),topFrame);
1159 topLayout->addWidget(eventColor->label(),ii,0); 1189 topLayout->addWidget(eventColor->label(),ii,0);
1160 topLayout->addWidget(eventColor->button(),ii++,1); 1190 topLayout->addWidget(eventColor->button(),ii++,1);
1161 eventColor = 1191 eventColor =
1162 addWidColor(i18n("Default todo done color:"), 1192 addWidColor(i18n("Default todo done color:"),
1163 &(KOPrefs::instance()->mTodoDoneColor),topFrame); 1193 &(KOPrefs::instance()->mTodoDoneColor),topFrame);
1164 topLayout->addWidget(eventColor->label(),ii,0); 1194 topLayout->addWidget(eventColor->label(),ii,0);
1165 topLayout->addWidget(eventColor->button(),ii++,1); 1195 topLayout->addWidget(eventColor->button(),ii++,1);
1166 1196
1197 if ( QApplication::desktop()->height() <= 240 ) {
1198 topFrame = addPage(i18n("Colors") +" 2",0,0);
1199 // DesktopIcon("colorize",KIcon::SizeMedium));
1200
1201 topLayout = new QGridLayout(topFrame,5,2);
1202 // topLayout->setSpacing(mSpacingHint);
1203 // topLayout->setMargin(mMarginHint);
1204
1205 topLayout->setSpacing(2);
1206 topLayout->setMargin(3);
1207 }
1208
1167 1209
1168 // agenda view background color 1210 // agenda view background color
1169 KPrefsDialogWidColor *agendaBgColor = 1211 KPrefsDialogWidColor *agendaBgColor =
1170 addWidColor(i18n("Agenda view background color:"), 1212 addWidColor(i18n("Agenda view background color:"),
1171 &(KOPrefs::instance()->mAgendaBgColor),topFrame); 1213 &(KOPrefs::instance()->mAgendaBgColor),topFrame);
1172 topLayout->addWidget(agendaBgColor->label(),ii,0); 1214 topLayout->addWidget(agendaBgColor->label(),ii,0);
1173 topLayout->addWidget(agendaBgColor->button(),ii++,1); 1215 topLayout->addWidget(agendaBgColor->button(),ii++,1);
1174 1216
1175 // working hours color 1217 // working hours color
1176 KPrefsDialogWidColor *workingHoursColor = 1218 KPrefsDialogWidColor *workingHoursColor =
1177 addWidColor(i18n("Working hours color:"), 1219 addWidColor(i18n("Working hours color:"),
1178 &(KOPrefs::instance()->mWorkingHoursColor),topFrame); 1220 &(KOPrefs::instance()->mWorkingHoursColor),topFrame);
1179 topLayout->addWidget(workingHoursColor->label(),ii,0); 1221 topLayout->addWidget(workingHoursColor->label(),ii,0);
1180 topLayout->addWidget(workingHoursColor->button(),ii++,1); 1222 topLayout->addWidget(workingHoursColor->button(),ii++,1);
1181 1223
1182 KPrefsDialogWidBool *sb = 1224 KPrefsDialogWidBool *sb =
1183 addWidBool(i18n("Use colors for application:"), 1225 addWidBool(i18n("Use colors for application:"),
1184 &(KOPrefs::instance()->mUseAppColors),topFrame); 1226 &(KOPrefs::instance()->mUseAppColors),topFrame);
1185 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); 1227 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 );
1186 1228
1187 ii++; 1229 ii++;
1188 KPrefsDialogWidColor * workingHoursColor1 = 1230 KPrefsDialogWidColor * workingHoursColor1 =
1189 addWidColor(i18n("Buttons, menus, etc.:"), 1231 addWidColor(i18n("Buttons, menus, etc.:"),
1190 &(KOPrefs::instance()->mAppColor1),topFrame); 1232 &(KOPrefs::instance()->mAppColor1),topFrame);
1191 topLayout->addWidget(workingHoursColor1->label(),ii,0); 1233 topLayout->addWidget(workingHoursColor1->label(),ii,0);
1192 topLayout->addWidget(workingHoursColor1->button(),ii++,1); 1234 topLayout->addWidget(workingHoursColor1->button(),ii++,1);
1193 1235
1194 KPrefsDialogWidColor * workingHoursColor2 = 1236 KPrefsDialogWidColor * workingHoursColor2 =
1195 addWidColor(i18n("Frames, labels, etc.:"), 1237 addWidColor(i18n("Frames, labels, etc.:"),
1196 &(KOPrefs::instance()->mAppColor2),topFrame); 1238 &(KOPrefs::instance()->mAppColor2),topFrame);
1197 topLayout->addWidget(workingHoursColor2->label(),ii,0); 1239 topLayout->addWidget(workingHoursColor2->label(),ii,0);
1198 topLayout->addWidget(workingHoursColor2->button(),ii++,1); 1240 topLayout->addWidget(workingHoursColor2->button(),ii++,1);
1199 1241
1200 1242
1201 1243
1202} 1244}
1203 1245
1204void KOPrefsDialog::setCategoryColor() 1246void KOPrefsDialog::setCategoryColor()
1205{ 1247{
1206 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); 1248 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
1207} 1249}
1208 1250
1209void KOPrefsDialog::updateCategoryColor() 1251void KOPrefsDialog::updateCategoryColor()
1210{ 1252{
1211 QString cat = mCategoryCombo->currentText(); 1253 QString cat = mCategoryCombo->currentText();
1212 QColor *color = mCategoryDict.find(cat); 1254 QColor *color = mCategoryDict.find(cat);
1213 if (!color) { 1255 if (!color) {
1214 color = KOPrefs::instance()->categoryColor(cat); 1256 color = KOPrefs::instance()->categoryColor(cat);
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 2c04852..0cb0bce 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -580,97 +580,97 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
580 else if ( msg == "nextView()" ) { 580 else if ( msg == "nextView()" ) {
581 mView->viewManager()->showNextView(); 581 mView->viewManager()->showNextView();
582 } 582 }
583 else if ( msg == "-showNextXView" ) { 583 else if ( msg == "-showNextXView" ) {
584 mView->viewManager()->showNextXView(); 584 mView->viewManager()->showNextXView();
585 } 585 }
586 586
587 587
588 } 588 }
589 589
590 showMaximized(); 590 showMaximized();
591 raise(); 591 raise();
592} 592}
593 593
594QPixmap MainWindow::loadPixmap( QString name ) 594QPixmap MainWindow::loadPixmap( QString name )
595{ 595{
596 return SmallIcon( name ); 596 return SmallIcon( name );
597 597
598} 598}
599void MainWindow::setUsesBigPixmaps ( bool b ) 599void MainWindow::setUsesBigPixmaps ( bool b )
600{ 600{
601 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 601 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
602 if ( b ) 602 if ( b )
603 qDebug("KO: BigPixmaps are not supported "); 603 qDebug("KO: BigPixmaps are not supported ");
604} 604}
605void MainWindow::initActions() 605void MainWindow::initActions()
606{ 606{
607 //KOPrefs::instance()->mShowFullMenu 607 //KOPrefs::instance()->mShowFullMenu
608 iconToolBar->clear(); 608 iconToolBar->clear();
609 KOPrefs *p = KOPrefs::instance(); 609 KOPrefs *p = KOPrefs::instance();
610 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 610 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
611 611
612 QPopupMenu *viewMenu = new QPopupMenu( this ); 612 QPopupMenu *viewMenu = new QPopupMenu( this );
613 QPopupMenu *actionMenu = new QPopupMenu( this ); 613 QPopupMenu *actionMenu = new QPopupMenu( this );
614 QPopupMenu *importMenu = new QPopupMenu( this ); 614 QPopupMenu *importMenu = new QPopupMenu( this );
615 QPopupMenu *importMenu_X = new QPopupMenu( this ); 615 QPopupMenu *importMenu_X = new QPopupMenu( this );
616 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 616 QPopupMenu *exportMenu_X = new QPopupMenu( this );
617 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 617 QPopupMenu *beamMenu_X = new QPopupMenu( this );
618 selectFilterMenu = new QPopupMenu( this ); 618 selectFilterMenu = new QPopupMenu( this );
619 selectFilterMenu->setCheckable( true ); 619 selectFilterMenu->setCheckable( true );
620 syncMenu = new QPopupMenu( this ); 620 syncMenu = new QPopupMenu( this );
621 configureAgendaMenu = new QPopupMenu( this ); 621 configureAgendaMenu = new QPopupMenu( this );
622 configureToolBarMenu = new QPopupMenu( this ); 622 configureToolBarMenu = new QPopupMenu( this );
623 QPopupMenu *helpMenu = new QPopupMenu( this ); 623 QPopupMenu *helpMenu = new QPopupMenu( this );
624 QIconSet icon; 624 QIconSet icon;
625 int pixWid = 22, pixHei = 22; 625 int pixWid = 22, pixHei = 22;
626 QString pathString = ""; 626 QString pathString = "";
627 if ( !p->mToolBarMiniIcons ) { 627 if ( !p->mToolBarMiniIcons ) {
628 if ( QApplication::desktop()->width() < 480 ) { 628 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
629 pathString += "icons16/"; 629 pathString += "icons16/";
630 pixWid = 18; pixHei = 16; 630 pixWid = 18; pixHei = 16;
631 } 631 }
632 } else { 632 } else {
633 pathString += "iconsmini/"; 633 pathString += "iconsmini/";
634 pixWid = 18; pixHei = 16; 634 pixWid = 18; pixHei = 16;
635 } 635 }
636 if ( KOPrefs::instance()->mShowFullMenu ) { 636 if ( KOPrefs::instance()->mShowFullMenu ) {
637 QMenuBar *menuBar1; 637 QMenuBar *menuBar1;
638 menuBar1 = menuBar(); 638 menuBar1 = menuBar();
639 menuBar1->insertItem( i18n("File"), importMenu ); 639 menuBar1->insertItem( i18n("File"), importMenu );
640 menuBar1->insertItem( i18n("View"), viewMenu ); 640 menuBar1->insertItem( i18n("View"), viewMenu );
641 menuBar1->insertItem( i18n("Actions"), actionMenu ); 641 menuBar1->insertItem( i18n("Actions"), actionMenu );
642#ifdef DESKTOP_VERSION 642#ifdef DESKTOP_VERSION
643 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 643 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
644 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 644 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
645#else 645#else
646 menuBar1->insertItem( i18n("Sync"), syncMenu ); 646 menuBar1->insertItem( i18n("Sync"), syncMenu );
647 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 647 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
648#endif 648#endif
649 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 649 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
650 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 650 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
651 menuBar1->insertItem( i18n("Help"), helpMenu ); 651 menuBar1->insertItem( i18n("Help"), helpMenu );
652 } else { 652 } else {
653 QPEMenuBar *menuBar1; 653 QPEMenuBar *menuBar1;
654 menuBar1 = new QPEMenuBar( iconToolBar ); 654 menuBar1 = new QPEMenuBar( iconToolBar );
655 QPopupMenu *menuBar = new QPopupMenu( this ); 655 QPopupMenu *menuBar = new QPopupMenu( this );
656 icon = loadPixmap( pathString + "z_menu" ); 656 icon = loadPixmap( pathString + "z_menu" );
657 menuBar1->insertItem( icon.pixmap(), menuBar); 657 menuBar1->insertItem( icon.pixmap(), menuBar);
658 //menuBar1->insertItem( i18n("ME"), menuBar); 658 //menuBar1->insertItem( i18n("ME"), menuBar);
659 menuBar->insertItem( i18n("File"), importMenu ); 659 menuBar->insertItem( i18n("File"), importMenu );
660 menuBar->insertItem( i18n("View"), viewMenu ); 660 menuBar->insertItem( i18n("View"), viewMenu );
661 menuBar->insertItem( i18n("Actions"), actionMenu ); 661 menuBar->insertItem( i18n("Actions"), actionMenu );
662 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 662 menuBar->insertItem( i18n("Synchronize"), syncMenu );
663 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 663 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
664 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 664 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
665 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 665 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
666 menuBar->insertItem( i18n("Help"), helpMenu ); 666 menuBar->insertItem( i18n("Help"), helpMenu );
667 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 667 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
668 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 668 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
669 } 669 }
670 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 670 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
671 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 671 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
672 672
673 673
674 mWeekBgColor = iconToolBar->backgroundColor(); 674 mWeekBgColor = iconToolBar->backgroundColor();
675 mWeekPixmap.resize( pixWid , pixHei ); 675 mWeekPixmap.resize( pixWid , pixHei );
676 mWeekPixmap.fill( mWeekBgColor ); 676 mWeekPixmap.fill( mWeekBgColor );
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index ef2fc1c..7b3b543 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -25,162 +25,179 @@
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27#include <qgroupbox.h> 27#include <qgroupbox.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlistview.h> 29#include <qlistview.h>
30#include <qwhatsthis.h> 30#include <qwhatsthis.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qpushbutton.h> 32#include <qpushbutton.h>
33 33
34#include <klocale.h> 34#include <klocale.h>
35#include <kmessagebox.h> 35#include <kmessagebox.h>
36 36
37#include <libkdepim/kdateedit.h> 37#include <libkdepim/kdateedit.h>
38 38
39#include "koglobals.h" 39#include "koglobals.h"
40#include "koprefs.h" 40#include "koprefs.h"
41#include "klineedit.h" 41#include "klineedit.h"
42 42
43#include "calendarview.h" 43#include "calendarview.h"
44#include "koviewmanager.h" 44#include "koviewmanager.h"
45#include "searchdialog.h" 45#include "searchdialog.h"
46 46
47SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) 47SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
48 : QVBox( 0 ) 48 : QVBox( 0 )
49 49
50{ 50{
51 mCalendar = calendar; 51 mCalendar = calendar;
52 QFrame *topFrame = new QFrame( this ) ;//plainPage(); 52 QFrame *topFrame = new QFrame( this ) ;//plainPage();
53 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); 53 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
54 54
55 // Search expression 55 // Search expression
56 QHBoxLayout *subLayout = new QHBoxLayout(); 56 QHBoxLayout *subLayout = new QHBoxLayout();
57 layout->addLayout(subLayout); 57 layout->addLayout(subLayout);
58 /* 58 /*
59 searchLabel = new QLabel(topFrame); 59 searchLabel = new QLabel(topFrame);
60 searchLabel->setText(i18n("Search for:")); 60 searchLabel->setText(i18n("Search for:"));
61 subLayout->addWidget(searchLabel); 61 subLayout->addWidget(searchLabel);
62 */ 62 */
63 QPushButton *OkButton = new QPushButton( i18n("Search for:"), topFrame ); 63 QPushButton *OkButton = new QPushButton( i18n("Search for:"), topFrame );
64 //OkButton->setDefault( true ); 64 //OkButton->setDefault( true );
65 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch())); 65 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch()));
66 subLayout->addWidget(OkButton); 66 subLayout->addWidget(OkButton);
67 searchEdit = new KLineEdit(topFrame); 67 searchEdit = new KLineEdit(topFrame);
68 subLayout->addWidget(searchEdit); 68 subLayout->addWidget(searchEdit);
69 69
70 mAddItems = new QCheckBox(i18n("Add items"),topFrame); 70 mAddItems = new QCheckBox(i18n("Add items"),topFrame);
71 subLayout->addWidget(mAddItems); 71 subLayout->addWidget(mAddItems);
72 72
73 QPushButton *togButton = new QPushButton( "", topFrame );
74 subLayout->addWidget(togButton);
75 connect(togButton,SIGNAL(clicked()),SLOT(toggleCheckboxes()));
76 togButton->setPixmap(SmallIcon("1updownarrow"));
77 togButton->setMinimumWidth( togButton->sizeHint().height() );
73 searchEdit->setText("*"); // Find all events by default 78 searchEdit->setText("*"); // Find all events by default
74 searchEdit->setFocus(); 79 searchEdit->setFocus();
75 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); 80 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
76 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); 81 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch()));
77 // Subjects to search 82 // Subjects to search
78 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), 83 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
79 // topFrame); 84 // topFrame);
80 85
81 QHBox *incidenceGroup = new QHBox( topFrame ); 86 incidenceGroup = new QHBox( topFrame );
82 layout->addWidget(incidenceGroup); 87 layout->addWidget(incidenceGroup);
83 88
84 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 89 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
85 //mSearchEvent->setChecked(true); 90 //mSearchEvent->setChecked(true);
86 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 91 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
87 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 92 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
88 93
89 QHBox *subjectGroup = new QHBox( topFrame ); 94 subjectGroup = new QHBox( topFrame );
90 layout->addWidget(subjectGroup); 95 layout->addWidget(subjectGroup);
91 96
92 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); 97 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
93 mSummaryCheck->setChecked(true); 98 mSummaryCheck->setChecked(true);
94 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); 99 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup);
95 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 100 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
96 101
97 QHBox *attendeeGroup = new QHBox( topFrame ); 102 attendeeGroup = new QHBox( topFrame );
98 layout->addWidget(attendeeGroup ); 103 layout->addWidget(attendeeGroup );
99 new QLabel( i18n("Attendee:"),attendeeGroup ); 104 new QLabel( i18n("Attendee:"),attendeeGroup );
100 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); 105 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
101 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); 106 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup );
102 // Date range 107 // Date range
103 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), 108 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"),
104 // topFrame); 109 // topFrame);
105 // layout->addWidget(rangeGroup); 110 // layout->addWidget(rangeGroup);
106 111
107 QWidget *rangeWidget = new QWidget(topFrame); 112 QWidget *rangeWidget = new QWidget(topFrame);
108 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint()); 113 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint());
109 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); 114 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget));
110 mStartDate = new KDateEdit(rangeWidget); 115 mStartDate = new KDateEdit(rangeWidget);
111 rangeLayout->addWidget(mStartDate); 116 rangeLayout->addWidget(mStartDate);
112 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); 117 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget));
113 mEndDate = new KDateEdit(rangeWidget); 118 mEndDate = new KDateEdit(rangeWidget);
114 mEndDate->setDate(QDate::currentDate().addDays(365)); 119 mEndDate->setDate(QDate::currentDate().addDays(365));
115 rangeLayout->addWidget(mEndDate); 120 rangeLayout->addWidget(mEndDate);
116 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); 121 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget );
117 rangeLayout->addWidget( (QWidget*)wt ); 122 rangeLayout->addWidget( (QWidget*)wt );
118 layout->addWidget(rangeWidget); 123 layout->addWidget(rangeWidget);
119 // Results list view 124 // Results list view
120 listView = new KOListView(mCalendar,topFrame); 125 listView = new KOListView(mCalendar,topFrame);
121 layout->addWidget(listView); 126 layout->addWidget(listView);
122 //layout->setStretchFactor( listView, 333 ); 127 //layout->setStretchFactor( listView, 333 );
123 //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); 128 //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) );
124 //listView->setMaximumHeight( 50 ); 129 //listView->setMaximumHeight( 50 );
125 listView->readSettings(KOGlobals::config(),"SearchListView Layout"); 130 listView->readSettings(KOGlobals::config(),"SearchListView Layout");
126 connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); 131 connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList()));
127 132
128 setCaption( i18n("KO/Pi Find: ")); 133 setCaption( i18n("KO/Pi Find: "));
129#ifdef DESKTOP_VERSION 134#ifdef DESKTOP_VERSION
130 OkButton = new QPushButton( i18n("Close"), this ); 135 OkButton = new QPushButton( i18n("Close"), this );
131 connect(OkButton,SIGNAL(clicked()),SLOT(hide())); 136 connect(OkButton,SIGNAL(clicked()),SLOT(hide()));
132#endif 137#endif
133} 138}
134 139
135SearchDialog::~SearchDialog() 140SearchDialog::~SearchDialog()
136{ 141{
137 142
138} 143}
144void SearchDialog::toggleCheckboxes()
145{
146 if ( incidenceGroup->isVisible() ) {
147 incidenceGroup->hide() ;
148 subjectGroup->hide() ;
149 attendeeGroup->hide() ;
150 } else {
151 incidenceGroup->show() ;
152 subjectGroup->show() ;
153 attendeeGroup->show() ;
154 }
155}
139void SearchDialog::raiseAndSelect() 156void SearchDialog::raiseAndSelect()
140{ 157{
141 158
142 static int currentState = 0; 159 static int currentState = 0;
143 160
144 if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() ) 161 if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() )
145 currentState = 0; 162 currentState = 0;
146 int newState = 0; 163 int newState = 0;
147 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { 164 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
148 newState = VIEW_J_VIEW; 165 newState = VIEW_J_VIEW;
149 } 166 }
150 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { 167 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
151 newState = VIEW_T_VIEW; 168 newState = VIEW_T_VIEW;
152 } 169 }
153 else { 170 else {
154 newState = VIEW_A_VIEW; 171 newState = VIEW_A_VIEW;
155 } 172 }
156 if ( newState != currentState ) { 173 if ( newState != currentState ) {
157 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { 174 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
158 if ( ! mSearchJournal->isChecked() ) { 175 if ( ! mSearchJournal->isChecked() ) {
159 mSearchJournal->setChecked( true ); 176 mSearchJournal->setChecked( true );
160 mSearchTodo->setChecked( false ); 177 mSearchTodo->setChecked( false );
161 mSearchEvent->setChecked( false ); 178 mSearchEvent->setChecked( false );
162 } 179 }
163 } 180 }
164 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { 181 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
165 if ( ! mSearchTodo->isChecked() ) { 182 if ( ! mSearchTodo->isChecked() ) {
166 mSearchTodo->setChecked( true ); 183 mSearchTodo->setChecked( true );
167 mSearchJournal->setChecked( false ); 184 mSearchJournal->setChecked( false );
168 mSearchEvent->setChecked( false ); 185 mSearchEvent->setChecked( false );
169 } 186 }
170 } 187 }
171 else { 188 else {
172 if ( ! mSearchEvent->isChecked() ) { 189 if ( ! mSearchEvent->isChecked() ) {
173 mSearchEvent->setChecked( true ); 190 mSearchEvent->setChecked( true );
174 mSearchJournal->setChecked( false ); 191 mSearchJournal->setChecked( false );
175 mSearchTodo->setChecked( false ); 192 mSearchTodo->setChecked( false );
176 } 193 }
177 } 194 }
178 } 195 }
179 currentState = newState; 196 currentState = newState;
180 raise(); 197 raise();
181} 198}
182void SearchDialog::setFocusToList() 199void SearchDialog::setFocusToList()
183{ 200{
184 listView->resetFocus(); 201 listView->resetFocus();
185} 202}
186void SearchDialog::accept() 203void SearchDialog::accept()
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index 11ad2f0..b345b98 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -15,82 +15,85 @@
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24#ifndef SEARCHDIALOG_H 24#ifndef SEARCHDIALOG_H
25#define SEARCHDIALOG_H 25#define SEARCHDIALOG_H
26 26
27#include <qregexp.h> 27#include <qregexp.h>
28 28
29#include <kdialogbase.h> 29#include <kdialogbase.h>
30#include <qvbox.h> 30#include <qvbox.h>
31 31
32#include <libkcal/calendar.h> 32#include <libkcal/calendar.h>
33 33
34#include "kolistview.h" 34#include "kolistview.h"
35 35
36class KDateEdit; 36class KDateEdit;
37class QCheckBox; 37class QCheckBox;
38class QLineEdit; 38class QLineEdit;
39class KLineEdit; 39class KLineEdit;
40class QLabel; 40class QLabel;
41class CalendarView; 41class CalendarView;
42 42
43using namespace KCal; 43using namespace KCal;
44class SearchDialog : public QVBox 44class SearchDialog : public QVBox
45{ 45{
46 Q_OBJECT 46 Q_OBJECT
47 public: 47 public:
48 SearchDialog(Calendar *calendar,CalendarView *parent=0); 48 SearchDialog(Calendar *calendar,CalendarView *parent=0);
49 virtual ~SearchDialog(); 49 virtual ~SearchDialog();
50 KOListView *listview(){ return listView;} 50 KOListView *listview(){ return listView;}
51 void updateView(); 51 void updateView();
52 void raiseAndSelect(); 52 void raiseAndSelect();
53 53
54 public slots: 54 public slots:
55 void changeEventDisplay(Event *, int) { updateView(); } 55 void changeEventDisplay(Event *, int) { updateView(); }
56 void updateConfig(); 56 void updateConfig();
57 void updateList(); 57 void updateList();
58 protected slots: 58 protected slots:
59 void setFocusToList(); 59 void setFocusToList();
60 void accept(); 60 void accept();
61 void doSearch(); 61 void doSearch();
62 void searchTextChanged( const QString &_text ); 62 void searchTextChanged( const QString &_text );
63 void toggleCheckboxes();
63 64
64 signals: 65 signals:
65 void showEventSignal(Event *); 66 void showEventSignal(Event *);
66 void editEventSignal(Event *); 67 void editEventSignal(Event *);
67 void deleteEventSignal(Event *); 68 void deleteEventSignal(Event *);
68 69
69 private: 70 private:
71
72 QHBox *incidenceGroup ,*subjectGroup ,*attendeeGroup;
70 void search(const QRegExp &); 73 void search(const QRegExp &);
71 74
72 Calendar *mCalendar; 75 Calendar *mCalendar;
73 76
74 QPtrList<Event> mMatchedEvents; 77 QPtrList<Event> mMatchedEvents;
75 QPtrList<Todo> mMatchedTodos; 78 QPtrList<Todo> mMatchedTodos;
76 QPtrList<Journal> mMatchedJournals; 79 QPtrList<Journal> mMatchedJournals;
77 80
78 QLabel *searchLabel; 81 QLabel *searchLabel;
79 KLineEdit *searchEdit; 82 KLineEdit *searchEdit;
80 KOListView *listView; 83 KOListView *listView;
81 84
82 KDateEdit *mStartDate; 85 KDateEdit *mStartDate;
83 KDateEdit *mEndDate; 86 KDateEdit *mEndDate;
84 QCheckBox *mSummaryCheck; 87 QCheckBox *mSummaryCheck;
85 QCheckBox *mDescriptionCheck; 88 QCheckBox *mDescriptionCheck;
86 QCheckBox *mCategoryCheck; 89 QCheckBox *mCategoryCheck;
87 QCheckBox *mSearchEvent; 90 QCheckBox *mSearchEvent;
88 QCheckBox *mSearchTodo; 91 QCheckBox *mSearchTodo;
89 QCheckBox *mSearchJournal; 92 QCheckBox *mSearchJournal;
90 QCheckBox *mSearchAName; 93 QCheckBox *mSearchAName;
91 QCheckBox *mSearchAEmail; 94 QCheckBox *mSearchAEmail;
92 QCheckBox *mAddItems; 95 QCheckBox *mAddItems;
93 void keyPressEvent ( QKeyEvent *e) ; 96 void keyPressEvent ( QKeyEvent *e) ;
94}; 97};
95 98
96#endif 99#endif
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 93538ec..d3797ae 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -131,97 +131,98 @@ void KDEPIMConfigWidget::setupBackupTab()
131 topLayout->addWidget((bupFrame)); 131 topLayout->addWidget((bupFrame));
132 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); 132 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) );
133 QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); 133 QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame);
134 sb = addWidBool(i18n("Use standard backup dir"), 134 sb = addWidBool(i18n("Use standard backup dir"),
135 &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); 135 &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame);
136 bupLayout->addWidget((QWidget*)sb->checkBox()); 136 bupLayout->addWidget((QWidget*)sb->checkBox());
137 mBackupUrl = new KURLRequester( bupFrame ); 137 mBackupUrl = new KURLRequester( bupFrame );
138 mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); 138 mBackupUrl->setURL( KGlobalSettings::backupDataDir() );
139 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); 139 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) );
140 bupLayout->addWidget( mBackupUrl ); 140 bupLayout->addWidget( mBackupUrl );
141 141
142 mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); 142 mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir );
143 bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); 143 bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled );
144 QHBox *dummy = new QHBox(bupFrame); 144 QHBox *dummy = new QHBox(bupFrame);
145 new QLabel(i18n("Number of Backups:"),dummy); 145 new QLabel(i18n("Number of Backups:"),dummy);
146 mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); 146 mBackupNumbersSpin = new QSpinBox(1,21,1,dummy);
147 new QLabel(i18n(" "),dummy); 147 new QLabel(i18n(" "),dummy);
148 bupLayout->addWidget( dummy ); 148 bupLayout->addWidget( dummy );
149 149
150 dummy = new QHBox(bupFrame); 150 dummy = new QHBox(bupFrame);
151 new QLabel(i18n("Make backup every "),dummy); 151 new QLabel(i18n("Make backup every "),dummy);
152 mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); 152 mBackupDayCountSpin = new QSpinBox(1,28,1,dummy);
153 new QLabel(i18n(" days"),dummy); 153 new QLabel(i18n(" days"),dummy);
154 new QLabel(i18n(" "),dummy); 154 new QLabel(i18n(" "),dummy);
155 bupLayout->addWidget( dummy ); 155 bupLayout->addWidget( dummy );
156 QString localKdeDir; 156 QString localKdeDir;
157 localKdeDir = readEnvPath("LOCALMICROKDEHOME"); 157 localKdeDir = readEnvPath("LOCALMICROKDEHOME");
158 if ( ! localKdeDir.isEmpty() ) { 158 if ( ! localKdeDir.isEmpty() ) {
159 sb->checkBox()->setEnabled( false ); 159 sb->checkBox()->setEnabled( false );
160 sb->checkBox()->setChecked( true ); 160 sb->checkBox()->setChecked( true );
161 mBackupUrl->setEnabled( false ); 161 mBackupUrl->setEnabled( false );
162 KPimGlobalPrefs::instance()->mBackupUseDefaultDir = true; 162 KPimGlobalPrefs::instance()->mBackupUseDefaultDir = true;
163 } 163 }
164 164
165} 165}
166void KDEPIMConfigWidget::setupStoreTab() 166void KDEPIMConfigWidget::setupStoreTab()
167{ 167{
168 QVBox *colorPage = new QVBox( this ); 168 QVBox *colorPage = new QVBox( this );
169 tabWidget->addTab( colorPage, i18n( "Colors" ) ); 169 tabWidget->addTab( colorPage, i18n( "Colors" ) );
170 QWidget* cw = new QWidget( colorPage ); 170 QWidget* cw = new QWidget( colorPage );
171 KPrefsWidColor *holidayColor = 171 KPrefsWidColor *holidayColor =
172 addWidColor(i18n("Alternating background of list views"), 172 addWidColor(i18n("Alternating background of list views"),
173 &(KPimGlobalPrefs::instance()->mAlternateColor),cw); 173 &(KPimGlobalPrefs::instance()->mAlternateColor),cw);
174 QHBoxLayout *topLayout = new QHBoxLayout(cw); 174 QHBoxLayout *topLayout = new QHBoxLayout(cw);
175 topLayout->addWidget(holidayColor->label()); 175 topLayout->addWidget(holidayColor->label());
176 topLayout->addWidget( (QWidget* )holidayColor->button()); 176 topLayout->addWidget( (QWidget* )holidayColor->button());
177 177
178 178
179 QVBox *storePage = new QVBox( this ); 179 QVBox *storePage = new QVBox( this );
180 if ( QApplication::desktop()->height() > 240 )
180 new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); 181 new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
181 new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); 182 new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
182 mStoreUrl = new KURLRequester( storePage ); 183 mStoreUrl = new KURLRequester( storePage );
183 mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); 184 mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
184#ifdef DESKTOP_VERSION 185#ifdef DESKTOP_VERSION
185 QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; 186 QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ;
186 QFileInfo fi ( confFile ); 187 QFileInfo fi ( confFile );
187 if ( fi.exists() ) { 188 if ( fi.exists() ) {
188 KConfig cfg ( confFile ); 189 KConfig cfg ( confFile );
189 cfg.setGroup("Global"); 190 cfg.setGroup("Global");
190 QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); 191 QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" );
191 if ( localKdeDir != "x_x_x" ) { 192 if ( localKdeDir != "x_x_x" ) {
192 mStoreUrl->setURL( localKdeDir ); 193 mStoreUrl->setURL( localKdeDir );
193 qDebug("Reading config from %s ", confFile.latin1()); 194 qDebug("Reading config from %s ", confFile.latin1());
194 } 195 }
195 } 196 }
196 197
197#endif 198#endif
198 new QLabel( i18n("New dirs are created automatically"), storePage ); 199 new QLabel( i18n("New dirs are created automatically"), storePage );
199 QHBox *bb = new QHBox( storePage ); 200 QHBox *bb = new QHBox( storePage );
200 QPushButton * pb; 201 QPushButton * pb;
201 if ( QApplication::desktop()->width() < 640 ) 202 if ( QApplication::desktop()->width() < 640 )
202 pb = new QPushButton ( i18n("Save"), bb ); 203 pb = new QPushButton ( i18n("Save"), bb );
203 else 204 else
204 pb = new QPushButton ( i18n("Save settings"), bb ); 205 pb = new QPushButton ( i18n("Save settings"), bb );
205 connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); 206 connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) );
206 pb = new QPushButton ( i18n("Save standard"), bb ); 207 pb = new QPushButton ( i18n("Save standard"), bb );
207 connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); 208 connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) );
208#ifdef DESKTOP_VERSION 209#ifdef DESKTOP_VERSION
209 pb = new QPushButton ( i18n("Save using LOCAL storage"), bb ); 210 pb = new QPushButton ( i18n("Save using LOCAL storage"), bb );
210 connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); 211 connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) );
211#endif 212#endif
212 new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); 213 new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage );
213 new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); 214 new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage );
214 tabWidget->addTab( storePage, i18n( "Data storage path" ) ); 215 tabWidget->addTab( storePage, i18n( "Data storage path" ) );
215} 216}
216void KDEPIMConfigWidget::setLocalStore() 217void KDEPIMConfigWidget::setLocalStore()
217{ 218{
218 mStoreUrl->setURL( "LOCAL:kdepimpi" ); 219 mStoreUrl->setURL( "LOCAL:kdepimpi" );
219 saveStoreSettings(); 220 saveStoreSettings();
220 QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data."); 221 QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data.");
221 KMessageBox::information( this, message); 222 KMessageBox::information( this, message);
222} 223}
223void KDEPIMConfigWidget::setStandardStore() 224void KDEPIMConfigWidget::setStandardStore()
224{ 225{
225 mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); 226 mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
226 saveStoreSettings(); 227 saveStoreSettings();
227} 228}
@@ -245,186 +246,192 @@ void KDEPIMConfigWidget::saveStoreSettings()
245 saveStoreSettings(); 246 saveStoreSettings();
246 } 247 }
247} 248}
248void KDEPIMConfigWidget::setupExternalAppTab() 249void KDEPIMConfigWidget::setupExternalAppTab()
249{ 250{
250 QWidget *externalAppsPage = new QWidget( this ); 251 QWidget *externalAppsPage = new QWidget( this );
251 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), 252 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
252 KDialog::spacingHintSmall() ); 253 KDialog::spacingHintSmall() );
253 254
254 mExternalApps = new QComboBox( externalAppsPage ); 255 mExternalApps = new QComboBox( externalAppsPage );
255 256
256 QMap<ExternalAppHandler::Types, QString>::Iterator it; 257 QMap<ExternalAppHandler::Types, QString>::Iterator it;
257 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) 258 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it )
258 mExternalApps->insertItem( it.data(), it.key() ); 259 mExternalApps->insertItem( it.data(), it.key() );
259 260
260 layout->addWidget( mExternalApps ); 261 layout->addWidget( mExternalApps );
261 262
262 connect( mExternalApps, SIGNAL( activated( int ) ), 263 connect( mExternalApps, SIGNAL( activated( int ) ),
263 this, SLOT (externalapp_changed( int ) ) ); 264 this, SLOT (externalapp_changed( int ) ) );
264 265
265 266
266 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); 267 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
267 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); 268 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
268 mExternalAppGroupBox->layout()->setMargin(4); 269 mExternalAppGroupBox->layout()->setMargin(4);
269 270
270 mClient = new QComboBox( mExternalAppGroupBox ); 271 mClient = new QComboBox( mExternalAppGroupBox );
271 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); 272 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 );
272 273
273 connect( mClient, SIGNAL( activated( int ) ), 274 connect( mClient, SIGNAL( activated( int ) ),
274 this, SLOT (client_changed( int ) ) ); 275 this, SLOT (client_changed( int ) ) );
275 276
276 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); 277 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox);
277 boxLayout->addWidget( lab, 1, 0 ); 278 boxLayout->addWidget( lab, 1, 0 );
278 mChannel = new QLineEdit(mExternalAppGroupBox); 279 mChannel = new QLineEdit(mExternalAppGroupBox);
279 mChannel->setReadOnly(true); 280 mChannel->setReadOnly(true);
280 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); 281 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 );
281 282
282 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); 283 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox);
283 boxLayout->addWidget( lab, 3, 0 ); 284 boxLayout->addWidget( lab, 3, 0 );
284 mMessage = new QLineEdit(mExternalAppGroupBox); 285 mMessage = new QLineEdit(mExternalAppGroupBox);
285 mMessage->setReadOnly(true); 286 mMessage->setReadOnly(true);
286 boxLayout->addWidget( mMessage , 4, 0); 287 boxLayout->addWidget( mMessage , 4, 0);
287 288
288 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); 289 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox);
289 boxLayout->addWidget( lab, 3, 1 ); 290 boxLayout->addWidget( lab, 3, 1 );
290 mParameters = new QLineEdit(mExternalAppGroupBox); 291 mParameters = new QLineEdit(mExternalAppGroupBox);
291 mParameters->setReadOnly(true); 292 mParameters->setReadOnly(true);
292 boxLayout->addWidget( mParameters, 4, 1 ); 293 boxLayout->addWidget( mParameters, 4, 1 );
293 294 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox);
294 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); 295 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 );
295 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); 296
296 297
297 298 if ( QApplication::desktop()->height() > 240 ) {
298 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); 299 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox);
299 boxLayout->addWidget( lab, 6, 0 ); 300 boxLayout->addWidget( lab, 6, 0 );
300 mMessage2 = new QLineEdit(mExternalAppGroupBox); 301 mMessage2 = new QLineEdit(mExternalAppGroupBox);
301 mMessage2->setReadOnly(true); 302 mMessage2->setReadOnly(true);
302 boxLayout->addWidget( mMessage2 , 7, 0); 303 boxLayout->addWidget( mMessage2 , 7, 0);
303 304
304 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); 305 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox);
305 boxLayout->addWidget( lab, 6, 1 ); 306 boxLayout->addWidget( lab, 6, 1 );
306 mParameters2 = new QLineEdit(mExternalAppGroupBox); 307 mParameters2 = new QLineEdit(mExternalAppGroupBox);
307 mParameters2->setReadOnly(true); 308 mParameters2->setReadOnly(true);
308 boxLayout->addWidget( mParameters2, 7, 1 ); 309 boxLayout->addWidget( mParameters2, 7, 1 );
309 310
310 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); 311 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox);
311 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); 312 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 );
312 313 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
314 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
315 } else {
316 mMessage2 = 0;
317 mParameters2 = 0;
318 }
313 319
314 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 320 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
315 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 321 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
316 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 322 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
317 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
318 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
319 323
320 324
321 layout->addWidget( mExternalAppGroupBox ); 325 layout->addWidget( mExternalAppGroupBox );
322 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); 326 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) );
323 327
324} 328}
325 329
326 330
327void KDEPIMConfigWidget::setupLocaleDateTab() 331void KDEPIMConfigWidget::setupLocaleDateTab()
328{ 332{
329 QWidget *topFrame = new QWidget( this ); 333 QWidget *topFrame = new QWidget( this );
330 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); 334 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2);
331 335
332 topLayout->setSpacing(KDialog::spacingHintSmall()); 336 topLayout->setSpacing(KDialog::spacingHintSmall());
333 topLayout->setMargin(KDialog::marginHintSmall()); 337 topLayout->setMargin(KDialog::marginHintSmall());
334 int iii = 0; 338 int iii = 0;
335 339
336 340
337 KPrefsWidRadios *syncPrefsGroup = 341 KPrefsWidRadios *syncPrefsGroup =
338 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); 342 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame);
339 QString format; 343 QString format;
340 if ( QApplication::desktop()->width() < 480 ) 344 if ( QApplication::desktop()->width() < 480 )
341 format = "(%d.%m.%Y)"; 345 format = "(%d.%m.%Y)";
342 else 346 else
343 format = "(%d.%m.%Y|%A %d %B %Y)"; 347 format = "(%d.%m.%Y|%A %d %B %Y)";
344 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 348 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
345 if ( QApplication::desktop()->width() < 480 ) 349 if ( QApplication::desktop()->width() < 480 )
346 format = "(%m.%d.%Y)"; 350 format = "(%m.%d.%Y)";
347 else 351 else
348 format = "(%m.%d.%Y|%A %B %d %Y)"; 352 format = "(%m.%d.%Y|%A %B %d %Y)";
349 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 353 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
350 if ( QApplication::desktop()->width() < 480 ) 354 if ( QApplication::desktop()->width() < 480 )
351 format = "(%Y-%m-%d)"; 355 format = "(%Y-%m-%d)";
352 else 356 else
353 format = "(%Y-%m-%d|%A %Y %B %d)"; 357 format = "(%Y-%m-%d|%A %Y %B %d)";
354 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 358 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
355 syncPrefsGroup->addRadio(i18n("User defined")); 359 syncPrefsGroup->addRadio(i18n("User defined"));
356 if ( QApplication::desktop()->width() < 480 ) { 360 if ( QApplication::desktop()->width() < 480 ) {
357 syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); 361 syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
358 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); 362 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
359 } 363 }
360 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 364 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
361 ++iii; 365 ++iii;
362 ++iii; 366 ++iii;
363 QLabel * lab; 367 QLabel * lab;
364 mUserDateFormatLong = new QLineEdit(topFrame); 368 mUserDateFormatLong = new QLineEdit(topFrame);
365 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 369 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
366 topLayout->addWidget(lab ,iii,0); 370 topLayout->addWidget(lab ,iii,0);
367 topLayout->addWidget(mUserDateFormatLong,iii,1); 371 topLayout->addWidget(mUserDateFormatLong,iii,1);
368 ++iii; 372 ++iii;
369 mUserDateFormatShort = new QLineEdit(topFrame); 373 mUserDateFormatShort = new QLineEdit(topFrame);
370 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 374 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
371 topLayout->addWidget(lab ,iii,0); 375 topLayout->addWidget(lab ,iii,0);
372 topLayout->addWidget(mUserDateFormatShort,iii,1); 376 topLayout->addWidget(mUserDateFormatShort,iii,1);
373 ++iii; 377 ++iii;
374 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 378 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
375 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 379 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
376 ++iii; 380 ++iii;
377 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 381 //qDebug(" QApplication::desktop()->height()xx %d ", QApplication::desktop()->height() );
378 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 382 if ( QApplication::desktop()->height() > 240 ) {
379 ++iii; 383 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
380 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 384 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
381 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 385 ++iii;
382 ++iii; 386 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
387 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
388 ++iii;
389 }
383 390
384 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 391 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
385 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 392 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
386 393
387 394
388 tabWidget->addTab( topFrame, i18n( "Date Format" ) ); 395 tabWidget->addTab( topFrame, i18n( "Date Format" ) );
389} 396}
390 397
391void KDEPIMConfigWidget::setupLocaleTab() 398void KDEPIMConfigWidget::setupLocaleTab()
392{ 399{
393 400
394 QWidget *topFrame = new QWidget( this ); 401 QWidget *topFrame = new QWidget( this );
395 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 402 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
396 403
397 topLayout->setSpacing(KDialog::spacingHint()); 404 topLayout->setSpacing(KDialog::spacingHint());
398 topLayout->setMargin(KDialog::marginHint()); 405 topLayout->setMargin(KDialog::marginHint());
399 int iii = 0; 406 int iii = 0;
400 KPrefsWidRadios *syncPrefsGroup = 407 KPrefsWidRadios *syncPrefsGroup =
401 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); 408 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame);
402 syncPrefsGroup->addRadio(i18n("English")); 409 syncPrefsGroup->addRadio(i18n("English"));
403 syncPrefsGroup->addRadio(i18n("German")); 410 syncPrefsGroup->addRadio(i18n("German"));
404 syncPrefsGroup->addRadio(i18n("French")); 411 syncPrefsGroup->addRadio(i18n("French"));
405 syncPrefsGroup->addRadio(i18n("Italian")); 412 syncPrefsGroup->addRadio(i18n("Italian"));
406 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 413 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
407 if ( QApplication::desktop()->width() < 300 ) { 414 if ( QApplication::desktop()->width() < 300 ) {
408 syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); 415 syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
409 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); 416 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
410 } 417 }
411 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 418 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
412 ++iii; 419 ++iii;
413 420
414 421
415 tabWidget->addTab( topFrame, i18n( "Language" ) ); 422 tabWidget->addTab( topFrame, i18n( "Language" ) );
416 topFrame = new QWidget( this ); 423 topFrame = new QWidget( this );
417 topLayout = new QGridLayout(topFrame,4,2); 424 topLayout = new QGridLayout(topFrame,4,2);
418 425
419 topLayout->setSpacing(KDialog::spacingHint()); 426 topLayout->setSpacing(KDialog::spacingHint());
420 topLayout->setMargin(KDialog::marginHint()); 427 topLayout->setMargin(KDialog::marginHint());
421 iii = 0; 428 iii = 0;
422 syncPrefsGroup = 429 syncPrefsGroup =
423 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); 430 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame);
424 if ( QApplication::desktop()->width() > 300 ) 431 if ( QApplication::desktop()->width() > 300 )
425 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 432 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
426 syncPrefsGroup->addRadio(i18n("24:00")); 433 syncPrefsGroup->addRadio(i18n("24:00"));
427 syncPrefsGroup->addRadio(i18n("12:00am")); 434 syncPrefsGroup->addRadio(i18n("12:00am"));
428 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 435 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
429 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 436 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
430 ++iii; 437 ++iii;
@@ -583,268 +590,282 @@ void KDEPIMConfigWidget::client_changed( int newClient )
583 return; 590 return;
584 591
585 // first store the current data 592 // first store the current data
586 saveEditFieldSettings(); 593 saveEditFieldSettings();
587 594
588 595
589 //then reset the clientvariable 596 //then reset the clientvariable
590 mCurrentClient = newClient; 597 mCurrentClient = newClient;
591 598
592 // and at last update the widgets 599 // and at last update the widgets
593 updateClientWidgets(); 600 updateClientWidgets();
594 601
595 KPrefsWidget::modified(); 602 KPrefsWidget::modified();
596} 603}
597 604
598void KDEPIMConfigWidget::saveEditFieldSettings() 605void KDEPIMConfigWidget::saveEditFieldSettings()
599{ 606{
600 607
601 switch(mCurrentApp) 608 switch(mCurrentApp)
602 { 609 {
603 case(ExternalAppHandler::EMAIL): 610 case(ExternalAppHandler::EMAIL):
604 mEmailClient = mClient->currentItem(); 611 mEmailClient = mClient->currentItem();
605 break; 612 break;
606 case(ExternalAppHandler::PHONE): 613 case(ExternalAppHandler::PHONE):
607 mPhoneClient= mClient->currentItem(); 614 mPhoneClient= mClient->currentItem();
608 break; 615 break;
609 case(ExternalAppHandler::SMS): 616 case(ExternalAppHandler::SMS):
610 mSMSClient = mClient->currentItem(); 617 mSMSClient = mClient->currentItem();
611 break; 618 break;
612 case(ExternalAppHandler::FAX): 619 case(ExternalAppHandler::FAX):
613 mFaxClient = mClient->currentItem(); 620 mFaxClient = mClient->currentItem();
614 break; 621 break;
615 case(ExternalAppHandler::PAGER): 622 case(ExternalAppHandler::PAGER):
616 mPagerClient = mClient->currentItem(); 623 mPagerClient = mClient->currentItem();
617 break; 624 break;
618 case(ExternalAppHandler::SIP): 625 case(ExternalAppHandler::SIP):
619 mSipClient = mClient->currentItem(); 626 mSipClient = mClient->currentItem();
620 break; 627 break;
621 default: 628 default:
622 return; 629 return;
623 } 630 }
624 631
625 //store the current data back to the apropriate membervariables if we had set it to "other" 632 //store the current data back to the apropriate membervariables if we had set it to "other"
626 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) 633 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC))
627 { 634 {
628 mEmailOtherChannel = mChannel->text(); 635 mEmailOtherChannel = mChannel->text();
629 mEmailOtherMessage = mMessage->text(); 636 mEmailOtherMessage = mMessage->text();
630 mEmailOtherMessageParameters = mParameters->text(); 637 mEmailOtherMessageParameters = mParameters->text();
631 mEmailOtherMessage2 = mMessage2->text(); 638 if ( mMessage2 )
632 mEmailOtherMessageParameters2 = mParameters2->text(); 639 mEmailOtherMessage2 = mMessage2->text();
640 if ( mParameters2 )
641 mEmailOtherMessageParameters2 = mParameters2->text();
633 } 642 }
634 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) 643 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
635 { 644 {
636 mPhoneOtherChannel = mChannel->text(); 645 mPhoneOtherChannel = mChannel->text();
637 mPhoneOtherMessage = mMessage->text(); 646 mPhoneOtherMessage = mMessage->text();
638 mPhoneOtherMessageParameters = mParameters->text(); 647 mPhoneOtherMessageParameters = mParameters->text();
639 } 648 }
640 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) 649 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
641 { 650 {
642 mSMSOtherChannel = mChannel->text(); 651 mSMSOtherChannel = mChannel->text();
643 mSMSOtherMessage = mMessage->text(); 652 mSMSOtherMessage = mMessage->text();
644 mSMSOtherMessageParameters = mParameters->text(); 653 mSMSOtherMessageParameters = mParameters->text();
645 } 654 }
646 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) 655 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
647 { 656 {
648 mFaxOtherChannel = mChannel->text(); 657 mFaxOtherChannel = mChannel->text();
649 mFaxOtherMessage = mMessage->text(); 658 mFaxOtherMessage = mMessage->text();
650 mFaxOtherMessageParameters = mParameters->text(); 659 mFaxOtherMessageParameters = mParameters->text();
651 } 660 }
652 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) 661 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
653 { 662 {
654 mPagerOtherChannel = mChannel->text(); 663 mPagerOtherChannel = mChannel->text();
655 mPagerOtherMessage = mMessage->text(); 664 mPagerOtherMessage = mMessage->text();
656 mPagerOtherMessageParameters = mParameters->text(); 665 mPagerOtherMessageParameters = mParameters->text();
657 } 666 }
658 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) 667 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
659 { 668 {
660 mSipOtherChannel = mChannel->text(); 669 mSipOtherChannel = mChannel->text();
661 mSipOtherMessage = mMessage->text(); 670 mSipOtherMessage = mMessage->text();
662 mSipOtherMessageParameters = mParameters->text(); 671 mSipOtherMessageParameters = mParameters->text();
663 } 672 }
664 673
665 674
666} 675}
667 676
668void KDEPIMConfigWidget::updateClientWidgets() 677void KDEPIMConfigWidget::updateClientWidgets()
669{ 678{
670 bool blocked = signalsBlocked(); 679 bool blocked = signalsBlocked();
671 blockSignals( true ); 680 blockSignals( true );
672 681
673 // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display 682 // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display
674 QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); 683 QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp );
675 if (it == mExternalAppsMap.end()) 684 if (it == mExternalAppsMap.end())
676 return; 685 return;
677 686
678 // update group box 687 // update group box
679 mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); 688 mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data()));
680 689
681 //update the entries in the client combobox 690 //update the entries in the client combobox
682 mClient->clear(); 691 mClient->clear();
683 692
684 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); 693 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
685 DefaultAppItem* dai; 694 DefaultAppItem* dai;
686 for ( dai=items.first(); dai != 0; dai=items.next() ) 695 for ( dai=items.first(); dai != 0; dai=items.next() )
687 { 696 {
688 mClient->insertItem( i18n(dai->_label), dai->_id ); 697 mClient->insertItem( i18n(dai->_label), dai->_id );
689 698
690 if (dai->_id == mCurrentClient) 699 if (dai->_id == mCurrentClient)
691 { 700 {
692 //restore the edit fields with the data of the local membervariables if we had set it to "other". 701 //restore the edit fields with the data of the local membervariables if we had set it to "other".
693 //Otherwise take the default data from externalapphandler. 702 //Otherwise take the default data from externalapphandler.
694 mChannel->setText(dai->_channel); 703 mChannel->setText(dai->_channel);
695 mMessage->setText(dai->_message); 704 mMessage->setText(dai->_message);
696 mParameters->setText(dai->_parameters); 705 mParameters->setText(dai->_parameters);
697 mMessage2->setText(dai->_message2); 706 if ( mMessage2 )
707 mMessage2->setText(dai->_message2);
708 if ( mParameters2 )
698 mParameters2->setText(dai->_parameters2); 709 mParameters2->setText(dai->_parameters2);
699 710
700 711
701 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) 712 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC))
702 { 713 {
703 mChannel->setText(mEmailOtherChannel); 714 mChannel->setText(mEmailOtherChannel);
704 mMessage->setText(mEmailOtherMessage); 715 mMessage->setText(mEmailOtherMessage);
705 mParameters->setText(mEmailOtherMessageParameters); 716 mParameters->setText(mEmailOtherMessageParameters);
717 if ( mMessage2 )
706 mMessage2->setText(mEmailOtherMessage2); 718 mMessage2->setText(mEmailOtherMessage2);
719 if ( mParameters2 )
707 mParameters2->setText(mEmailOtherMessageParameters2); 720 mParameters2->setText(mEmailOtherMessageParameters2);
708 } 721 }
709 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) 722 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
710 { 723 {
711 mChannel->setText(mPhoneOtherChannel); 724 mChannel->setText(mPhoneOtherChannel);
712 mMessage->setText(mPhoneOtherMessage); 725 mMessage->setText(mPhoneOtherMessage);
713 mParameters->setText(mPhoneOtherMessageParameters); 726 mParameters->setText(mPhoneOtherMessageParameters);
714 } 727 }
715 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) 728 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
716 { 729 {
717 mChannel->setText(mSMSOtherChannel); 730 mChannel->setText(mSMSOtherChannel);
718 mMessage->setText(mSMSOtherMessage); 731 mMessage->setText(mSMSOtherMessage);
719 mParameters->setText(mSMSOtherMessageParameters); 732 mParameters->setText(mSMSOtherMessageParameters);
720 } 733 }
721 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) 734 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
722 { 735 {
723 mChannel->setText(mFaxOtherChannel); 736 mChannel->setText(mFaxOtherChannel);
724 mMessage->setText(mFaxOtherMessage); 737 mMessage->setText(mFaxOtherMessage);
725 mParameters->setText(mFaxOtherMessageParameters); 738 mParameters->setText(mFaxOtherMessageParameters);
726 } 739 }
727 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) 740 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
728 { 741 {
729 mChannel->setText(mPagerOtherChannel); 742 mChannel->setText(mPagerOtherChannel);
730 mMessage->setText(mPagerOtherMessage); 743 mMessage->setText(mPagerOtherMessage);
731 mParameters->setText(mPagerOtherMessageParameters); 744 mParameters->setText(mPagerOtherMessageParameters);
732 } 745 }
733 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) 746 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
734 { 747 {
735 mChannel->setText(mSipOtherChannel); 748 mChannel->setText(mSipOtherChannel);
736 mMessage->setText(mSipOtherMessage); 749 mMessage->setText(mSipOtherMessage);
737 mParameters->setText(mSipOtherMessageParameters); 750 mParameters->setText(mSipOtherMessageParameters);
738 } 751 }
739 } 752 }
740 753
741 } 754 }
742 755
743 bool readonly; 756 bool readonly;
744 bool enabled; 757 bool enabled;
745 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) 758 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC))
746 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) 759 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
747 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) 760 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
748 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) 761 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
749 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) 762 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
750 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) 763 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)))
751 { 764 {
752 readonly = false; 765 readonly = false;
753 } 766 }
754 else 767 else
755 { 768 {
756 readonly = true; 769 readonly = true;
757 } 770 }
758 771
759 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) 772 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC))
760 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) 773 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC))
761 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) 774 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC))
762 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) 775 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC))
763 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) 776 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC))
764 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) 777 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC)))
765 { 778 {
766 enabled = false; 779 enabled = false;
767 } 780 }
768 else 781 else
769 { 782 {
770 enabled = true; 783 enabled = true;
771 } 784 }
772 785
773 786
774 mChannel->setReadOnly(readonly); 787 mChannel->setReadOnly(readonly);
775 mMessage->setReadOnly(readonly); 788 mMessage->setReadOnly(readonly);
776 mParameters->setReadOnly(readonly); 789 mParameters->setReadOnly(readonly);
790 if ( mMessage2 )
777 mMessage2->setReadOnly(readonly); 791 mMessage2->setReadOnly(readonly);
792 if ( mParameters2 )
778 mParameters2->setReadOnly(readonly); 793 mParameters2->setReadOnly(readonly);
779 794
780 mChannel->setEnabled(enabled); 795 mChannel->setEnabled(enabled);
781 mMessage->setEnabled(enabled); 796 mMessage->setEnabled(enabled);
782 mParameters->setEnabled(enabled); 797 mParameters->setEnabled(enabled);
798 if ( mMessage2 )
783 mMessage2->setEnabled(enabled); 799 mMessage2->setEnabled(enabled);
800 if ( mParameters2 )
784 mParameters2->setEnabled(enabled); 801 mParameters2->setEnabled(enabled);
785 802
786 803
787 804
788 mClient->setCurrentItem(mCurrentClient); 805 mClient->setCurrentItem(mCurrentClient);
789 806
790 807
791 // enable/disable the extra message/parameter field 808 // enable/disable the extra message/parameter field
792 if (mCurrentApp == ExternalAppHandler::EMAIL) 809 if (mCurrentApp == ExternalAppHandler::EMAIL)
793 { 810 {
794 } 811 }
795 else 812 else
796 { 813 {
814 if ( mMessage2 )
797 mMessage2->setText( "" ); 815 mMessage2->setText( "" );
816 if ( mParameters2 )
798 mParameters2->setText( "" ); 817 mParameters2->setText( "" );
799 } 818 }
800 819
801 if (enabled == true) { 820 if (enabled == true) {
821 if ( mMessage2 )
802 mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); 822 mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL);
823 if ( mParameters2 )
803 mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); 824 mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL);
804 } 825 }
805 826
806 827
807 blockSignals( blocked ); 828 blockSignals( blocked );
808 829
809} 830}
810 831
811void KDEPIMConfigWidget::usrReadConfig() 832void KDEPIMConfigWidget::usrReadConfig()
812{ 833{
813 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); 834 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance();
814 835
815 bool blocked = signalsBlocked(); 836 bool blocked = signalsBlocked();
816 blockSignals( true ); 837 blockSignals( true );
817 838
818 if (KPimGlobalPrefs::instance()->mBackupUseDefaultDir ) 839 if (KPimGlobalPrefs::instance()->mBackupUseDefaultDir )
819 mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); 840 mBackupUrl->setURL( KGlobalSettings::backupDataDir() );
820 else 841 else
821 mBackupUrl->setURL(prefs->mBackupDatadir); 842 mBackupUrl->setURL(prefs->mBackupDatadir);
822 mBackupNumbersSpin->setValue( prefs->mBackupNumbers ); 843 mBackupNumbersSpin->setValue( prefs->mBackupNumbers );
823 mBackupDayCountSpin->setValue( prefs->mBackupDayCount); 844 mBackupDayCountSpin->setValue( prefs->mBackupDayCount);
824 845
825 QString dummy = prefs->mUserDateFormatLong; 846 QString dummy = prefs->mUserDateFormatLong;
826 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 847 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
827 dummy = prefs->mUserDateFormatShort; 848 dummy = prefs->mUserDateFormatShort;
828 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 849 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
829 850
830 QDate current ( 2001, 1,1); 851 QDate current ( 2001, 1,1);
831 mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); 852 mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1));
832 mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); 853 mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1));
833 setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); 854 setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId));
834 855
835 mEmailClient = prefs->mEmailClient; 856 mEmailClient = prefs->mEmailClient;
836 mEmailOtherChannel = prefs->mEmailOtherChannel; 857 mEmailOtherChannel = prefs->mEmailOtherChannel;
837 mEmailOtherMessage = prefs->mEmailOtherMessage; 858 mEmailOtherMessage = prefs->mEmailOtherMessage;
838 mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; 859 mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters;
839 mEmailOtherMessage2 = prefs->mEmailOtherMessage2; 860 mEmailOtherMessage2 = prefs->mEmailOtherMessage2;
840 mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; 861 mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2;
841 862
842 mPhoneClient = prefs->mPhoneClient; 863 mPhoneClient = prefs->mPhoneClient;
843 mPhoneOtherChannel = prefs->mPhoneOtherChannel; 864 mPhoneOtherChannel = prefs->mPhoneOtherChannel;
844 mPhoneOtherMessage = prefs->mPhoneOtherMessage; 865 mPhoneOtherMessage = prefs->mPhoneOtherMessage;
845 mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; 866 mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters;
846 867
847 mFaxClient = prefs->mFaxClient; 868 mFaxClient = prefs->mFaxClient;
848 mFaxOtherChannel = prefs->mFaxOtherChannel; 869 mFaxOtherChannel = prefs->mFaxOtherChannel;
849 mFaxOtherMessage = prefs->mFaxOtherMessage; 870 mFaxOtherMessage = prefs->mFaxOtherMessage;
850 mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; 871 mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters;
diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp
index c7c6088..96dc256 100644
--- a/microkde/kcolorbutton.cpp
+++ b/microkde/kcolorbutton.cpp
@@ -1,47 +1,47 @@
1#include "kcolorbutton.h" 1#include "kcolorbutton.h"
2#include "kcolordialog.h" 2#include "kcolordialog.h"
3#include "qapplication.h" 3#include "qapplication.h"
4 4
5 5
6#include "qlayout.h" 6#include "qlayout.h"
7#ifdef DESKTOP_VERSION 7#ifdef DESKTOP_VERSION
8#include <qcolordialog.h> 8#include <qcolordialog.h>
9#endif 9#endif
10void KColorButton:: edit() 10void KColorButton:: edit()
11{ 11{
12 12
13#ifdef DESKTOP_VERSION 13#ifdef DESKTOP_VERSION
14 QColor col = QColorDialog::getColor ( mColor ); 14 QColor col = QColorDialog::getColor ( mColor );
15 if ( col.isValid () ) { 15 if ( col.isValid () ) {
16 mColor = col; 16 mColor = col;
17 setColor ( mColor ); 17 setColor ( mColor );
18 emit changed ( mColor ); 18 emit changed ( mColor );
19 } 19 }
20#else 20#else
21 KColorDialog* k = new KColorDialog( this ); 21 KColorDialog* k = new KColorDialog( this );
22 k->setColor( mColor ); 22 k->setColor( mColor );
23 int res = k->exec(); 23 int res = k->exec();
24 if ( res ) { 24 if ( res ) {
25 mColor = k->getColor(); 25 mColor = k->getColor();
26 setColor ( mColor ); 26 setColor ( mColor );
27 emit changed ( mColor ); 27 emit changed ( mColor );
28 } 28 }
29 delete k; 29 delete k;
30#endif 30#endif
31} 31}
32KColorButton::KColorButton( QWidget *p ):QPushButton( p ) 32KColorButton::KColorButton( QWidget *p ):QPushButton( p )
33{ 33{
34 int size = 24; 34 int size = 24;
35 if( QApplication::desktop()->width() < 480 ) 35 if( QApplication::desktop()->width() < 480 || QApplication::desktop()->height() <= 320 )
36 size = 18; 36 size = 18;
37 setFixedSize( size,size ); 37 setFixedSize( size,size );
38 connect ( this, SIGNAL( clicked() ), this ,SLOT (edit() )); 38 connect ( this, SIGNAL( clicked() ), this ,SLOT (edit() ));
39 39
40} 40}
41void KColorButton::setColor ( const QColor & c) 41void KColorButton::setColor ( const QColor & c)
42{ 42{
43 mColor = c; 43 mColor = c;
44 QPixmap pix ( height() - 4, width() - 4 ); 44 QPixmap pix ( height() - 4, width() - 4 );
45 pix.fill( c ); 45 pix.fill( c );
46 setPixmap ( pix ); 46 setPixmap ( pix );
47} 47}