Show
Ignore:
Timestamp:
12/16/07 01:01:13 (11 months ago)
Author:
nicfit
Message:

MessageWindowMgr? knows about ONE_MESSAGE_WINDOW_ALWAYS_WITH_ROSTER and MessageWindow? can reparent itself rather then the roster having to do so.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/one_window/src/roster_window.py

    r9153 r9155  
    13801380                                        name += '/' + contact.resource 
    13811381                                jid_with_resource = contact.jid + '/' + contact.resource 
    1382                                 if gajim.interface.msg_win_mgr.has_window(jid_with_resource, 
    1383                                 account): 
     1382                                if gajim.interface.msg_win_mgr.has_window(jid_with_resource, account): 
    13841383                                        win = gajim.interface.msg_win_mgr.get_window(jid_with_resource, 
    13851384                                                account) 
     
    26632662                mw = gajim.interface.msg_win_mgr.get_window(ctrl.contact.jid, ctrl.account) 
    26642663                if not mw: 
    2665                         mw = gajim.interface.msg_win_mgr.create_window(ctrl.contact, \ 
     2664                        mw = gajim.interface.msg_win_mgr.create_window(ctrl.contact, 
    26662665                                ctrl.account, ctrl.type_id) 
    26672666                ctrl.parent_win = mw 
     
    42624261                                gajim.config.set('roster_y-position', y) 
    42634262                                width, height = self.window.get_size() 
     4263                                # For the width use the size of the vbox containing the tree and 
     4264                                # status combo, this will cancel out any hpaned width  
     4265                                width = self.xml.get_widget('roster_vbox2').allocation.width 
    42644266                                gajim.config.set('roster_width', width) 
    42654267                                gajim.config.set('roster_height', height) 
     
    43994401                        win.get_control(fjid, account).got_disconnected() 
    44004402 
    4401                 # FIXME: This is probably not the right place for this code. 
    4402                 if (gajim.config.get('one_message_window') == 'always' and 
    4403                                 gajim.config.get('one_message_window_with_roster')): 
    4404                         win.window.hide() 
    4405                         hpaned = self.xml.get_widget('roster_hpaned') 
    4406                         notebook = win.xml.get_widget('notebook') 
    4407                         notebook.reparent(hpaned) 
    4408                         hpaned.pack2(notebook, resize=True, shrink=True) 
    4409                         notebook.show_all() 
    4410                 else: 
    4411                         win.window.present() 
     4403                win.window.present() 
    44124404 
    44134405        def on_row_activated(self, widget, path): 
     
    53375329                self.xml = gtkgui_helpers.get_glade('roster_window.glade') 
    53385330                self.window = self.xml.get_widget('roster_window') 
     5331                self.hpaned = self.xml.get_widget('roster_hpaned') 
    53395332                self._music_track_changed_signal = None 
    5340                 gajim.interface.msg_win_mgr = MessageWindowMgr() 
     5333                gajim.interface.msg_win_mgr = MessageWindowMgr(self.window, self.hpaned) 
    53415334                self.advanced_menus = [] # We keep them to destroy them 
    53425335                if gajim.config.get('roster_window_skip_taskbar'):