From 9bbe06c6cbf70ab8741acc6b356890c072b103e8 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 05 Jan 2005 18:00:42 +0000 Subject: some fixes --- (limited to 'korganizer/mainwindow.cpp') diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a652c05..6bc5b3a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -558,8 +558,6 @@ void MainWindow::initActions() } else pathString += "iconsmini/"; configureAgendaMenu->setCheckable( true ); - configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 ); - configureAgendaMenu->insertSeparator(); configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); configureAgendaMenu->insertItem(i18n("Small"), 6 ); configureAgendaMenu->insertItem(i18n("Medium"), 8 ); @@ -607,7 +605,10 @@ void MainWindow::initActions() action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleFilter() ) ); - + action = new QAction( i18n("Toggle Allday"), i18n("Toggle Allday"), 0, this ); + action->addTo( viewMenu ); + connect( action, SIGNAL( activated() ), + mView, SLOT( toggleAllDaySize() ) ); viewMenu->insertSeparator(); icon = loadPixmap( pathString + "picker" ); @@ -1138,30 +1139,17 @@ void MainWindow::displayText( QString text ,QString cap ) #endif dia.exec(); } -void MainWindow::displayFile( QString fn, QString cap ) -{ - QString fileName = resourcePath() + fn; - QString text; - QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { - return ; - } - QTextStream ts( &file ); - text = ts.read(); - file.close(); - displayText( text, cap); -} void MainWindow::features() { - displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); + KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); } void MainWindow::usertrans() { - displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); + KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); } void MainWindow::kdesynchowto() @@ -1178,7 +1166,7 @@ void MainWindow::synchowto() } void MainWindow::faq() { - displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") ); + KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); } void MainWindow::whatsNew() @@ -1208,7 +1196,7 @@ void MainWindow::about() } void MainWindow::keyBindings() { - QString cap = i18n("Key bindings KOrganizer/Pi"); + QString cap = i18n("KO/Pi Keys + Colors"); QString text = i18n("

KO/Pi key shortcuts:

\n") + i18n("

H: This help dialog | S: Search dialog

\n")+ i18n("

I: Show info for selected event/todo

\n") + @@ -1260,20 +1248,13 @@ void MainWindow::keyBindings() i18n("

Black: Event/todo with attendees. You are the organizer!

\n")+ i18n("

Dark yellow: Event/todo with attendees.

\n") + i18n("

White: Item readonly

\n"); - displayText( text, cap); - + displayText( text, cap); } void MainWindow::aboutAutoSaving() { - QMessageBox* msg; - msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), - i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, - QMessageBox::Ok, - QMessageBox::NoButton, - QMessageBox::NoButton); - msg->exec(); - delete msg; - + QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); + + KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); } void MainWindow::aboutKnownBugs() @@ -1726,10 +1707,6 @@ void MainWindow::configureAgenda( int item ) KOPrefs *p = KOPrefs::instance(); int i; - if ( item == 1 ) { - mView->toggleAllDaySize(); - return; - } // do not allow 4 for widgets higher than 480 // if ( QApplication::desktop()->height() > 480 ) { // if ( item == 4 ) -- cgit v0.9.0.2