I like the change and have a proposal to make it even better! What about extracting the code you added into a separate module, something like GTG.gtk.help?
Why?
- less duplicated code
- add more abstraction: I want the documentation for this dialog be this URI
- it would be easy to modify way how to open/display help
The use can be as easy as this:
<code>
from GTG.gtk.help import register_help
register_help(self.dialog, 'preferences')
</code>
Implementation will be the code you copy pasted (pseudo code):
I like the change and have a proposal to make it even better! What about extracting the code you added into a separate module, something like GTG.gtk.help?
Why?
- less duplicated code
- add more abstraction: I want the documentation for this dialog be this URI
- it would be easy to modify way how to open/display help
The use can be as easy as this:
<code> help(self. dialog, 'preferences')
from GTG.gtk.help import register_help
register_
</code>
Implementation will be the code you copy pasted (pseudo code):
<code> help_url)
def show_help(help_url, *args):
openurl(
return True
def register_ help(widget, help_addr): help_addr( help_addr)
full_help_addr = construct_
# Code for adding accel group here
</code>