Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
886ea230
by wurstsalat at 2022-01-06T18:57:06+01:00
3 changed files:
Changes:
| ... | ... | @@ -27,61 +27,6 @@ |
| 27 | 27 |
Message = namedtuple('Message', ['title', 'text', 'dialog'])
|
| 28 | 28 |
|
| 29 | 29 |
messages = {
|
| 30 |
- 'invalid-jid-with-error': Message(
|
|
| 31 |
- _('Invalid XMPP Address'),
|
|
| 32 |
- '%s',
|
|
| 33 |
- ErrorDialog),
|
|
| 34 |
- |
|
| 35 |
- 'invalid-jid': Message(
|
|
| 36 |
- _('Invalid XMPP Address'),
|
|
| 37 |
- _('It is not possible to send a message '
|
|
| 38 |
- 'to %s. This XMPP Address is not valid.'),
|
|
| 39 |
- ErrorDialog),
|
|
| 40 |
- |
|
| 41 |
- 'unread-events-on-remove-account': Message(
|
|
| 42 |
- _('Unread Events'),
|
|
| 43 |
- _('Read or acknowledge all pending events before '
|
|
| 44 |
- 'removing this account.'),
|
|
| 45 |
- ErrorDialog),
|
|
| 46 |
- |
|
| 47 |
- 'invalid-form': Message(
|
|
| 48 |
- _('Invalid Form'),
|
|
| 49 |
- _('The form is not filled correctly.'),
|
|
| 50 |
- ErrorDialog),
|
|
| 51 |
- |
|
| 52 |
- 'not-connected-while-sending': Message(
|
|
| 53 |
- _('No Connection Available'),
|
|
| 54 |
- _('Your message can not be sent until you are connected.'),
|
|
| 55 |
- ErrorDialog),
|
|
| 56 |
- |
|
| 57 |
- 'jid-in-list': Message(
|
|
| 58 |
- _('XMPP Address Already in List'),
|
|
| 59 |
- _('The XMPP Address you entered is already in the list. '
|
|
| 60 |
- 'Please choose another one.'),
|
|
| 61 |
- ErrorDialog),
|
|
| 62 |
- |
|
| 63 |
- 'invalid-answer': Message(
|
|
| 64 |
- _('Invalid Answer'),
|
|
| 65 |
- _('Transport %(name)s answered wrongly to '
|
|
| 66 |
- 'register request: %(error)s'),
|
|
| 67 |
- ErrorDialog),
|
|
| 68 |
- |
|
| 69 |
- 'invalid-custom-hostname': Message(
|
|
| 70 |
- _('Wrong Custom Hostname'),
|
|
| 71 |
- _('Custom hostname "%s" is wrong. It will be ignored.'),
|
|
| 72 |
- ErrorDialog),
|
|
| 73 |
- |
|
| 74 |
- 'agent-register-success': Message(
|
|
| 75 |
- _('Registration Succeeded'),
|
|
| 76 |
- _('Registration with agent %s succeeded.'),
|
|
| 77 |
- InformationDialog),
|
|
| 78 |
- |
|
| 79 |
- 'agent-register-error': Message(
|
|
| 80 |
- _('Registration Failed'),
|
|
| 81 |
- _('Registration with agent %(agent)s failed with error %(error)s: '
|
|
| 82 |
- '%(error_msg)s'),
|
|
| 83 |
- ErrorDialog),
|
|
| 84 |
- |
|
| 85 | 30 |
'gstreamer-error': Message(
|
| 86 | 31 |
_('GStreamer Error'),
|
| 87 | 32 |
_('Error: %(error)s\nDebug: %(debug)s'),
|
| ... | ... | @@ -96,12 +41,6 @@ |
| 96 | 41 |
_('Avahi Error'),
|
| 97 | 42 |
_('%s\nLink-local messaging might not work properly.'),
|
| 98 | 43 |
ErrorDialog),
|
| 99 |
- |
|
| 100 |
- 'open-file-error2': Message(
|
|
| 101 |
- _('Could not Open File'),
|
|
| 102 |
- '%s',
|
|
| 103 |
- ErrorDialog),
|
|
| 104 |
- |
|
| 105 | 44 |
}
|
| 106 | 45 |
|
| 107 | 46 |
|
| ... | ... | @@ -65,6 +65,7 @@ |
| 65 | 65 |
from gajim.gui.conversation.scrolled import ScrolledView
|
| 66 | 66 |
from gajim.gui.conversation.jump_to_end_button import JumpToEndButton
|
| 67 | 67 |
from gajim.gui.dialogs import DialogButton
|
| 68 |
+from gajim.gui.dialogs import ErrorDialog
|
|
| 68 | 69 |
from gajim.gui.dialogs import PastePreviewDialog
|
| 69 | 70 |
from gajim.gui.message_input import MessageInputTextView
|
| 70 | 71 |
from gajim.gui.util import get_hardware_key_codes
|
| ... | ... | @@ -962,7 +963,9 @@ def _on_message_textview_key_press_event(self, textview, event): |
| 962 | 963 |
|
| 963 | 964 |
if not app.account_is_available(self.account):
|
| 964 | 965 |
# we are not connected
|
| 965 |
- app.interface.raise_dialog('not-connected-while-sending')
|
|
| 966 |
+ ErrorDialog(
|
|
| 967 |
+ _('No Connection Available'),
|
|
| 968 |
+ _('Your message can not be sent until you are connected.'))
|
|
| 966 | 969 |
return True
|
| 967 | 970 |
|
| 968 | 971 |
self._on_send_message()
|
| ... | ... | @@ -612,9 +612,7 @@ def _send_httpupload(self, chat_control, path): |
| 612 | 612 |
chat_control.contact,
|
| 613 | 613 |
chat_control.is_groupchat)
|
| 614 | 614 |
except exceptions.FileError as error:
|
| 615 |
- app.ged.raise_event(
|
|
| 616 |
- InformationEvent(dialog_name='open-file-error2',
|
|
| 617 |
- args=error))
|
|
| 615 |
+ ErrorDialog(_('Could not Open File'), error)
|
|
| 618 | 616 |
return
|
| 619 | 617 |
|
| 620 | 618 |
transfer.connect('cancel', self._on_cancel_upload)
|