Philipp Hörist pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/gtk/groupchat_creation.py
    ... ... @@ -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()
    

  • gajim/gtk/start_chat.py
    ... ... @@ -108,7 +108,7 @@ class StartChatDialog(Gtk.ApplicationWindow):
    108 108
                 bookmarks = con.get_module('Bookmarks').bookmarks
    
    109 109
                 groupchats = {}
    
    110 110
                 for bookmark in bookmarks:
    
    111
    -                groupchats[bookmark.jid] = bookmark.name
    
    111
    +                groupchats[str(bookmark.jid)] = bookmark.name
    
    112 112
     
    
    113 113
                 for jid in app.contacts.get_gc_list(account):
    
    114 114
                     if jid in groupchats: