author | zautrix <zautrix> | 2005-06-17 10:27:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-17 10:27:21 (UTC) |
commit | ec691904e9c129fda7514179910c5be9bf0d908b (patch) (unidiff) | |
tree | 75984d135b97049af03ba22eab7f7db53a8a7922 | |
parent | 56f20e7a0a6b8ecf84d11ced19f870241a13c17d (diff) | |
download | kdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.zip kdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.tar.gz kdepimpi-ec691904e9c129fda7514179910c5be9bf0d908b.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/calendarview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 18 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 19 | ||||
-rw-r--r-- | microkde/kglobal.cpp | 7 |
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 | |||
@@ -4026,7 +4026,11 @@ void CalendarView::editFilters() | |||
4026 | } | 4026 | } |
4027 | void CalendarView::toggleFilter() | 4027 | void CalendarView::toggleFilter() |
4028 | { | 4028 | { |
4029 | showFilter(! mCalEditView->isVisible()); | 4029 | if ( mLeftFrame->isHidden() ) { |
4030 | toggleExpand(); | ||
4031 | showFilter( true ); | ||
4032 | } else | ||
4033 | showFilter(! mCalEditView->isVisible()); | ||
4030 | } | 4034 | } |
4031 | 4035 | ||
4032 | KOFilterView *CalendarView::filterView() | 4036 | KOFilterView *CalendarView::filterView() |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index e4dc751..bb88386 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -195,7 +195,7 @@ void 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 ); |
@@ -207,7 +207,7 @@ void KOCalEditView::deleteCal( int id ) | |||
207 | void KOCalEditView::infoCal( int id ) | 207 | void 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 ); |
@@ -360,7 +360,7 @@ void KOCalEditView::addCal() | |||
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; |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 13e88ef..926a136 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -96,6 +96,7 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name | |||
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() ) ); |
@@ -1202,26 +1203,9 @@ void KOTodoView::toggleRunningItem() | |||
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); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 13e186d..f945383 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -778,13 +778,7 @@ void MainWindow::initActions() | |||
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" ); |
@@ -793,6 +787,13 @@ void MainWindow::initActions() | |||
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 ); |
@@ -804,8 +805,8 @@ void MainWindow::initActions() | |||
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 ) ), |
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp index bf7e238..53edd08 100644 --- a/microkde/kglobal.cpp +++ b/microkde/kglobal.cpp | |||
@@ -99,6 +99,13 @@ QString KGlobal::getAppName() | |||
99 | QString KGlobal::formatMessage ( QString mess, int maxlen ) | 99 | QString 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 = ""; |