mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-01-19 22:13:10 +01:00
minor clean
This commit is contained in:
@@ -27,8 +27,7 @@ or edit the DemonEditor.spec file.
|
||||
To run the program, copy the **dist/DemonEditor.app** bundle to the **Application** directory.
|
||||
Perhaps in the security settings it will be necessary to allow the launch of this application!
|
||||
|
||||
Users of the **64-bit version of the OS** can download a ready-made package from [here](https://github.com/DYefremov/DemonEditor/raw/experimental-mac/dist/DemonEditor.app.zip).
|
||||
Just unpack and copy to the **Application** directory.
|
||||
Users of the **64-bit version of the OS** can download a ready-made package from [here](https://github.com/DYefremov/DemonEditor/raw/experimental-mac/dist/DemonEditor.app.zip). Just unpack and run.
|
||||
**Note. The package may not contain all the latest changes!**
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ from textwrap import dedent
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
|
||||
CONFIG_PATH = str(Path.home()) + "/.config/demon-editor/"
|
||||
HOME_PATH = str(Path.home())
|
||||
CONFIG_PATH = HOME_PATH + "/.config/demon-editor/"
|
||||
CONFIG_FILE = CONFIG_PATH + "config.json"
|
||||
DATA_PATH = "data/"
|
||||
DATA_PATH = HOME_PATH + "/data/"
|
||||
|
||||
|
||||
class Profile(Enum):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
""" Common module for showing dialogs """
|
||||
import locale
|
||||
import gettext
|
||||
from enum import Enum
|
||||
from functools import lru_cache
|
||||
|
||||
@@ -163,7 +163,7 @@ def get_dialog_from_xml(dialog_type, transient, use_header=0, title=""):
|
||||
|
||||
def get_message(message):
|
||||
""" returns translated message """
|
||||
return locale.dgettext(TEXT_DOMAIN, message)
|
||||
return gettext.dgettext(TEXT_DOMAIN, message)
|
||||
|
||||
|
||||
@lru_cache(maxsize=5)
|
||||
|
||||
@@ -1039,7 +1039,6 @@ class Application(Gtk.Application):
|
||||
GLib.idle_add(lambda: next(gen, False), priority=GLib.PRIORITY_LOW)
|
||||
|
||||
def save_data(self):
|
||||
self._save_header_button.set_sensitive(False)
|
||||
profile = self._profile
|
||||
path = self._settings.data_dir_path
|
||||
backup_path = self._settings.backup_dir_path
|
||||
|
||||
@@ -6,15 +6,19 @@ from enum import Enum, IntEnum
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk, Gdk
|
||||
|
||||
# path to *.glade files
|
||||
# For launching from the bundle.
|
||||
if os.getcwd() == "/":
|
||||
try:
|
||||
os.chdir(os.environ["GTK_PATH"])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
# path to *.glade files
|
||||
UI_RESOURCES_PATH = "app/ui/" if os.path.exists("app/ui/") else "ui/"
|
||||
|
||||
IS_GNOME_SESSION = int(bool(os.environ.get("GNOME_DESKTOP_SESSION_ID")))
|
||||
# translation
|
||||
TEXT_DOMAIN = "demon-editor"
|
||||
if UI_RESOURCES_PATH == "app/ui/":
|
||||
LANG_DIR = UI_RESOURCES_PATH + "lang"
|
||||
# locale.bindtextdomain(TEXT_DOMAIN, UI_RESOURCES_PATH + "lang")
|
||||
|
||||
theme = Gtk.IconTheme.get_default()
|
||||
_IMAGE_MISSING = theme.load_icon("image-missing", 16, 0) if theme.lookup_icon("image-missing", 16, 0) else None
|
||||
|
||||
Reference in New Issue
Block a user