diff --git a/src/chat.py b/src/chat.py index 2086bf2df..3af095864 100644 --- a/src/chat.py +++ b/src/chat.py @@ -345,7 +345,7 @@ class Chat: del self.tagStatus[jid] self.show_title() - def size_request(self, a, b, xml_top, message_scrollwindow): + def size_request(self, a, b, xml_top, message_scrolledwindow): ''' When message_textview changes its size. If the new height will enlarge the window, enable the scrollbar automatic policy''' message_textview = xml_top.get_widget('message_textview') @@ -360,7 +360,7 @@ class Chat: if not actions_hbox: actions_hbox = xml_top.get_widget('gc_actions_hbox') - x1 = conversation_scrolledwindow.get_property("height-request") + x1 = conversation_scrolledwindow.get_property('height-request') x2 = b.height x3 = vpaned.window.get_size()[1] x4 = banner_eventbox.size_request()[1] @@ -369,13 +369,13 @@ class Chat: if not self.compact_view_current_state: add_length += x4 + x5 if x2 + x1 + add_length > x3: - message_scrollwindow.set_property('vscrollbar-policy', gtk.POLICY_AUTOMATIC) - message_scrollwindow.set_property('hscrollbar-policy', gtk.POLICY_AUTOMATIC) - message_scrollwindow.set_property('height-request',x3 - x1 - add_length) + message_scrolledwindow.set_property('vscrollbar-policy', gtk.POLICY_AUTOMATIC) + message_scrolledwindow.set_property('hscrollbar-policy', gtk.POLICY_AUTOMATIC) + message_scrolledwindow.set_property('height-request', x3 - x1 - add_length) else: - message_scrollwindow.set_property('vscrollbar-policy', gtk.POLICY_NEVER) - message_scrollwindow.set_property('hscrollbar-policy', gtk.POLICY_NEVER) - message_scrollwindow.set_property('height-request',-1) + message_scrolledwindow.set_property('vscrollbar-policy', gtk.POLICY_NEVER) + message_scrolledwindow.set_property('hscrollbar-policy', gtk.POLICY_NEVER) + message_scrolledwindow.set_property('height-request', -1) return True def new_tab(self, jid): @@ -463,12 +463,12 @@ class Chat: tab_hbox = xm.get_widget('chat_tab_hbox') user = self.contacts[jid] message_textview = self.xmls[jid].get_widget('message_textview') - message_scrollwindow = self.xmls[jid].get_widget('scrolledwindow31') + message_scrolledwindow = self.xmls[jid].get_widget('message_scrolledwindow') elif self.widget_name == 'groupchat_window': xm = gtk.glade.XML(GTKGUI_GLADE, 'groupchat_tab_hbox', APP) tab_hbox = xm.get_widget('groupchat_tab_hbox') message_textview = self.xmls[jid].get_widget('message_textview') - message_scrollwindow = self.xmls[jid].get_widget('scrolledwindow19') + message_scrolledwindow = self.xmls[jid].get_widget('message_scrolledwindow') xm.signal_connect('on_close_button_clicked', self.on_close_button_clicked, jid) @@ -477,11 +477,11 @@ class Chat: self.notebook.append_page(child, tab_hbox) message_textview.connect('size-request', self.size_request, - self.xmls[jid], message_scrollwindow) + self.xmls[jid], message_scrolledwindow) - message_scrollwindow.set_property('height-request', -1) - message_scrollwindow.set_property('hscrollbar-policy', gtk.POLICY_NEVER) - message_scrollwindow.set_property('vscrollbar-policy', gtk.POLICY_NEVER) + message_scrolledwindow.set_property('height-request', -1) + message_scrolledwindow.set_property('hscrollbar-policy', gtk.POLICY_NEVER) + message_scrolledwindow.set_property('vscrollbar-policy', gtk.POLICY_NEVER) #init new sent history for this conversation self.sent_history[jid] = [] self.sent_history_pos[jid] = 0 diff --git a/src/gtkgui.glade b/src/gtkgui.glade index c93fb476f..8677cde30 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -8607,7 +8607,7 @@ Custom - + 45 True True @@ -8627,11 +8627,11 @@ Custom GTK_JUSTIFY_LEFT GTK_WRAP_WORD True - 0 - 0 + 2 + 2 0 - 1 - 1 + 2 + 2 0 @@ -10119,7 +10119,7 @@ Status message 0 - + 3 53 True @@ -10140,11 +10140,11 @@ Status message GTK_JUSTIFY_LEFT GTK_WRAP_WORD True - 0 - 0 + 2 + 2 0 - 1 - 1 + 2 + 2 0