From 4fcf603aae7c6c0c8aa2f23fefafa64f879043c0 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Mon, 6 Dec 2010 17:37:14 +0300 Subject: coding style --- wrong_layout/plugin.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'wrong_layout') diff --git a/wrong_layout/plugin.py b/wrong_layout/plugin.py index 0a30051..d747bd0 100644 --- a/wrong_layout/plugin.py +++ b/wrong_layout/plugin.py @@ -14,7 +14,8 @@ locale_path = os.path.dirname(__file__) + '/locale' try: gett = gettext.Catalog('WrongLayout', locale_path) _ = gett.gettext -except: pass +except: + pass class WrongLayoutPlugin(GajimPlugin): @@ -22,12 +23,12 @@ class WrongLayoutPlugin(GajimPlugin): def init(self): self.config_dialog = None self.gui_extension_points = { - 'chat_control_base' : (self.connect_with_chat_control, - self.disconnect_from_chat_control) - } + 'chat_control_base': (self.connect_with_chat_control, + self.disconnect_from_chat_control)} self.chat_control = None self.controls = [] - self.dict_eng = {'`': 'ё', 'q': 'й', 'w': 'ц', 'e': 'у', 'r': 'к', 't': 'е', + self.dict_eng = {'`': 'ё', 'q': 'й', 'w': 'ц', 'e': 'у', 'r': 'к', + 't': 'е', 'y': 'н', 'u': 'г', 'i': 'ш', 'o': 'щ', 'p': 'з', '[': 'х', ']': 'ъ', 'a': 'ф', 's': 'ы', 'd': 'в', 'f': 'а', 'g': 'п', 'h': 'р', 'j': 'о', 'k': 'л', 'l': 'д', ';': 'ж', '\'': 'э', @@ -64,6 +65,7 @@ class WrongLayoutPlugin(GajimPlugin): control.disconnect_from_chat_control() self.controls = [] + class Base(object): def __init__(self, plugin, chat_control): self.plugin = plugin @@ -80,7 +82,7 @@ class Base(object): def mykeypress_event(self, widget, event): if event.keyval == gtk.keysyms.r or event.keyval == 1739: - if event.state & gtk.gdk.MOD1_MASK: # alt+r + if event.state & gtk.gdk.MOD1_MASK: # alt+r start, end, iter_ = self.get_start_end() count_eng = count_rus = 0 c = iter_.get_char().decode('utf-8') -- cgit v1.2.3