Changeset 9184

Show
Ignore:
Timestamp:
12/20/07 04:40:27 (11 months ago)
Author:
nicfit
Message:

MessageWindow? reconfig bug fixes for deleted roster

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/chat_control.py

    r9118 r9184  
    644644 
    645645        def print_conversation_line(self, text, kind, name, tim, 
    646                 other_tags_for_name = [], other_tags_for_time = [],  
     646                other_tags_for_name = [], other_tags_for_time = [], 
    647647                other_tags_for_text = [], count_as_new = True, 
    648648                subject = None, old_kind = None, xhtml = None): 
  • trunk/src/message_window.py

    r9183 r9184  
    239239 
    240240                self.redraw_tab(control) 
    241                 self.notebook.show_all() 
     241                if self.parent_paned: 
     242                        self.notebook.show_all() 
     243                else: 
     244                        self.window.show_all() 
    242245                # NOTE: we do not call set_control_active(True) since we don't know whether 
    243246                # the tab is the active one. 
     
    438441                                child = self.parent_paned.get_child2() 
    439442                                self.parent_paned.remove(child) 
    440                                 # FIXME: restore preferred roster size 
    441443                        else: 
    442444                                self.window.destroy() 
     
    926928                for w in self.windows(): 
    927929                        self.save_state(w, width_adjust) 
    928                         w.window.hide() 
    929                         w.window.destroy() 
     930                        if not w.parent_paned: 
     931                                w.window.hide() 
     932                                w.window.destroy() 
     933 
    930934                gajim.interface.save_config() 
    931935 
     
    994998                controls = [] 
    995999                for w in self.windows(): 
    996                         w.window.hide() 
     1000                        # Note, we are taking care not to hide/delete the roster window when the 
     1001                        # MessageWindow is embedded. 
     1002                        if not w.parent_paned: 
     1003                                w.window.hide() 
    9971004                        while w.notebook.get_n_pages(): 
    9981005                                page = w.notebook.get_nth_page(0) 
     
    10031010                        # Must clear _controls from window to prevent MessageControl.shutdown calls 
    10041011                        w._controls = {} 
    1005                         w.window.destroy() 
     1012                        if not w.parent_paned: 
     1013                                w.window.destroy() 
     1014                        else: 
     1015                                # Don't close parent window, just remove the child 
     1016                                child = w.parent_paned.get_child2() 
     1017                                w.parent_paned.remove(child) 
    10061018 
    10071019                self._windows = {}