Page 1 of 1

[Python] Context sensitive recent files list

Posted: Mon Jun 23, 2008 6:50 pm
by hanya
This is an example implementation of the context sensitive recent files list in Python.
"Recent Files 2" menu is shown next position of the existing "Recent Files" of the File menu of Writer, Calc, Drawing, Impress, Master Document, HTML and Formula. And it shows files list including only the same kind of the current document.
There is the example to implement PopupMenuController in C++ in the OOoWiki, but there is the difference to implement it in Python.
The PopupMenuController is not instantiated through com.sun.star.lang.XInitialization interface, but it is instantiated through python __init__ method. You need to get some arguments passed as tuple of com.sun.star.beans.PropertyValue like the following:

Code: Select all

	def __init__(self, ctx, *args):
The file list of the history can be found /org.openoffice.Office.Common/History node in the configuration.
The list of filter names is taken from com.sun.star.document.FilterFactory service and the documentation can be read in the Office Development chapter fo the DevGuide.
AnotherRecentFilesList-0.0.6.oxt.zip
Remove "zip" file extension before installation.
(5.91 KiB) Downloaded 535 times

Re: [Python]Context sensitive recent files list

Posted: Tue Jun 24, 2008 4:55 pm
by hanya
Dummy post to remove from the unanswered list.