Commit 99872d8f authored by Yann Leboulanger's avatar Yann Leboulanger

split message_window.ui to separate chat_control.ui and groupchat_control.ui

parent 956accf0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -240,7 +240,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
contact = c
MessageControl.__init__(self, type_id, parent_win, widget_name,
contact, acct, resource = resource)
contact, acct, resource=resource)
widget = self.xml.get_object('history_button')
id_ = widget.connect('clicked', self._on_history_menuitem_activate)
......@@ -587,7 +587,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
def _on_message_textview_key_press_event(self, widget, event):
# Ctrl [+ Shift] + Tab are not forwarded to notebook. We handle it here
if self.widget_name == 'muc_child_vbox':
if self.widget_name == 'groupchat_control':
if event.keyval not in (gtk.keysyms.ISO_Left_Tab, gtk.keysyms.Tab):
self.last_key_tabs = False
if event.state & gtk.gdk.SHIFT_MASK:
......@@ -1244,7 +1244,7 @@ class ChatControl(ChatControlBase):
def __init__(self, parent_win, contact, acct, session, resource = None):
ChatControlBase.__init__(self, self.TYPE_ID, parent_win,
'chat_child_vbox', contact, acct, resource)
'chat_control', contact, acct, resource)
self.gpg_is_active = False
# for muc use:
......
......@@ -199,7 +199,7 @@ class GroupchatControl(ChatControlBase):
def __init__(self, parent_win, contact, acct, is_continued=False):
ChatControlBase.__init__(self, self.TYPE_ID, parent_win,
'muc_child_vbox', contact, acct)
'groupchat_control', contact, acct)
self.is_continued=is_continued
self.is_anonymous = True
......
......@@ -60,8 +60,8 @@ class MessageControl:
gajim.last_message_time[self.account][self.get_full_jid()] = 0
self.xml = gtkgui_helpers.get_gtk_builder('message_window.ui', widget_name)
self.widget = self.xml.get_object(widget_name)
self.xml = gtkgui_helpers.get_gtk_builder('%s.ui' % widget_name)
self.widget = self.xml.get_object('%s_vbox' % widget_name)
def get_full_jid(self):
fjid = self.contact.jid
......
......@@ -125,9 +125,6 @@ class MessageWindow(object):
self._on_notebook_key_press)
self.handlers[id_] = self.notebook
# Remove the pages from xml file
while self.notebook.get_n_pages():
self.notebook.remove_page(0)
# Tab customizations
pref_pos = gajim.config.get('tabs_position')
if pref_pos == 'bottom':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment