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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
eta
gajim
Commits
2e5fe517
Commit
2e5fe517
authored
19 years ago
by
nicfit
Browse files
Options
Downloads
Patches
Plain Diff
Implemented #1356
parent
fada2552
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
src/message_control.py
+1
-1
1 addition, 1 deletion
src/message_control.py
src/message_window.py
+16
-18
16 additions, 18 deletions
src/message_window.py
with
17 additions
and
19 deletions
src/message_control.py
+
1
−
1
View file @
2e5fe517
...
...
@@ -48,7 +48,7 @@ class MessageControl:
self
.
compact_view_current
=
False
self
.
nb_unread
=
0
self
.
print_time_timeout_id
=
None
# FIXME: Make this a member
gajim
.
last_message_time
[
self
.
account
][
contact
.
jid
]
=
0
self
.
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
widget_name
,
APP
)
...
...
This diff is collapsed.
Click to expand it.
src/message_window.py
+
16
−
18
View file @
2e5fe517
...
...
@@ -176,33 +176,30 @@ class MessageWindow:
'''
When close button is pressed: close a tab
'''
self
.
remove_tab
(
contact
)
def
show_title
(
self
,
urgent
=
True
):
def
show_title
(
self
,
urgent
=
True
,
control
=
None
):
'''
redraw the window
'
s title
'''
print
"
show_title
"
unread
=
0
for
ctl
in
self
.
_controls
.
values
():
unread
+=
ctl
.
nb_unread
start
=
''
unread_str
=
''
if
unread
>
1
:
start
=
'
[
'
+
unicode
(
unread
)
+
'
]
'
unread_str
=
'
[
'
+
unicode
(
unread
)
+
'
]
'
elif
unread
==
1
:
start
=
'
*
'
ctl
=
self
.
get_active_control
()
if
len
(
self
.
_controls
)
>
1
:
# if more than one tab in the same window
add
=
ctl
.
display_name
unread_str
=
'
*
'
if
not
control
:
control
=
self
.
get_active_control
()
if
control
.
type_id
==
message_control
.
TYPE_GC
:
title
=
control
.
room_jid
elif
control
.
contact
.
name
:
title
=
control
.
contact
.
name
else
:
add
=
ctl
.
contact
.
name
# FIXME: This is for GC only
# elif self.widget_name == 'groupchat_window':
# name = gajim.get_nick_from_jid(jid)
# add = name
title
=
control
.
contact
.
jid
title
=
start
+
add
if
len
(
gajim
.
connections
)
>=
2
:
# if we have 2 or more accounts
title
+=
'
(
'
+
_
(
'
account:
'
)
+
ctl
.
account
+
'
)
'
# Update UI
title
=
unread_str
+
title
self
.
window
.
set_title
(
title
)
if
urgent
:
gtkgui_helpers
.
set_unset_urgency_hint
(
self
.
window
,
unread
)
...
...
@@ -405,6 +402,7 @@ class MessageWindow:
new_ctl
=
self
.
_widget_to_control
(
notebook
.
get_nth_page
(
page_num
))
new_ctl
.
set_control_active
(
True
)
self
.
show_title
(
control
=
new_ctl
)
def
_on_notebook_key_press
(
self
,
widget
,
event
):
st
=
'
1234567890
'
# alt+1 means the first tab (tab 0)
...
...
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