Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norstbox
gajim
Commits
c0bcd072
Commit
c0bcd072
authored
Apr 07, 2006
by
Yann Leboulanger
Browse files
destroy context menu when selection is done. see #1820
parent
163d3eba
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/gtkgui_helpers.py
View file @
c0bcd072
...
...
@@ -602,3 +602,6 @@ def get_possible_button_event(event):
event_button
=
event
.
button
return
event_button
def
destroy_widget
(
widget
):
widget
.
destroy
()
src/roster_window.py
View file @
c0bcd072
...
...
@@ -631,7 +631,6 @@ class RosterWindow:
# make it sensitive. it is insensitive only if no accounts are *available*
advanced_menuitem
.
set_sensitive
(
True
)
if
self
.
add_new_contact_handler_id
:
add_new_contact_menuitem
.
handler_disconnect
(
self
.
add_new_contact_handler_id
)
...
...
@@ -1312,6 +1311,9 @@ class RosterWindow:
event_button
=
gtkgui_helpers
.
get_possible_button_event
(
event
)
roster_contact_context_menu
.
attach_to_widget
(
self
.
tree
,
None
)
roster_contact_context_menu
.
connect
(
'selection-done'
,
gtkgui_helpers
.
destroy_widget
)
roster_contact_context_menu
.
popup
(
None
,
None
,
None
,
event_button
,
event
.
time
)
roster_contact_context_menu
.
show_all
()
...
...
@@ -1343,6 +1345,8 @@ class RosterWindow:
event_button
=
gtkgui_helpers
.
get_possible_button_event
(
event
)
menu
.
attach_to_widget
(
self
.
tree
,
None
)
menu
.
connect
(
'selection-done'
,
gtkgui_helpers
.
destroy_widget
)
menu
.
popup
(
None
,
None
,
None
,
event_button
,
event
.
time
)
menu
.
show_all
()
...
...
@@ -1407,6 +1411,8 @@ class RosterWindow:
event_button
=
gtkgui_helpers
.
get_possible_button_event
(
event
)
menu
.
attach_to_widget
(
self
.
tree
,
None
)
menu
.
connect
(
'selection-done'
,
gtkgui_helpers
.
destroy_widget
)
menu
.
popup
(
None
,
None
,
None
,
event_button
,
event
.
time
)
menu
.
show_all
()
...
...
@@ -1536,6 +1542,8 @@ class RosterWindow:
event_button
=
gtkgui_helpers
.
get_possible_button_event
(
event
)
menu
.
attach_to_widget
(
self
.
tree
,
None
)
menu
.
connect
(
'selection-done'
,
gtkgui_helpers
.
destroy_widget
)
menu
.
popup
(
None
,
self
.
tree
,
None
,
event_button
,
event
.
time
)
menu
.
show_all
()
...
...
@@ -3110,6 +3118,8 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
c_dest
,
is_big_brother
,
context
,
etime
)
menu
.
append
(
item
)
menu
.
attach_to_widget
(
self
.
tree
,
None
)
menu
.
connect
(
'selection-done'
,
gtkgui_helpers
.
destroy_widget
)
menu
.
popup
(
None
,
None
,
None
,
1
,
etime
)
menu
.
show_all
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment