Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 933617 Details for
Bug 1135759
The rusle is broken with "Normal commit mode"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
0001-Disable-auto_commit-option-for-tables-which-do-not-h.patch
0001-Disable-auto_commit-option-for-tables-which-do-not-h.patch (text/plain), 5.66 KB, created by
Mike FABIAN
on 2014-09-02 07:54:30 UTC
(
hide
)
Description:
0001-Disable-auto_commit-option-for-tables-which-do-not-h.patch
Filename:
MIME Type:
Creator:
Mike FABIAN
Created:
2014-09-02 07:54:30 UTC
Size:
5.66 KB
patch
obsolete
>From e609c7638cbff63cc9db9124ea997f77503fb911 Mon Sep 17 00:00:00 2001 >From: Mike FABIAN <mfabian@redhat.com> >Date: Mon, 1 Sep 2014 16:29:41 +0200 >Subject: [PATCH 1/2] Disable auto_commit option for tables which do not have > RULES >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Resolves: rhbz#1135759 - The rusle is broken with "Normal commit mode" >See: https://bugzilla.redhat.com/show_bug.cgi?id=1135759 > >If a table does not have USER_CAN_DEFINE_PHRASE=TRUE and a non-empty >RULES, it makes no sense to use âcommit to preeditâ for that table. >Therefore, for such tables, auto_commit should always be True >(= âDirect commit modeâ) and never False (= âNormal commit modeâ). >These tables have AUTO_COMMIT = TRUE in their source and this should >never be changed by the user. > >âNormal commit modeâ, i.e. committing to preedit makes sense only >for tables like wubi-jidian86, wubi-haifeng86, and erbi-qs because >only these 3 tables currently have RULES and USER_CAN_DEFINE_PHRASE=TRUE. >For such tables, committing to preedit is used to define new >user shortcuts semi-automatically. >--- > engine/table.py | 37 +++++++++++++++++++------------------ > setup/main.py | 10 +++++++++- > 2 files changed, 28 insertions(+), 19 deletions(-) > >diff --git a/engine/table.py b/engine/table.py >index 10cf763..c5b8e97 100644 >--- a/engine/table.py >+++ b/engine/table.py >@@ -1354,9 +1354,9 @@ class tabengine (IBus.Engine): > self._onechar_property = self._new_property(u'onechar') > self.properties.append(self._onechar_property) > >- self._auto_commit_property = self._new_property(u'acommit') >- self.properties.append(self._auto_commit_property) >- >+ if self.db.user_can_define_phrase and self.db.rules: >+ self._auto_commit_property = self._new_property(u'acommit') >+ self.properties.append(self._auto_commit_property) > > self._setup_property = self._new_property( > key = u'setup', >@@ -1465,19 +1465,20 @@ class tabengine (IBus.Engine): > _('Switch to âSingle character modeâ (Ctrl-,)')) > self.update_property(self._onechar_property) > >- if self._auto_commit: >- self._set_property( >- self._auto_commit_property, >- 'acommit.svg', >- _('Direct commit mode (Ctrl-/)'), >- _('Switch to âNormal commit modeâ (uses space to commit) (Ctrl-/)')) >- else: >- self._set_property( >- self._auto_commit_property, >- 'ncommit.svg', >- _('Normal commit mode (Ctrl-/)'), >- _('Switch to âDirect commit modeâ (Ctrl-/)')) >- self.update_property(self._auto_commit_property) >+ if self.db.user_can_define_phrase and self.db.rules: >+ if self._auto_commit: >+ self._set_property( >+ self._auto_commit_property, >+ 'acommit.svg', >+ _('Direct commit mode (Ctrl-/)'), >+ _('Switch to âNormal commit modeâ (uses space to commit) (Ctrl-/)')) >+ else: >+ self._set_property( >+ self._auto_commit_property, >+ 'ncommit.svg', >+ _('Normal commit mode (Ctrl-/)'), >+ _('Switch to âDirect commit modeâ (Ctrl-/)')) >+ self.update_property(self._auto_commit_property) > > # The Chinese_mode: > # 0 means to show simplified Chinese only >@@ -1549,7 +1550,7 @@ class tabengine (IBus.Engine): > self._config_section, > "OneChar", > GLib.Variant.new_boolean(self._editor._onechar)) >- elif property == u'acommit': >+ elif property == u'acommit' and self.db.user_can_define_phrase and self.db.rules: > self._auto_commit = not self._auto_commit > self._config.set_value( > self._config_section, >@@ -1945,7 +1946,7 @@ class tabengine (IBus.Engine): > return True > > # Match direct commit mode switch hotkey >- if self._match_hotkey(key, IBus.KEY_slash, IBus.ModifierType.CONTROL_MASK): >+ if self._match_hotkey(key, IBus.KEY_slash, IBus.ModifierType.CONTROL_MASK) and self.db.user_can_define_phrase and self.db.rules: > self.do_property_activate(u"acommit") > return True > >diff --git a/setup/main.py b/setup/main.py >index 947bd2b..a2143cd 100644 >--- a/setup/main.py >+++ b/setup/main.py >@@ -162,6 +162,11 @@ class PreferencesDialog: > for lang in ['zh', 'ja', 'ko']: > if language.strip().startswith(lang): > self.__is_cjk = True >+ self.__user_can_define_phrase = False >+ user_can_define_phrase = self.tabsqlitedb.ime_properties.get('user_can-define_phrase') >+ if user_can_define_phrase: >+ self.__user_can_define_phrase = user_can_define_phrase.lower() == u'true' >+ self.__rules = self.tabsqlitedb.ime_properties.get('rules') > language_filter = self.tabsqlitedb.ime_properties.get('language_filter') > if language_filter in ['cm0', 'cm1', 'cm2', 'cm3', 'cm4']: > OPTION_DEFAULTS['chinesemode'] = int(language_filter[-1]) >@@ -339,7 +344,10 @@ class PreferencesDialog: > 'tabdeffullwidthpunct', > 'endeffullwidthletter', > 'endeffullwidthpunct'] >- and not self.__is_cjk)): >+ and not self.__is_cjk) >+ or >+ (name in ['autocommit'] >+ and (not self.__user_can_define_phrase or not self.__rules))): > __combobox.set_button_sensitivity(Gtk.SensitivityType.OFF) > > def _init_entry(self, name): >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1135759
:
933160
|
933266
|
933267
| 933617