https://bugs.freedesktop.org/show_bug.cgi?id=64088

          Priority: medium
            Bug ID: 64088
          Assignee: libreoffice-bugs@lists.freedesktop.org
           Summary: Reuse Recent Documents code in the Start Center
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: ke...@suse.cz
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.1.0.0.alpha0+ Master
         Component: UI
           Product: LibreOffice

The Start Center constructs the Recent Documents menu in
BackingWindow::prepareRecentFileMenu():

http://cgit.freedesktop.org/libreoffice/core/tree/framework/source/services/backingwindow.cxx#n283

But this is effectively duplicating code (AKA copy'n'paste) from elsewhere,
which causes that it lacks the nice 'Clear List' feature.  It would be much
better to re-use the code, like in
SfxRecentFilesToolBoxControl::CreatePopupWindow():

http://cgit.freedesktop.org/libreoffice/core/tree/sfx2/source/toolbox/tbxitem.cxx#n1761

To do this, you want to change the ActivateHdl link:

http://cgit.freedesktop.org/libreoffice/core/tree/framework/source/services/backingwindow.cxx#n970

to do the same thing as SfxRecentFilesToolBoxControl::CreatePopupWindow(), and
remove all unnecessary pieces like prepareRecentFileMenu, maRecentFiles, etc.
etc.

Should be straightforward, but in case you have problems, please ask :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to