GTG

Code review comment for lp:~sara.ribeiro/gtg/userdoc

Revision history for this message
Izidor MatuĊĦov (izidor) wrote :

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):

<code>
def show_help(help_url, *args):
   openurl(help_url)
   return True

def register_help(widget, help_addr):
   full_help_addr = construct_help_addr(help_addr)

   # Code for adding accel group here
</code>

review: Needs Fixing

« Back to merge proposal