diff --git a/src/common/helpers.py b/src/common/helpers.py index c611c04a9..988df203d 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -497,19 +497,6 @@ r'Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders') win32api.RegCloseKey(rkey) return val -def get_my_pictures_path(): - """ - Windows-only atm - """ - return get_windows_reg_env('My Pictures') - -def get_desktop_path(): - if os.name == 'nt': - path = get_windows_reg_env('Desktop') - else: - path = os.path.join(os.path.expanduser('~'), 'Desktop') - return path - def get_documents_path(): if os.name == 'nt': path = get_windows_reg_env('Personal') diff --git a/src/dialogs.py b/src/dialogs.py index e85749ca5..fcb3202d7 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -4960,13 +4960,7 @@ class ImageChooserDialog(FileChooserDialog): else: callback(widget, path_to_file) - try: - if os.name == 'nt': - path = helpers.get_my_pictures_path() - else: - path = os.environ['HOME'] - except Exception: - path = '' + path = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES) FileChooserDialog.__init__(self, title_text = _('Choose Image'), action = Gtk.FileChooserAction.OPEN,