diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 3e928357f..d3e1d65a9 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -1466,7 +1466,7 @@ class GrampsPreferences(ConfigureDialog): status = f.run() if status == Gtk.ResponseType.OK: - val = conv_to_unicode(f.get_filename()) + val = f.get_filename() if val: self.path_entry.set_text(val) f.destroy() diff --git a/gramps/gui/dbloader.py b/gramps/gui/dbloader.py index d1d6e1679..b15bad638 100644 --- a/gramps/gui/dbloader.py +++ b/gramps/gui/dbloader.py @@ -64,7 +64,6 @@ from gramps.gen.db.exceptions import (DbUpgradeRequiredError, BsddbDowngradeRequiredError, PythonUpgradeRequiredError, PythonDowngradeError) -from gramps.gen.constfunc import conv_to_unicode from .pluginmanager import GuiPluginManager from .dialog import (DBErrorDialog, ErrorDialog, QuestionDialog2, WarningDialog) @@ -171,7 +170,7 @@ class DbLoader(CLIDbLoader): if response == Gtk.ResponseType.CANCEL: break elif response == Gtk.ResponseType.OK: - filename = conv_to_unicode(import_dialog.get_filename()) + filename = import_dialog.get_filename() if self.check_errors(filename): # displays errors if any continue diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py index fab8ff1a5..e8a65655b 100644 --- a/gramps/gui/plug/_guioptions.py +++ b/gramps/gui/plug/_guioptions.py @@ -59,7 +59,7 @@ from ..selectors import SelectorFactory from gramps.gen.display.name import displayer as _nd from gramps.gen.display.place import displayer as _pd from gramps.gen.filters import GenericFilterFactory, GenericFilter, rules -from gramps.gen.constfunc import conv_to_unicode, get_curr_dir +from gramps.gen.constfunc import get_curr_dir from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext @@ -1714,7 +1714,7 @@ class GuiDestinationOption(Gtk.Box): status = fcd.run() if status == Gtk.ResponseType.OK: - path = conv_to_unicode(fcd.get_filename()) + path = fcd.get_filename() if path: if not self.__option.get_directory_entry() and \ not path.endswith(self.__option.get_extension()): diff --git a/gramps/gui/plug/_windows.py b/gramps/gui/plug/_windows.py index e1039153a..8202ef252 100644 --- a/gramps/gui/plug/_windows.py +++ b/gramps/gui/plug/_windows.py @@ -67,7 +67,6 @@ from ..editors import EditPerson from ..glade import Glade from ..listmodel import ListModel, NOSORT, TOGGLE from gramps.gen.const import URL_WIKISTRING, USER_HOME, WIKI_EXTRAPLUGINS_RAWDATA -from gramps.gen.constfunc import win, conv_to_unicode from gramps.gen.config import config from ..widgets.progressdialog import (LongOpStatus, ProgressMonitor, GtkProgressDialog) @@ -441,7 +440,7 @@ class PluginStatus(ManagedWindow): status = fcd.run() if status == Gtk.ResponseType.OK: - path = conv_to_unicode(fcd.get_filename()) + path = fcd.get_filename() if path: self.install_addon_path.set_text(path) fcd.destroy() diff --git a/gramps/gui/plug/export/_exportassistant.py b/gramps/gui/plug/export/_exportassistant.py index 1341275fe..16095f16e 100644 --- a/gramps/gui/plug/export/_exportassistant.py +++ b/gramps/gui/plug/export/_exportassistant.py @@ -57,7 +57,6 @@ from gi.repository import GdkPixbuf from gramps.gen.const import USER_HOME, ICON, SPLASH, GRAMPS_LOCALE as glocale _ = glocale.translation.gettext -from gramps.gen.constfunc import conv_to_unicode from gramps.gen.config import config from ...pluginmanager import GuiPluginManager from gramps.gen.utils.file import (find_folder, get_new_filename) @@ -314,11 +313,11 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) : Used as normal callback and event callback. For callback, we will have show=True """ - filename = conv_to_unicode(filechooser.get_filename()) + filename = filechooser.get_filename() if not filename: self.set_page_complete(filechooser, False) else: - folder = conv_to_unicode(filechooser.get_current_folder()) + folder = filechooser.get_current_folder() if not folder: folder = find_folder(filename) else: @@ -452,7 +451,7 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) : #Allow for exotic error: file is still not correct self.check_fileselect(self.chooser, show=False) if self.get_page_complete(self.chooser) : - filename = conv_to_unicode(self.chooser.get_filename()) + filename = self.chooser.get_filename() name = os.path.split(filename)[1] folder = os.path.split(filename)[0] confirm_text = _( @@ -585,7 +584,7 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) : hasattr(self.option_box_instance, "no_fileselect")): filename = "" else: - filename = conv_to_unicode(self.chooser.get_filename()) + filename = self.chooser.get_filename() config.set('paths.recent-export-dir', os.path.split(filename)[0]) ix = self.get_selected_format_index() config.set('behavior.recent-export-type', ix) diff --git a/gramps/gui/plug/report/_fileentry.py b/gramps/gui/plug/report/_fileentry.py index 52c806426..8fc7a157f 100644 --- a/gramps/gui/plug/report/_fileentry.py +++ b/gramps/gui/plug/report/_fileentry.py @@ -77,7 +77,7 @@ class FileEntry(Gtk.Box): dialog.present() status = dialog.run() if status == Gtk.ResponseType.OK: - self.set_filename(conv_to_unicode(dialog.get_filename())) + self.set_filename(dialog.get_filename()) dialog.destroy() def set_filename(self, path): diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index fe226378f..3d97b4fad 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -57,7 +57,6 @@ from gramps.gen.config import config from gramps.gen.errors import WindowActiveError from ..filters import SearchBar from ..widgets.menuitem import add_menuitem -from gramps.gen.constfunc import conv_to_unicode from gramps.gen.const import CUSTOM_FILTERS from gramps.gen.utils.debug import profile from gramps.gen.utils.string import data_recover_msg @@ -1018,7 +1017,6 @@ class ListView(NavigationView): while True: value = chooser.run() fn = chooser.get_filename() - fn = conv_to_unicode(fn) fl = combobox.get_active() if value == Gtk.ResponseType.OK: if fn: diff --git a/gramps/plugins/export/exportpkg.py b/gramps/plugins/export/exportpkg.py index 97763959c..af28f89ae 100644 --- a/gramps/plugins/export/exportpkg.py +++ b/gramps/plugins/export/exportpkg.py @@ -60,7 +60,7 @@ from gi.repository import Gtk from gramps.gui.plug.export import WriterOptionBox from gramps.plugins.export.exportxml import XmlWriter from gramps.gen.utils.file import media_path_full -from gramps.gen.constfunc import win, conv_to_unicode +from gramps.gen.constfunc import win #------------------------------------------------------------------------- # @@ -155,7 +155,7 @@ class PackageWriter(object): # pass # def fs_ok_clicked(obj): - # name = conv_to_unicode(fs_top.get_filename()) + # name = fs_top.get_filename() # if os.path.isfile(name): # archive.add(name) diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index adc65e858..f52a17ea1 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -60,7 +60,6 @@ from gramps.gui.managedwindow import ManagedWindow from gramps.gen.config import config from gramps.gui.editors import EditPlace, EditEvent, EditFamily, EditPerson from gramps.gui.selectors.selectplace import SelectPlace -from gramps.gen.constfunc import conv_to_unicode import gi gi.require_version('OsmGpsMap', '1.0') @@ -945,7 +944,7 @@ class GeoGraphyView(OsmGps, NavigationView): status = kml.run() if status == Gtk.ResponseType.OK: - val = conv_to_unicode(kml.get_filename()) + val = kml.get_filename() if val: kmlfile = Kml(val) points = kmlfile.add_points() @@ -1184,7 +1183,7 @@ class GeoGraphyView(OsmGps, NavigationView): status = f.run() if status == Gtk.ResponseType.OK: - val = conv_to_unicode(f.get_filename()) + val = f.get_filename() if val: self.path_entry.set_text(val) f.destroy() diff --git a/gramps/plugins/tool/check.py b/gramps/plugins/tool/check.py index a9981d51d..28f39b5d6 100644 --- a/gramps/plugins/tool/check.py +++ b/gramps/plugins/tool/check.py @@ -677,7 +677,7 @@ class CheckIntegrity(object): logging.warning(' FAIL: references to missing file kept') def fs_ok_clicked(obj): - name = conv_to_unicode(fs_top.get_filename()) + name = fs_top.get_filename() if os.path.isfile(name): obj = self.db.get_object_from_handle(ObjectId) obj.set_path(name) diff --git a/gramps/plugins/tool/eventcmp.py b/gramps/plugins/tool/eventcmp.py index f62879cc2..85722016e 100644 --- a/gramps/plugins/tool/eventcmp.py +++ b/gramps/plugins/tool/eventcmp.py @@ -59,7 +59,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext from gramps.gui.glade import Glade from gramps.gui.editors import FilterEditor -from gramps.gen.constfunc import conv_to_unicode, get_curr_dir +from gramps.gen.constfunc import get_curr_dir #------------------------------------------------------------------------- # @@ -403,7 +403,7 @@ class DisplayChart(ManagedWindow): f.hide() if status == Gtk.ResponseType.OK: - name = conv_to_unicode(f.get_filename()) + name = f.get_filename() doc = ODSTab(len(self.row_data)) doc.creator(self.db.get_researcher().get_name())