Skip to content
Snippets Groups Projects
Commit d982f6b8 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

refactor: Change layout of chat page

Add new Chat Stack to aid in the upcoming refactor
parent b56ee020
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@
from .chat_filter import ChatFilter
from .chat_list import ChatList
from .chat_list_stack import ChatListStack
from .chat_stack import ChatStack
from .control_stack import ControlStack
from .search_view import SearchView
from .types import ControlT
......@@ -57,8 +58,10 @@ def __init__(self):
self.add(self._ui.paned)
self._ui.connect_signals(self)
self._control_stack = ControlStack()
self._ui.right_grid_overlay.add(self._control_stack)
self._chat_stack = ChatStack()
self._ui.right_grid_overlay.add(self._chat_stack)
self._control_stack = self._chat_stack.get_control_stack()
self._search_view = SearchView()
self._search_view.connect('hide-search', self._on_search_hide)
......
# This file is part of Gajim.
#
# Gajim is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; version 3 only.
#
# Gajim is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
import logging
from gi.repository import Gtk
from .control_stack import ControlStack
from .util import EventHelper
log = logging.getLogger('gajim.gui.chatstack')
class ChatStack(Gtk.Stack, EventHelper):
def __init__(self):
Gtk.Stack.__init__(self)
EventHelper.__init__(self)
self.set_vexpand(True)
self.set_hexpand(True)
self._control_stack = ControlStack()
box = Gtk.Box()
box.add(self._control_stack)
self.add_named(box, 'controls')
self.show_all()
def get_control_stack(self) -> ControlStack:
return self._control_stack
......@@ -61,6 +61,7 @@
"gajim/gtk/chat_list_stack.py",
"gajim/gtk/chat_list.py",
"gajim/gtk/chat_page.py",
"gajim/gtk/chat_stack.py",
"gajim/gtk/control_stack.py",
"gajim/gtk/const.py",
"gajim/gtk/contact_info.py",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment