Ejemplo n.º 1
0
    def _on_header_bar_toggled(self, button):
        BaseView._on_header_bar_toggled(self, button)

        view_selection = self._view.get_generic_view().get_selection()
        if button.get_active():
            self.text_renderer.set_fixed_size(178, -1)
            self._last_selection = view_selection.get_selected()[1]
            view_selection.set_mode(Gtk.SelectionMode.NONE)
        else:
            self.text_renderer.set_fixed_size(220, -1)
            view_selection.set_mode(Gtk.SelectionMode.SINGLE)
            if self._last_selection is not None:
                view_selection.select_iter(self._last_selection)
Ejemplo n.º 2
0
    def _on_header_bar_toggled(self, button):
        BaseView._on_header_bar_toggled(self, button)

        view_selection = self.view.get_generic_view().get_selection()
        if button.get_active():
            self.text_renderer.set_fixed_size(178, -1)
            self._last_selection = view_selection.get_selected()[1]
            view_selection.set_mode(Gtk.SelectionMode.NONE)
        else:
            self.text_renderer.set_fixed_size(220, -1)
            view_selection.set_mode(Gtk.SelectionMode.SINGLE)
            if self._last_selection is not None:
                view_selection.select_iter(self._last_selection)