summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt16
-rw-r--r--korganizer/kolistview.cpp147
-rw-r--r--korganizer/kolistview.h7
-rw-r--r--korganizer/koprefs.cpp2
-rw-r--r--korganizer/koviewmanager.cpp2
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
@@ -486,5 +486,5 @@
{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." },
{ "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" },
{ "Date Picker","Datum auswählen" },
@@ -1197,5 +1197,5 @@
{ "Select week %1-%2","Wähle Woche %1-%2" },
{ "Select Week","Wähle Woche" },
-{ "Set alarm for selected...","Setze Alarm für Selekt..." },
+{ "Set alarm...","Setze Alarm..." },
{ "Set Alarm!","Setze Alarm!" },
{ "Changed alarm for %1 items","Alarm für %1 Items geändert" },
@@ -1287,5 +1287,5 @@
{ "Export","Exportiere" },
{ "Beam","Beame" },
-{ "Export selected","Exportiere Selektierte" },
+{ "Export","Exportiere" },
{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
@@ -1479,6 +1479,12 @@
{ "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" },
{ "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
@@ -291,14 +291,14 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mListView->setFont ( KOPrefs::instance()->mListViewFont );
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()),
i18n("Hide all selected"),this,
@@ -315,4 +315,10 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mPopupMenu->insertItem( i18n("Set Calendar"), mCalPopup );
+ 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,
SLOT( populateCalPopup() ));
@@ -320,5 +326,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
SLOT( setCalendar( int ) ));
QPopupMenu * exportPO = new QPopupMenu ( this );
- mPopupMenu->insertItem( i18n("Export selected"), exportPO );
+ mPopupMenu->insertItem( i18n("Export"), exportPO );
exportPO->insertItem( i18n("As iCal (ics) file..."),this,
SLOT(saveToFile()));
@@ -328,21 +334,12 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
SLOT(saveDescriptionToFile()));
// 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
mPopupMenu->insertSeparator();
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
- i18n("Beam selected via IR"),this,
+ i18n("Beam via IR"),this,
SLOT(beamSelected()),true);
#endif
@@ -439,5 +436,5 @@ void KOListView::populateCalPopup()
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
while ( kkf ) {
- int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber);
+ int index = mCalPopup->insertItem( kkf->mName+"...", kkf->mCalNumber);
if ( kkf->mErrorOnLoad || kkf->isReadOnly )
mCalPopup->setItemEnabled( index, false );
@@ -455,11 +452,17 @@ void KOListView::clearList()
clear ();
}
-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 );
}
@@ -469,5 +472,4 @@ void KOListView::setAlarm()
if ( !kap.exec() )
return;
- QStringList itemList;
QPtrList<KOListViewItem> sel ;
QListViewItem *qitem = mListView->firstChild ();
@@ -544,43 +546,18 @@ void KOListView::setCategories( bool removeOld )
QStringList catList = csd->selectedCategories();
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();
}
QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
@@ -590,43 +567,6 @@ 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"));
}
@@ -1107,7 +1047,6 @@ void KOListView::changeEventDisplay(Event *event, int action)
item = getItemForEvent(event);
if (item) {
- mUidDict.remove( event->uid() );
- delete item;
- addIncidence( event );
+ ListItemVisitor v(item, mStartDate );
+ ((Incidence*)event)->accept(v);
}
break;
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index bcef0f0..a54b550 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -31,9 +31,4 @@
#include <klistview.h>
-#ifndef DESKTOP_VERSION
-#include <qtopia/ir.h>
-#else
-#define Ir char
-#endif
#include <libkcal/incidence.h>
@@ -280,5 +275,4 @@ class KOListView : public KOEventView
void clear();
- void beamDone( Ir *ir );
void showDates();
void hideDates();
@@ -289,5 +283,4 @@ class KOListView : public KOEventView
void beamSelected();
void updateConfig();
- void addCat();
void setCat();
void setAlarm();
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 02d7aae..6337ca5 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -230,5 +230,5 @@ KOPrefs::KOPrefs() :
KPrefs::setCurrentGroup("Views");
- addItemBool("Block Popup Menu",&mBlockPopupMenu,true);
+ addItemBool("Block Popup Menu",&mBlockPopupMenu,false);
addItemBool("Show Date Navigator",&mShowDateNavigator,true);
addItemInt("Hour Size",&mHourSize,8);
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index bd191d8..792a7b8 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -456,4 +456,6 @@ void KOViewManager::showListView()
connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( beamIncidence( Incidence * ) ) );
+ connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ),
+ mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) );
}
// bool temp = mFlagShowNextxDays;