popup menu is now shown in tabs
This commit is contained in:
parent
c22777a242
commit
0fa731445a
10
src/chat.py
10
src/chat.py
|
@ -269,9 +269,7 @@ class Chat:
|
|||
|
||||
return menu
|
||||
|
||||
def on_banner_eventbox_button_press_event(self, widget, event):
|
||||
'''If right-clicked, show popup'''
|
||||
if event.button == 3: # right click
|
||||
def popup_menu(self, event):
|
||||
self.popup_is_shown = True
|
||||
menu = self.prepare_context_menu()
|
||||
menu.connect('deactivate', self.on_popup_deactivate)
|
||||
|
@ -292,6 +290,11 @@ class Chat:
|
|||
menu.popup(None, None, None, event.button, event.time)
|
||||
menu.show_all()
|
||||
|
||||
def on_banner_eventbox_button_press_event(self, widget, event):
|
||||
'''If right-clicked, show popup'''
|
||||
if event.button == 3: # right click
|
||||
self.popup_menu(event)
|
||||
|
||||
def on_popup_deactivate(self, widget):
|
||||
self.popup_is_shown = False
|
||||
|
||||
|
@ -455,6 +458,7 @@ class Chat:
|
|||
#menu.connect('deactivate', self.on_popup_deactivate)
|
||||
n = self.notebook.page_num(child)
|
||||
self.notebook.set_current_page(n)
|
||||
self.popup_menu(event)
|
||||
|
||||
def new_tab(self, jid):
|
||||
#FIXME: text formating buttons will be hidden in 0.8 release
|
||||
|
|
Loading…
Reference in New Issue