Split ChatControlBase into its own file.

This commit is contained in:
Emmanuel Gil Peyrot 2017-01-04 22:54:16 +00:00
parent 4afdba2874
commit 80221afc2c
6 changed files with 1305 additions and 1263 deletions

File diff suppressed because it is too large Load Diff

1298
src/chat_control_base.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@ import gtkgui_helpers
import dialogs import dialogs
import cell_renderer_image import cell_renderer_image
import message_control import message_control
import chat_control from chat_control_base import ChatControlBase
import dataforms_widget import dataforms_widget
import profile_window import profile_window
@ -690,7 +690,7 @@ class PreferencesWindow:
def apply_speller(self): def apply_speller(self):
for ctrl in self._get_all_controls(): for ctrl in self._get_all_controls():
if isinstance(ctrl, chat_control.ChatControlBase): if isinstance(ctrl, ChatControlBase):
try: try:
spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview) spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview)
except (TypeError, RuntimeError, OSError): except (TypeError, RuntimeError, OSError):
@ -701,7 +701,7 @@ class PreferencesWindow:
def remove_speller(self): def remove_speller(self):
for ctrl in self._get_all_controls(): for ctrl in self._get_all_controls():
if isinstance(ctrl, chat_control.ChatControlBase): if isinstance(ctrl, ChatControlBase):
try: try:
spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview) spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview)
except (TypeError, RuntimeError): except (TypeError, RuntimeError):

View File

@ -54,7 +54,7 @@ from common import ged
from common import i18n from common import i18n
from chat_control import ChatControl from chat_control import ChatControl
from chat_control import ChatControlBase from chat_control_base import ChatControlBase
from common.exceptions import GajimGeneralException from common.exceptions import GajimGeneralException
from command_system.implementation.hosts import PrivateChatCommands from command_system.implementation.hosts import PrivateChatCommands

View File

@ -61,7 +61,7 @@ import dialogs
import notify import notify
import message_control import message_control
from chat_control import ChatControlBase from chat_control_base import ChatControlBase
from chat_control import ChatControl from chat_control import ChatControl
from groupchat_control import GroupchatControl from groupchat_control import GroupchatControl
from groupchat_control import PrivateChatControl from groupchat_control import PrivateChatControl

View File

@ -38,7 +38,7 @@ import common
import gtkgui_helpers import gtkgui_helpers
import message_control import message_control
import dialogs import dialogs
from chat_control import ChatControlBase from chat_control_base import ChatControlBase
from common import gajim from common import gajim