Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
4f7a0fa9
Commit
4f7a0fa9
authored
2 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
refactor: ChatStack: Add control methods
parent
d982f6b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gajim/gtk/chat_page.py
+3
-3
3 additions, 3 deletions
gajim/gtk/chat_page.py
gajim/gtk/chat_stack.py
+13
-1
13 additions, 1 deletion
gajim/gtk/chat_stack.py
with
16 additions
and
4 deletions
gajim/gtk/chat_page.py
+
3
−
3
View file @
4f7a0fa9
...
...
@@ -151,12 +151,12 @@ def _on_chat_selected(self,
account
:
str
,
jid
:
JID
)
->
None
:
self
.
_c
ontrol
_stack
.
show_chat
(
account
,
jid
)
self
.
_c
hat
_stack
.
show_chat
(
account
,
jid
)
self
.
_search_view
.
set_context
(
account
,
jid
)
self
.
emit
(
'
chat-selected
'
,
workspace_id
,
account
,
jid
)
def
_on_chat_unselected
(
self
,
_chat_list_stack
:
ChatListStack
)
->
None
:
self
.
_c
ontrol
_stack
.
clear
()
self
.
_c
hat
_stack
.
clear
()
self
.
_search_view
.
set_context
(
None
,
None
)
def
_on_search_history
(
self
,
...
...
@@ -185,7 +185,7 @@ def _on_chat_list_changed(self,
self
.
_ui
.
search_entry
.
set_text
(
''
)
def
process_event
(
self
,
event
:
ApplicationEvent
):
self
.
_c
ontrol
_stack
.
process_event
(
event
)
self
.
_c
hat
_stack
.
process_event
(
event
)
self
.
_chat_list_stack
.
process_event
(
event
)
def
add_chat_list
(
self
,
workspace_id
:
str
)
->
None
:
...
...
This diff is collapsed.
Click to expand it.
gajim/gtk/chat_stack.py
+
13
−
1
View file @
4f7a0fa9
...
...
@@ -12,9 +12,12 @@
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from
typing
import
Any
import
logging
from
gi.repository
import
Gtk
from
nbxmpp.protocol
import
JID
from
.control_stack
import
ControlStack
from
.util
import
EventHelper
...
...
@@ -32,7 +35,7 @@ def __init__(self):
self
.
_control_stack
=
ControlStack
()
box
=
Gtk
.
Box
()
box
=
Gtk
.
Box
(
orientation
=
Gtk
.
Orientation
.
VERTICAL
)
box
.
add
(
self
.
_control_stack
)
self
.
add_named
(
box
,
'
controls
'
)
...
...
@@ -41,3 +44,12 @@ def __init__(self):
def
get_control_stack
(
self
)
->
ControlStack
:
return
self
.
_control_stack
def
show_chat
(
self
,
account
:
str
,
jid
:
JID
)
->
None
:
self
.
_control_stack
.
show_chat
(
account
,
jid
)
def
clear
(
self
)
->
None
:
self
.
_control_stack
.
clear
()
def
process_event
(
self
,
event
:
Any
)
->
None
:
self
.
_control_stack
.
process_event
(
event
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment