| ... |
... |
@@ -24,6 +24,7 @@ from nbxmpp.util import is_error_result |
|
24
|
24
|
|
|
25
|
25
|
from gajim.common import app
|
|
26
|
26
|
from gajim.common.const import MUC_CREATION_EXAMPLES
|
|
|
27
|
+from gajim.common.const import MUC_DISCO_ERRORS
|
|
27
|
28
|
from gajim.common.i18n import _
|
|
28
|
29
|
|
|
29
|
30
|
from gajim.gtk.dialogs import ErrorDialog
|
| ... |
... |
@@ -48,16 +49,6 @@ class CreateGroupchatWindow(Gtk.ApplicationWindow): |
|
48
|
49
|
|
|
49
|
50
|
self._destroyed = False
|
|
50
|
51
|
|
|
51
|
|
- not_muc_error = _('Address does not belong to a group chat server')
|
|
52
|
|
- self._error_messages = {
|
|
53
|
|
- 'remote-server-not-found': _('Remote server not found'),
|
|
54
|
|
- 'remote-server-timeout': _('Remote server timeout'),
|
|
55
|
|
- 'service-unavailable': not_muc_error,
|
|
56
|
|
- 'subscription-required': not_muc_error,
|
|
57
|
|
- 'not-muc-service': not_muc_error,
|
|
58
|
|
- 'already-exists': _('Group chat already exists')
|
|
59
|
|
- }
|
|
60
|
|
-
|
|
61
|
52
|
self._account = self._fill_account_combo(account)
|
|
62
|
53
|
|
|
63
|
54
|
self._create_entry_completion()
|
| ... |
... |
@@ -168,11 +159,11 @@ class CreateGroupchatWindow(Gtk.ApplicationWindow): |
|
168
|
159
|
self._ui.create_button.set_sensitive(False)
|
|
169
|
160
|
|
|
170
|
161
|
def _set_warning_from_error(self, error):
|
|
171
|
|
- text = self._error_messages.get(error.type, str(error))
|
|
|
162
|
+ text = MUC_DISCO_ERRORS.get(error.type, str(error))
|
|
172
|
163
|
self._set_warning(text)
|
|
173
|
164
|
|
|
174
|
165
|
def _set_warning_from_error_code(self, error_code):
|
|
175
|
|
- self._set_warning(self._error_messages[error_code])
|
|
|
166
|
+ self._set_warning(MUC_DISCO_ERRORS[error_code])
|
|
176
|
167
|
|
|
177
|
168
|
def _on_address_entry_changed(self, entry):
|
|
178
|
169
|
text = entry.get_text()
|