Changeset 9153

Show
Ignore:
Timestamp:
12/15/07 21:41:46 (9 months ago)
Author:
nicfit
Message:

Use one_message_window_with_roster and some whitespace cleanup

Files:
1 modified

Legend:

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

    r9145 r9153  
    44## Copyright (C) 2003-2007 Yann Leboulanger <asterix@lagaule.org> 
    55## Copyright (C) 2005-2007 Nikos Kouremenos <kourem@gmail.com> 
     6##                         Travis Shirk <travis@pobox.com>  
    67## Copyright (C) 2005-2006 Dimitur Kirov <dkirov@gmail.com> 
    78## Copyright (C) 2007 Lukas Petrovicky <lukas@petrovicky.net> 
     
    30863087                        execute_command_menuitem.connect('activate', 
    30873088                                self.on_execute_command, contact, account) 
    3088                          
    3089                         start_chat_menuitem.connect('activate',  
     3089 
     3090                        start_chat_menuitem.connect('activate', 
    30903091                                self.on_new_chat_menuitem_activate, account) 
    30913092 
     
    41514152                else: 
    41524153                        gajim.interface.instances['file_transfers'].window.show_all() 
    4153          
     4154 
    41544155        def on_history_menuitem_activate(self, widget): 
    41554156                if gajim.interface.instances.has_key('logs'): 
     
    43984399                        win.get_control(fjid, account).got_disconnected() 
    43994400 
    4400                 if gajim.config.get('one_message_window') == 'always': 
     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')): 
    44014404                        win.window.hide() 
    44024405                        hpaned = self.xml.get_widget('roster_hpaned') 
    4403                         notebook = win.xml.get_widget('notebook')  
     4406                        notebook = win.xml.get_widget('notebook') 
    44044407                        notebook.reparent(hpaned) 
    44054408                        hpaned.pack2(notebook, resize=True, shrink=True) 
     
    49954998                        for g in old_groups: 
    49964999                                self.draw_group(g, account_source) 
    4997                         self.draw_account(account_source)        
     5000                        self.draw_account(account_source) 
    49985001                        context.finish(True, True, etime) 
    49995002 
     
    50675070                if position == gtk.TREE_VIEW_DROP_BEFORE and len(path_dest) == 2: 
    50685071                        # dropped before a group: we drop it in the previous group every time 
    5069                         path_dest = (path_dest[0], path_dest[1]-1)       
     5072                        path_dest = (path_dest[0], path_dest[1]-1) 
    50705073                # destination: the row something got dropped on 
    50715074                iter_dest = model.get_iter(path_dest) 
     
    51215124                        dialog.popup() 
    51225125                        return 
    5123                  
     5126 
    51245127                # a roster entry was dragged and dropped somewhere in the roster 
    51255128 
     
    51295132                type_source = model[iter_source][C_TYPE] 
    51305133                account_source = model[iter_source][C_ACCOUNT].decode('utf-8') 
    5131                  
     5134 
    51325135                # Only normal contacts can be dragged    
    5133                 if type_source != 'contact':  
     5136                if type_source != 'contact': 
    51345137                        return 
    51355138                if gajim.config.get_per('accounts', account_source, 'is_zeroconf'): 
     
    51815184                                # Drop on self 
    51825185                                return 
    5183                  
     5186 
    51845187                # contact drop somewhere in or on a foreign account 
    51855188                if (type_dest == 'account' or not self.regroup) and \ 
     
    51895192                                user_nick = c_source.name, group = grp_dest) 
    51905193                        return 
    5191                  
     5194 
    51925195                # we may not add contacts from special_groups 
    51935196                if grp_source in helpers.special_groups : 
     
    52035206                                is_big_brother, context, etime, grp_source) 
    52045207                        return 
    5205                  
     5208 
    52065209                # Contact drop on another contact, make meta contacts 
    52075210                if position == gtk.TREE_VIEW_DROP_INTO_OR_AFTER or \ 
     
    53135316                self.xml.get_widget('roster_window').add_accel_group(accels) 
    53145317                prefs_item.add_accelerator('activate', accels, ord(','), 
    5315                                                                    gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) 
     5318                                                gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) 
    53165319                app_menu.append(prefs_item) 
    53175320                app_menu.append(gtk.MenuItem('__SKIP__'))