def open_file(self, file_view, path, column, window): model = file_view.get_model() try: iter_ = model.get_iter(path) except ValueError: pass else: location = model.get_value(iter_, Column.LOCATION) Pluma.commands_load_uri(window, location.get_uri(), None, -1) self.destroy()
def on_activated(self, gfile): Pluma.commands_load_uri(self._window, gfile.get_uri(), None, -1) return True
def restore_open_files(self, window): if self.is_only_window(): settings = Gio.Settings.new(SCHEMA_ID) for uri in settings.get_value('uris'): if Pluma.utils_uri_exists(uri): Pluma.commands_load_uri(window, uri, None, -1)