Merge branch 'main' into dev
This commit is contained in:
@@ -230,7 +230,6 @@ class GuiMainMenu(QMenuBar):
|
||||
|
||||
# Document > Import From File
|
||||
self.aImportFile = self.docuMenu.addAction(self.tr("Import Text from File"))
|
||||
self.aImportFile.setShortcut("Ctrl+Shift+I")
|
||||
self.aImportFile.triggered.connect(lambda: self.mainGui.importDocument())
|
||||
|
||||
return
|
||||
|
||||
@@ -346,7 +346,7 @@ class GuiTheme:
|
||||
if themeName:
|
||||
self._themeList.append((themeKey, themeName))
|
||||
|
||||
self._themeList = sorted(self._themeList, key=lambda x: x[1])
|
||||
self._themeList = sorted(self._themeList, key=_sortTheme)
|
||||
|
||||
return self._themeList
|
||||
|
||||
@@ -362,7 +362,7 @@ class GuiTheme:
|
||||
if syntaxName:
|
||||
self._syntaxList.append((syntaxKey, syntaxName))
|
||||
|
||||
self._syntaxList = sorted(self._syntaxList, key=lambda x: x[1])
|
||||
self._syntaxList = sorted(self._syntaxList, key=_sortTheme)
|
||||
|
||||
return self._syntaxList
|
||||
|
||||
@@ -729,6 +729,13 @@ class GuiIcons:
|
||||
# Module Functions
|
||||
# =============================================================================================== #
|
||||
|
||||
|
||||
def _sortTheme(data: tuple[str, str]) -> str:
|
||||
"""Key function for theme sorting."""
|
||||
key, name = data
|
||||
return f"*{name}" if key.startswith("default_") else name
|
||||
|
||||
|
||||
def _loadInternalName(confParser: NWConfigParser, confFile: str | Path) -> str:
|
||||
"""Open a conf file and read the 'name' setting."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user