Update of /cvsroot/mahogany/M/src/modules
In directory sc8-pr-cvs1:/tmp/cvs-serv5682/src/modules
Modified Files:
LayoutEditor.cpp BareBonesEditor.cpp
Log Message:
added popup menu for the attachments in the composer (bug 828)
Index: LayoutEditor.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/LayoutEditor.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -b -u -2 -r1.17 -r1.18
--- LayoutEditor.cpp 19 Sep 2003 13:31:23 -0000 1.17
+++ LayoutEditor.cpp 1 Oct 2003 00:35:09 -0000 1.18
@@ -115,4 +115,5 @@
void OnFocus(wxFocusEvent& event);
void OnMouseLClick(wxCommandEvent& event);
+ void OnMouseRClick(wxCommandEvent& event);
private:
@@ -179,4 +180,5 @@
EVT_MENU(WXLOWIN_MENU_LCLICK, wxComposerLayoutWindow::OnMouseLClick)
+ EVT_MENU(WXLOWIN_MENU_RCLICK, wxComposerLayoutWindow::OnMouseRClick)
END_EVENT_TABLE()
@@ -233,4 +235,24 @@
{
m_editor->EditAttachmentProperties(part);
+ part->DecRef();
+ }
+
+ data->DecRef();
+ }
+}
+
+void wxComposerLayoutWindow::OnMouseRClick(wxCommandEvent& event)
+{
+ wxLayoutObject *obj = (wxLayoutObject *)event.GetClientData();
+ LayoutEditData *data = (LayoutEditData *)obj->GetUserData();
+ if ( data )
+ {
+ EditorContentPart *part = data->GetContentPart();
+ if ( part )
+ {
+ CoordType x, y;
+ obj->GetSize(&x, &y);
+
+ m_editor->ShowAttachmentMenu(part, wxPoint(x, y));
part->DecRef();
}
Index: BareBonesEditor.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/BareBonesEditor.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -b -u -2 -r1.17 -r1.18
--- BareBonesEditor.cpp 26 Sep 2003 15:10:37 -0000 1.17
+++ BareBonesEditor.cpp 1 Oct 2003 00:35:12 -0000 1.18
@@ -190,4 +190,5 @@
void OnUnformatAll(wxCommandEvent& event);
void OnItemActivate(wxListEvent& event);
+ void OnItemRightClick(wxListEvent& event);
private:
@@ -563,4 +564,6 @@
EVT_LIST_ITEM_ACTIVATED(ListCtrl_Attachments,
wxBareBonesEditorNotebook::OnItemActivate)
+ EVT_LIST_ITEM_RIGHT_CLICK(ListCtrl_Attachments,
+ wxBareBonesEditorNotebook::OnItemRightClick)
END_EVENT_TABLE()
@@ -651,4 +654,10 @@
{
m_editor->EditAttachmentProperties((EditorContentPart *)event.GetData());
+}
+
+void wxBareBonesEditorNotebook::OnItemRightClick(wxListEvent& event)
+{
+ m_editor->ShowAttachmentMenu((EditorContentPart *)event.GetData(),
+ event.GetPoint());
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates