How to add new context menu item in qlog?

Asked by André Bachmann

After my first little success in customizing qbzr, now I want to add a new context menu item when looking at a revision and a file in qlog. Please look at the screenshot: http://najut.org/~blackarchon/qlog.png
There I want to have a new entry (like 'Save file on this revision as...') which allows me to save the selected file at the chosen revision to a specified path.

I understand that I have to modify qlog.py and add in FileListContainer.__init__ something like:

self.file_list_context_menu_save_revert_file = \
                self.file_list_context_menu.addAction(
                                        gettext("Save file on this revision as..."),
                                        self.save_revert_file)

And then I have to write this method save_revert_file. At the beginning, it should look like show_file_content, but I will have to change the last three lines, right? Any hints on how I get a standard save-file-as-dialog?

Question information

Language:
English Edit question
Status:
Solved
For:
QBzr Edit question
Assignee:
No assignee Edit question
Solved by:
André Bachmann
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Belchenko (bialix) said :
#1

André B., I invite you to join our discussion group:
http://groups.google.com/group/qbzr .
I think there's more appropriate place to talk about qbzr codebase.

Please?

--
All the dude wanted was his rug back

Revision history for this message
André Bachmann (andrebachmann-dd) said :
#2

Ok, I will do so.