summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-17 10:27:21 (UTC)
committer zautrix <zautrix>2005-06-17 10:27:21 (UTC)
commitec691904e9c129fda7514179910c5be9bf0d908b (patch) (side-by-side diff)
tree75984d135b97049af03ba22eab7f7db53a8a7922
parent56f20e7a0a6b8ecf84d11ced19f870241a13c17d (diff)
downloadkdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.zip
kdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.tar.gz
kdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp6
-rw-r--r--korganizer/kofilterview.cpp6
-rw-r--r--korganizer/kotodoview.cpp18
-rw-r--r--korganizer/mainwindow.cpp19
-rw-r--r--microkde/kglobal.cpp7
5 files changed, 26 insertions, 30 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index eac2f29..d25f632 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -4017,25 +4017,29 @@ void CalendarView::editFilters()
CalFilter *filter = mFilters.first();
while(filter) {
kdDebug() << " Filter: " << filter->name() << endl;
filter = mFilters.next();
}
mDialogManager->showFilterEditDialog(&mFilters);
updateFilter();
}
void CalendarView::toggleFilter()
{
- showFilter(! mCalEditView->isVisible());
+ if ( mLeftFrame->isHidden() ) {
+ toggleExpand();
+ showFilter( true );
+ } else
+ showFilter(! mCalEditView->isVisible());
}
KOFilterView *CalendarView::filterView()
{
return mFilterView;
}
void CalendarView::selectFilter( int fil )
{
mFilterView->setSelectedFilter( fil );
}
void CalendarView::showFilter(bool visible)
{
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index e4dc751..bb88386 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -186,37 +186,37 @@ void KOCalEditView::selectReadOnly(int id ,bool b )
QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
}
void KOCalEditView::setColor( const QColor& c, int id )
{
KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
emit needsUpdate();
}
void KOCalEditView::deleteCal( int id )
{
KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
QString name = kkf->mName;
- QString file = kkf->mFileName;
+ QString file = KGlobal::formatMessage ( kkf->mFileName ,0 );
if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
if ( kkf->isStandard )
selectStdCal( 1, true );
emit removeCalendar ( id );
KOPrefs::instance()->mCalendars.remove ( kkf );
emit needsUpdate();
QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
}
void KOCalEditView::infoCal( int id )
{
QString name = KOPrefs::instance()->getCalendar( id )->mName;
- QString file = KOPrefs::instance()->getCalendar( id )->mFileName;
+ QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 );
if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) {
if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) {
emit calendarAdded( id );
emit needsUpdate();
QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
}
}
else
KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
}
void KOCalEditView::readConfig()
{
@@ -351,25 +351,25 @@ void KOCalEditView::addCal()
name = prefs.calName();
file = prefs.calFileName();
tryagain = false;
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
while ( kkf ) {
if ( kkf->mName == name ) {
KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) );
name = "";
tryagain = true;
break;
}
if ( kkf->mFileName == file ) {
- KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( file) );
+ KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) );
tryagain = true;
file = "";
break;
}
kkf = KOPrefs::instance()->mCalendars.next();
}
}
QFileInfo fi ( file );
if (!fi.exists() ) {
if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No )
return;
QFile fileIn( file );
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 13e88ef..926a136 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -87,24 +87,25 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
sde = new KDateEdit( start );
ste = new KOTimeEdit( start );
connect ( sde,SIGNAL(setTimeTo( QTime ) ),ste , SLOT ( setTime(QTime ) ) );
ede = new KDateEdit( end );
ete = new KOTimeEdit(end );
connect ( ede,SIGNAL(setTimeTo( QTime ) ),ete , SLOT ( setTime(QTime ) ) );
sde->setDate( mTodo->runStart().date() );
ste->setTime( mTodo->runStart().time() );
ede->setDate( QDate::currentDate());
ete->setTime( QTime::currentTime() );
QPushButton * ok = new QPushButton( i18n("Stop and save"), this );
lay->addWidget( ok );
+ ok->setDefault( true );
QPushButton * cancel = new QPushButton( i18n("Continue running"), this );
lay->addWidget( cancel );
connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
ok = new QPushButton( i18n("Stop - do not save"), this );
connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) );
lay->addWidget( ok );
if (QApplication::desktop()->width() < 320 )
resize( 240, 200 );
else
resize( 320, 200 );
@@ -1193,44 +1194,27 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
if ( KOPrefs::instance()->mEditOnDoubleClick )
editItem( item );
else
showItem( item , QPoint(), 0 );
}
void KOTodoView::toggleRunningItem()
{
// qDebug("KOTodoView::toggleRunning() ");
if ( ! mActiveItem )
return;
Todo * t = mActiveItem->todo();
if ( t->isRunning() ) {
-
-
KOStopTodoPrefs tp ( t, this );
tp.exec();
-
-
-#if 0
- int result = KMessageBox::warningYesNoCancel(this,
- i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop"),i18n("Stop+note"));
- if (result == KMessageBox::Cancel) return;
- if ( result == KMessageBox::No ) {
- QString comment = QInputDialog::getText(mActiveItem->text(0).left( 25 ),i18n("Comment for todo:") );
- t->setRunningFalse( comment );
- } else {
- t->setRunning( false );
- }
mActiveItem->construct();
-
-
-#endif
} else {
int result = KMessageBox::warningContinueCancel(this,
i18n("<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>").arg(mActiveItem->text(0).left( 25 ) ),i18n("Start todo"),i18n("Start todo"),i18n("Cancel"), true);
if (result != KMessageBox::Continue) return;
t->setRunning( true );
mActiveItem->construct();
}
}
void KOTodoView::itemClicked(QListViewItem *item)
{
//qDebug("KOTodoView::itemClicked %d", item);
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 13e186d..f945383 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -769,52 +769,53 @@ void MainWindow::initActions()
// ***********************
if ( KOPrefs::instance()->mVerticalScreen ) {
icon = SmallIcon( "1updownarrow" );
} else {
icon = SmallIcon("1leftrightarrow" );
}
configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
FSaction->addTo( viewMenu );
connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
- icon = loadPixmap( pathString + "navi" );
- configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
- action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
- action->addTo( viewMenu );
- connect( action, SIGNAL( activated() ),
- mView, SLOT( toggleDateNavigatorWidget() ) );
- mToggleNav = action ;
+
icon = loadPixmap( pathString + "filter" );
configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
icon = loadPixmap( pathString + "configure" );
action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleFilter() ) );
mToggleFilter = action;
+ icon = loadPixmap( pathString + "navi" );
+ configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
+ action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
+ action->addTo( viewMenu );
+ connect( action, SIGNAL( activated() ),
+ mView, SLOT( toggleDateNavigatorWidget() ) );
+ mToggleNav = action ;
icon = loadPixmap( pathString + "allday" );
configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleAllDaySize() ) );
mToggleAllday = action;
connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
mToggleNav, SLOT( setEnabled ( bool ) ) );
- connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
- mToggleFilter, SLOT( setEnabled ( bool ) ) );
+ //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
+ // mToggleFilter, SLOT( setEnabled ( bool ) ) );
connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
mToggleAllday, SLOT( setEnabled ( bool ) ) );
// connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
// configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
viewMenu->insertSeparator();
icon = loadPixmap( pathString + "picker" );
action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( showDatePicker() ) );
action->addTo( iconToolBar );
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp
index bf7e238..53edd08 100644
--- a/microkde/kglobal.cpp
+++ b/microkde/kglobal.cpp
@@ -90,24 +90,31 @@ void KGlobal::setAppName( const QString &appName )
mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
}
//US
QString KGlobal::getAppName()
{
return mAppName;
}
QString KGlobal::formatMessage ( QString mess, int maxlen )
{
//int maxlen = 80;
+ if ( maxlen == 0 ) {
+ maxlen = QApplication::desktop()->width()/10;
+ if ( maxlen > 32 )
+ maxlen = (maxlen * 3) / 4;
+ if ( maxlen > 100 )
+ maxlen = 100;
+ }
int start = 0;
int end = mess.length();
QString retVal = "";
int nl, space;
while ( (end - start) > maxlen ) {
nl = mess.find( "\n", start );
if ( nl > 0 && nl < start + maxlen ) {
nl += 1;
retVal += mess.mid( start, nl - start);
start = nl;
} else {
space = mess.findRev( " ", start + maxlen );