[ibus-indic-table/f16] Fixed bug-750730.patch

anish anishpatil at fedoraproject.org
Mon Nov 21 11:43:31 UTC 2011


commit 3685c1885a2397cd2c6a4edceb407a7bd26a8d61
Author: anish <anish at dhcp193-44.pnq.redhat.com>
Date:   Mon Nov 21 17:14:53 2011 +0530

    Fixed bug-750730.patch

 bug-750730.patch      |  282 +++++++++++++++++++++++++++++++++++++++++++++++++
 ibus-indic-table.spec |    7 +-
 2 files changed, 288 insertions(+), 1 deletions(-)
---
diff --git a/bug-750730.patch b/bug-750730.patch
new file mode 100644
index 0000000..b54e4fa
--- /dev/null
+++ b/bug-750730.patch
@@ -0,0 +1,282 @@
+Only in ibus-indic-table-1.3.1/engine: factory.pyc
+diff -rup ibus-indic-table-1.3.1-old/engine/indic_table.py ibus-indic-table-1.3.1/engine/indic_table.py
+--- ibus-indic-table-1.3.1-old/engine/indic_table.py	2011-11-21 16:50:00.245443070 +0530
++++ ibus-indic-table-1.3.1/engine/indic_table.py	2011-11-21 14:46:23.486273837 +0530
+@@ -1043,6 +1043,7 @@ class tabengine (ibus.EngineBase):
+     def _init_properties (self):
+         self.properties= ibus.PropList ()
+         self._status_property = ibus.Property(u'status')
++#        self._help_property = ibus.Property(u'help')
+   #      if self.db._is_chinese:
+   #          self._cmode_property = ibus.Property(u'cmode')
+   #      self._letter_property = ibus.Property(u'letter')
+@@ -1051,6 +1052,7 @@ class tabengine (ibus.EngineBase):
+   #      self._onechar_property = ibus.Property(u'onechar')
+   #      self._auto_commit_property = ibus.Property(u'acommit')
+         for prop in (self._status_property,
++#             self._help_property
+   #          self._letter_property,
+   #          self._punct_property,
+   #          self._py_property,
+@@ -1061,85 +1063,20 @@ class tabengine (ibus.EngineBase):
+             self.properties.append(prop)
+    #     if self.db._is_chinese:
+    #         self.properties.insert( 1, self._cmode_property )
+-   #     self.register_properties (self.properties)
+-        self.register_properties (self._status_property)
+-  #      self._refresh_properties ()
++        self.register_properties (self.properties)
++#        self.register_properties (self._status_property)
++#        self.register_properties (self._help_property)
++        self._refresh_properties ()
+     
+     def _refresh_properties (self):
+         '''Method used to update properties'''
+-        # taken and modified from PinYin.py :)
+-        if self._mode == 1: # refresh mode
+-            if self._status == u'CN':
+-                self._status_property.set_icon( u'%s%s' % (self._icon_dir, 'chinese.svg') )
+-                self._status_property.set_label(  _(u'CN') )
+-            else:
+-                self._status_property.set_icon( u'%s%s' % (self._icon_dir, 'ibus-indic-table.svg') )
+-                self._status_property.set_label(  self._status )
+-            self._status_property.set_tooltip (  _(u'Switch to English mode') )
+-        else:
+-            self._status_property.set_icon( u'%s%s' % (self._icon_dir, 'english.svg') )
+-            self._status_property.set_label( _(u'EN') )
+-            self._status_property.set_tooltip (  _(u'Switch to Table mode') )
+-
+-        if self._full_width_letter[self._mode]:
+-            self._letter_property.set_icon ( u'%s%s' % (self._icon_dir, 'full-letter.svg') )
+-            self._letter_property.set_tooltip ( _(u'Switch to half letter') )
+-        else:
+-            self._letter_property.set_icon ( u'%s%s' % (self._icon_dir, 'half-letter.svg') )
+-            self._letter_property.set_tooltip ( _(u'Switch to full letter') )
+-
+-        if self._full_width_punct[self._mode]:
+-            self._punct_property.set_icon ( u'%s%s' % (self._icon_dir, 'full-punct.svg') )
+-            self._punct_property.set_tooltip ( _( u'Switch to half punction' ) )
+-        else:
+-            self._punct_property.set_icon ( u'%s%s' % (self._icon_dir,'half-punct.svg' ) )
+-            self._punct_property.set_tooltip ( _( u'Switch to full punction' ) )
+-        
+-        if self._editor._py_mode:
+-            self._py_property.set_icon ( u'%s%s' % (self._icon_dir, 'py-mode.svg' ) )
+-            self._py_property.set_tooltip ( _(u'Switch to Table mode') )
+-        
+-        else:
+-            self._py_property.set_icon ( u'%s%s' % (self._icon_dir, 'tab-mode.svg' ) )
+-            self._py_property.set_tooltip ( _(u'Switch to PinYin mode') )
+-
+-        if self._editor._onechar:
+-            self._onechar_property.set_icon ( u'%s%s' % (self._icon_dir, 'onechar.svg' ))
+-            self._onechar_property.set_tooltip ( _(u'Switch to phrase mode') )
+-        else:
+-            self._onechar_property.set_icon ( u'%s%s' % (self._icon_dir, 'phrase.svg' ))
+-            self._onechar_property.set_tooltip ( _(u'Switch to single char mode') )
+-        if self._auto_commit:
+-            self._auto_commit_property.set_icon ( u'%s%s' % (self._icon_dir, 'acommit.svg' ) ) 
+-            self._auto_commit_property.set_tooltip ( _(u'Switch to normal commit mode, which use space to commit') ) 
+-        else:
+-            self._auto_commit_property.set_icon ( u'%s%s' % (self._icon_dir, 'ncommit.svg' ) ) 
+-            self._auto_commit_property.set_tooltip ( _(u'Switch to direct commit mode') ) 
+-        # the chinese_mode:
+-        if self.db._is_chinese:
+-            if self._editor._chinese_mode == 0:
+-                self._cmode_property.set_icon ( u'%s%s' % (self._icon_dir,\
+-                        'sc-mode.svg' ) ) 
+-                self._cmode_property.set_tooltip ( _(u'Switch to Traditional Chinese mode') ) 
+-            elif self._editor._chinese_mode == 1:
+-                self._cmode_property.set_icon ( u'%s%s' % (self._icon_dir,\
+-                        'tc-mode.svg' ) ) 
+-                self._cmode_property.set_tooltip ( _(u'Switch to Simplify Chinese first Big Charset Mode') ) 
+-            elif self._editor._chinese_mode == 2:
+-                self._cmode_property.set_icon ( u'%s%s' % (self._icon_dir,\
+-                        'scb-mode.svg' ) ) 
+-                self._cmode_property.set_tooltip ( _(u'Switch to Traditional Chinese first Big Charset Mode') ) 
+-            elif self._editor._chinese_mode == 3:
+-                self._cmode_property.set_icon ( u'%s%s' % (self._icon_dir,\
+-                        'tcb-mode.svg' ) ) 
+-                self._cmode_property.set_tooltip ( _(u'Switch to Big Charset Mode') ) 
+-            elif self._editor._chinese_mode == 4:
+-                self._cmode_property.set_icon ( u'%s%s' % (self._icon_dir,\
+-                        'cb-mode.svg' ) ) 
+-                self._cmode_property.set_tooltip ( _(u'Switch to Simplify Chinese Mode') ) 
+-
+-        # use buildin method to update properties :)
++        self._status_property.set_icon( u'%s%s' % (self._icon_dir, 'ibus-indic-table.svg') )
++        self._status_property.set_label(  self._status )
++#        self._help_property.set_icon( u'%s%s' % (self._icon_dir, 'ibus-indic-table.svg') )
++#        self._help_property.set_label( "Help" )
++          # use buildin method to update properties :)
+         map (self.update_property, self.properties)
++
+     
+     def _change_mode (self):
+         '''Shift input mode, TAB -> EN -> TAB
+@@ -1147,53 +1084,24 @@ class tabengine (ibus.EngineBase):
+         self._mode = int (not self._mode)
+         self.reset ()
+         self._update_ui ()
++        
+ 
+     def property_activate (self, property,prop_state = ibus.PROP_STATE_UNCHECKED):
+-        '''Shift property'''
+-        if property == u"status":
+-            self._change_mode ()
+-        elif property == u'py_mode' and self._ime_py:
+-            self._editor.r_shift ()
+-        elif property == u'onechar':
+-            self._editor._onechar = not self._editor._onechar
+-            self._config.set_value( self._config_section,
+-                    "OneChar",
+-                    self._editor._onechar)
+-
+-        elif property == u'acommit':
+-            self._auto_commit = not self._auto_commit
+-            self._config.set_value( self._config_section,
+-                    "AutoCommit",
+-                    self._auto_commit)
+-        elif property == u'letter':
+-            self._full_width_letter [self._mode] = not self._full_width_letter [self._mode]
+-            if self._mode:
+-                self._config.set_value( self._config_section,
+-                        "TabDefFullWidthLetter",
+-                        self._full_width_letter [self._mode])
+-            else:
+-                self._config.set_value( self._config_section,
+-                        "EnDefFullWidthLetter",
+-                        self._full_width_letter [self._mode])
+-
+-        elif property == u'punct':
+-            self._full_width_punct [self._mode] = not self._full_width_punct [self._mode]
+-            if self._mode:
+-                self._config.set_value( self._config_section,
+-                        "TabDefFullWidthPunct",
+-                        self._full_width_punct [self._mode])
+-            else:
+-                self._config.set_value( self._config_section,
+-                        "EnDefFullWidthPunct",
+-                        self._full_width_punct [self._mode])
+-        elif property == u'cmode':
+-            self._editor.change_chinese_mode()
+-            self.reset()
+-        self._refresh_properties ()
++#        '''Shift property'''
++#        if property == u"status":
++#            self._change_mode ()
++#        self._refresh_properties ()
+     #    elif property == "setup":
+             # Need implementation
+     #        self.start_helper ("96c07b6f-0c3d-4403-ab57-908dd9b8d513")
+         # at last invoke default method 
++#        if property == u"help":
++#            try:
++#                h =  Help("help me out")
++#            except:
++#                print "Help not found"
++        pass
++
+     
+     def _update_preedit (self):
+         '''Update Preedit String in UI'''
+@@ -1363,22 +1271,22 @@ class tabengine (ibus.EngineBase):
+             return True
+ 
+         # Match full half letter mode switch hotkey
+-        if self._match_hotkey (key, keysyms.space, modifier.SHIFT_MASK):
+-            self.property_activate ("letter")
+-            return True
++#        if self._match_hotkey (key, keysyms.space, modifier.SHIFT_MASK):
++#            self.property_activate ("letter")
++#            return True
+         
+         # Match full half punct mode switch hotkey
+-        if self._match_hotkey (key, keysyms.period, modifier.CONTROL_MASK):
+-            self.property_activate ("punct")
+-            return True
++#        if self._match_hotkey (key, keysyms.period, modifier.CONTROL_MASK):
++#            self.property_activate ("punct")
++#            return True
+         
+         # we ignore all hotkeys
+-#        if key.mask & modifier.ALT_MASK:
+-#            return False
++        if key.mask & modifier.ALT_MASK:
++            return False
+ 
+         # Ignore key release event
+-#        if key.mask & modifier.RELEASE_MASK:
+-#            return True
++        if key.mask & modifier.RELEASE_MASK:
++            return True
+         
+         if self._mode:
+             return self._table_mode_process_key_event (key)
+@@ -1437,18 +1345,18 @@ class tabengine (ibus.EngineBase):
+             return res
+         
+         # Match single char mode switch hotkey
+-        if self._match_hotkey (key, keysyms.comma, modifier.CONTROL_MASK):
+-            self.property_activate ( u"onechar" )
+-            return True
++#        if self._match_hotkey (key, keysyms.comma, modifier.CONTROL_MASK):
++#            self.property_activate ( u"onechar" )
++#            return True
+         # Match direct commit mode switch hotkey
+-        if self._match_hotkey (key, keysyms.slash, modifier.CONTROL_MASK):
+-            self.property_activate ( u"acommit" )
+-            return True
++#        if self._match_hotkey (key, keysyms.slash, modifier.CONTROL_MASK):
++#            self.property_activate ( u"acommit" )
++#            return True
+         
+         # Match Chinese mode shift
+-        if self._match_hotkey (key, keysyms.semicolon, modifier.CONTROL_MASK):
+-            self.property_activate ( u"cmode" )
+-            return True
++#        if self._match_hotkey (key, keysyms.semicolon, modifier.CONTROL_MASK):
++#            self.property_activate ( u"cmode" )
++#            return True
+         
+         # Match speedmeter shift
+         #if self._match_hotkey (key, keysyms.apostrophe, modifier.CONTROL_MASK):
+Only in ibus-indic-table-1.3.1/engine: indic_table.py~
+Only in ibus-indic-table-1.3.1/engine: indic_table.pyc
+diff -rup ibus-indic-table-1.3.1-old/engine/main.py ibus-indic-table-1.3.1/engine/main.py
+--- ibus-indic-table-1.3.1-old/engine/main.py	2011-11-21 16:50:00.245443070 +0530
++++ ibus-indic-table-1.3.1/engine/main.py	2011-11-21 16:08:12.747385856 +0530
+@@ -3,6 +3,7 @@
+ # ibus-indic-table - The Tables engine for IBus
+ #
+ # Copyright (c) 2011-2012 Naveen Kumar <nav007 at gmail.com>
++# Copyright (c) 2011-2012 Anish Patil <anish.developer at gmail.com>
+ #
+ # This library is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU Lesser General Public
+@@ -94,6 +95,10 @@ class IMApp:
+             name = self.__factory.db.get_ime_property ("name")
+             longname = name
+             description = self.__factory.db.get_ime_property ("description")
++            description += "\n Keyboard mapping is as follows \n Input Charater \t Output Character \n"
++            keys_vals= self.__factory.db.get_all_values()
++            for keyval in keys_vals:
++                description += ("\t %s \t \t\t\t %s \n")% (keyval[0],keyval[1])
+             language = self.__factory.db.get_ime_property ("languages")
+             license = self.__factory.db.get_ime_property ("credit")
+             author = self.__factory.db.get_ime_property ("author")
+Only in ibus-indic-table-1.3.1/engine: main.py~
+diff -rup ibus-indic-table-1.3.1-old/engine/tabcreatedb.py ibus-indic-table-1.3.1/engine/tabcreatedb.py
+--- ibus-indic-table-1.3.1-old/engine/tabcreatedb.py	2011-11-21 16:50:00.245443070 +0530
++++ ibus-indic-table-1.3.1/engine/tabcreatedb.py	2011-11-21 15:35:11.043340639 +0530
+@@ -4,6 +4,7 @@
+ # ibus-indic-table - The Tables engine for IBus
+ #
+ # Copyright (c) 2011-2012 Naveen Kumar <nav007 at gmail.com>
++# Copyright (c) 2011-2012 Anish Patil <anish.developer at gmail.com> 
+ #
+ # This library is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU Lesser General Public
+Only in ibus-indic-table-1.3.1/engine: tabcreatedb.py~
+Only in ibus-indic-table-1.3.1/engine: tabdict.pyc
+Only in ibus-indic-table-1.3.1/engine: tabsqlitedb.pyc
diff --git a/ibus-indic-table.spec b/ibus-indic-table.spec
index dd4adc1..2411751 100644
--- a/ibus-indic-table.spec
+++ b/ibus-indic-table.spec
@@ -1,6 +1,6 @@
 Name:       ibus-indic-table
 Version:    1.3.1
-Release:    15%{?dist}
+Release:    16%{?dist}
 Summary:    The Table engine for IBus platform
 License:    LGPLv2+
 Group:      System Environment/Libraries
@@ -19,6 +19,7 @@ Patch9:	    bug-684118-inscript.patch
 Patch10:    bug-684118-capscase.patch
 Patch11:    bug-743502.patch
 Patch12:    bug-750735.patch
+Patch13:    bug-750730.patch
 Requires:       ibus
 BuildRequires:  ibus-devel
 BuildArch:  noarch
@@ -41,6 +42,7 @@ The Indic Table engine for IBus platform.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 
 %build
 %configure --disable-static --disable-additional
@@ -61,6 +63,9 @@ make DESTDIR=${RPM_BUILD_ROOT} NO_INDEX=true install pkgconfigdir=%{_datadir}/pk
 %{_datadir}/pkgconfig/%{name}.pc
 
 %changelog
+* Mon Nov 21 2011 Anish Patil <apatil at redhat.com> - 1.3.1-16
+- Fixed th bug-750730.patch
+
 * Thu Nov 10 2011 Anish Patil <apatil at redhat.com> - 1.3.1-15
 - Fixed the #bug-750735.patch
 


More information about the scm-commits mailing list