author | zautrix <zautrix> | 2005-07-01 20:33:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-01 20:33:17 (UTC) |
commit | 541878bcf52030d8597d5e79afb6ae1185b2ac2c (patch) (side-by-side diff) | |
tree | c6aeb2861062f1bfcc6ba10ec6e26b058205a1cd | |
parent | c53efbe8f53f468d21d93f5e19b625d1a4beb242 (diff) | |
download | kdepimpi-541878bcf52030d8597d5e79afb6ae1185b2ac2c.zip kdepimpi-541878bcf52030d8597d5e79afb6ae1185b2ac2c.tar.gz kdepimpi-541878bcf52030d8597d5e79afb6ae1185b2ac2c.tar.bz2 |
fixixixis
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 16 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 147 | ||||
-rw-r--r-- | korganizer/kolistview.h | 7 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 2 |
5 files changed, 57 insertions, 117 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 708ac19..ed6a1c1 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -487,3 +487,3 @@ { "Set Categ. for selected...","Setze Kateg. für Selekt." }, -{ "Beam selected via IR","Sende Selekt. via IR..." }, +{ "Beam via IR","Sende via IR" }, { "Search","Suchen" }, @@ -1198,3 +1198,3 @@ { "Select Week","Wähle Woche" }, -{ "Set alarm for selected...","Setze Alarm für Selekt..." }, +{ "Set alarm...","Setze Alarm..." }, { "Set Alarm!","Setze Alarm!" }, @@ -1288,3 +1288,3 @@ { "Beam","Beame" }, -{ "Export selected","Exportiere Selektierte" }, +{ "Export","Exportiere" }, { "As iCal (ics) file...","Als iCal (ics) Datei..." }, @@ -1480,4 +1480,10 @@ { "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, -{ "","" }, -{ "","" }, +{ "Alarm Options","Alarm Einstellungen" }, +{ "Delete selected...","Lösche Ausgewählte..." }, +{ "None","Nichts" }, +{ "Selection","Auswahl" }, +{ "Set categories","Setze Kategorien" }, +{ "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, +{ "Reset","Neu setzen" }, +{ "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, { "","" }, diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index e5e3704..4c815d8 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -292,12 +292,12 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mPopupMenu = eventPopup(); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Select all"),this, - SLOT(allSelection()),true); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Deselect all"),this, - SLOT(clearSelection()),true); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Delete all selected"),this, - SLOT(deleteAll()),true); + QPopupMenu* selPopup = new QPopupMenu ( this ); + mPopupMenu->insertSeparator(); + selPopup->insertItem(i18n("All"),this, + SLOT(allSelection())); + selPopup->insertItem(i18n("None"),this, + SLOT(clearSelection())); + selPopup->insertItem(i18n("Delete selected..."),this, + SLOT(deleteAll())); + mPopupMenu->insertItem(i18n("Selection"), selPopup ); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), @@ -316,2 +316,8 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, + mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + i18n("Set categories")+"...",this, + SLOT(setCat()),true); + mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + i18n("Set alarm..."),this, + SLOT(setAlarm()),true); QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, @@ -321,3 +327,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, QPopupMenu * exportPO = new QPopupMenu ( this ); - mPopupMenu->insertItem( i18n("Export selected"), exportPO ); + mPopupMenu->insertItem( i18n("Export"), exportPO ); exportPO->insertItem( i18n("As iCal (ics) file..."),this, @@ -329,15 +335,6 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, // mPopupMenu->insertSeparator(); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Add Categ. to selected..."),this, - SLOT(addCat()),true); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Set Categ. for selected..."),this, - SLOT(setCat()),true); + // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + // i18n("Add Categ. to selected..."),this, + // SLOT(addCat()),true); //mPopupMenu->insertSeparator(); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Set alarm for selected..."),this, - SLOT(setAlarm()),true); - - - #ifndef DESKTOP_VERSION @@ -345,3 +342,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Beam selected via IR"),this, + i18n("Beam via IR"),this, SLOT(beamSelected()),true); @@ -440,3 +437,3 @@ void KOListView::populateCalPopup() while ( kkf ) { - int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); + int index = mCalPopup->insertItem( kkf->mName+"...", kkf->mCalNumber); if ( kkf->mErrorOnLoad || kkf->isReadOnly ) @@ -456,9 +453,15 @@ void KOListView::clearList() } -void KOListView::addCat( ) -{ - setCategories( false ); -} + void KOListView::setCat() { - setCategories( true ); + + bool set = true; + int result = KMessageBox::warningYesNoCancel(this, + i18n("Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?"), + i18n("Set categories"), + i18n("Add"), + i18n("Reset")); + if (result == KMessageBox::Cancel) return; + if (result == KMessageBox::Yes) set = false; + setCategories( set ); } @@ -470,3 +473,2 @@ void KOListView::setAlarm() return; - QStringList itemList; QPtrList<KOListViewItem> sel ; @@ -545,41 +547,16 @@ void KOListView::setCategories( bool removeOld ) delete csd; - // if ( catList.count() == 0 ) - // return; - //catList.sort(); - QString categoriesStr = catList.join(","); - int i; - QStringList itemList; - QPtrList<KOListViewItem> sel ; - QListViewItem *qitem = mListView->firstChild (); - while ( qitem ) { - if ( qitem->isSelected() ) { - sel.append(((KOListViewItem *)qitem)); - } - qitem = qitem->nextSibling(); - } - KOListViewItem * item, *temp; - item = sel.first(); - if( item ) { - Incidence* inc = item->data() ; - bool setSub = false; - if( inc->typeID() == todoID && sel.count() == 1 && inc->relations().count() > 0 ) { - int result = KMessageBox::warningYesNoCancel(this, - i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), - i18n("Todo has subtodos"), - i18n("Yes"), - i18n("No")); - if (result == KMessageBox::Cancel) item = 0; - if (result == KMessageBox::Yes) setSub = true; - } - while ( item ) { - inc = item->data(); + QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; + Incidence* inc = delSel.first(); + while ( inc ) { if ( removeOld ) { - inc->setCategories( catList, setSub ); + inc->setCategories( catList, false ); } else { - inc->addCategories( catList, setSub ); + inc->addCategories( catList, false ); } + KOListViewItem* item = getItemForEvent(inc); + if (item) { ListItemVisitor v(item, mStartDate ); inc->accept(v); - item = sel.next(); } + inc = delSel.next(); } @@ -591,41 +568,4 @@ void KOListView::beamSelected() QPtrList<Incidence> delSel = getSelectedIncidences() ; - int icount = delSel.count(); - if ( icount ) { + if ( delSel.count() ) emit beamIncidenceList( delSel ); - return; - QString fn ; - fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; - QString mes; - bool createbup = true; - if ( createbup ) { - QString description = "\n"; - CalendarLocal* cal = new CalendarLocal(); - cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); - Incidence *incidence = delSel.first(); - while ( incidence ) { - Incidence *in = incidence->clone(); - description += in->summary() + "\n"; - cal->addIncidence( in ); - incidence = delSel.next(); - } - FileStorage storage( cal, fn, new VCalFormat ); - storage.save(); - delete cal; - mes = i18n("KO/Pi: Ready for beaming"); - topLevelWidget()->setCaption(mes); - -#ifndef DESKTOP_VERSION - Ir *ir = new Ir( this ); - connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); - ir->send( fn, description, "text/x-vCalendar" ); -#endif - } - } -} -void KOListView::beamDone( Ir *ir ) -{ -#ifndef DESKTOP_VERSION - delete ir; -#endif - topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); } @@ -1108,5 +1048,4 @@ void KOListView::changeEventDisplay(Event *event, int action) if (item) { - mUidDict.remove( event->uid() ); - delete item; - addIncidence( event ); + ListItemVisitor v(item, mStartDate ); + ((Incidence*)event)->accept(v); } diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index bcef0f0..a54b550 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h @@ -32,7 +32,2 @@ -#ifndef DESKTOP_VERSION -#include <qtopia/ir.h> -#else -#define Ir char -#endif #include <libkcal/incidence.h> @@ -281,3 +276,2 @@ class KOListView : public KOEventView void clear(); - void beamDone( Ir *ir ); void showDates(); @@ -290,3 +284,2 @@ class KOListView : public KOEventView void updateConfig(); - void addCat(); void setCat(); diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 02d7aae..6337ca5 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -231,3 +231,3 @@ KOPrefs::KOPrefs() : KPrefs::setCurrentGroup("Views"); - addItemBool("Block Popup Menu",&mBlockPopupMenu,true); + addItemBool("Block Popup Menu",&mBlockPopupMenu,false); addItemBool("Show Date Navigator",&mShowDateNavigator,true); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index bd191d8..792a7b8 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -457,2 +457,4 @@ void KOViewManager::showListView() mMainView, SLOT ( beamIncidence( Incidence * ) ) ); + connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ), + mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) ); } |