mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Install the GNOME shortcut this already knew how to install
install_shortcut(), remove_shortcut(), shortcut_status() and desktop_name() were added and nothing called them: the settings window and the command line both still went straight to the KDE ones. On GNOME, pressing Install ran kwriteconfig6, which is not there, and the three interface strings written for this never appeared. README said the settings window installs a GNOME or KDE shortcut, and it installed neither. Both callers go through the chooser now, and the status line names whichever desktop answered.
This commit is contained in:
@@ -176,7 +176,7 @@ class EvdevHotkey(QObject):
|
||||
return True
|
||||
|
||||
|
||||
# --- KDE custom shortcut --------------------------------------------------
|
||||
# --- the desktop's own shortcut -------------------------------------------
|
||||
|
||||
def _gnome():
|
||||
desktop = os.environ.get("XDG_CURRENT_DESKTOP", "").lower()
|
||||
@@ -322,6 +322,9 @@ def shortcut_status(desktop_id=DESKTOP_ID):
|
||||
def desktop_name():
|
||||
return "GNOME" if _gnome() else "KDE"
|
||||
|
||||
|
||||
# --- KDE ------------------------------------------------------------------
|
||||
|
||||
def install_kde_shortcut(shortcut, exec_command, name="Dikte: start/stop recording",
|
||||
desktop_id=DESKTOP_ID):
|
||||
"""Write the desktop file and the kglobalshortcutsrc entry.
|
||||
|
||||
Reference in New Issue
Block a user