Revision: 7475
http://mahogany.svn.sourceforge.net/mahogany/?rev=7475&view=rev
Author: vadz
Date: 2008-05-13 12:43:11 -0700 (Tue, 13 May 2008)
Log Message:
-----------
add toolbar/menubar/full screen menu commands to the composer and address book
windows too
Modified Paths:
--------------
trunk/M/include/gui/wxMFrame.h
trunk/M/include/gui/wxMenuDefs.h
trunk/M/src/adb/AdbFrame.cpp
trunk/M/src/gui/wxComposeView.cpp
trunk/M/src/gui/wxMFrame.cpp
trunk/M/src/gui/wxMessageView.cpp
Modified: trunk/M/include/gui/wxMFrame.h
===================================================================
--- trunk/M/include/gui/wxMFrame.h 2008-05-06 00:39:31 UTC (rev 7474)
+++ trunk/M/include/gui/wxMFrame.h 2008-05-13 19:43:11 UTC (rev 7475)
@@ -79,13 +79,21 @@
/// Passes a menu id to modules for reacting to it.
virtual bool ProcessModulesMenu(int id);
- /// add a menu to the bar
- virtual void AddFileMenu(void);
- virtual void AddHelpMenu(void);
- void AddEditMenu(void);
- void AddMessageMenu(void);
- void AddLanguageMenu(void);
+ /**
+ Methods for adding standard menus to the frame menu bar.
+ All frames should use AddFileMenu() and AddHelpMenu() and either
+ AddMessageMenu() if they show a message or AddViewMenu() otherwise.
+ */
+ //@{
+ virtual void AddFileMenu();
+ virtual void AddHelpMenu();
+ void AddEditMenu();
+ void AddViewMenu();
+ void AddMessageMenu();
+ void AddLanguageMenu();
+ //@}
+
/// wxMFrame handles all print setup
void OnPrintSetup();
void OnPageSetup();
Modified: trunk/M/include/gui/wxMenuDefs.h
===================================================================
--- trunk/M/include/gui/wxMenuDefs.h 2008-05-06 00:39:31 UTC (rev 7474)
+++ trunk/M/include/gui/wxMenuDefs.h 2008-05-13 19:43:11 UTC (rev 7475)
@@ -255,7 +255,10 @@
WXMENU_MSG_SAVEADDRESSES,
WXMENU_MSG_END = WXMENU_MSG_SAVEADDRESSES,
- WXMENU_VIEW_BEGIN = WXMENU_MSG_END,
+ // MSGVIEW menu should be used by the frames showing the messages in them
+ // (wxMainFrame and wxMessageViewFrame currently) and combines the VIEW menu
+ // (which should be shown by all frames) with the message-specific commands
+ WXMENU_MSGVIEW_BEGIN = WXMENU_MSG_END,
WXMENU_VIEW_VIEWERS_SUBMENU_BEGIN,
// this submenu is filled dynamically and the ids of its items start at
// WXMENU_VIEW_VIEWERS_BEGIN defined below
@@ -272,10 +275,12 @@
#endif // EXPERIMENTAL_show_uid
WXMENU_VIEW_SHOWMIME,
WXMENU_VIEW_SEP2,
+ WXMENU_VIEW_BEGIN = WXMENU_VIEW_SEP2,
WXMENU_VIEW_TOOLBAR,
WXMENU_VIEW_STATUSBAR,
WXMENU_VIEW_FULLSCREEN,
WXMENU_VIEW_END = WXMENU_VIEW_FULLSCREEN,
+ WXMENU_MSGVIEW_END = WXMENU_VIEW_END,
WXMENU_COMPOSE_BEGIN = WXMENU_VIEW_END,
WXMENU_COMPOSE_INSERTFILE,
Modified: trunk/M/src/adb/AdbFrame.cpp
===================================================================
--- trunk/M/src/adb/AdbFrame.cpp 2008-05-06 00:39:31 UTC (rev 7474)
+++ trunk/M/src/adb/AdbFrame.cpp 2008-05-13 19:43:11 UTC (rev 7475)
@@ -1266,6 +1266,7 @@
WXADD_MENU(GetMenuBar(), ADBBOOK, _("&Book")); // operations on address
books
WXADD_MENU(GetMenuBar(), ADBEDIT, _("&Edit")); // commands to edit ADB
entries
WXADD_MENU(GetMenuBar(), ADBFIND, _("&Find")); // searching and moving
+ AddViewMenu(); // frame viewing options
AddHelpMenu(); // help
// toolbar and status bar
Modified: trunk/M/src/gui/wxComposeView.cpp
===================================================================
--- trunk/M/src/gui/wxComposeView.cpp 2008-05-06 00:39:31 UTC (rev 7474)
+++ trunk/M/src/gui/wxComposeView.cpp 2008-05-13 19:43:11 UTC (rev 7475)
@@ -1908,6 +1908,7 @@
AddEditMenu();
WXADD_MENU(GetMenuBar(), COMPOSE, _("&Compose"));
AddLanguageMenu();
+ AddViewMenu();
AddHelpMenu();
GetMenuBar()->Enable(WXMENU_EDIT_PASTE_QUOTED, m_OriginalMessage != NULL);
Modified: trunk/M/src/gui/wxMFrame.cpp
===================================================================
--- trunk/M/src/gui/wxMFrame.cpp 2008-05-06 00:39:31 UTC (rev 7474)
+++ trunk/M/src/gui/wxMFrame.cpp 2008-05-13 19:43:11 UTC (rev 7475)
@@ -320,25 +320,31 @@
#endif // USE_PYTHON
void
-wxMFrame::AddEditMenu(void)
+wxMFrame::AddEditMenu()
{
WXADD_MENU(GetMenuBar(), EDIT, _("&Edit"));
}
void
-wxMFrame::AddHelpMenu(void)
+wxMFrame::AddViewMenu()
{
+ WXADD_MENU(GetMenuBar(), VIEW, _("&View"));
+}
+
+void
+wxMFrame::AddHelpMenu()
+{
WXADD_MENU(GetMenuBar(), HELP, _("&Help"));
}
void
-wxMFrame::AddMessageMenu(void)
+wxMFrame::AddMessageMenu()
{
WXADD_MENU(GetMenuBar(), MSG, _("Me&ssage"));
}
void
-wxMFrame::AddLanguageMenu(void)
+wxMFrame::AddLanguageMenu()
{
WXADD_MENU(GetMenuBar(), LANG, _("&Language"));
Modified: trunk/M/src/gui/wxMessageView.cpp
===================================================================
--- trunk/M/src/gui/wxMessageView.cpp 2008-05-06 00:39:31 UTC (rev 7474)
+++ trunk/M/src/gui/wxMessageView.cpp 2008-05-13 19:43:11 UTC (rev 7475)
@@ -296,7 +296,7 @@
CHECK_RET( frame, _T("no parent frame in wxMessageView") );
// create the top level menu
- WXADD_MENU(frame->GetMenuBar(), VIEW, _("&View"));
+ WXADD_MENU(frame->GetMenuBar(), MSGVIEW, _("&View"));
// initialize viewers submenu
// --------------------------
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates