Show
Ignore:
Timestamp:
01/13/07 23:35:41 (23 months ago)
Author:
asterix
Message:

merge diff from trunc to 0.11 branch

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/groupchat_control.py

    r7787 r7829  
    181181                self.name = self.room_jid.split('@')[0] 
    182182 
    183                 self.hide_chat_buttons_always = gajim.config.get( 
     183                hide_chat_buttons_always = gajim.config.get( 
    184184                        '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) 
    186186                self.widget_set_visible(self.xml.get_widget('banner_eventbox'), 
    187187                        gajim.config.get('hide_groupchat_banner')) 
    188188                self.widget_set_visible(self.xml.get_widget('list_scrolledwindow'), 
    189189                        gajim.config.get('hide_groupchat_occupants_list')) 
    190                 self.gc_refer_to_nick_char = gajim.config.get('gc_refer_to_nick_char') 
    191190 
    192191                self._last_selected_contact = None # None or holds jid, account tuple 
     
    302301                self.list_treeview.set_expander_column(column) 
    303302 
    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)  
    306306 
    307307                self.update_ui() 
     
    452452                banner_status_img.set_from_pixbuf(scaled_pix) 
    453453 
    454         def draw_banner(self):   
    455                 '''Draw the fat line at the top of the window that  
    456                 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.  
    457457                ''' 
    458                 ChatControlBase.draw_banner(self) 
    459  
    460458                self.name_label.set_ellipsize(pango.ELLIPSIZE_END) 
    461459                font_attrs, font_attrs_small = self.get_font_attrs() 
     
    726724        def set_subject(self, subject): 
    727725                self.subject = subject 
    728                 self.draw_banner() 
     726                self.draw_banner_text() 
    729727 
    730728        def got_connected(self): 
    731729                gajim.gc_connected[self.account][self.room_jid] = True 
    732730                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() 
    734733 
    735734        def got_disconnected(self): 
     
    741740                        gajim.contacts.remove_gc_contact(self.account, gc_contact) 
    742741                gajim.gc_connected[self.account][self.room_jid] = False 
    743                 # Note, since this method is called during initialization it is NOT safe 
    744                 # to call self.parent_win.redraw_tab here 
    745742                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() 
    747745 
    748746        def draw_roster(self): 
     
    13421340                                self.handlers[i].disconnect(i) 
    13431341                        del self.handlers[i] 
     1342                # Remove unread events from systray 
     1343                gajim.events.remove_events(self.account, self.room_jid) 
    13441344 
    13451345        def allow_shutdown(self, method): 
     
    15101510                                begin = '' 
    15111511 
     1512                        gc_refer_to_nick_char = gajim.config.get('gc_refer_to_nick_char') 
    15121513                        if len(self.nick_hits) and \ 
    15131514                                        self.nick_hits[0].startswith(begin.replace( 
    1514                                         self.gc_refer_to_nick_char, '')) and \ 
     1515                                        gc_refer_to_nick_char, '')) and \ 
    15151516                                        self.last_key_tabs: # we should cycle 
    15161517                                self.nick_hits.append(self.nick_hits[0]) 
     
    15201521                                list_nick = gajim.contacts.get_nick_list(self.account, 
    15211522                                                                        self.room_jid) 
     1523                                list_nick.remove(self.nick) # Skip self 
    15221524                                for nick in list_nick: 
    15231525                                        if nick.lower().startswith(begin.lower()): 
     
    15261528                        if len(self.nick_hits): 
    15271529                                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 + ' ' 
    15291531                                else: 
    15301532                                        add = ' ' 
     
    17791781                        add = ' ' 
    17801782                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 + ' ' 
    17821785                message_buffer.insert_at_cursor(start + nick + add) 
    17831786