Subversion Repositories basico

Rev

Rev 273 | Rev 278 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 273 Rev 277
Line 115... Line 115...
115
115
116
    def setup_headerbar_right(self, hb):
116
    def setup_headerbar_right(self, hb):
117
        rhbox = Gtk.HBox()
117
        rhbox = Gtk.HBox()
118
118
119
        ## Help togglebutton
119
        ## Help togglebutton
120
        if self.srvuif.webkit_support():
-
 
121
            button = self.srvgui.add_widget('gtk_togglebutton_help', Gtk.ToggleButton())
-
 
122
            icon = self.srvicm.get_pixbuf_icon('basico-help', 24, 24)
-
 
123
            image = Gtk.Image()
-
 
124
            image.set_from_pixbuf(icon)
-
 
125
            button.set_image(image)
-
 
126
            button.set_relief(Gtk.ReliefStyle.NONE)
-
 
127
            button.connect('toggled', self.srvclb.gui_toggle_help_visor)
-
 
128
        else:
-
 
129
            button = self.srvgui.add_widget('gtk_button_help', Gtk.Button())
-
 
130
            icon = self.srvicm.get_pixbuf_icon('basico-help', 24, 24)
-
 
131
            image = Gtk.Image()
-
 
132
            image.set_from_pixbuf(icon)
-
 
133
            button.set_image(image)
-
 
134
            button.set_relief(Gtk.ReliefStyle.NONE)
-
 
135
            button.connect('clicked', self.srvclb.gui_lauch_help_visor)
-
 
-
 
120
        # ~ if self.srvuif.webkit_support():
-
 
121
            # ~ button = self.srvgui.add_widget('gtk_togglebutton_help', Gtk.ToggleButton())
-
 
122
            # ~ icon = self.srvicm.get_pixbuf_icon('basico-help', 24, 24)
-
 
123
            # ~ image = Gtk.Image()
-
 
124
            # ~ image.set_from_pixbuf(icon)
-
 
125
            # ~ button.set_image(image)
-
 
126
            # ~ button.set_relief(Gtk.ReliefStyle.NONE)
-
 
127
            # ~ button.connect('toggled', self.srvclb.gui_toggle_help_visor)
-
 
128
        # ~ else:
-
 
129
            # ~ button = self.srvgui.add_widget('gtk_button_help', Gtk.Button())
-
 
130
            # ~ icon = self.srvicm.get_pixbuf_icon('basico-help', 24, 24)
-
 
131
            # ~ image = Gtk.Image()
-
 
132
            # ~ image.set_from_pixbuf(icon)
-
 
133
            # ~ button.set_image(image)
-
 
134
            # ~ button.set_relief(Gtk.ReliefStyle.NONE)
-
 
135
            # ~ button.connect('clicked', self.srvclb.gui_lauch_help_visor)
136
136
137
        rhbox.pack_end(button, False, False, 0)
-
 
-
 
137
        # ~ rhbox.pack_end(button, False, False, 0)
138
138
139
        ## System Menu
139
        ## System Menu
140
        button = Gtk.Button()
140
        button = Gtk.Button()
141
        icon = self.srvicm.get_pixbuf_icon('basico-menu-system', 24, 24)
141
        icon = self.srvicm.get_pixbuf_icon('basico-menu-system', 24, 24)
142
        image = Gtk.Image()
142
        image = Gtk.Image()
Line 386... Line 386...
386
        visor_annotations_page = self.setup_tab_annotations_visor()
386
        visor_annotations_page = self.setup_tab_annotations_visor()
387
        visor_annotations_page.set_hexpand(True)
387
        visor_annotations_page.set_hexpand(True)
388
        tab_widget = self.srvuif.create_notebook_tab_label('basico-annotation', '<b>Annotations</b>')
388
        tab_widget = self.srvuif.create_notebook_tab_label('basico-annotation', '<b>Annotations</b>')
389
        notebook.append_page(visor_annotations_page, tab_widget)
389
        notebook.append_page(visor_annotations_page, tab_widget)
390
390
391
        if self.srvuif.webkit_support():
-
 
392
            visor_help_page = self.srvgui.add_widget('gtk_notebook_help_page', self.setup_tab_help_visor())
-
 
393
            visor_help_page.set_hexpand(True)
-
 
394
            tab_widget = self.srvuif.create_notebook_tab_label('basico-help', '<b>Help</b>')
-
 
395
            notebook.append_page(visor_help_page, tab_widget)
-
 
396
            self.srvuif.set_widget_visibility('gtk_notebook_help_page', False)
-
 
397
            notebook.child_set_property(visor_help_page, "tab-expand", True)
-
 
398
            notebook.child_set_property(visor_help_page, "tab-fill", False)
-
 
-
 
391
        # ~ if self.srvuif.webkit_support():
-
 
392
            # ~ visor_help_page = self.srvgui.add_widget('gtk_notebook_help_page', self.setup_tab_help_visor())
-
 
393
            # ~ visor_help_page.set_hexpand(True)
-
 
394
            # ~ tab_widget = self.srvuif.create_notebook_tab_label('basico-help', '<b>Help</b>')
-
 
395
            # ~ notebook.append_page(visor_help_page, tab_widget)
-
 
396
            # ~ self.srvuif.set_widget_visibility('gtk_notebook_help_page', False)
-
 
397
            # ~ notebook.child_set_property(visor_help_page, "tab-expand", True)
-
 
398
            # ~ notebook.child_set_property(visor_help_page, "tab-fill", False)
399
399
400
400
401
        notebook.child_set_property(visor_sapnotes_page, "tab-expand", True)
401
        notebook.child_set_property(visor_sapnotes_page, "tab-expand", True)
402
        notebook.child_set_property(visor_sapnotes_page, "tab-fill", False)
402
        notebook.child_set_property(visor_sapnotes_page, "tab-fill", False)
403
        notebook.child_set_property(visor_annotations_page, "tab-expand", True)
403
        notebook.child_set_property(visor_annotations_page, "tab-expand", True)
Line 406... Line 406...
406
406
407
        box.pack_start(notebook, True, True, 0)
407
        box.pack_start(notebook, True, True, 0)
408
408
409
        return box
409
        return box
410
410
411
    def setup_tab_help_visor(self):
-
 
412
        from basico.widgets.wdg_browser import BasicoBrowser
-
 
413
        box = Gtk.VBox()
-
 
414
        box.set_hexpand(True)
-
 
-
 
411
    # ~ def setup_tab_help_visor(self):
-
 
412
        # ~ from basico.widgets.wdg_browser import BasicoBrowser
-
 
413
        # ~ box = Gtk.VBox()
-
 
414
        # ~ box.set_hexpand(True)
415
415
416
        ### Help Visor
-
 
417
        browser = BasicoBrowser()
-
 
418
        self.controller.debug(FILE['HELP_INDEX'])
-
 
419
        browser.load_url("file://%s" % FILE['HELP_INDEX'])
-
 
420
        box.pack_start(browser, True, True, 0)
-
 
421
        box.show_all()
-
 
422
        return box
-
 
-
 
416
        # ~ ### Help Visor
-
 
417
        # ~ browser = BasicoBrowser()
-
 
418
        # ~ self.controller.debug(FILE['HELP_INDEX'])
-
 
419
        # ~ browser.load_url("file://%s" % FILE['HELP_INDEX'])
-
 
420
        # ~ box.pack_start(browser, True, True, 0)
-
 
421
        # ~ box.show_all()
-
 
422
        # ~ return box
423
423
424
424
425
    def setup_tab_sapnote_visor(self):
425
    def setup_tab_sapnote_visor(self):
426
        box = Gtk.VBox()
426
        box = Gtk.VBox()
427
        box.set_hexpand(True)
427
        box.set_hexpand(True)