0

I'm currently new to Ubuntu programming, and learning the basic's of it. I've been following this tutorial as some of you might know in previous questions asked about it I've made before.

Now, I've created a Web browser using 'quickly'. It's a simple program witch helps create programs on Ubuntu. In the video It showed how to 'refresh' the page witch is basically this code:

def on_refreshbutton_clicked(self, widget):  
    self.webview.reload()

Now, my question is to make the page go back from a previous page is it this code:

def on_refreshbutton_clicked(self, widget):
    self.webview.back()

I used 'refreshbutton' as a example, but if you would like to view the full source of the the code just ask for it and I'll provide you with a link with which you can view the source.

*Code Edit from Mark R. - Thanks for the update.

Mark R. Wilkins
  • 1,282
  • 7
  • 15
Shaun
  • 147
  • 1
  • 2
  • 16
  • 1
    *Ubuntu* programming? Where? What is the link to the tutorial? – Sudipta Chatterjee Sep 01 '13 at 09:45
  • http://www.youtube.com/watch?v=sO8hiPreNBg - He calles it a 'APP' but I think of it as program. – Shaun Sep 01 '13 at 09:46
  • Hi Shaun, a couple suggestions: first, when you insert code into your questions, add four spaces to each line and you won't have to use the backtick syntax. Also, I would recommend including the link to the original code (or better yet putting relevant parts in your question) when you ask it, because in this case it's pretty clear you're relying on libraries we can't see to do a lot of our code's work. – Mark R. Wilkins Sep 01 '13 at 09:50
  • I guess you could try whether it works or not in python interpreter. Try help(self.webview) to see all methods in it in python interpreter. – Sai Manoj Kumar Yadlapati Sep 01 '13 at 09:51
  • Also added the canonical-quickly tag because the question is specific to that app framework. – Mark R. Wilkins Sep 01 '13 at 09:55

1 Answers1

0

Create new button and give it label backbutton Than try to add this code to your py file.

def on_backbutton_clicked(self, widget):
    self.webview.go_back()

It will go back. Also you can add forward button.

def on_forwardbutton_clicked(self, widget):
    self.webview.go_forward()

I hope I am not too late.

Beratod
  • 11
  • 2