Changeset 7829 for branches/gajim_0.11/src/groupchat_control.py
- Timestamp:
- 01/13/07 23:35:41 (23 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/groupchat_control.py (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/groupchat_control.py
r7787 r7829 181 181 self.name = self.room_jid.split('@')[0] 182 182 183 self.hide_chat_buttons_always = gajim.config.get(183 hide_chat_buttons_always = gajim.config.get( 184 184 'always_hide_groupchat_buttons') 185 self.chat_buttons_set_visible( self.hide_chat_buttons_always)185 self.chat_buttons_set_visible(hide_chat_buttons_always) 186 186 self.widget_set_visible(self.xml.get_widget('banner_eventbox'), 187 187 gajim.config.get('hide_groupchat_banner')) 188 188 self.widget_set_visible(self.xml.get_widget('list_scrolledwindow'), 189 189 gajim.config.get('hide_groupchat_occupants_list')) 190 self.gc_refer_to_nick_char = gajim.config.get('gc_refer_to_nick_char')191 190 192 191 self._last_selected_contact = None # None or holds jid, account tuple … … 302 301 self.list_treeview.set_expander_column(column) 303 302 304 self.draw_banner() 305 self.got_disconnected() # init some variables 303 gajim.gc_connected[self.account][self.room_jid] = False 304 # disable win, we are not connected yet 305 ChatControlBase.got_disconnected(self) 306 306 307 307 self.update_ui() … … 452 452 banner_status_img.set_from_pixbuf(scaled_pix) 453 453 454 def draw_banner (self):455 '''Draw the fat line at the top of the window that456 houses the muc icon,room jid, subject.454 def draw_banner_text(self): 455 '''Draw the text in the fat line at the top of the window that 456 houses the room jid, subject. 457 457 ''' 458 ChatControlBase.draw_banner(self)459 460 458 self.name_label.set_ellipsize(pango.ELLIPSIZE_END) 461 459 font_attrs, font_attrs_small = self.get_font_attrs() … … 726 724 def set_subject(self, subject): 727 725 self.subject = subject 728 self.draw_banner ()726 self.draw_banner_text() 729 727 730 728 def got_connected(self): 731 729 gajim.gc_connected[self.account][self.room_jid] = True 732 730 ChatControlBase.got_connected(self) 733 self.draw_banner() 731 # We don't redraw the whole banner here, because only icon change 732 self._update_banner_state_image() 734 733 735 734 def got_disconnected(self): … … 741 740 gajim.contacts.remove_gc_contact(self.account, gc_contact) 742 741 gajim.gc_connected[self.account][self.room_jid] = False 743 # Note, since this method is called during initialization it is NOT safe744 # to call self.parent_win.redraw_tab here745 742 ChatControlBase.got_disconnected(self) 746 self.draw_banner() 743 # We don't redraw the whole banner here, because only icon change 744 self._update_banner_state_image() 747 745 748 746 def draw_roster(self): … … 1342 1340 self.handlers[i].disconnect(i) 1343 1341 del self.handlers[i] 1342 # Remove unread events from systray 1343 gajim.events.remove_events(self.account, self.room_jid) 1344 1344 1345 1345 def allow_shutdown(self, method): … … 1510 1510 begin = '' 1511 1511 1512 gc_refer_to_nick_char = gajim.config.get('gc_refer_to_nick_char') 1512 1513 if len(self.nick_hits) and \ 1513 1514 self.nick_hits[0].startswith(begin.replace( 1514 self.gc_refer_to_nick_char, '')) and \1515 gc_refer_to_nick_char, '')) and \ 1515 1516 self.last_key_tabs: # we should cycle 1516 1517 self.nick_hits.append(self.nick_hits[0]) … … 1520 1521 list_nick = gajim.contacts.get_nick_list(self.account, 1521 1522 self.room_jid) 1523 list_nick.remove(self.nick) # Skip self 1522 1524 for nick in list_nick: 1523 1525 if nick.lower().startswith(begin.lower()): … … 1526 1528 if len(self.nick_hits): 1527 1529 if len(splitted_text) < 2: # This is the 1st word of the line or no word 1528 add = self.gc_refer_to_nick_char + ' '1530 add = gc_refer_to_nick_char + ' ' 1529 1531 else: 1530 1532 add = ' ' … … 1779 1781 add = ' ' 1780 1782 else: 1781 add = self.gc_refer_to_nick_char + ' ' 1783 gc_refer_to_nick_char = gajim.config.get('gc_refer_to_nick_char') 1784 add = gc_refer_to_nick_char + ' ' 1782 1785 message_buffer.insert_at_cursor(start + nick + add) 1783 1786
