def __init__(self): gtk.VBox.__init__(self) #vbox = gtk.VBox(False, 8) wv = WebView() print 'show', WORKFILE, path(WORKFILE).exists() wv.load_uri(WORKFILE) wv.show() self.pack_start(wv, True, True, 0) #self.add(wv) self.show_all()
def __init__(self, handle): print "running activity init", handle activity.Activity.__init__(self, handle) print "activity running" self.set_title('Teach Teacher') toolbox = activity.ActivityToolbox(self) self.set_toolbox(toolbox) toolbar = gtk.Toolbar() self.xois = ToolButton('computer-xo') self.xois.set_tooltip("T's XO") self.xois.connect('clicked', self.xois_clicked) toolbar.insert(self.xois, -1) self.xois.show() self.guide = ToolButton('go-next') self.guide.set_tooltip("T's Guide") self.guide.connect('clicked', self.guide_clicked) toolbar.insert(self.guide, -1) self.guide.show() self.diary = ToolButton('activity-journal') self.diary.set_tooltip("T's Diary") self.diary.connect('clicked', self.diary_clicked) toolbar.insert(self.diary, -1) self.diary.show() self.society = ToolButton('zoom-neighborhood') self.society.set_tooltip("T's Society") self.society.connect('clicked', self.society_clicked) toolbar.insert(self.society, -1) self.society.show() toolbar.show() toolbox.add_toolbar("Menu", toolbar) toolbox.show() self.webview = WebView() self.set_canvas(self.webview) self.webview.show() self.webview.load_uri('http://teach-teacher.ep.io/') print "AT END OF THE CLASS"
def __init__(self, handle): print "running activity init", handle activity.Activity.__init__(self, handle) print "activity running" self.set_title('Teach Teacher') toolbox = activity.ActivityToolbox(self) self.set_toolbox(toolbox) toolbar = gtk.Toolbar() self.goBack = ToolButton('go-left') self.goBack.set_tooltip("Go Back") self.goBack.connect('clicked', self.back_clicked) toolbar.insert(self.goBack, -1) self.goBack.show() self.home = ToolButton('go-home') self.home.set_tooltip("Home") self.home.connect('clicked', self.home_clicked) toolbar.insert(self.home, -1) self.home.show() self.xois = ToolButton('computer-xo') self.xois.set_tooltip("T's XO") self.xois.connect('clicked', self.xois_clicked) # toolbar.insert(self.xois, -1) # self.xois.show() self.guide = ToolButton('go-next') self.guide.set_tooltip("T's Guide") self.guide.connect('clicked', self.guide_clicked) # toolbar.insert(self.guide, -1) # self.guide.show() toolbar.show() toolbox.add_toolbar("Menu", toolbar) toolbox.show() self.webview = WebView() self.set_canvas(self.webview) self.webview.show() self.webview.load_uri('http://147.47.120.20/~tsquare/menu.php') print "AT END OF THE CLASS"
def __init__(self, handle): activity.Activity.__init__(self, handle) self.props.max_participants = 1 self._web_view = WebView() toolbox = activity.ActivityToolbox(self) self.set_toolbox(toolbox) toolbox.show() toolbar = Toolbar(self._web_view) toolbox.add_toolbar(_('Navigation'), toolbar) toolbar.show() self.set_canvas(self._web_view) self._web_view.show() toolbox.set_current_toolbar(1) self._web_view.load_uri(HOME)
def __init__(self, controller, uri, parent_widget, widget_list): """ pre: parent_widget is not None pre: widget_list is not None """ self._controller = controller self._widget_list = widget_list self._parent_widget = parent_widget self._htmlview = None self._uri = '' if uri is None else uri try: # The XOCom object helps us communicate with the browser # This uses web/index.html as the default page to load #!! from XOCom import XOCom #!! self.xocom = XOCom(self.control_sending_text) #REMEMBER THAT I HAVE STILL TO SEND THE ARGUMENT IN THE XOCOM CLASS #!! self._htmlview = self.xocom.create_webview() self._htmlview = WebView() except: ka_debug.err('failed creating hulahop [%s] [%s]' % \ (sys.exc_info()[0], sys.exc_info()[1])) traceback.print_exc(file=sys.__stderr__)
def __init__(self, DIRECTORIO_DATOS): self.directorio = DIRECTORIO_DATOS self.uri = None self.navegador = WebView()
def get_Navegador(self): # Establece la dirección por defecto, y devuelve el navegador para ser incrustado en un contenedor gtk self.navegador = WebView() self.navegador.load_uri(DIRECTORIO_DATOS + "web.htm") return self.navegador
import hulahop hulahop.startup(os.path.expanduser('~/.test-hulahop')) from hulahop.webview import WebView from xpcom import components def _quit(window): hulahop.shutdown() gtk.main_quit() cls = components.classes["@mozilla.org/preferences-service;1"] prefService = cls.getService(components.interfaces.nsIPrefService) branch = prefService.getBranch('') branch.setBoolPref('security.warn_submit_insecure', False) branch.setBoolPref('security.warn_submit_insecure.show_once', False) window = gtk.Window() window.connect("destroy", _quit) web_view = WebView() web_view.load_uri('http://www.google.com') window.add(web_view) web_view.show() window.show() gtk.main()
def create_webview(self): web_view = WebView() web_view.load_uri(self.uri) web_view.show() return web_view