Commit 4a253581 authored by Nico's avatar Nico
Browse files

Rename NotificationController to Handler

The name "controller" is used in the MVC pattern context here, so we
should rather go with another name.
parent c9740f3a
Pipeline #5346 failed with stage
in 3 minutes and 34 seconds
......@@ -2,7 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md
from briar_gtk.controllers.notification import NotificationController
from briar_gtk.handlers.notification import NotificationHandler
from briar_gtk.controllers.private_chat import PrivateChatController
from briar_gtk.controllers.sidebar import SidebarController
from briar_gtk.define import APP
......@@ -42,12 +42,12 @@ class MainWindowController:
self._private_chat_controller.open_private_chat(contact_id)
def _setup_children(self):
self._setup_notification_controller()
self._setup_notification_handler()
self._setup_sidebar_controller()
self._setup_private_chat_controller()
def _setup_notification_controller(self):
self._notification_controller = NotificationController()
def _setup_notification_handler(self):
self._notification_handler = NotificationHandler()
def _setup_sidebar_controller(self):
sidebar_view = SidebarView(self._builder)
......@@ -69,6 +69,6 @@ class MainWindowController:
def _disconnect_signals(self):
self._sidebar_controller.disconnect_signals()
self._notification_controller.disconnect_signals()
self._notification_handler.disconnect_signals()
for signal in self._signals:
APP().api.socket_listener.disconnect(signal)
......@@ -14,7 +14,6 @@ from briar_gtk.widgets.edit_dialog import EditDialog
class PrivateChatController:
_current_contact_id = 0
def __init__(self, private_chat_view, sidebar_controller, builder, api):
......
# Copyright (c) 2020 Nico Alt
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md
"""
Similar to controllers, handlers react to input, but they aren't attached to a view
"""
......@@ -9,7 +9,7 @@ from briar_gtk.define import APP, NOTIFICATION_CONTACT_ADDED
from briar_gtk.define import NOTIFICATION_PRIVATE_MESSAGE
class NotificationController():
class NotificationHandler:
def __init__(self):
self._signals = list()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment