From dbed5bbce2eca2a2cafa9de88c75898e7fc88135 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Sat, 25 Sep 2010 23:04:42 +0400 Subject: [PATCH] wrong_layout. correct deactivate --- wrong_layout/manifest.ini | 2 +- wrong_layout/plugin.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wrong_layout/manifest.ini b/wrong_layout/manifest.ini index 10de54b..594339f 100644 --- a/wrong_layout/manifest.ini +++ b/wrong_layout/manifest.ini @@ -1,7 +1,7 @@ [info] name: Wrong Layout short_name: Wrong Layout -version: 0.1 +version: 0.1.1 description: Press alt+r to convert chars typed in wrong layout Rus<>Eng authors: Denis Fomin homepage: http://trac-plugins.gajim.org/wiki/WrongLayoutPlugin diff --git a/wrong_layout/plugin.py b/wrong_layout/plugin.py index 5444426..0a30051 100644 --- a/wrong_layout/plugin.py +++ b/wrong_layout/plugin.py @@ -75,7 +75,8 @@ class Base(object): self.chat_control.handlers[self.id_] = self.chat_control.msg_textview def disconnect_from_chat_control(self): - self.chat_control.handlers[self.id_].disconnect(self.id_) + if self.chat_control.msg_textview.handler_is_connected(self.id_): + self.chat_control.msg_textview.disconnect(self.id_) def mykeypress_event(self, widget, event): if event.keyval == gtk.keysyms.r or event.keyval == 1739: