-rw-r--r-- | korganizer/koagendaview.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8d32152..95388ef 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -504,11 +504,9 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mAllDayAgenda->setFocusPolicy(NoFocus); QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); // Create event context menu for all day agenda - mAllDayAgendaPopup = eventPopup(); - connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), - mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + //mAllDayAgendaPopup = eventPopup(); // Create agenda frame QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); // QHBox *agendaFrame = new QHBox(splitterAgenda); @@ -543,18 +541,22 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); agendaLayout->setColStretch(1,1); mAgenda->setFocusPolicy(NoFocus); // Create event context menu for agenda - mAgendaPopup = eventPopup(); + mAllAgendaPopup = eventPopup(); - mAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), + mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), i18n("Toggle Alarm"),mAgenda, SLOT(popupAlarm()),true); connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), - mAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), + mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + mAgenda->setPopup( mAllAgendaPopup ); + mAllDayAgenda->setPopup( mAllAgendaPopup ); // make connections between dependent widgets mTimeLabels->setAgenda(mAgenda); // Update widgets to reflect user preferences @@ -666,10 +668,10 @@ void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) } KOAgendaView::~KOAgendaView() { - delete mAgendaPopup; - delete mAllDayAgendaPopup; + delete mAllAgendaPopup; + //delete mAllDayAgendaPopup; delete KOAgendaItem::paintPix(); delete KOAgendaItem::paintPixSel(); } void KOAgendaView::resizeEvent( QResizeEvent* e ) |