Skip to content
Snippets Groups Projects
Commit 4b141270 authored by nkour's avatar nkour
Browse files

make good use of the context menu in notebook

parent d2895c81
No related branches found
No related tags found
No related merge requests found
...@@ -123,7 +123,7 @@ class Chat: ...@@ -123,7 +123,7 @@ class Chat:
#FIXME: when gtk2.4 is OOOOLD do it via glade2.10+ #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): 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]) nickname.set_text(start + self.names[jid])
...@@ -294,8 +294,6 @@ class Chat: ...@@ -294,8 +294,6 @@ class Chat:
self.on_conversation_vadjustment_value_changed) self.on_conversation_vadjustment_value_changed)
child = self.childs[jid] child = self.childs[jid]
self.notebook.append_page(child)
if len(self.xmls) > 1: if len(self.xmls) > 1:
self.notebook.set_show_tabs(True) self.notebook.set_show_tabs(True)
...@@ -303,13 +301,19 @@ class Chat: ...@@ -303,13 +301,19 @@ class Chat:
if self.widget_name == 'tabbed_chat_window': if self.widget_name == 'tabbed_chat_window':
xm = gtk.glade.XML(GTKGUI_GLADE, 'chat_tab_hbox', APP) xm = gtk.glade.XML(GTKGUI_GLADE, 'chat_tab_hbox', APP)
tab_hbox = xm.get_widget('chat_tab_hbox') 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': elif self.widget_name == 'groupchat_window':
xm = gtk.glade.XML(GTKGUI_GLADE, 'groupchat_tab_hbox', APP) xm = gtk.glade.XML(GTKGUI_GLADE, 'groupchat_tab_hbox', APP)
tab_hbox = xm.get_widget('groupchat_tab_hbox') 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', xm.signal_connect('on_close_button_clicked',
self.on_close_button_clicked, jid) 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() self.show_title()
......
...@@ -7934,7 +7934,7 @@ Custom</property> ...@@ -7934,7 +7934,7 @@ Custom</property>
<property name="show_border">False</property> <property name="show_border">False</property>
<property name="tab_pos">GTK_POS_TOP</property> <property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">True</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="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"/> <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> ...@@ -8154,7 +8154,7 @@ Custom</property>
<property name="border_width">2</property> <property name="border_width">2</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="spacing">6</property> <property name="spacing">4</property>
<child> <child>
<widget class="GtkLabel" id="label250"> <widget class="GtkLabel" id="label250">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment