-rw-r--r-- | korganizer/kodialogmanager.cpp | 3 | ||||
-rw-r--r-- | korganizer/koeditordetails.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 50 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 2 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 23 | ||||
-rw-r--r-- | korganizer/searchdialog.h | 3 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 91 | ||||
-rw-r--r-- | microkde/kcolorbutton.cpp | 2 |
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 @@ -105,5 +105,6 @@ void KODialogManager::showOptionsDialog( bool showSync ) } mOptionsDialog->readConfig(); -#ifndef DESKTOP_VERSION +#ifndef DESKTOP_VERSION + mOptionsDialog->hideButtons(); mOptionsDialog->showMaximized(); #else diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index bdfc637..6ecf978 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -88,5 +88,5 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) mListView->addColumn(i18n("Status"),100); mListView->addColumn(i18n("RSVP"),35); - if ( QApplication::desktop()->width() <= 320 ) { + if ( QApplication::desktop()->width() <= 320 || QApplication::desktop()->height() <= 240) { int hei = 80; if ( QApplication::desktop()->height() <= 240 ) diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index bfe0aec..915c7ec 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -101,5 +101,5 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) mLocationEdit = new KOLocationBox(TRUE,parent,10); mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); - if ( QApplication::desktop()->width() > 320 ) + if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->height() > 240 ) mLocationEdit->setMaximumHeight( hei + 6); diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index b782bb1..3ee9a22 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -286,4 +286,11 @@ void KOPrefsDialog::setupMainTab() topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); ++iii; + if ( QApplication::desktop()->height() <= 240 ) { + topFrame = addPage(i18n("General") +" 2",0,0); + topLayout = new QGridLayout(topFrame,4,2); + topLayout->setSpacing(2); + topLayout->setMargin(3); + iii = 0; + } QHBox *dummy = new QHBox(topFrame); new QLabel(i18n("Days in Next-X-Days:"),dummy); @@ -432,10 +439,17 @@ void KOPrefsDialog::setupTimeTab() mAlarmTimeCombo->insertStringList(alarmList); topLayout->addWidget(mAlarmTimeCombo,3,1); - + int iii = 4; + if ( QApplication::desktop()->height() <= 240 ) { + topFrame = addPage(i18n("Time") +" 2",0,0); + topLayout = new QGridLayout(topFrame,1,2); + topLayout->setSpacing(2); + topLayout->setMargin(3); + iii = 0; + } QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, i18n("Working Hours"), topFrame); - topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); + topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); workingHoursGroup->layout()->setSpacing( 0 ); workingHoursGroup->layout()->setMargin( 4 ); @@ -703,4 +717,16 @@ void KOPrefsDialog::setupViewsTab() &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); + + + + if ( QApplication::desktop()->height() <= 240 ) { + topFrame = addPage(i18n("Month View") +" 2",0,0); + topLayout = new QGridLayout(topFrame,4,1); + topLayout->setSpacing(2); + topLayout->setMargin(1); + ii = 0; + } + + coloredCategoriesInMonthView = addWidBool(i18n("Month view uses day colors"), @@ -902,7 +928,11 @@ dummy = &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); topLayout->addWidget(dummy->checkBox(),iii++,0); - 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); - topLayout->addWidget(lab ,iii++,0); + if ( QApplication::desktop()->height() > 240 ) { + + 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); + + topLayout->addWidget(lab ,iii++,0); + } #ifndef DESKTOP_VERSION lab->setAlignment( AlignLeft|WordBreak|AlignTop); @@ -1165,4 +1195,16 @@ void KOPrefsDialog::setupColorsTab() topLayout->addWidget(eventColor->button(),ii++,1); + if ( QApplication::desktop()->height() <= 240 ) { + topFrame = addPage(i18n("Colors") +" 2",0,0); + // DesktopIcon("colorize",KIcon::SizeMedium)); + + topLayout = new QGridLayout(topFrame,5,2); + // topLayout->setSpacing(mSpacingHint); + // topLayout->setMargin(mMarginHint); + + topLayout->setSpacing(2); + topLayout->setMargin(3); + } + // agenda view background color diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2c04852..0cb0bce 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -626,5 +626,5 @@ void MainWindow::initActions() QString pathString = ""; if ( !p->mToolBarMiniIcons ) { - if ( QApplication::desktop()->width() < 480 ) { + if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { pathString += "icons16/"; pixWid = 18; pixHei = 16; diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index ef2fc1c..7b3b543 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -71,4 +71,9 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) subLayout->addWidget(mAddItems); + QPushButton *togButton = new QPushButton( "", topFrame ); + subLayout->addWidget(togButton); + connect(togButton,SIGNAL(clicked()),SLOT(toggleCheckboxes())); + togButton->setPixmap(SmallIcon("1updownarrow")); + togButton->setMinimumWidth( togButton->sizeHint().height() ); searchEdit->setText("*"); // Find all events by default searchEdit->setFocus(); @@ -79,5 +84,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) // topFrame); - QHBox *incidenceGroup = new QHBox( topFrame ); + incidenceGroup = new QHBox( topFrame ); layout->addWidget(incidenceGroup); @@ -87,5 +92,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); - QHBox *subjectGroup = new QHBox( topFrame ); + subjectGroup = new QHBox( topFrame ); layout->addWidget(subjectGroup); @@ -95,5 +100,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); - QHBox *attendeeGroup = new QHBox( topFrame ); + attendeeGroup = new QHBox( topFrame ); layout->addWidget(attendeeGroup ); new QLabel( i18n("Attendee:"),attendeeGroup ); @@ -137,4 +142,16 @@ SearchDialog::~SearchDialog() } +void SearchDialog::toggleCheckboxes() +{ + if ( incidenceGroup->isVisible() ) { + incidenceGroup->hide() ; + subjectGroup->hide() ; + attendeeGroup->hide() ; + } else { + incidenceGroup->show() ; + subjectGroup->show() ; + attendeeGroup->show() ; + } +} void SearchDialog::raiseAndSelect() { diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h index 11ad2f0..b345b98 100644 --- a/korganizer/searchdialog.h +++ b/korganizer/searchdialog.h @@ -61,4 +61,5 @@ class SearchDialog : public QVBox void doSearch(); void searchTextChanged( const QString &_text ); + void toggleCheckboxes(); signals: @@ -68,4 +69,6 @@ class SearchDialog : public QVBox private: + + QHBox *incidenceGroup ,*subjectGroup ,*attendeeGroup; void search(const QRegExp &); 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 @@ -177,5 +177,6 @@ void KDEPIMConfigWidget::setupStoreTab() - QVBox *storePage = new QVBox( this ); + QVBox *storePage = new QVBox( this ); + if ( QApplication::desktop()->height() > 240 ) 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 ); new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); @@ -291,30 +292,33 @@ void KDEPIMConfigWidget::setupExternalAppTab() mParameters->setReadOnly(true); boxLayout->addWidget( mParameters, 4, 1 ); - - lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); - boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); - - - lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); - boxLayout->addWidget( lab, 6, 0 ); - mMessage2 = new QLineEdit(mExternalAppGroupBox); - mMessage2->setReadOnly(true); - boxLayout->addWidget( mMessage2 , 7, 0); - - lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); - boxLayout->addWidget( lab, 6, 1 ); - mParameters2 = new QLineEdit(mExternalAppGroupBox); - mParameters2->setReadOnly(true); - boxLayout->addWidget( mParameters2, 7, 1 ); - - lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); - boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); - + lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); + boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); + + + if ( QApplication::desktop()->height() > 240 ) { + lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); + boxLayout->addWidget( lab, 6, 0 ); + mMessage2 = new QLineEdit(mExternalAppGroupBox); + mMessage2->setReadOnly(true); + boxLayout->addWidget( mMessage2 , 7, 0); + + lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); + boxLayout->addWidget( lab, 6, 1 ); + mParameters2 = new QLineEdit(mExternalAppGroupBox); + mParameters2->setReadOnly(true); + boxLayout->addWidget( mParameters2, 7, 1 ); + + lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); + boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); + connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); + connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); + } else { + mMessage2 = 0; + mParameters2 = 0; + } connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); - connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); - connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); @@ -375,10 +379,13 @@ void KDEPIMConfigWidget::setupLocaleDateTab() topLayout->addMultiCellWidget(lab ,iii,iii,0,1); ++iii; - lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); - topLayout->addMultiCellWidget(lab ,iii,iii,0,1); - ++iii; - lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); - topLayout->addMultiCellWidget(lab ,iii,iii,0,1); - ++iii; + //qDebug(" QApplication::desktop()->height()xx %d ", QApplication::desktop()->height() ); + if ( QApplication::desktop()->height() > 240 ) { + lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); + topLayout->addMultiCellWidget(lab ,iii,iii,0,1); + ++iii; + lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); + topLayout->addMultiCellWidget(lab ,iii,iii,0,1); + ++iii; + } connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); @@ -629,6 +636,8 @@ void KDEPIMConfigWidget::saveEditFieldSettings() mEmailOtherMessage = mMessage->text(); mEmailOtherMessageParameters = mParameters->text(); - mEmailOtherMessage2 = mMessage2->text(); - mEmailOtherMessageParameters2 = mParameters2->text(); + if ( mMessage2 ) + mEmailOtherMessage2 = mMessage2->text(); + if ( mParameters2 ) + mEmailOtherMessageParameters2 = mParameters2->text(); } else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) @@ -694,6 +703,8 @@ void KDEPIMConfigWidget::updateClientWidgets() mChannel->setText(dai->_channel); mMessage->setText(dai->_message); - mParameters->setText(dai->_parameters); - mMessage2->setText(dai->_message2); + mParameters->setText(dai->_parameters); + if ( mMessage2 ) + mMessage2->setText(dai->_message2); + if ( mParameters2 ) mParameters2->setText(dai->_parameters2); @@ -703,6 +714,8 @@ void KDEPIMConfigWidget::updateClientWidgets() mChannel->setText(mEmailOtherChannel); mMessage->setText(mEmailOtherMessage); - mParameters->setText(mEmailOtherMessageParameters); + mParameters->setText(mEmailOtherMessageParameters); + if ( mMessage2 ) mMessage2->setText(mEmailOtherMessage2); + if ( mParameters2 ) mParameters2->setText(mEmailOtherMessageParameters2); } @@ -774,6 +787,8 @@ void KDEPIMConfigWidget::updateClientWidgets() mChannel->setReadOnly(readonly); mMessage->setReadOnly(readonly); - mParameters->setReadOnly(readonly); + mParameters->setReadOnly(readonly); + if ( mMessage2 ) mMessage2->setReadOnly(readonly); + if ( mParameters2 ) mParameters2->setReadOnly(readonly); @@ -781,5 +796,7 @@ void KDEPIMConfigWidget::updateClientWidgets() mMessage->setEnabled(enabled); mParameters->setEnabled(enabled); + if ( mMessage2 ) mMessage2->setEnabled(enabled); + if ( mParameters2 ) mParameters2->setEnabled(enabled); @@ -795,10 +812,14 @@ void KDEPIMConfigWidget::updateClientWidgets() else { + if ( mMessage2 ) mMessage2->setText( "" ); + if ( mParameters2 ) mParameters2->setText( "" ); } if (enabled == true) { + if ( mMessage2 ) mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); + if ( mParameters2 ) mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); } diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp index c7c6088..96dc256 100644 --- a/microkde/kcolorbutton.cpp +++ b/microkde/kcolorbutton.cpp @@ -33,5 +33,5 @@ KColorButton::KColorButton( QWidget *p ):QPushButton( p ) { int size = 24; - if( QApplication::desktop()->width() < 480 ) + if( QApplication::desktop()->width() < 480 || QApplication::desktop()->height() <= 320 ) size = 18; setFixedSize( size,size ); |