Daniel Brötzmann pushed to branch newcontrol at gajim / gajim
Commits: 32cd853a by wurstsalat at 2022-07-11T20:19:17+02:00 Remove update_actions method
- - - - -
4 changed files:
- gajim/common/modules/httpupload.py - gajim/gtk/accounts.py - gajim/gtk/controls/base.py - gajim/gtk/controls/chat.py
Changes:
===================================== gajim/common/modules/httpupload.py ===================================== @@ -95,9 +95,6 @@ def pass_disco(self, info: DiscoInfo) -> None: GLib.FormatSizeFlags.IEC_UNITS) self._log.info('Component has a maximum file size of: %s', size)
- for ctrl in app.window.get_controls(account=self._account): - ctrl.update_actions() - def make_transfer(self, path: str, encryption: Optional[str],
===================================== gajim/gtk/accounts.py ===================================== @@ -872,8 +872,6 @@ def _reset_send_read_marker(self, button: Gtk.Button) -> None: app.settings.set_contact_settings('send_marker', None) app.settings.set_group_chat_settings( 'send_marker', None, context='private') - for ctrl in app.window.get_controls(account=self._account): - ctrl.update_actions()
class ConnectionPage(GenericSettingPage):
===================================== gajim/gtk/controls/base.py ===================================== @@ -321,11 +321,6 @@ def is_groupchat(self) -> bool: def focus(self) -> None: raise NotImplementedError
- def update_actions(self) -> None: - """ - Derived types MAY implement this - """ - def update_ui(self) -> None: """ Derived types SHOULD implement this
===================================== gajim/gtk/controls/chat.py ===================================== @@ -40,12 +40,8 @@
from gajim.common import app from gajim.common import events -from gajim.common import helpers -from gajim.common import types -from gajim.common.client import Client from gajim.common.i18n import _ from gajim.common.helpers import AdditionalDataDict -from gajim.common.const import SimpleClientState from gajim.common.const import KindConstant from gajim.common.modules.contacts import BareContact
@@ -81,16 +77,11 @@ def __init__(self, account: str, jid: JID) -> None: self.correcting: bool = False self.last_sent_msg: Optional[str] = None
- if self._type == ControlType.CHAT: - self._client.connect_signal('state-changed', - self._on_client_state_changed) - self.update_ui()
# PluginSystem: adding GUI extension point for this ChatControl # instance object app.plugin_manager.gui_extension_point('chat_control', self) - self.update_actions()
def _connect_contact_signals(self) -> None: pass @@ -205,7 +196,6 @@ def _nec_ping(self, event: events.ApplicationEvent):
def update_ui(self) -> None: BaseControl.update_ui(self) - self.update_actions()
def add_message(self, text: str, @@ -267,12 +257,6 @@ def _on_drag_data_received(self, # File drag and drop (handled in chat_control_base) self.drag_data_file_transfer(selection)
- def _on_client_state_changed(self, - _client: Client, - _signal_name: str, - state: SimpleClientState): - self.update_actions() - def _on_presence_received(self, event: events.PresenceReceived) -> None: self.update_ui()
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/32cd853a3aae9d25b34e10433d017017b...