Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
886ea230 by wurstsalat at 2022-01-06T18:57:06+01:00
Dialog messages: Remove obsolete messages
- - - - -
3 changed files:
- gajim/dialog_messages.py
- gajim/gtk/controls/base.py
- gajim/gui_interface.py
Changes:
=====================================
gajim/dialog_messages.py
=====================================
@@ -27,61 +27,6 @@
Message = namedtuple('Message', ['title', 'text', 'dialog'])
messages = {
- 'invalid-jid-with-error': Message(
- _('Invalid XMPP Address'),
- '%s',
- ErrorDialog),
-
- 'invalid-jid': Message(
- _('Invalid XMPP Address'),
- _('It is not possible to send a message '
- 'to %s. This XMPP Address is not valid.'),
- ErrorDialog),
-
- 'unread-events-on-remove-account': Message(
- _('Unread Events'),
- _('Read or acknowledge all pending events before '
- 'removing this account.'),
- ErrorDialog),
-
- 'invalid-form': Message(
- _('Invalid Form'),
- _('The form is not filled correctly.'),
- ErrorDialog),
-
- 'not-connected-while-sending': Message(
- _('No Connection Available'),
- _('Your message can not be sent until you are connected.'),
- ErrorDialog),
-
- 'jid-in-list': Message(
- _('XMPP Address Already in List'),
- _('The XMPP Address you entered is already in the list. '
- 'Please choose another one.'),
- ErrorDialog),
-
- 'invalid-answer': Message(
- _('Invalid Answer'),
- _('Transport %(name)s answered wrongly to '
- 'register request: %(error)s'),
- ErrorDialog),
-
- 'invalid-custom-hostname': Message(
- _('Wrong Custom Hostname'),
- _('Custom hostname "%s" is wrong. It will be ignored.'),
- ErrorDialog),
-
- 'agent-register-success': Message(
- _('Registration Succeeded'),
- _('Registration with agent %s succeeded.'),
- InformationDialog),
-
- 'agent-register-error': Message(
- _('Registration Failed'),
- _('Registration with agent %(agent)s failed with error %(error)s: '
- '%(error_msg)s'),
- ErrorDialog),
-
'gstreamer-error': Message(
_('GStreamer Error'),
_('Error: %(error)s\nDebug: %(debug)s'),
@@ -96,12 +41,6 @@
_('Avahi Error'),
_('%s\nLink-local messaging might not work properly.'),
ErrorDialog),
-
- 'open-file-error2': Message(
- _('Could not Open File'),
- '%s',
- ErrorDialog),
-
}
=====================================
gajim/gtk/controls/base.py
=====================================
@@ -65,6 +65,7 @@
from gajim.gui.conversation.scrolled import ScrolledView
from gajim.gui.conversation.jump_to_end_button import JumpToEndButton
from gajim.gui.dialogs import DialogButton
+from gajim.gui.dialogs import ErrorDialog
from gajim.gui.dialogs import PastePreviewDialog
from gajim.gui.message_input import MessageInputTextView
from gajim.gui.util import get_hardware_key_codes
@@ -962,7 +963,9 @@ def _on_message_textview_key_press_event(self, textview,
event):
if not app.account_is_available(self.account):
# we are not connected
- app.interface.raise_dialog('not-connected-while-sending')
+ ErrorDialog(
+ _('No Connection Available'),
+ _('Your message can not be sent until you are connected.'))
return True
self._on_send_message()
=====================================
gajim/gui_interface.py
=====================================
@@ -612,9 +612,7 @@ def _send_httpupload(self, chat_control, path):
chat_control.contact,
chat_control.is_groupchat)
except exceptions.FileError as error:
- app.ged.raise_event(
- InformationEvent(dialog_name='open-file-error2',
- args=error))
+ ErrorDialog(_('Could not Open File'), error)
return
transfer.connect('cancel', self._on_cancel_upload)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/886ea23022d547501ebd84e758d1aa9cca3dd84f
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/886ea23022d547501ebd84e758d1aa9cca3dd84f
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits