[Libreoffice-ux-advise] [Bug 71770] Enhancement: Move Cut/Copy/Paste to the top in the context menu
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jul 9 02:14:07 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=71770
Michael Meeks <michael.meeks at collabora.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Whiteboard| |EasyHack DifficultyBeginner
| |SkillCpp TopicCleanup
--- Comment #10 from Michael Meeks <michael.meeks at collabora.com> ---
Sounds like a slam-dunk to me. Unfortunately popup menus are not nearly as
trivial to edit as you might hope - there is no nice XML stuff; it is all
resource file blather with things like this:
class SwReadOnlyPopup : public PopupMenu
Menu MN_READONLY_POPUP
{
ItemList =
{
MenuItem
{
Identifier = MN_READONLY_OPENURL ;
HelpId = CMD_SID_OPENDOC ;
Text [ en-US ] = "~Open" ;
};
...
SEPARATOR
MenuItem
{
Identifier = MN_READONLY_COPY ;
HelpId = CMD_SID_COPY;
Text [ en-US ] = "~Copy" ;
};
};
Though that guy should be easy to move 'Copy' to the top of the menu (for
readonly documents) - finding the other more generic bits is perhaps harder:
sfx2/source/menu/menu.hrc:#define MN_CLIPBOARDFUNCS
RID_SFX_MENU_START+1
sfx2/source/menu/menu.src:Menu MN_CLIPBOARDFUNCS
sfx2/source/menu/mnumgr.cxx: PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS
) );
sfx2/source/menu/mnumgr.cxx: PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS
) );
is one place that might be useful. Indeed - reading that it looks quite
promising:
SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId,
SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow )
{
-seems-
to insert these items into menus that don't have them =) and it always does it
at the end; that should be ~trivial to change this to the beginning - even a
beginner can do that =)
cf. include/vcl/menu.hxx:
void InsertSeparator( const OString &rIdent = OString(),
sal_uInt16 nPos = MENU_APPEND );
We need to provide an nPos of zero (ONO) for the insertion of those items and
... bingo =) => an easy hack.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libreoffice-ux-advise
mailing list