Comment 2 for bug 130245

Revision history for this message
Jasper Groenewegen (colbrac) wrote :

In current trunk there is an option 'Bookmark current folder' so half the work is done..
With respect to the context menu..
It can be implemented, but in different ways.
-The OliveMenu class generating the menu items knows the selected item so before creating the self.actiongroup.add_actions is invoked, there could be some if os.path.isdir(self.selected): magic (if selected gets a string from the event that is. Didn't check.) to pick between the strings 'Bookmark current folder' and 'Bookmark this folder'. The current 'Bookmark' is ambiguous anyway.
- Or leave that ambiguous 'Bookmark' and do the smart stuff behind the screens in the OliveMenu.bookmark method. E.g. a 'if os.path.isdir(self.selected): path = self.selected, else: path = self.path, followed by the self.pref.add_bookmark(path)
Or as a matter of fact.. we could do both. :)