[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] [PATCH] Better context menus in KOrganizer
From: "Chris Howells" <chris () chrishowells ! co ! uk>
Date: 2005-07-10 14:39:17
Message-ID: 63077.213.78.118.205.1121006357.squirrel () webmail ! devrandom ! org ! uk
[Download RAW message or body]
Hi Reinhold,
On Sat, July 9, 2005 10:27 pm, Reinhold Kainhofer said:
> Apart from the issues mentioned below, I'm fine with you committing it.
Thanks, good points, I have attached an updated patch which should address
all of your points. OK to commit now?
> Are the i18n strings new? Or are they already in use somewhere else in
> korganizer? If they are new, backporting is out of question (unless you
> find
> strings that you can re-use).
The strings are in kdelibs/kde.pot. I think that means that it wouldn't
introduce any new strings, can someone confirm?
--
Cheers, Chris Howells -- chris@chrishowells.co.uk, howells@kde.org
Web: http://www.chrishowells.co.uk, PGP ID: 0x33795A2C
KDE/Qt/C++/PHP Developer: http://www.kde.org
["contextmenus.patch" (text/x-diff)]
Index: koeventview.cpp
===================================================================
--- koeventview.cpp (revision 432882)
+++ koeventview.cpp (working copy)
@@ -67,6 +67,10 @@
SIGNAL(showIncidenceSignal(Incidence *)));
connect(eventPopup,SIGNAL(deleteIncidenceSignal(Incidence *)),
SIGNAL(deleteIncidenceSignal(Incidence *)));
+ connect(eventPopup,SIGNAL(cutIncidenceSignal(Incidence *)),
+ SIGNAL(cutIncidenceSignal(Incidence *)));
+ connect(eventPopup,SIGNAL(copyIncidenceSignal(Incidence *)),
+ SIGNAL(copyIncidenceSignal(Incidence *)));
connect(eventPopup,SIGNAL(toggleAlarmSignal(Incidence *)),
SIGNAL(toggleAlarmSignal(Incidence*)));
connect(eventPopup,SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & )),
@@ -115,6 +119,20 @@
//---------------------------------------------------------------------------
+void KOEventView::popupCut()
+{
+ emit cutIncidenceSignal(mCurrentIncidence);
+}
+
+//---------------------------------------------------------------------------
+
+void KOEventView::popupCopy()
+{
+ emit copyIncidenceSignal(mCurrentIncidence);
+}
+
+//---------------------------------------------------------------------------
+
void KOEventView::showNewEventPopup()
{
QPopupMenu *popup = newEventPopup();
Index: koeventview.h
===================================================================
--- koeventview.h (revision 432882)
+++ koeventview.h (working copy)
@@ -121,6 +121,8 @@
void popupShow();
void popupEdit();
void popupDelete();
+ void popupCut();
+ void popupCopy();
virtual void showNewEventPopup();
protected:
Index: calendarview.h
===================================================================
--- calendarview.h (revision 432882)
+++ calendarview.h (working copy)
@@ -295,6 +295,14 @@
deleted without prompting for confirmation.
*/
void deleteIncidence( Incidence *, bool force = false );
+ /**
+ Cuts the selected incidence using the edit_cut() method
+ */
+ void cutIncidence( Incidence * );
+ /**
+ Copies the selected incidence using the edit_copy() method
+ */
+ void copyIncidence( Incidence *);
/** Delete the supplied todo and all sub-todos */
void deleteSubTodosIncidence ( Todo *todo );
/**
Index: koeventpopupmenu.h
===================================================================
--- koeventpopupmenu.h (revision 432882)
+++ koeventpopupmenu.h (working copy)
@@ -52,6 +52,8 @@
void popupShow();
void popupEdit();
void popupDelete();
+ void popupCut();
+ void popupCopy();
void popupAlarm();
void dissociateOccurrence();
void dissociateFutureOccurrence();
@@ -60,6 +62,8 @@
void editIncidenceSignal(Incidence *);
void showIncidenceSignal(Incidence *);
void deleteIncidenceSignal(Incidence *);
+ void cutIncidenceSignal(Incidence *);
+ void copyIncidenceSignal(Incidence *);
void toggleAlarmSignal(Incidence *);
void dissociateOccurrenceSignal( Incidence *, const QDate & );
void dissociateFutureOccurrenceSignal( Incidence *, const QDate & );
Index: interfaces/korganizer/baseview.h
===================================================================
--- interfaces/korganizer/baseview.h (revision 432882)
+++ interfaces/korganizer/baseview.h (working copy)
@@ -196,6 +196,16 @@
void deleteIncidenceSignal(Incidence *);
/**
+ * instructs the receiver to cut the Incidence
+ */
+ void cutIncidenceSignal(Incidence *);
+
+ /**
+ * instructs the receiver to copy the incidence
+ */
+ void copyIncidenceSignal(Incidence *);
+
+ /**
* instructs the receiver to toggle the alarms of the Incidence.
*/
void toggleAlarmSignal(Incidence *);
Index: korganizerui.rc
===================================================================
--- korganizerui.rc (revision 432882)
+++ korganizerui.rc (working copy)
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui>
-<kpartgui name="korganizer" version="34">
+<kpartgui name="korganizer" version="35">
<MenuBar>
<Menu name="file"><text>&File</text>
@@ -139,6 +139,8 @@
<Menu name="rmb_selection_popup">
<Action name="new_event"/>
<Action name="new_todo"/>
+ <Separator/>
+ <Action name="edit_paste"/>
<Merge/>
</Menu>
Index: calendarview.cpp
===================================================================
--- calendarview.cpp (revision 433307)
+++ calendarview.cpp (working copy)
@@ -1173,8 +1173,6 @@
}
}
-
-
void CalendarView::toggleAlarm( Incidence *incidence )
{
if ( !incidence || !mChanger ) {
@@ -1803,6 +1801,16 @@
deleteIncidence( selectedIncidence() );
}
+void CalendarView::cutIncidence(Incidence *)
+{
+ edit_cut();
+}
+
+void CalendarView::copyIncidence(Incidence *)
+{
+ edit_copy();
+}
+
void CalendarView::showIncidence( Incidence *incidence )
{
KOEventViewerDialog *eventViewer = new KOEventViewerDialog( this );
Index: korganizer_part.rc
===================================================================
--- korganizer_part.rc (revision 432882)
+++ korganizer_part.rc (working copy)
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui>
-<kpartgui name="korganizer" version="34">
+<kpartgui name="korganizer" version="35">
<MenuBar>
<Menu name="file"><text>&File</text>
@@ -163,6 +163,8 @@
<Menu name="rmb_selection_popup">
<Action name="new_event"/>
<Action name="new_todo"/>
+ <Separator/>
+ <Action name="edit_paste"/>
<Merge/>
</Menu>
Index: koeventpopupmenu.cpp
===================================================================
--- koeventpopupmenu.cpp (revision 432882)
+++ koeventpopupmenu.cpp (working copy)
@@ -43,11 +43,16 @@
insertItem (i18n("&Show"),this,SLOT(popupShow()));
mEditOnlyItems.append(insertItem (i18n("&Edit..."),this,SLOT(popupEdit())));
+ mEditOnlyItems.append(insertSeparator());
+ mEditOnlyItems.append(insertItem (KOGlobals::self()->smallIcon("editcut"),i18n("&Cut"),
+ this,SLOT(popupCut())));
+ mEditOnlyItems.append(insertItem (KOGlobals::self()->smallIcon("editcopy"),i18n("&Copy"),
+ this,SLOT(popupCopy())));
mEditOnlyItems.append(insertItem (KOGlobals::self()->smallIcon("editdelete"),i18n("&Delete"),
this,SLOT(popupDelete())));
mEditOnlyItems.append( insertSeparator() );
mEditOnlyItems.append( insertItem( QIconSet( KOGlobals::self()->smallIcon("bell") ),
- i18n("Toggle Alarm"), this,
+ i18n("&Toggle Alarm"), this,
SLOT( popupAlarm() ) ) );
mRecurrenceItems.append( insertSeparator() );
mRecurrenceItems.append( insertItem( i18n("&Dissociate This Occurrence"),
@@ -103,6 +108,17 @@
if (mCurrentIncidence) emit deleteIncidenceSignal(mCurrentIncidence);
}
+void KOEventPopupMenu::popupCut()
+{
+ if (mCurrentIncidence) emit cutIncidenceSignal(mCurrentIncidence);
+}
+
+void KOEventPopupMenu::popupCopy()
+{
+ if (mCurrentIncidence) emit copyIncidenceSignal(mCurrentIncidence);
+}
+
+
void KOEventPopupMenu::popupAlarm()
{
if (mCurrentIncidence) emit toggleAlarmSignal( mCurrentIncidence );
Index: koviewmanager.cpp
===================================================================
--- koviewmanager.cpp (revision 432882)
+++ koviewmanager.cpp (working copy)
@@ -172,6 +172,10 @@
mMainView, SLOT(editIncidence(Incidence *)));
connect(view, SIGNAL(deleteIncidenceSignal(Incidence *)),
mMainView, SLOT(deleteIncidence(Incidence *)));
+ connect(view, SIGNAL(copyIncidenceSignal(Incidence *)),
+ mMainView, SLOT(copyIncidence(Incidence *)));
+ connect(view, SIGNAL(cutIncidenceSignal(Incidence *)),
+ mMainView, SLOT(cutIncidence(Incidence *)));
connect(view, SIGNAL(toggleAlarmSignal(Incidence *)),
mMainView, SLOT(toggleAlarm(Incidence *)));
connect(view,SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & )),
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic