diff --git a/data/key-mapper.glade b/data/key-mapper.glade index d04d9f4f..2b638d90 100644 --- a/data/key-mapper.glade +++ b/data/key-mapper.glade @@ -22,242 +22,11 @@ False edit-delete - - False - 4 - Key Mapper - True - center - key-mapper.svg - dialog - True - - - True - False - vertical - - - True - False - center - 10 - end - - - gtk-close - False - True - True - True - False - True - - - False - False - 0 - - - - - False - True - end - 0 - - - - - True - False - - - True - False - 10 - 0 - dialog-error - 6 - - - False - False - 0 - - - - - True - False - 10 - vertical - - - True - False - 6 - True - 0 - - - False - False - 0 - - - - - True - False - 6 - True - 0 - 0 - - - True - True - 1 - - - - - True - True - 1 - - - - - True - True - 2 - - - - - - close_error_dialog - - True False gtk-delete - - False - 4 - Key Mapper - True - center - key-mapper.svg - dialog - True - - - True - False - vertical - - - True - False - end - 10 - end - - - Delete - False - True - True - True - False - gtk-delete-icon1 - - - False - False - 0 - - - - - Go Back - True - True - True - - - True - True - 1 - - - - - False - True - end - 0 - - - - - True - False - - - True - False - 10 - 10 - 0 - dialog-warning - 6 - - - False - False - 0 - - - - - True - False - 10 - 10 - 10 - 10 - 6 - Are you sure to delete your preset? - True - 0 - 0.5 - - - True - True - 1 - - - - - True - True - 2 - - - - - - go_back1 - go_ahead1 - - True False @@ -267,7 +36,7 @@ 2 9 1 - 10 + 6 True @@ -299,7 +68,7 @@ vertical - 20 + 18 True False 0 @@ -314,11 +83,11 @@ True False - 20 - 20 - 20 + 18 + 18 + 18 0 - 10 + 6 50 @@ -427,14 +196,14 @@ To give your keys back their original mapping. True False - 20 + 18 vertical - 10 + 6 True False - 10 + 6 True @@ -517,7 +286,7 @@ Don't hold down any keys while the injection starts. True False - 10 + 6 50 @@ -557,7 +326,7 @@ Don't hold down any keys while the injection starts. True False - 10 + 6 True @@ -580,6 +349,7 @@ Don't hold down any keys while the injection starts. True True + True @@ -593,7 +363,7 @@ Don't hold down any keys while the injection starts. True True Save the entered name - 10 + 6 save-icon @@ -676,14 +446,14 @@ Don't hold down any keys while the injection starts. True False - 20 + 18 vertical - 10 + 6 True False - 10 + 6 True @@ -727,7 +497,7 @@ Don't hold down any keys while the injection starts. True False - 10 + 6 True @@ -771,7 +541,7 @@ Don't hold down any keys while the injection starts. True False - 10 + 6 True @@ -840,8 +610,8 @@ Don't hold down any keys while the injection starts. False - 10 - 10 + 6 + 6 dialog-warning @@ -853,7 +623,7 @@ Don't hold down any keys while the injection starts. False - 10 + 6 dialog-error @@ -1030,9 +800,13 @@ Don't hold down any keys while the injection starts. False + True key-mapper.svg + dialog + True window window + True @@ -1042,10 +816,10 @@ Don't hold down any keys while the injection starts. True False center - 20 - 20 + 18 + 18 vertical - 20 + 18 True @@ -1072,14 +846,14 @@ Don't hold down any keys while the injection starts. - + True True - 10 - 10 - 10 - 10 - You can find more information and the latest version on github + 6 + 6 + 6 + 6 + You can find more information and report bugs at <a href="https://github.com/sezanzeb/key-mapper">https://github.com/sezanzeb/key-mapper</a> True center @@ -1090,6 +864,30 @@ Don't hold down any keys while the injection starts. 2 + + + True + True + 0.5 + 6 + 6 + 6 + 6 + © 2021 Sezanzeb proxima@sezanzeb.de +This program comes with absolutely no warranty. +See the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License, version 3 or later</a> for details. + True + center + + + + False + True + 3 + + About @@ -1114,9 +912,9 @@ Don't hold down any keys while the injection starts. 5 5 5 - 10 + 6 vertical - 10 + 6 True @@ -1138,10 +936,10 @@ Don't hold down any keys while the injection starts. True False center - 10 - 10 - 10 - 10 + 6 + 6 + 6 + 6 6 Macros True @@ -1174,7 +972,7 @@ Don't hold down any keys while the injection starts. True False - 20 + 18 True @@ -1403,10 +1201,10 @@ Don't hold down any keys while the injection starts. True False center - 10 - 10 - 10 - 10 + 6 + 6 + 6 + 6 6 Examples True @@ -1425,7 +1223,7 @@ Don't hold down any keys while the injection starts. True False - 20 + 18 True @@ -1612,8 +1410,8 @@ Don't hold down any keys while the injection starts. True False - 10 - 10 + 6 + 6 6 Between calls to k, key down and key up events, macros will sleep for 10ms by default, which can be configured in ~/.config/key-mapper/config True @@ -1658,4 +1456,236 @@ Don't hold down any keys while the injection starts. + + False + 4 + Key Mapper + True + key-mapper.svg + dialog + True + window + window + + + True + False + vertical + + + True + False + end + 6 + end + + + Go Back + True + True + True + + + True + True + 0 + + + + + Delete + False + True + True + True + False + gtk-delete-icon1 + + + False + False + 1 + + + + + False + True + end + 0 + + + + + True + False + + + True + False + 6 + 6 + 0 + dialog-warning + 6 + + + False + False + 0 + + + + + True + False + 6 + 6 + 6 + 6 + 6 + True + 0 + 0.5 + + + True + True + 1 + + + + + True + True + 2 + + + + + + go_ahead1 + go_back1 + + + + False + 4 + Key Mapper + True + key-mapper.svg + dialog + True + window + window + + + True + False + vertical + + + True + False + center + 6 + end + + + gtk-close + False + True + True + True + False + True + + + False + False + 0 + + + + + False + True + end + 0 + + + + + True + False + + + True + False + 6 + 0 + dialog-error + 6 + + + False + False + 0 + + + + + True + False + 6 + vertical + + + True + False + 6 + True + 0 + + + False + False + 0 + + + + + True + False + 6 + True + 0 + 0 + + + True + True + 1 + + + + + True + True + 1 + + + + + True + True + 2 + + + + + + close_error_dialog + + diff --git a/data/style.css b/data/style.css index bb96648e..41050280 100644 --- a/data/style.css +++ b/data/style.css @@ -39,4 +39,8 @@ list button { border-color: transparent; } +.copyright { + font-size: 7pt; +} + /* @theme_bg_color, @theme_fg_color */ \ No newline at end of file diff --git a/keymapper/gui/window.py b/keymapper/gui/window.py index fc06b3ad..794c433f 100755 --- a/keymapper/gui/window.py +++ b/keymapper/gui/window.py @@ -186,6 +186,9 @@ class Window: def show_confirm_delete(self): """Blocks until the user decided about an action.""" + text = f'Are you sure to delete preset "{self.selected_preset}"?' + self.get('confirm-delete-label').set_text(text) + self.confirm_delete.show() response = self.confirm_delete.run() self.confirm_delete.hide() @@ -682,6 +685,7 @@ class Window: """Show the mappings of the preset.""" # beware in tests that this function won't be called at all if the # active_id stays the same + self.save_preset() if dropdown.get_active_id() == self.selected_preset: return @@ -794,3 +798,9 @@ class Window: def on_about_clicked(self, _): """Show the about/help dialog.""" self.about.show() + + def on_about_key_press(self, _, event): + """Hide the about/help dialog.""" + gdk_keycode = event.get_keyval()[1] + if gdk_keycode == Gdk.KEY_Escape: + self.about.hide() diff --git a/readme/development.md b/readme/development.md index c49a521d..081fa0b1 100644 --- a/readme/development.md +++ b/readme/development.md @@ -207,3 +207,4 @@ This stuff is going on as a daemon in the background - [PyGObject API Reference](https://lazka.github.io/pgi-docs/) - [python-evdev](https://python-evdev.readthedocs.io/en/stable/) - [Python Unix Domain Sockets](https://pymotw.com/2/socket/uds.html) +- [GNOME HIG](https://developer.gnome.org/hig/stable/) diff --git a/readme/pylint.svg b/readme/pylint.svg index 6771fc7a..c731f771 100644 --- a/readme/pylint.svg +++ b/readme/pylint.svg @@ -1,23 +1,23 @@ - + - + - - + + pylint pylint - 9.8 - 9.8 + 9.79 + 9.79 \ No newline at end of file