Esempio n. 1
0
    def __init__(self, parent):

        self.pydebug = parent
        #from hulahop.webview import WebView
        from browser import Browser

        self.help_id = None
        self.handle = ActivityHandle()
        self.handle.activity_id = util.unique_id()
        Window.__init__(self)
        self.connect('realize', self.realize_cb)

        self.props.max_participants = 1

        self._web_view = Browser()

        ##self.toolbox = Toolbox()
        ##self.toolbox.connect('current_toolbar_changed',self.goto_cb)
        ##self.set_toolbox(self.toolbox)
        ##self.toolbox.show()

        activitybar = Gtk.Toolbar()
        ##self.toolbox.add_toolbar(_('Activity'), activitybar)
        activitybar.show_all()

        editbar = Gtk.Toolbar()
        ##self.toolbox.add_toolbar(_('Edit'), editbar)
        #editbar.connect('current_toolbar_changed', self.goto_cb,1)
        editbar.show_all()

        projectbar = Gtk.Toolbar()
        ##self.toolbox.add_toolbar(_('Project'), projectbar)
        #projectbar.connect('current_toolbar_changed', self.goto_cb,2)
        projectbar.show_all()

        self.help_toolbar = Toolbar(self._web_view)
        self.help_toolbar.show()
        ##self.toolbox.add_toolbar(_('Help'), self.help_toolbar)
        ##self.toolbox._notebook.set_current_page(HELP_PANE)

        self.set_canvas(self._web_view)
        self._web_view.show()

        self.toolbox.set_current_toolbar(HELP_PANE)

        self._web_view.load_uri(HOME)
        self.pid = Popen(['/usr/bin/pydoc', '-p', '23432'])
Esempio n. 2
0
    def __init__(self, parent):
        self.pydebug = parent

        self.help_id = None
        self.handle = ActivityHandle()
        self.handle.activity_id = util.unique_id()

        Window.__init__(self)
        self.connect('realize', self.realize_cb)

        self._web_view = Browser()

        #determine which language we are going to be using
        help_root = self.get_help_root()
        self.HOME = os.path.join(help_root, 'PyDebug.htm')

        self.toolbarbox = ToolbarBox()
        self.set_toolbar_box(self.toolbarbox)
        self.toolbarbox.show()

        ##activitybar = Gtk.Toolbar()
        ##self.toolbarbox.add_toolbar(_('Activity'), activitybar)
        ##activitybar.show_all()

        editbar = Gtk.Toolbar()
        self.toolbarbox.toolbar.insert(
            ToolbarButton(page=editbar, icon_name='toolbar-edit'), -1)
        editbar.show_all()

        projectbar = Gtk.Toolbar()
        self.toolbarbox.toolbar.insert(
            ToolbarButton(page=self, icon_name='system-run'), -1)
        projectbar.show_all()

        self.help_toolbar = Toolbar(self, self._web_view)
        self.help_toolbar.show()
        self.toolbarbox.toolbar.insert(
            ToolbarButton(page=self.help_toolbar, icon_name="help-about"), -1)

        self.set_canvas(self._web_view)
        self._web_view.show()

        self._web_view.load_uri(self.HOME)
        self.pid = Popen(['/usr/bin/pydoc', '-p', '23432'])
def create_activity_id():
    """Generate a new, unique ID for this activity"""
    return util.unique_id()
def create_activity_id():
    """Generate a new, unique ID for this activity"""
    return util.unique_id()
Esempio n. 5
0
 def realize_cb(self, window):
     self.help_id = util.unique_id()
     wm.set_activity_id(window.window, self.help_id)
     self.help_window = window