summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-01-05 18:00:42 (UTC)
committer zautrix <zautrix>2005-01-05 18:00:42 (UTC)
commit9bbe06c6cbf70ab8741acc6b356890c072b103e8 (patch) (side-by-side diff)
tree89ce922f849540b959c6f778c9371f9ff01decf6 /korganizer/mainwindow.cpp
parent71017beb975666a0f654898ed6a40a5303d567dc (diff)
downloadkdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.zip
kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.tar.gz
kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.tar.bz2
some fixes
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp47
1 files changed, 12 insertions, 35 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index a652c05..6bc5b3a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -549,26 +549,24 @@ void MainWindow::initActions()
QAction *action;
QIconSet icon;
// QPopupMenu *configureMenu= new QPopupMenu( menuBar );
configureToolBarMenu->setCheckable( true );
QString pathString = "";
if ( !p->mToolBarMiniIcons ) {
if ( QApplication::desktop()->width() < 480 )
pathString += "icons16/";
} 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 );
configureAgendaMenu->insertItem(i18n("Normal"), 10 );
configureAgendaMenu->insertItem(i18n("Large"), 12 );
configureAgendaMenu->insertItem(i18n("Big"), 14 );
configureAgendaMenu->insertItem(i18n("Bigger"), 16 );
configureAgendaMenu->insertItem(i18n("Biggest"), 18 );
//configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
icon = loadPixmap( pathString + "configure" );
action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
@@ -598,25 +596,28 @@ void MainWindow::initActions()
connect( nt_action, SIGNAL( activated() ),
mView, SLOT( newTodo() ) );
icon = loadPixmap( pathString + "navi" );
action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleDateNavigatorWidget() ) );
icon = loadPixmap( pathString + "filter" );
action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
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" );
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 );
viewMenu->insertSeparator();
icon = loadPixmap( pathString + "list" );
configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
@@ -1129,65 +1130,52 @@ void MainWindow::displayText( QString text ,QString cap )
lay->setSpacing( 3 );
lay->setMargin( 3 );
QTextBrowser tb ( &dia );
lay->addWidget( &tb );
tb.setText( text );
#ifdef DESKTOP_VERSION
dia.resize( 640, 480);
#else
dia.showMaximized();
#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()
{
KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
}
void MainWindow::multisynchowto()
{
KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
}
void MainWindow::synchowto()
{
KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
}
void MainWindow::faq()
{
- displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") );
+ KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
}
void MainWindow::whatsNew()
{
KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
}
void MainWindow::licence()
{
KApplication::showLicence();
}
@@ -1199,25 +1187,25 @@ void MainWindow::about()
i18n("KOrganizer/Platform-independent\n") +
"(KO/Pi) " + version + " - " +
#ifdef DESKTOP_VERSION
i18n("Desktop Edition\n") +
#else
i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") +
#endif
i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") );
}
void MainWindow::keyBindings()
{
- QString cap = i18n("Key bindings KOrganizer/Pi");
+ QString cap = i18n("KO/Pi Keys + Colors");
QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+
i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+
i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
@@ -1251,38 +1239,31 @@ void MainWindow::keyBindings()
i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
i18n("<p><b>A</b>: Show agenda view.</p>\n")+
i18n("<p><b>E</b>: Edit item</p>\n") +
i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
i18n("<p><b>White</b>: Item readonly</p>\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()
{
QMessageBox* msg;
msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+
i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") +
i18n("\nor report them in the bugtracker on\n") +
i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
QMessageBox::NoIcon,
@@ -1717,28 +1698,24 @@ void MainWindow::setCaptionToDates()
if (mView->startDate() < mView->endDate() )
selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
setCaption( i18n("Dates: ") + selDates );
}
// parameter item == 0: reinit
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 )
// item = 6;
// }
for ( i = 4; i <= 18; i= i+2 )
configureAgendaMenu->setItemChecked( i, false );
configureAgendaMenu->setItemChecked( item, true );
if ( p->mHourSize == item )
return;
p->mHourSize=item;
mView->viewManager()->agendaView()->updateConfig();