summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kofilterview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ce2880a..9709324 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -142,14 +142,14 @@ void KOCalEditView::selectStdCal( int id, bool b )
it->setChecked( true );
it->blockSignals( false );
return;
}
return;
}
- KOCalCheckButton* sen = (KOCalCheckButton*) sender();
- KOCalCheckButton* it = mStdandardB.first();
+ KOCalRadioButton* sen = (KOCalRadioButton*) sender();
+ KOCalRadioButton* it = mStdandardB.first();
while ( it ) {
if ( it->isChecked() ) {
if ( it != sen ) {
it->blockSignals( true );
it->setChecked( false );
it->blockSignals( false );
@@ -233,13 +233,15 @@ void KOCalEditView::readConfig()
mainLayout = new QGridLayout ( mw , 2, 8 );
mainLayout->setMargin( 2 );
mainLayout->setSpacing( 2 );
QPushButton * addBut = new QPushButton ( mw );
addBut->setFocusPolicy(NoFocus);
mainLayout->addWidget( addBut,0,0 );
- addBut->setPixmap ( SmallIcon("greenhook16"));
+ addBut->setText( "D");
+ connect(addBut,SIGNAL(clicked()),SLOT(defaultInfo()));
+ //addBut->setPixmap ( SmallIcon("greenhook16"));
addBut->setMaximumWidth( addBut->sizeHint().height() );
int max = addBut->sizeHint().height();
addBut = new QPushButton ( mw );
addBut->setFocusPolicy(NoFocus);
mainLayout->addWidget( addBut,0,++ii );
addBut->setPixmap ( SmallIcon("eye"));
@@ -287,20 +289,20 @@ void KOCalEditView::readConfig()
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
int row = 1;
while ( kkf ) {
int iii = 0;
- KOCalCheckButton* cb = new KOCalCheckButton( mw );
- mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb );
- cb->setChecked( kkf->isStandard );
- cb->setNum( kkf->mCalNumber );
- connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) );
+ KOCalRadioButton* rb = new KOCalRadioButton( mw );
+ mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb );
+ rb->setChecked( kkf->isStandard );
+ rb->setNum( kkf->mCalNumber );
+ connect (rb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) );
if ( kkf->mErrorOnLoad || kkf->isReadOnly )
- cb->setEnabled( false );
- cb = new KOCalCheckButton( mw );
+ rb->setEnabled( false );
+ KOCalCheckButton* cb = new KOCalCheckButton( mw );
mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb );
cb->setChecked( kkf->isEnabled );
cb->setNum( kkf->mCalNumber );
if ( kkf->mErrorOnLoad )
cb->setEnabled( false );
connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) );
@@ -344,12 +346,18 @@ void KOCalEditView::readConfig()
}
lab = new QLabel ( "", mw );
mainLayout->addWidget( lab,row,0 );
mw->show();
}
+
+
+void KOCalEditView::defaultInfo()
+{
+ KMessageBox::information( this, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
+}
void KOCalEditView::addCal()
{
bool tryagain = true;
QString name, file;
while ( tryagain ) {
KONewCalPrefs prefs ( this );