Is there a way to create a Gtk.Button("http://www.google.com"), when clicked will open the system default Web Browser using the label as the URL?
What I could do is...
import os
button = Gtk.Button(label="http://www.google.com")
label = button.get_text()
os.system("sensible-browser " + label)
The above code does what I need it to do. Is this the correct way about doing this? Or is there a GTK function I should be using instead?
(Disclaimer: I am usually more specific with my questions, I feel like this is really basic and may not even be possible and I have checked the docs. Thank you!)