summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/filteredit_base.cpp11
-rw-r--r--korganizer/koeditordetails.cpp3
-rw-r--r--korganizer/koeditorgeneral.cpp8
-rw-r--r--korganizer/koprefsdialog.cpp6
4 files changed, 17 insertions, 11 deletions
diff --git a/korganizer/filteredit_base.cpp b/korganizer/filteredit_base.cpp
index 15a4aaa..505edf6 100644
--- a/korganizer/filteredit_base.cpp
+++ b/korganizer/filteredit_base.cpp
@@ -1,39 +1,40 @@
/****************************************************************************
** Form implementation generated from reading ui file 'filteredit_base.ui'
**
** Created: Fr Jan 21 21:25:30 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "filteredit_base.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qframe.h>
#include <qbuttongroup.h>
+#include <qapplication.h>
#include <qradiobutton.h>
#include <qlistbox.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "tr.h"
/*
* Constructs a FilterEdit_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "FilterEdit_base" );
FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout");
mCriteriaFrame = new QFrame( this, "mCriteriaFrame" );
mCriteriaFrame->setFrameShape( QFrame::StyledPanel );
mCriteriaFrame->setFrameShadow( QFrame::Raised );
mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout");
@@ -86,60 +87,66 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
mTodoCheck = new QCheckBox( mCriteriaFrame, "mTodoCheck" );
layout9->addWidget( mTodoCheck );
mJournalCheck = new QCheckBox( mCriteriaFrame, "mJournalCheck" );
layout9->addWidget( mJournalCheck );
mCriteriaFrameLayout->addLayout( layout9 );
layout2 = new QHBoxLayout( 0, 0, 0, "layout2");
textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" );
layout2->addWidget( textLabel2 );
mPublicCheck = new QCheckBox( mCriteriaFrame, "mPublicCheck" );
layout2->addWidget( mPublicCheck );
mPrivateCheck = new QCheckBox( mCriteriaFrame, "mPrivateCheck" );
layout2->addWidget( mPrivateCheck );
mConfidentialCheck = new QCheckBox( mCriteriaFrame, "mConfidentialCheck" );
mConfidentialCheck->setChecked( FALSE );
layout2->addWidget( mConfidentialCheck );
mCriteriaFrameLayout->addLayout( layout2 );
FilterEdit_baseLayout->addWidget( mCriteriaFrame );
languageChange();
- resize( QSize(324, 281).expandedTo(minimumSizeHint()) );
+ resize( QSize(300, 200).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
}
/*
* Destroys the object and frees any allocated resources
*/
FilterEdit_base::~FilterEdit_base()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void FilterEdit_base::languageChange()
{
setCaption( tr( "FilterEditor" ) );
ButtonGroup1->setTitle( tr( "Categories" ) );
mCatShowCheck->setText( tr( "Include" ) );
mCatHideCheck->setText( tr( "Exclude" ) );
mCatEditButton->setText( tr( "Edit Selection..." ) );
textLabel1->setText( tr( "Exclude" ) );
- mRecurringCheck->setText( tr( "recurring events" ) );
+ if (QApplication::desktop()->width() > 480 ) {
mCompletedCheck->setText( tr( "completed to-dos" ) );
+ mRecurringCheck->setText( tr( "recurring events" ) );
+ }
+ else {
+ mCompletedCheck->setText( tr( "compl.todos" ) );
+ mRecurringCheck->setText( tr( "recurr. events" ) );
+ }
textLabel1_2->setText( tr( "Exclude" ) );
mEventCheck->setText( tr( "events" ) );
mTodoCheck->setText( tr( "todos" ) );
mJournalCheck->setText( tr( "journals" ) );
textLabel2->setText( tr( "Include" ) );
mPublicCheck->setText( tr( "public" ) );
mPrivateCheck->setText( tr( "private" ) );
mConfidentialCheck->setText( tr( "confidential" ) );
}
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index b73d22f..cf0a458 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -123,49 +123,50 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
mStatusCombo->insertStringList(Attendee::statusList());
connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
mRsvpButton = new QCheckBox(this);
mRsvpButton->setText(i18n("Request response"));
connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
QWidget *buttonBox = new QWidget(this);
QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox);
QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
buttonLayout->addWidget(newButton);
connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee()));
mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox);
buttonLayout->addWidget(mRemoveButton);
connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee()));
mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
// buttonLayout->addWidget(mAddressBookButton);
connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
//mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
if (qApp->desktop()->width() < 640 ) {
if ( qApp->desktop()->width() < 300 )
- mListView->setFixedHeight(80);
+ topLayout->setSpacing(1);
+ ;//mListView->setFixedHeight(80);
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
topLayout->addMultiCellWidget(mListView,1,1,0,3);
topLayout->addWidget(attendeeLabel,3,0);
topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
topLayout->addWidget(emailLabel,4,0);
topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
topLayout->addWidget(attendeeRoleLabel,5,0);
topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
topLayout->addWidget(statusLabel,6,0);
topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
topLayout->setRowStretch(1,2);
topLayout->setColStretch(0,0);
topLayout->setColStretch(1,2);
topLayout->setColStretch(2,1);
topLayout->setColStretch(3,1);
} else {
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
topLayout->addMultiCellWidget(mListView,1,1,0,5);
topLayout->addWidget(attendeeLabel,3,0);
topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index b4fe965..f5eb52e 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -228,79 +228,79 @@ void KOEditorGeneral::pickAlarmSound()
if (!mAlarmSoundButton->isOn()) {
//mAlarmSound = "";
QToolTip::remove(mAlarmSoundButton);
QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
mAlarmProgramButton->setOn(true);
mAlarmSoundButton->setOn(false);
} else {
QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
i18n("*.wav|Wav Files"), 0));
if (!fileName.isEmpty()) {
mAlarmSound = fileName;
QToolTip::remove(mAlarmSoundButton);
QString dispStr = i18n("Playing '%1'").arg(fileName);
QToolTip::add(mAlarmSoundButton, dispStr);
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
} else {
mAlarmProgramButton->setOn(true);
mAlarmSoundButton->setOn(false);
}
}
if (mAlarmProgramButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + mAlarmSound );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) );
}
void KOEditorGeneral::pickAlarmProgram()
{
if (!mAlarmProgramButton->isOn()) {
//mAlarmProgram = "";
QToolTip::remove(mAlarmProgramButton);
QToolTip::add(mAlarmProgramButton, i18n("No program set"));
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
} else {
QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0));
if (!fileName.isEmpty()) {
mAlarmProgram = fileName;
QToolTip::remove(mAlarmProgramButton);
QString dispStr = i18n("Running '%1'").arg(fileName);
QToolTip::add(mAlarmProgramButton, dispStr);
mAlarmSoundButton->setOn(false);
mAlarmProgramButton->setOn(true);
} else {
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
}
}
if (mAlarmProgramButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + mAlarmSound );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) );
}
QString KOEditorGeneral::getFittingPath( const QString s )
{
int maxlen = 50;
if ( QApplication::desktop()->width() < 640 ) {
if ( QApplication::desktop()->width() < 320 )
maxlen = 22;
else
maxlen = 35;
}
if ( s.length() > maxlen ) {
return "..."+s.right(maxlen -3);
}
return s;
}
void KOEditorGeneral::enableAlarmEdit(bool enable)
{
if ( enable ) {
if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) {
mAlarmSoundButton->setOn( true );
if ( mAlarmSound.isEmpty() )
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index ea73fd0..1b24f56 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -695,71 +695,69 @@ void KOPrefsDialog::setupViewsTab()
topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Listview uses monthly timespan"),
&(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Highlight selection in Time Edit"),
&(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
topLayout->addWidget( dummy->checkBox(), ii++,0);
topFrame = addPage(i18n("Month View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
topLayout = new QGridLayout(topFrame,5,1);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
ii = 0;
QLabel *lab;
QHBox *habo = new QHBox( topFrame );
- if ( QApplication::desktop()->width() < 320 ) {
+ if ( QApplication::desktop()->width() <= 480 ) {
lab = new QLabel ( i18n("Show events that recur "), topFrame );
topLayout->addMultiCellWidget(lab,ii, ii,0,1);
ii++;
-
} else {
new QLabel ( i18n("Show events that recur "), habo );
-
}
dailyRecur =
addWidBool(i18n("daily"),
&(KOPrefs::instance()->mMonthDailyRecur),habo);
// topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
weeklyRecur =
addWidBool(i18n("weekly"),
&(KOPrefs::instance()->mMonthWeeklyRecur),habo);
topLayout->addMultiCellWidget(habo,ii, ii,0,1);
ii++;
habo = new QHBox( topFrame );
- if ( QApplication::desktop()->width() < 320 ) {
+ if ( QApplication::desktop()->width() <= 480 ) {
lab = new QLabel (i18n("Show in every cell ") , topFrame );
topLayout->addMultiCellWidget(lab,ii, ii,0,1);
ii++;
} else {
new QLabel ( i18n("Show in every cell "), habo );
}
weeklyRecur =
addWidBool(i18n("short month"),
&(KOPrefs::instance()->mMonthShowShort),habo);
weeklyRecur =
addWidBool(i18n("icons"),
&(KOPrefs::instance()->mMonthShowIcons),habo);
topLayout->addMultiCellWidget(habo,ii, ii,0,1);
ii++;
#ifdef DESKTOP_VERSION
KPrefsDialogWidBool *enableMonthScroll =
addWidBool(i18n("Enable scrollbars in month view cells"),
&(KOPrefs::instance()->mEnableMonthScroll),topFrame);
topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
#endif
dummy =