Ok, Great woirk by the "HammerCrewe" and thanks to all
I am trying to see how we cab feed an url into thehammer from an external app ( a mail client for example) or from the commad line
From an earlier script I spotted this example which we can addapt into the current script I think, there is also an example of how we can add the http:// to addresses if its not entered
if len(sys.argv) > 1:
url = sys.argv
url = DEFAULT_URL
browser = SimpleBrowser()
def on_active(self, widget, data=None):
'''When the user enters an address in the bar, we check to make
sure they added the http://, if not we add it for them. Once
the url is correct, we just ask webkit to open that site.'''
url = self.url_bar.get_text()
url = "http://"+url
The other Question i have relates to hiding the toolbar with a keybinding, I notice that there is line that say 'if toolbar true @ doe this mean ther is a toggle state?
def __init__(self, location_enabled=True, toolbar_enabled=True):
Not sure if this makes sence as I am flagging a bit today, I will have a coffee of 5 and see if that helps.
EDIT - added both sets of code for review