summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventpopupmenu.cpp2
-rw-r--r--korganizer/kolistview.cpp2
-rw-r--r--korganizer/mainwindow.cpp17
3 files changed, 9 insertions, 12 deletions
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index 41d331a..0b0fe8e 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -1,91 +1,91 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qcursor.h> 24#include <qcursor.h>
25 25
26#include <klocale.h> 26#include <klocale.h>
27#include <kdebug.h> 27#include <kdebug.h>
28#include <kiconloader.h> 28#include <kiconloader.h>
29 29
30#include <libkcal/event.h> 30#include <libkcal/event.h>
31 31
32#include "koeventpopupmenu.h" 32#include "koeventpopupmenu.h"
33#include "koprefs.h" 33#include "koprefs.h"
34 34
35KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() 35KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
36{ 36{
37 mCurrentIncidence = 0; 37 mCurrentIncidence = 0;
38 mHasAdditionalItems = false; 38 mHasAdditionalItems = false;
39 39
40 40
41 mSingleOnlyItems.append( insertItem (i18n("&Show"),this,SLOT(popupShow()))); 41 mSingleOnlyItems.append( insertItem (i18n("&Show"),this,SLOT(popupShow())));
42 mEditOnlyItems.append(insertItem (i18n("&Edit..."),this,SLOT(popupEdit()))); 42 mEditOnlyItems.append(insertItem (i18n("&Edit..."),this,SLOT(popupEdit())));
43 mEditOnlyItems.append(insertItem (i18n("&Delete"), 43 mEditOnlyItems.append(insertItem (i18n("&Delete..."),
44 this,SLOT(popupDelete()))); 44 this,SLOT(popupDelete())));
45 mEditOnlyItems.append(insertItem (i18n("&Clone..."), 45 mEditOnlyItems.append(insertItem (i18n("&Clone..."),
46 this,SLOT(popupClone()))); 46 this,SLOT(popupClone())));
47 mEditOnlyItems.append(insertItem (i18n("&Move..."), 47 mEditOnlyItems.append(insertItem (i18n("&Move..."),
48 this,SLOT(popupMove()))); 48 this,SLOT(popupMove())));
49#ifndef DESKTOP_VERSION 49#ifndef DESKTOP_VERSION
50 mEditOnlyItems.append(insertItem (i18n("&Beam..."), 50 mEditOnlyItems.append(insertItem (i18n("&Beam..."),
51 this,SLOT(popupBeam()))); 51 this,SLOT(popupBeam())));
52#endif 52#endif
53 mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), 53 mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"),
54 this,SLOT(popupCancel()))); 54 this,SLOT(popupCancel())));
55 isDisabled = false; 55 isDisabled = false;
56 mCatPopup = new QPopupMenu ( this ); 56 mCatPopup = new QPopupMenu ( this );
57 mCatPopup->setCheckable (true); 57 mCatPopup->setCheckable (true);
58 connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); 58 connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup()));
59 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); 59 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int )));
60 mCalPopup = new QPopupMenu ( this ); 60 mCalPopup = new QPopupMenu ( this );
61 mCalPopup->setCheckable (true); 61 mCalPopup->setCheckable (true);
62 connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); 62 connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup()));
63 connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); 63 connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int )));
64 mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup )); 64 mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup ));
65 mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); 65 mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup ));
66 QValueList<int>::Iterator it; 66 QValueList<int>::Iterator it;
67 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { 67 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
68 mSingleOnlyItems.append(*it); 68 mSingleOnlyItems.append(*it);
69 } 69 }
70 70
71} 71}
72void KOEventPopupMenu::enableDefault( bool enable ) 72void KOEventPopupMenu::enableDefault( bool enable )
73{ 73{
74 isDisabled = !enable; 74 isDisabled = !enable;
75 QValueList<int>::Iterator it; 75 QValueList<int>::Iterator it;
76 for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { 76 for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) {
77 setItemEnabled(*it,enable); 77 setItemEnabled(*it,enable);
78 } 78 }
79 79
80} 80}
81 81
82void KOEventPopupMenu::fillCalPopup() // CAL 82void KOEventPopupMenu::fillCalPopup() // CAL
83{ 83{
84 mCalPopup->clear(); 84 mCalPopup->clear();
85 if (!mCurrentIncidence) return; 85 if (!mCurrentIncidence) return;
86 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 86 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
87 while ( kkf ) { 87 while ( kkf ) {
88 int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); 88 int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber);
89 if ( kkf->mErrorOnLoad || kkf->isReadOnly ) 89 if ( kkf->mErrorOnLoad || kkf->isReadOnly )
90 mCalPopup->setItemEnabled( index, false ); 90 mCalPopup->setItemEnabled( index, false );
91 mCalPopup->setItemChecked (index, kkf->mCalNumber == mCurrentIncidence->calID()); 91 mCalPopup->setItemChecked (index, kkf->mCalNumber == mCurrentIncidence->calID());
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index cdcbbf0..ea037a9 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -302,97 +302,97 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
302 mPopupMenu->insertItem(i18n("Selection"), selPopup ); 302 mPopupMenu->insertItem(i18n("Selection"), selPopup );
303 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 303 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
304 i18n("Hide all selected"),this, 304 i18n("Hide all selected"),this,
305 SLOT(hideAll()),true); 305 SLOT(hideAll()),true);
306 306
307 selPopup->insertSeparator(); 307 selPopup->insertSeparator();
308#ifdef DESKTOP_VERSION 308#ifdef DESKTOP_VERSION
309 mPopupMenu->insertSeparator(); 309 mPopupMenu->insertSeparator();
310 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 310 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
311 i18n("Print complete list"),this, 311 i18n("Print complete list"),this,
312 SLOT(printList()),true); 312 SLOT(printList()),true);
313#endif 313#endif
314 mCalPopup = new QPopupMenu ( this ); 314 mCalPopup = new QPopupMenu ( this );
315 selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); 315 selPopup->insertItem( i18n("Set Calendar"), mCalPopup );
316 316
317 selPopup->insertItem(i18n("Set categories")+"...",this, 317 selPopup->insertItem(i18n("Set categories")+"...",this,
318 SLOT(setCat()) ); 318 SLOT(setCat()) );
319 selPopup->insertItem( i18n("Set alarm..."),this, 319 selPopup->insertItem( i18n("Set alarm..."),this,
320 SLOT(setAlarm())); 320 SLOT(setAlarm()));
321#if 0 321#if 0
322 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 322 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
323 i18n("Set categories")+"...",this, 323 i18n("Set categories")+"...",this,
324 SLOT(setCat()),true); 324 SLOT(setCat()),true);
325 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 325 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
326 i18n("Set alarm..."),this, 326 i18n("Set alarm..."),this,
327 SLOT(setAlarm()),true); 327 SLOT(setAlarm()),true);
328#endif 328#endif
329 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, 329 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this,
330 SLOT( populateCalPopup() )); 330 SLOT( populateCalPopup() ));
331 QObject::connect(mCalPopup,SIGNAL(activated( int )),this, 331 QObject::connect(mCalPopup,SIGNAL(activated( int )),this,
332 SLOT( setCalendar( int ) )); 332 SLOT( setCalendar( int ) ));
333 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, 333 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this,
334 SLOT( catChanged( Incidence * ) )); 334 SLOT( catChanged( Incidence * ) ));
335 QPopupMenu * exportPO = new QPopupMenu ( this ); 335 QPopupMenu * exportPO = new QPopupMenu ( this );
336 selPopup->insertItem( i18n("Export"), exportPO ); 336 selPopup->insertItem( i18n("Export"), exportPO );
337 exportPO->insertItem( i18n("As iCal (ics) file..."),this, 337 exportPO->insertItem( i18n("As iCal (ics) file..."),this,
338 SLOT(saveToFile())); 338 SLOT(saveToFile()));
339 exportPO->insertItem( i18n("As vCal (vcs) file..."),this, 339 exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
340 SLOT(saveToFileVCS())); 340 SLOT(saveToFileVCS()));
341 exportPO->insertItem( i18n("Journal/Details..."),this, 341 exportPO->insertItem( i18n("Journal/Details..."),this,
342 SLOT(saveDescriptionToFile())); 342 SLOT(saveDescriptionToFile()));
343 // mPopupMenu->insertSeparator(); 343 // mPopupMenu->insertSeparator();
344 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 344 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
345 // i18n("Add Categ. to selected..."),this, 345 // i18n("Add Categ. to selected..."),this,
346 // SLOT(addCat()),true); 346 // SLOT(addCat()),true);
347 //mPopupMenu->insertSeparator(); 347 //mPopupMenu->insertSeparator();
348#ifndef DESKTOP_VERSION 348#ifndef DESKTOP_VERSION
349 selPopup->insertSeparator(); 349 selPopup->insertSeparator();
350 selPopup->insertItem( i18n("Beam via IR"),this, 350 selPopup->insertItem( i18n("Beam via IR..."),this,
351 SLOT(beamSelected())); 351 SLOT(beamSelected()));
352#if 0 352#if 0
353 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 353 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
354 i18n("Beam via IR"),this, 354 i18n("Beam via IR"),this,
355 SLOT(beamSelected()),true); 355 SLOT(beamSelected()),true);
356#endif 356#endif
357#endif 357#endif
358 /* 358 /*
359 mPopupMenu = new QPopupMenu; 359 mPopupMenu = new QPopupMenu;
360 mPopupMenu->insertItem(i18n("Edit Event"), this, 360 mPopupMenu->insertItem(i18n("Edit Event"), this,
361 SLOT (editEvent())); 361 SLOT (editEvent()));
362 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, 362 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this,
363 SLOT (deleteEvent())); 363 SLOT (deleteEvent()));
364 mPopupMenu->insertSeparator(); 364 mPopupMenu->insertSeparator();
365 mPopupMenu->insertItem(i18n("Show Dates"), this, 365 mPopupMenu->insertItem(i18n("Show Dates"), this,
366 SLOT(showDates())); 366 SLOT(showDates()));
367 mPopupMenu->insertItem(i18n("Hide Dates"), this, 367 mPopupMenu->insertItem(i18n("Hide Dates"), this,
368 SLOT(hideDates())); 368 SLOT(hideDates()));
369 */ 369 */
370 QObject::connect(mListView,SIGNAL( newEvent()), 370 QObject::connect(mListView,SIGNAL( newEvent()),
371 this,SIGNAL(signalNewEvent())); 371 this,SIGNAL(signalNewEvent()));
372 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), 372 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)),
373 this,SLOT(defaultItemAction(QListViewItem *))); 373 this,SLOT(defaultItemAction(QListViewItem *)));
374 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, 374 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *,
375 const QPoint &, int )), 375 const QPoint &, int )),
376 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); 376 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int)));
377 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), 377 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
378 SLOT(processSelectionChange(QListViewItem *))); 378 SLOT(processSelectionChange(QListViewItem *)));
379 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 379 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
380 SIGNAL(showIncidenceSignal(Incidence *)) ); 380 SIGNAL(showIncidenceSignal(Incidence *)) );
381 381
382 readSettings(KOGlobals::config(),"KOListView Layout"); 382 readSettings(KOGlobals::config(),"KOListView Layout");
383} 383}
384 384
385KOListView::~KOListView() 385KOListView::~KOListView()
386{ 386{
387 delete mPopupMenu; 387 delete mPopupMenu;
388#if QT_VERSION >= 0x030000 388#if QT_VERSION >= 0x030000
389 389
390#else 390#else
391 delete mKOListViewWhatsThis; 391 delete mKOListViewWhatsThis;
392#endif 392#endif
393} 393}
394 394
395void KOListView::catChanged( Incidence* inc) 395void KOListView::catChanged( Incidence* inc)
396{ 396{
397 KOListViewItem* item = getItemForEvent(inc); 397 KOListViewItem* item = getItemForEvent(inc);
398 if (item) { 398 if (item) {
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index f68f032..7a5f3e5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -630,217 +630,219 @@ void MainWindow::startMultiSync()
630QPixmap MainWindow::loadPixmap( QString name ) 630QPixmap MainWindow::loadPixmap( QString name )
631{ 631{
632 return SmallIcon( name ); 632 return SmallIcon( name );
633 633
634} 634}
635void MainWindow::setUsesBigPixmaps ( bool b ) 635void MainWindow::setUsesBigPixmaps ( bool b )
636{ 636{
637 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 637 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
638 if ( b ) 638 if ( b )
639 qDebug("KO: BigPixmaps are not supported "); 639 qDebug("KO: BigPixmaps are not supported ");
640} 640}
641void MainWindow::initActions() 641void MainWindow::initActions()
642{ 642{
643 //KOPrefs::instance()->mShowFullMenu 643 //KOPrefs::instance()->mShowFullMenu
644 iconToolBar->clear(); 644 iconToolBar->clear();
645 KOPrefs *p = KOPrefs::instance(); 645 KOPrefs *p = KOPrefs::instance();
646 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 646 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
647 647
648 QPopupMenu *viewMenu = new QPopupMenu( this ); 648 QPopupMenu *viewMenu = new QPopupMenu( this );
649 QPopupMenu *actionMenu = new QPopupMenu( this ); 649 QPopupMenu *actionMenu = new QPopupMenu( this );
650 mCurrentItemMenu = new QPopupMenu ( this ); 650 mCurrentItemMenu = new QPopupMenu ( this );
651 QPopupMenu *importMenu = new QPopupMenu( this ); 651 QPopupMenu *importMenu = new QPopupMenu( this );
652 QPopupMenu *importMenu_X = new QPopupMenu( this ); 652 QPopupMenu *importMenu_X = new QPopupMenu( this );
653 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 653 QPopupMenu *exportMenu_X = new QPopupMenu( this );
654 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 654 QPopupMenu *beamMenu_X = new QPopupMenu( this );
655 selectFilterMenu = new QPopupMenu( this ); 655 selectFilterMenu = new QPopupMenu( this );
656 selectFilterMenu->setCheckable( true ); 656 selectFilterMenu->setCheckable( true );
657 syncMenu = new QPopupMenu( this ); 657 syncMenu = new QPopupMenu( this );
658 configureAgendaMenu = new QPopupMenu( this ); 658 configureAgendaMenu = new QPopupMenu( this );
659 configureToolBarMenu = new QPopupMenu( this ); 659 configureToolBarMenu = new QPopupMenu( this );
660 QPopupMenu *helpMenu = new QPopupMenu( this ); 660 QPopupMenu *helpMenu = new QPopupMenu( this );
661 QIconSet icon; 661 QIconSet icon;
662 int pixWid = 22, pixHei = 22; 662 int pixWid = 22, pixHei = 22;
663 QString pathString = ""; 663 QString pathString = "";
664 if ( !p->mToolBarMiniIcons ) { 664 if ( !p->mToolBarMiniIcons ) {
665 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { 665 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
666 pathString += "icons16/"; 666 pathString += "icons16/";
667 pixWid = 18; pixHei = 16; 667 pixWid = 18; pixHei = 16;
668 } 668 }
669 } else { 669 } else {
670 pathString += "iconsmini/"; 670 pathString += "iconsmini/";
671 pixWid = 18; pixHei = 16; 671 pixWid = 18; pixHei = 16;
672 } 672 }
673 if ( KOPrefs::instance()->mShowFullMenu ) { 673 if ( KOPrefs::instance()->mShowFullMenu ) {
674 QMenuBar *menuBar1; 674 QMenuBar *menuBar1;
675 menuBar1 = menuBar(); 675 menuBar1 = menuBar();
676 menuBar1->insertItem( i18n("File"), importMenu ); 676 menuBar1->insertItem( i18n("File"), importMenu );
677 menuBar1->insertItem( i18n("View"), viewMenu ); 677 menuBar1->insertItem( i18n("View"), viewMenu );
678 menuBar1->insertItem( i18n("Actions"), actionMenu ); 678 menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu );
679 menuBar1->insertItem( i18n("Action"), actionMenu );
679#ifdef DESKTOP_VERSION 680#ifdef DESKTOP_VERSION
680 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 681 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
681 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 682 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
682#else 683#else
683 menuBar1->insertItem( i18n("Sync"), syncMenu ); 684 menuBar1->insertItem( i18n("Sync"), syncMenu );
684 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 685 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
685#endif 686#endif
686 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 687 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
687 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 688 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
688 menuBar1->insertItem( i18n("Help"), helpMenu ); 689 menuBar1->insertItem( i18n("Help"), helpMenu );
689 } else { 690 } else {
690 QPEMenuBar *menuBar1; 691 QPEMenuBar *menuBar1;
691 menuBar1 = new QPEMenuBar( iconToolBar ); 692 menuBar1 = new QPEMenuBar( iconToolBar );
692 QPopupMenu *menuBar = new QPopupMenu( this ); 693 QPopupMenu *menuBar = new QPopupMenu( this );
693 icon = loadPixmap( pathString + "z_menu" ); 694 icon = loadPixmap( pathString + "z_menu" );
694 menuBar1->insertItem( icon.pixmap(), menuBar); 695 menuBar1->insertItem( icon.pixmap(), menuBar);
695 //menuBar1->insertItem( i18n("ME"), menuBar); 696 //menuBar1->insertItem( i18n("ME"), menuBar);
696 menuBar->insertItem( i18n("File"), importMenu ); 697 menuBar->insertItem( i18n("File"), importMenu );
697 menuBar->insertItem( i18n("View"), viewMenu ); 698 menuBar->insertItem( i18n("View"), viewMenu );
698 menuBar->insertItem( i18n("Actions"), actionMenu ); 699 menuBar->insertItem( i18n("Edit"), mCurrentItemMenu );
700 menuBar->insertItem( i18n("Action"), actionMenu );
699 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 701 menuBar->insertItem( i18n("Synchronize"), syncMenu );
700 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 702 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
701 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 703 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
702 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 704 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
703 menuBar->insertItem( i18n("Help"), helpMenu ); 705 menuBar->insertItem( i18n("Help"), helpMenu );
704 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 706 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
705 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 707 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
706 } 708 }
707 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 709 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
708 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 710 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
709 711
710 712
711 mWeekBgColor = iconToolBar->backgroundColor(); 713 mWeekBgColor = iconToolBar->backgroundColor();
712 mWeekPixmap.resize( pixWid , pixHei ); 714 mWeekPixmap.resize( pixWid , pixHei );
713 mWeekPixmap.fill( mWeekBgColor ); 715 mWeekPixmap.fill( mWeekBgColor );
714 icon = mWeekPixmap; 716 icon = mWeekPixmap;
715 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 717 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
716 if ( p-> mShowIconWeekNum ) 718 if ( p-> mShowIconWeekNum )
717 mWeekAction->addTo( iconToolBar ); 719 mWeekAction->addTo( iconToolBar );
718 mWeekFont = font(); 720 mWeekFont = font();
719 721
720 int fontPoint = mWeekFont.pointSize(); 722 int fontPoint = mWeekFont.pointSize();
721 QFontMetrics f( mWeekFont ); 723 QFontMetrics f( mWeekFont );
722 int fontWid = f.width( "30" ); 724 int fontWid = f.width( "30" );
723 while ( fontWid > pixWid ) { 725 while ( fontWid > pixWid ) {
724 --fontPoint; 726 --fontPoint;
725 mWeekFont.setPointSize( fontPoint ); 727 mWeekFont.setPointSize( fontPoint );
726 QFontMetrics f( mWeekFont ); 728 QFontMetrics f( mWeekFont );
727 fontWid = f.width( "30" ); 729 fontWid = f.width( "30" );
728 //qDebug("dec-- "); 730 //qDebug("dec-- ");
729 } 731 }
730 732
731 connect( mWeekAction, SIGNAL( activated() ), 733 connect( mWeekAction, SIGNAL( activated() ),
732 this, SLOT( weekAction() ) ); 734 this, SLOT( weekAction() ) );
733 735
734 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 736 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
735 if ( p->mShowIconFilterview ) { 737 if ( p->mShowIconFilterview ) {
736 icon = loadPixmap( pathString + "filter" ); 738 icon = loadPixmap( pathString + "filter" );
737 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 739 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
738 connect( actionFilterMenuTB, SIGNAL( activated() ), 740 connect( actionFilterMenuTB, SIGNAL( activated() ),
739 this, SLOT( fillFilterMenuTB() ) ); 741 this, SLOT( fillFilterMenuTB() ) );
740 actionFilterMenuTB->addTo( iconToolBar ); 742 actionFilterMenuTB->addTo( iconToolBar );
741 selectFilterMenuTB = new QPopupMenu( this ); 743 selectFilterMenuTB = new QPopupMenu( this );
742 selectFilterMenuTB->setCheckable( true ); 744 selectFilterMenuTB->setCheckable( true );
743 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 745 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
744 } 746 }
745 747
746 //#endif 748 //#endif
747 // ****************** 749 // ******************
748 QAction *action; 750 QAction *action;
749 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 751 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
750 configureToolBarMenu->setCheckable( true ); 752 configureToolBarMenu->setCheckable( true );
751 753
752 754
753 configureAgendaMenu->setCheckable( true ); 755 configureAgendaMenu->setCheckable( true );
754 int iii ; 756 int iii ;
755 for ( iii = 1;iii<= 10 ;++iii ){ 757 for ( iii = 1;iii<= 10 ;++iii ){
756 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 758 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
757 } 759 }
758 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 760 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
759 761
760 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 762 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
761 this, SLOT( showConfigureAgenda( ) ) ); 763 this, SLOT( showConfigureAgenda( ) ) );
762 icon = loadPixmap( pathString + "today" ); 764 icon = loadPixmap( pathString + "today" );
763 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 765 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
764 today_action->addTo( actionMenu ); 766 today_action->addTo( actionMenu );
765 connect( today_action, SIGNAL( activated() ), 767 connect( today_action, SIGNAL( activated() ),
766 mView, SLOT( goToday() ) ); 768 mView, SLOT( goToday() ) );
767 769
768 icon = loadPixmap( pathString + "picker" ); 770 icon = loadPixmap( pathString + "picker" );
769 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); 771 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
770 dPickerAction->addTo( actionMenu ); 772 dPickerAction->addTo( actionMenu );
771 connect( dPickerAction, SIGNAL( activated() ), 773 connect( dPickerAction, SIGNAL( activated() ),
772 mView, SLOT( showDatePicker() ) ); 774 mView, SLOT( showDatePicker() ) );
773 775
774 icon = loadPixmap( pathString + "search" ); 776 icon = loadPixmap( pathString + "search" );
775 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 777 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
776 search_action->addTo( actionMenu ); 778 search_action->addTo( actionMenu );
777 connect( search_action, SIGNAL( activated() ), 779 connect( search_action, SIGNAL( activated() ),
778 mView->dialogManager(), SLOT( showSearchDialog() ) ); 780 mView->dialogManager(), SLOT( showSearchDialog() ) );
779 781
780 actionMenu->insertSeparator(); 782 actionMenu->insertSeparator();
781 783
782 784
783 785
784 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 786 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
785 action->addTo( actionMenu ); 787 action->addTo( mCurrentItemMenu );
786 connect( action, SIGNAL( activated() ), 788 connect( action, SIGNAL( activated() ),
787 mView, SLOT( undo_delete() ) ); 789 mView, SLOT( undo_delete() ) );
788 790 mCurrentItemMenu->insertSeparator();
789 icon = loadPixmap( pathString + "newevent" ); 791 icon = loadPixmap( pathString + "newevent" );
790 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 792 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
791 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 793 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
792 configureToolBarMenu->insertSeparator(); 794 configureToolBarMenu->insertSeparator();
793 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 795 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
794 configureToolBarMenu->insertSeparator(); 796 configureToolBarMenu->insertSeparator();
795 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 797 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
796 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 798 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
797 799
798 actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); 800 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
799 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 801 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
800 mShowAction->addTo( mCurrentItemMenu ); 802 mShowAction->addTo( mCurrentItemMenu );
801 connect( mShowAction, SIGNAL( activated() ), 803 connect( mShowAction, SIGNAL( activated() ),
802 mView, SLOT( showIncidence() ) ); 804 mView, SLOT( showIncidence() ) );
803 805
804 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 806 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
805 mEditAction->addTo( mCurrentItemMenu ); 807 mEditAction->addTo( mCurrentItemMenu );
806 connect( mEditAction, SIGNAL( activated() ), 808 connect( mEditAction, SIGNAL( activated() ),
807 mView, SLOT( editIncidence() ) ); 809 mView, SLOT( editIncidence() ) );
808 810
809 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 811 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
810 mDeleteAction->addTo( mCurrentItemMenu ); 812 mDeleteAction->addTo( mCurrentItemMenu );
811 connect( mDeleteAction, SIGNAL( activated() ), 813 connect( mDeleteAction, SIGNAL( activated() ),
812 mView, SLOT( deleteIncidence() ) ); 814 mView, SLOT( deleteIncidence() ) );
813 815
814 816
815 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 817 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
816 mCloneAction->addTo( mCurrentItemMenu ); 818 mCloneAction->addTo( mCurrentItemMenu );
817 connect( mCloneAction, SIGNAL( activated() ), 819 connect( mCloneAction, SIGNAL( activated() ),
818 mView, SLOT( cloneIncidence() ) ); 820 mView, SLOT( cloneIncidence() ) );
819 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 821 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
820 mMoveAction->addTo( mCurrentItemMenu ); 822 mMoveAction->addTo( mCurrentItemMenu );
821 connect( mMoveAction, SIGNAL( activated() ), 823 connect( mMoveAction, SIGNAL( activated() ),
822 mView, SLOT( moveIncidence() ) ); 824 mView, SLOT( moveIncidence() ) );
823 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 825 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
824 mBeamAction->addTo(mCurrentItemMenu ); 826 mBeamAction->addTo(mCurrentItemMenu );
825 connect( mBeamAction, SIGNAL( activated() ), 827 connect( mBeamAction, SIGNAL( activated() ),
826 mView, SLOT( beamIncidence() ) ); 828 mView, SLOT( beamIncidence() ) );
827 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 829 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
828 mCancelAction->addTo( mCurrentItemMenu ); 830 mCancelAction->addTo( mCurrentItemMenu );
829 connect( mCancelAction, SIGNAL( activated() ), 831 connect( mCancelAction, SIGNAL( activated() ),
830 mView, SLOT( toggleCancelIncidence() ) ); 832 mView, SLOT( toggleCancelIncidence() ) );
831#ifdef DESKTOP_VERSION 833#ifdef DESKTOP_VERSION
832 actionMenu->insertSeparator(); 834 actionMenu->insertSeparator();
833#endif 835#endif
834 836
835 837
836 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 838 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
837 ne_action->addTo( actionMenu ); 839 ne_action->addTo( actionMenu );
838 connect( ne_action, SIGNAL( activated() ), 840 connect( ne_action, SIGNAL( activated() ),
839 mView, SLOT( newEvent() ) ); 841 mView, SLOT( newEvent() ) );
840 icon = loadPixmap( pathString + "newtodo" ); 842 icon = loadPixmap( pathString + "newtodo" );
841 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 843 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
842 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 844 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
843 nt_action->addTo( actionMenu ); 845 nt_action->addTo( actionMenu );
844 connect( nt_action, SIGNAL( activated() ), 846 connect( nt_action, SIGNAL( activated() ),
845 mView, SLOT( newTodo() ) ); 847 mView, SLOT( newTodo() ) );
846 848
@@ -1677,109 +1679,104 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1677 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1679 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1678 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1680 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1679 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1681 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1680 1682
1681 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1683 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1682 bool ok; 1684 bool ok;
1683 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1685 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1684 if ( ok ) { 1686 if ( ok ) {
1685 int years = noc.date().year() - incidence->dtStart().date().year(); 1687 int years = noc.date().year() - incidence->dtStart().date().year();
1686 startString += i18n(" (%1 y.)"). arg( years ); 1688 startString += i18n(" (%1 y.)"). arg( years );
1687 } 1689 }
1688 } 1690 }
1689 else 1691 else
1690 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1692 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1691 } 1693 }
1692 1694
1693 } 1695 }
1694 else 1696 else
1695 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1697 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1696 if ( !incidence->location().isEmpty() ) 1698 if ( !incidence->location().isEmpty() )
1697 startString += " (" +incidence->location()+")"; 1699 startString += " (" +incidence->location()+")";
1698 setCaption( incidence->summary()+startString); 1700 setCaption( incidence->summary()+startString);
1699 1701
1700 enableIncidenceActions( true ); 1702 enableIncidenceActions( true );
1701 1703
1702 if ( incidence->typeID() == eventID ) { 1704 if ( incidence->typeID() == eventID ) {
1703 mShowAction->setText( i18n("Show Event...") ); 1705 mShowAction->setText( i18n("Show Event...") );
1704 mEditAction->setText( i18n("Edit Event...") ); 1706 mEditAction->setText( i18n("Edit Event...") );
1705 mDeleteAction->setText( i18n("Delete Event...") ); 1707 mDeleteAction->setText( i18n("Delete Event...") );
1706 1708
1707 mNewSubTodoAction->setEnabled( false ); 1709 mNewSubTodoAction->setEnabled( false );
1708 } else if ( incidence->typeID() == todoID ) { 1710 } else if ( incidence->typeID() == todoID ) {
1709 mShowAction->setText( i18n("Show Todo...") ); 1711 mShowAction->setText( i18n("Show Todo...") );
1710 mEditAction->setText( i18n("Edit Todo...") ); 1712 mEditAction->setText( i18n("Edit Todo...") );
1711 mDeleteAction->setText( i18n("Delete Todo...") ); 1713 mDeleteAction->setText( i18n("Delete Todo...") );
1712 1714
1713 mNewSubTodoAction->setEnabled( true ); 1715 mNewSubTodoAction->setEnabled( true );
1714 } else { 1716 } else {
1715 mShowAction->setText( i18n("Show...") ); 1717 mShowAction->setText( i18n("Show...") );
1716 mShowAction->setText( i18n("Edit...") ); 1718 mShowAction->setText( i18n("Edit...") );
1717 mShowAction->setText( i18n("Delete...") ); 1719 mShowAction->setText( i18n("Delete...") );
1718 1720
1719 mNewSubTodoAction->setEnabled( false ); 1721 mNewSubTodoAction->setEnabled( false );
1720 } 1722 }
1721} 1723}
1722 1724
1723void MainWindow::enableIncidenceActions( bool enabled ) 1725void MainWindow::enableIncidenceActions( bool enabled )
1724{ 1726{
1725
1726#ifndef DESKTOP_VERSION
1727 mCurrentItemMenu->setEnabled( enabled );
1728#else
1729 mShowAction->setEnabled( enabled ); 1727 mShowAction->setEnabled( enabled );
1730 mEditAction->setEnabled( enabled ); 1728 mEditAction->setEnabled( enabled );
1731 mDeleteAction->setEnabled( enabled ); 1729 mDeleteAction->setEnabled( enabled );
1732 1730
1733 mCloneAction->setEnabled( enabled ); 1731 mCloneAction->setEnabled( enabled );
1734 mMoveAction->setEnabled( enabled ); 1732 mMoveAction->setEnabled( enabled );
1735 mBeamAction->setEnabled( enabled ); 1733 mBeamAction->setEnabled( enabled );
1736 mCancelAction->setEnabled( enabled ); 1734 mCancelAction->setEnabled( enabled );
1737#endif
1738} 1735}
1739 1736
1740void MainWindow::importOL() 1737void MainWindow::importOL()
1741{ 1738{
1742#ifdef _OL_IMPORT_ 1739#ifdef _OL_IMPORT_
1743 mView->clearAllViews(); 1740 mView->clearAllViews();
1744 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); 1741 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
1745 id->exec(); 1742 id->exec();
1746 delete id; 1743 delete id;
1747 mView->calendar()->checkAlarmForIncidence( 0, true ); 1744 mView->calendar()->checkAlarmForIncidence( 0, true );
1748 mView->updateView(); 1745 mView->updateView();
1749#endif 1746#endif
1750} 1747}
1751void MainWindow::importBday() 1748void MainWindow::importBday()
1752{ 1749{
1753 int result = QMessageBox::warning( this, i18n("KO/Pi import information!"), 1750 int result = QMessageBox::warning( this, i18n("KO/Pi import information!"),
1754 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), 1751 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"),
1755 i18n("Import!"), i18n("Cancel"), 0, 1752 i18n("Import!"), i18n("Cancel"), 0,
1756 0, 1 ); 1753 0, 1 );
1757 if ( result == 0 ) { 1754 if ( result == 0 ) {
1758 mView->importBday(); 1755 mView->importBday();
1759 1756
1760 } 1757 }
1761 1758
1762 1759
1763} 1760}
1764void MainWindow::importQtopia() 1761void MainWindow::importQtopia()
1765{ 1762{
1766 //#ifndef DESKTOP_VERSION 1763 //#ifndef DESKTOP_VERSION
1767 QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); 1764 QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing");
1768#ifdef DESKTOP_VERSION 1765#ifdef DESKTOP_VERSION
1769 mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); 1766 mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml");
1770#endif 1767#endif
1771 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, 1768 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess,
1772 i18n("Import!"), i18n("Cancel"), 0, 1769 i18n("Import!"), i18n("Cancel"), 0,
1773 0, 1 ); 1770 0, 1 );
1774 if ( result == 0 ) { 1771 if ( result == 0 ) {
1775#ifndef DESKTOP_VERSION 1772#ifndef DESKTOP_VERSION
1776 QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); 1773 QString datebook = Global::applicationFileName( "datebook", "datebook.xml");
1777 QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); 1774 QString todolist = Global::applicationFileName( "todolist", "todolist.xml");
1778 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; 1775 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml";
1779#else 1776#else
1780 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; 1777 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml";
1781 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; 1778 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml";
1782 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; 1779 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml";
1783#endif 1780#endif
1784 mView->importQtopia( categories, datebook, todolist ); 1781 mView->importQtopia( categories, datebook, todolist );
1785 } 1782 }