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
norstbox
gajim
Commits
e9bd8176
Commit
e9bd8176
authored
19 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
destroy sub menus in systray popup menu before creating new. Fixes #1820
parent
52d01323
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/systray.py
+11
-1
11 additions, 1 deletion
src/systray.py
with
11 additions
and
1 deletion
src/systray.py
+
11
−
1
View file @
e9bd8176
...
...
@@ -63,6 +63,7 @@ class Systray:
self
.
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
'
systray_context_menu
'
,
APP
)
self
.
systray_context_menu
=
self
.
xml
.
get_widget
(
'
systray_context_menu
'
)
self
.
xml
.
signal_autoconnect
(
self
)
self
.
popup_menus
=
[]
def
set_img
(
self
):
if
len
(
self
.
jids
)
>
0
:
...
...
@@ -113,7 +114,10 @@ class Systray:
'''
create chat with and new message (sub) menus/menuitems
event is None when we
'
re in Windows
'''
for
m
in
self
.
popup_menus
:
m
.
destroy
()
chat_with_menuitem
=
self
.
xml
.
get_widget
(
'
chat_with_menuitem
'
)
single_message_menuitem
=
self
.
xml
.
get_widget
(
'
single_message_menuitem
'
)
status_menuitem
=
self
.
xml
.
get_widget
(
'
status_menu
'
)
...
...
@@ -124,6 +128,7 @@ class Systray:
self
.
single_message_handler_id
=
None
sub_menu
=
gtk
.
Menu
()
self
.
popup_menus
.
append
(
sub_menu
)
status_menuitem
.
set_submenu
(
sub_menu
)
# We need our own set of status icons, let's make 'em!
...
...
@@ -170,9 +175,11 @@ class Systray:
if
connected_accounts
>=
2
:
# 2 or more connections? make submenus
account_menu_for_chat_with
=
gtk
.
Menu
()
chat_with_menuitem
.
set_submenu
(
account_menu_for_chat_with
)
self
.
popup_menus
.
append
(
account_menu_for_chat_with
)
account_menu_for_single_message
=
gtk
.
Menu
()
single_message_menuitem
.
set_submenu
(
account_menu_for_single_message
)
self
.
popup_menus
.
append
(
account_menu_for_single_message
)
accounts_list
=
gajim
.
contacts
.
get_accounts
()
accounts_list
.
sort
()
...
...
@@ -182,6 +189,7 @@ class Systray:
item
=
gtk
.
MenuItem
(
_
(
'
using account %s
'
)
%
account
)
account_menu_for_chat_with
.
append
(
item
)
group_menu
=
self
.
make_groups_submenus_for_chat_with
(
account
)
self
.
popup_menus
.
append
(
group_menu
)
item
.
set_submenu
(
group_menu
)
#for single message
item
=
gtk
.
MenuItem
(
_
(
'
using account %s
'
)
%
account
)
...
...
@@ -195,6 +203,7 @@ class Systray:
if
gajim
.
connections
[
account
].
connected
:
# for chat_with
group_menu
=
self
.
make_groups_submenus_for_chat_with
(
account
)
self
.
popup_menus
.
append
(
group_menu
)
chat_with_menuitem
.
set_submenu
(
group_menu
)
# for single message
...
...
@@ -249,6 +258,7 @@ class Systray:
at_least_one
=
False
item
=
gtk
.
MenuItem
(
group
)
contacts_menu
=
gtk
.
Menu
()
self
.
popup_menus
.
append
(
contacts_menu
)
item
.
set_submenu
(
contacts_menu
)
for
jid
in
gajim
.
contacts
.
get_jid_list
(
account
):
contact
=
gajim
.
contacts
.
get_contact_with_highest_priority
(
account
,
...
...
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