73 lines
2.6 KiB
Diff
73 lines
2.6 KiB
Diff
commit 2ee257c73388df89b4f5966c882d8047a896f9b2
|
|
Author: Peng Wu <alexepico@gmail.com>
|
|
Date: Fri Aug 28 11:30:31 2020 +0800
|
|
|
|
restore mainSwitch shortcut key
|
|
|
|
diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc
|
|
index dcd2e3f..295adc5 100644
|
|
--- a/src/PYPPinyinEngine.cc
|
|
+++ b/src/PYPPinyinEngine.cc
|
|
@@ -166,8 +166,10 @@ PinyinEngine::processAccelKeyEvent (guint keyval, guint keycode,
|
|
* and no other key event between the press and release key event */
|
|
gboolean triggered = FALSE;
|
|
|
|
- if (PinyinConfig::instance ().mainSwitch () == accel) {
|
|
- triggered = TRUE;
|
|
+ if (m_prev_pressed_key == keyval) {
|
|
+ if (PinyinConfig::instance ().mainSwitch () == accel) {
|
|
+ triggered = TRUE;
|
|
+ }
|
|
}
|
|
|
|
if (triggered) {
|
|
From c346468fdf9ef8f7f6c8acd0dc54b976b1dafd14 Mon Sep 17 00:00:00 2001
|
|
From: Peng Wu <alexepico@gmail.com>
|
|
Date: Tue, 29 Sep 2020 11:33:27 +0800
|
|
Subject: [PATCH] Fixes import/export dictionary in setup dialog
|
|
|
|
---
|
|
setup/main2.py | 19 +++++++++++--------
|
|
1 file changed, 11 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/setup/main2.py b/setup/main2.py
|
|
index adbebe9..f2d5847 100644
|
|
--- a/setup/main2.py
|
|
+++ b/setup/main2.py
|
|
@@ -435,10 +435,11 @@ class PreferencesDialog:
|
|
|
|
def __import_dictionary_cb(self, widget):
|
|
dialog = Gtk.FileChooserDialog \
|
|
- (_("Please choose a file"), self.__dialog,
|
|
- Gtk.FileChooserAction.OPEN,
|
|
- (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
|
|
- Gtk.STOCK_OPEN, Gtk.ResponseType.OK))
|
|
+ (title = _("Please choose a file"), parent = self.__dialog,
|
|
+ action = Gtk.FileChooserAction.OPEN)
|
|
+
|
|
+ dialog.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
|
|
+ Gtk.STOCK_OPEN, Gtk.ResponseType.OK)
|
|
|
|
filter_text = Gtk.FileFilter()
|
|
filter_text.set_name("Text files")
|
|
@@ -453,10 +454,12 @@ class PreferencesDialog:
|
|
|
|
def __export_dictionary_cb(self, widget):
|
|
dialog = Gtk.FileChooserDialog \
|
|
- (_("Please save a file"), self.__dialog,
|
|
- Gtk.FileChooserAction.SAVE,
|
|
- (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
|
|
- Gtk.STOCK_SAVE, Gtk.ResponseType.OK))
|
|
+ (title = _("Please save a file"), parent = self.__dialog,
|
|
+ action = Gtk.FileChooserAction.SAVE)
|
|
+
|
|
+ dialog.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
|
|
+ Gtk.STOCK_SAVE, Gtk.ResponseType.OK)
|
|
+
|
|
dialog.set_do_overwrite_confirmation(True)
|
|
|
|
filter_text = Gtk.FileFilter()
|
|
--
|
|
2.26.2
|
|
|