summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-17 10:27:21 (UTC)
committer zautrix <zautrix>2005-06-17 10:27:21 (UTC)
commitec691904e9c129fda7514179910c5be9bf0d908b (patch) (unidiff)
tree75984d135b97049af03ba22eab7f7db53a8a7922
parent56f20e7a0a6b8ecf84d11ced19f870241a13c17d (diff)
downloadkdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.zip
kdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.tar.gz
kdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.tar.bz2
fixxx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-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, 25 insertions, 29 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index eac2f29..d25f632 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -4025,8 +4025,12 @@ void CalendarView::editFilters()
4025 updateFilter(); 4025 updateFilter();
4026} 4026}
4027void CalendarView::toggleFilter() 4027void CalendarView::toggleFilter()
4028{ 4028{
4029 if ( mLeftFrame->isHidden() ) {
4030 toggleExpand();
4031 showFilter( true );
4032 } else
4029 showFilter(! mCalEditView->isVisible()); 4033 showFilter(! mCalEditView->isVisible());
4030} 4034}
4031 4035
4032KOFilterView *CalendarView::filterView() 4036KOFilterView *CalendarView::filterView()
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index e4dc751..bb88386 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -194,9 +194,9 @@ void KOCalEditView::setColor( const QColor& c, int id )
194void KOCalEditView::deleteCal( int id ) 194void KOCalEditView::deleteCal( int id )
195{ 195{
196 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); 196 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
197 QString name = kkf->mName; 197 QString name = kkf->mName;
198 QString file = kkf->mFileName; 198 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 );
199 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; 199 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;
200 if ( kkf->isStandard ) 200 if ( kkf->isStandard )
201 selectStdCal( 1, true ); 201 selectStdCal( 1, true );
202 emit removeCalendar ( id ); 202 emit removeCalendar ( id );
@@ -206,9 +206,9 @@ void KOCalEditView::deleteCal( int id )
206} 206}
207void KOCalEditView::infoCal( int id ) 207void KOCalEditView::infoCal( int id )
208{ 208{
209 QString name = KOPrefs::instance()->getCalendar( id )->mName; 209 QString name = KOPrefs::instance()->getCalendar( id )->mName;
210 QString file = KOPrefs::instance()->getCalendar( id )->mFileName; 210 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 );
211 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { 211 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) {
212 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) ) ) { 212 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) ) ) {
213 emit calendarAdded( id ); 213 emit calendarAdded( id );
214 emit needsUpdate(); 214 emit needsUpdate();
@@ -359,9 +359,9 @@ void KOCalEditView::addCal()
359 tryagain = true; 359 tryagain = true;
360 break; 360 break;
361 } 361 }
362 if ( kkf->mFileName == file ) { 362 if ( kkf->mFileName == file ) {
363 KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( file) ); 363 KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) );
364 tryagain = true; 364 tryagain = true;
365 file = ""; 365 file = "";
366 break; 366 break;
367 } 367 }
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 13e88ef..926a136 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -95,8 +95,9 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
95 ede->setDate( QDate::currentDate()); 95 ede->setDate( QDate::currentDate());
96 ete->setTime( QTime::currentTime() ); 96 ete->setTime( QTime::currentTime() );
97 QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); 97 QPushButton * ok = new QPushButton( i18n("Stop and save"), this );
98 lay->addWidget( ok ); 98 lay->addWidget( ok );
99 ok->setDefault( true );
99 QPushButton * cancel = new QPushButton( i18n("Continue running"), this ); 100 QPushButton * cancel = new QPushButton( i18n("Continue running"), this );
100 lay->addWidget( cancel ); 101 lay->addWidget( cancel );
101 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 102 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
102 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 103 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
@@ -1201,28 +1202,11 @@ void KOTodoView::toggleRunningItem()
1201 if ( ! mActiveItem ) 1202 if ( ! mActiveItem )
1202 return; 1203 return;
1203 Todo * t = mActiveItem->todo(); 1204 Todo * t = mActiveItem->todo();
1204 if ( t->isRunning() ) { 1205 if ( t->isRunning() ) {
1205
1206
1207 KOStopTodoPrefs tp ( t, this ); 1206 KOStopTodoPrefs tp ( t, this );
1208 tp.exec(); 1207 tp.exec();
1209
1210
1211#if 0
1212 int result = KMessageBox::warningYesNoCancel(this,
1213 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"));
1214 if (result == KMessageBox::Cancel) return;
1215 if ( result == KMessageBox::No ) {
1216 QString comment = QInputDialog::getText(mActiveItem->text(0).left( 25 ),i18n("Comment for todo:") );
1217 t->setRunningFalse( comment );
1218 } else {
1219 t->setRunning( false );
1220 }
1221 mActiveItem->construct(); 1208 mActiveItem->construct();
1222
1223
1224#endif
1225 } else { 1209 } else {
1226 int result = KMessageBox::warningContinueCancel(this, 1210 int result = KMessageBox::warningContinueCancel(this,
1227 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); 1211 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);
1228 if (result != KMessageBox::Continue) return; 1212 if (result != KMessageBox::Continue) return;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 13e186d..f945383 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -777,23 +777,24 @@ void MainWindow::initActions()
777 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 777 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
778 FSaction->addTo( viewMenu ); 778 FSaction->addTo( viewMenu );
779 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 779 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
780 780
781 icon = loadPixmap( pathString + "navi" ); 781
782 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
783 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
784 action->addTo( viewMenu );
785 connect( action, SIGNAL( activated() ),
786 mView, SLOT( toggleDateNavigatorWidget() ) );
787 mToggleNav = action ;
788 icon = loadPixmap( pathString + "filter" ); 782 icon = loadPixmap( pathString + "filter" );
789 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 783 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
790 icon = loadPixmap( pathString + "configure" ); 784 icon = loadPixmap( pathString + "configure" );
791 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 785 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
792 action->addTo( viewMenu ); 786 action->addTo( viewMenu );
793 connect( action, SIGNAL( activated() ), 787 connect( action, SIGNAL( activated() ),
794 mView, SLOT( toggleFilter() ) ); 788 mView, SLOT( toggleFilter() ) );
795 mToggleFilter = action; 789 mToggleFilter = action;
790 icon = loadPixmap( pathString + "navi" );
791 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
792 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
793 action->addTo( viewMenu );
794 connect( action, SIGNAL( activated() ),
795 mView, SLOT( toggleDateNavigatorWidget() ) );
796 mToggleNav = action ;
796 icon = loadPixmap( pathString + "allday" ); 797 icon = loadPixmap( pathString + "allday" );
797 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 798 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
798 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 799 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
799 action->addTo( viewMenu ); 800 action->addTo( viewMenu );
@@ -803,10 +804,10 @@ void MainWindow::initActions()
803 804
804 805
805 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 806 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
806 mToggleNav, SLOT( setEnabled ( bool ) ) ); 807 mToggleNav, SLOT( setEnabled ( bool ) ) );
807 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 808 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
808 mToggleFilter, SLOT( setEnabled ( bool ) ) ); 809 // mToggleFilter, SLOT( setEnabled ( bool ) ) );
809 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 810 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
810 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 811 mToggleAllday, SLOT( setEnabled ( bool ) ) );
811 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 812 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
812 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 813 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp
index bf7e238..53edd08 100644
--- a/microkde/kglobal.cpp
+++ b/microkde/kglobal.cpp
@@ -98,8 +98,15 @@ QString KGlobal::getAppName()
98} 98}
99QString KGlobal::formatMessage ( QString mess, int maxlen ) 99QString KGlobal::formatMessage ( QString mess, int maxlen )
100{ 100{
101 //int maxlen = 80; 101 //int maxlen = 80;
102 if ( maxlen == 0 ) {
103 maxlen = QApplication::desktop()->width()/10;
104 if ( maxlen > 32 )
105 maxlen = (maxlen * 3) / 4;
106 if ( maxlen > 100 )
107 maxlen = 100;
108 }
102 int start = 0; 109 int start = 0;
103 int end = mess.length(); 110 int end = mess.length();
104 QString retVal = ""; 111 QString retVal = "";
105 int nl, space; 112 int nl, space;