mirror of
https://github.com/dialect-app/dialect.git
synced 2026-04-04 13:46:24 +00:00
Implement Translate accel feature
This commit is contained in:
parent
73d7acc4b3
commit
a7d2127d40
2 changed files with 9 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"app-id":"com.github.gi_lom.dialect",
|
||||
"runtime":"org.gnome.Platform",
|
||||
"runtime-version":"3.36",
|
||||
"runtime-version":"3.38",
|
||||
"sdk":"org.gnome.Sdk",
|
||||
"command":"dialect",
|
||||
"finish-args":[
|
||||
|
|
|
|||
|
|
@ -342,8 +342,16 @@ class DialectWindow(Handy.ApplicationWindow):
|
|||
|
||||
if control_mask == modifiers:
|
||||
if keyboard.keyval == Gdk.KEY_Return:
|
||||
if not self.settings.get_value('translate-accel'):
|
||||
GLib.idle_add(self.translation, button)
|
||||
return Gdk.EVENT_STOP
|
||||
return Gdk.EVENT_PROPAGATE
|
||||
elif keyboard.keyval == Gdk.KEY_Return:
|
||||
if self.settings.get_value('translate-accel'):
|
||||
GLib.idle_add(self.translation, button)
|
||||
return Gdk.EVENT_STOP
|
||||
return Gdk.EVENT_PROPAGATE
|
||||
|
||||
return Gdk.EVENT_PROPAGATE
|
||||
|
||||
def text_changed(self, buffer):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue