make good use of the context menu in notebook

This commit is contained in:
Nikos Kouremenos 2005-06-03 15:37:17 +00:00
parent d2895c814c
commit 4b14127049
2 changed files with 10 additions and 6 deletions

View File

@ -123,7 +123,7 @@ class Chat:
#FIXME: when gtk2.4 is OOOOLD do it via glade2.10+
if gtk.pygtk_version > (2, 6, 0) and gtk.gtk_version > (2, 6, 0):
nickname.set_max_width_chars(15)
nickname.set_max_width_chars(10)
nickname.set_text(start + self.names[jid])
@ -294,8 +294,6 @@ class Chat:
self.on_conversation_vadjustment_value_changed)
child = self.childs[jid]
self.notebook.append_page(child)
if len(self.xmls) > 1:
self.notebook.set_show_tabs(True)
@ -303,13 +301,19 @@ class Chat:
if self.widget_name == 'tabbed_chat_window':
xm = gtk.glade.XML(GTKGUI_GLADE, 'chat_tab_hbox', APP)
tab_hbox = xm.get_widget('chat_tab_hbox')
user = self.plugin.roster.contacts[self.account][jid][0]
gtklabel = gtk.Label(user.name)
gtklabel.set_property('xalign', 0)
elif self.widget_name == 'groupchat_window':
xm = gtk.glade.XML(GTKGUI_GLADE, 'groupchat_tab_hbox', APP)
tab_hbox = xm.get_widget('groupchat_tab_hbox')
gtklabel = gtk.Label(jid.split('@')[0])
gtklabel.set_property('xalign', 0)
xm.signal_connect('on_close_button_clicked',
self.on_close_button_clicked, jid)
self.notebook.set_tab_label(child, tab_hbox)
self.notebook.append_page_menu(child, tab_hbox, gtklabel)
self.show_title()

View File

@ -7934,7 +7934,7 @@ Custom</property>
<property name="show_border">False</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">True</property>
<property name="enable_popup">False</property>
<property name="enable_popup">True</property>
<signal name="switch_page" handler="on_chat_notebook_switch_page" last_modification_time="Wed, 16 Mar 2005 20:58:25 GMT"/>
<signal name="key_press_event" handler="on_chat_notebook_key_press_event" last_modification_time="Wed, 16 Mar 2005 20:58:38 GMT"/>
@ -8154,7 +8154,7 @@ Custom</property>
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<property name="spacing">4</property>
<child>
<widget class="GtkLabel" id="label250">