Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv26906/src/gui
Modified Files:
wxComposeView.cpp wxMainFrame.cpp wxMenuDefs.cpp
Log Message:
added paste quoted command in composer (bug 834)
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.349
retrieving revision 1.350
diff -b -u -2 -r1.349 -r1.350
--- wxComposeView.cpp 2 Oct 2003 10:34:27 -0000 1.349
+++ wxComposeView.cpp 6 Oct 2003 00:38:54 -0000 1.350
@@ -62,4 +62,5 @@
#include <ctype.h> // for isspace
+#include <wx/clipbrd.h>
#include <wx/process.h>
#include <wx/file.h>
@@ -1599,4 +1600,8 @@
m_OriginalMessage->IncRef();
+ // enable "Paste Quoted" command now that we have message to get the
+ // attribution from
+ GetMenuBar()->Enable(WXMENU_EDIT_PASTE_QUOTED, true);
+
// write reply by default in the same encoding as the original message
SetEncodingToSameAs(original);
@@ -1668,12 +1673,5 @@
AddHelpMenu();
- // currently unused
- //
- // TODO: provide some visual feedback for them, like enabling/disabling
-#if 0
- m_MItemCut = GetMenuBar()->FindItem(WXMENU_EDIT_CUT);
- m_MItemCopy = GetMenuBar()->FindItem(WXMENU_EDIT_COPY);
- m_MItemPaste = GetMenuBar()->FindItem(WXMENU_EDIT_PASTE);
-#endif // 0
+ GetMenuBar()->Enable(WXMENU_EDIT_PASTE_QUOTED, m_OriginalMessage != NULL);
// check if we can schedule messages:
@@ -3122,11 +3120,28 @@
case WXMENU_HELP_CONTEXT:
- mApplication->Help(
- (m_mode == Mode_Mail)?
- MH_COMPOSE_MAIL : MH_COMPOSE_NEWS, this);
+ mApplication->Help(m_mode == Mode_Mail ? MH_COMPOSE_MAIL
+ : MH_COMPOSE_NEWS, this);
break;
case WXMENU_EDIT_PASTE:
m_editor->Paste();
+ break;
+
+ case WXMENU_EDIT_PASTE_QUOTED:
+ {
+ wxClipboardLocker clipboardLock;
+ if ( !clipboardLock )
+ break;
+
+ wxTextDataObject data;
+ if ( wxTheClipboard->GetData(data) )
+ {
+ m_editor->InsertText(QuoteText(data.GetText(),
+ m_Profile,
+ m_OriginalMessage
+ ),
+ MessageEditor::Insert_Insert);
+ }
+ }
break;
Index: wxMainFrame.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMainFrame.cpp,v
retrieving revision 1.175
retrieving revision 1.176
diff -b -u -2 -r1.175 -r1.176
--- wxMainFrame.cpp 4 Oct 2003 01:48:35 -0000 1.175
+++ wxMainFrame.cpp 6 Oct 2003 00:38:55 -0000 1.176
@@ -614,4 +614,5 @@
menuBar->Enable(WXMENU_EDIT_CUT, FALSE);
menuBar->Enable(WXMENU_EDIT_PASTE, FALSE);
+ menuBar->Enable(WXMENU_EDIT_PASTE_QUOTED, FALSE);
m_ModulesMenu = NULL;
Index: wxMenuDefs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMenuDefs.cpp,v
retrieving revision 1.211
retrieving revision 1.212
diff -b -u -2 -r1.211 -r1.212
--- wxMenuDefs.cpp 4 Oct 2003 13:20:41 -0000 1.211
+++ wxMenuDefs.cpp 6 Oct 2003 00:38:55 -0000 1.212
@@ -302,8 +302,9 @@
// the available accelerators for this menu:
- // BHJKLNOQVWYZ
+ // BHJKLNOVWYZ
{ WXMENU_EDIT_CUT, gettext_noop("C&ut\tCtrl-X"), gettext_noop("Cut selection and
copy it to clipboard") , wxITEM_NORMAL },
{ WXMENU_EDIT_COPY, gettext_noop("&Copy\tCtrl-C"), gettext_noop("Copy selection to
clipboard") , wxITEM_NORMAL },
{ WXMENU_EDIT_PASTE,gettext_noop("&Paste\tCtrl-V"), gettext_noop("Paste from
clipboard") , wxITEM_NORMAL },
+ { WXMENU_EDIT_PASTE_QUOTED,gettext_noop("Paste "ed\tShift-Ctrl-V"),
gettext_noop("Paste from clipboard as quoted text") , wxITEM_NORMAL },
{ WXMENU_SEPARATOR, "", "" ,
wxITEM_NORMAL },
{ WXMENU_EDIT_FIND, gettext_noop("&Find...\tF3"), gettext_noop("Find text in
message") , wxITEM_NORMAL },
-------------------------------------------------------
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