Show
Ignore:
Timestamp:
01/06/07 12:00:50 (23 months ago)
Author:
asterix
Message:

merge changeset from trunk except pyopenssl stuff

Files:
1 modified

Legend:

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

    r7646 r7787  
    8585                self.one_window_type_combobox =\ 
    8686                        self.xml.get_widget('one_window_type_combobox') 
     87                self.treat_incoming_messages_combobox =\ 
     88                        self.xml.get_widget('treat_incoming_messages_combobox') 
    8789 
    8890                #FIXME: remove when ANC will be implemented 
     
    141143                        emoticons_combobox.set_active(len(l)-1) 
    142144 
    143                 #iconset 
     145                # iconset 
    144146                iconsets_list = os.listdir(os.path.join(gajim.DATA_DIR, 'iconsets')) 
    145147                # new model, image in 0, string in 1 
     
    183185                        self.one_window_type_combobox.set_active(0) 
    184186 
     187                # Set default for treat incoming messages 
     188                choices = common.config.opt_treat_incoming_messages 
     189                type = gajim.config.get('treat_incoming_messages') 
     190                if type in choices: 
     191                        self.treat_incoming_messages_combobox.set_active(choices.index(type)) 
     192                else: 
     193                        self.treat_incoming_messages_combobox.set_active(0) 
     194 
    185195                # Use transports iconsets 
    186196                st = gajim.config.get('use_transports_iconsets') 
     
    354364                                        break 
    355365 
    356                 #sounds treeview 
     366                # sounds treeview 
    357367                self.sound_tree = self.xml.get_widget('sounds_treeview') 
    358368                 
     
    381391                self.auto_away_checkbutton.set_active(st) 
    382392 
    383                 #Autoawaytime 
     393                # Autoawaytime 
    384394                st = gajim.config.get('autoawaytime') 
    385395                self.auto_away_time_spinbutton.set_value(st) 
    386396                self.auto_away_time_spinbutton.set_sensitive(gajim.config.get('autoaway')) 
    387397 
    388                 #autoaway message 
     398                # autoaway message 
    389399                st = gajim.config.get('autoaway_message') 
    390400                self.auto_away_message_entry.set_text(st) 
    391401                self.auto_away_message_entry.set_sensitive(gajim.config.get('autoaway')) 
    392402 
    393                 #Autoxa 
     403                # Autoxa 
    394404                st = gajim.config.get('autoxa') 
    395405                self.auto_xa_checkbutton.set_active(st) 
    396406 
    397                 #Autoxatime 
     407                # Autoxatime 
    398408                st = gajim.config.get('autoxatime') 
    399409                self.auto_xa_time_spinbutton.set_value(st) 
    400410                self.auto_xa_time_spinbutton.set_sensitive(gajim.config.get('autoxa')) 
    401411 
    402                 #autoxa message 
     412                # autoxa message 
    403413                st = gajim.config.get('autoxa_message') 
    404414                self.auto_xa_message_entry.set_text(st) 
    405415                self.auto_xa_message_entry.set_sensitive(gajim.config.get('autoxa')) 
    406416 
    407                 #ask_status when online / offline 
     417                # ask_status when online / offline 
    408418                st = gajim.config.get('ask_online_status') 
    409419                self.xml.get_widget('prompt_online_status_message_checkbutton').\ 
     
    439449                self.fill_default_msg_treeview() 
    440450 
    441                 #Status messages 
     451                # Status messages 
    442452                self.msg_tree = self.xml.get_widget('msg_treeview') 
    443453                model = gtk.ListStore(str, str) 
     
    454464                buf.connect('changed', self.on_msg_textview_changed) 
    455465 
    456                 #open links with 
     466                # open links with 
    457467                if os.name == 'nt': 
    458468                        applications_frame = self.xml.get_widget('applications_frame') 
     
    493503                self.xml.get_widget('send_os_info_checkbutton').set_active(st) 
    494504 
     505                # send os info 
     506                st = gajim.config.get('check_if_gajim_is_default') 
     507                self.xml.get_widget('check_default_client_checkbutton').set_active(st) 
     508 
    495509                # set status msg from currently playing music track 
    496510                widget = self.xml.get_widget( 
     
    646660                gajim.interface.save_config() 
    647661                gajim.interface.msg_win_mgr.reconfig() 
     662 
     663        def on_treat_incoming_messages_combobox_changed(self, widget): 
     664                active = widget.get_active() 
     665                config_type = common.config.opt_treat_incoming_messages[active] 
     666                gajim.config.set('treat_incoming_messages', config_type) 
    648667 
    649668        def apply_speller(self): 
     
    9981017        def on_send_os_info_checkbutton_toggled(self, widget): 
    9991018                self.on_checkbutton_toggled(widget, 'send_os_info') 
    1000                  
     1019 
     1020        def on_check_default_client_checkbutton_toggled(self, widget): 
     1021                self.on_checkbutton_toggled(widget, 'check_if_gajim_is_default') 
     1022 
    10011023        def on_notify_gmail_checkbutton_toggled(self, widget): 
    10021024                self.on_checkbutton_toggled(widget, 'notify_on_new_gmail_email') 
     
    10041026        def on_notify_gmail_extra_checkbutton_toggled(self, widget): 
    10051027                self.on_checkbutton_toggled(widget, 'notify_on_new_gmail_email_extra') 
    1006                  
     1028 
    10071029        def fill_msg_treeview(self): 
    10081030                self.xml.get_widget('delete_msg_button').set_sensitive(False) 
     
    14681490                        gajim.status_before_autoaway[name] = \ 
    14691491                                gajim.status_before_autoaway[self.account] 
     1492                        gajim.transport_avatar[name] = gajim.transport_avatar[self.account] 
    14701493 
    14711494                        gajim.contacts.change_account_name(self.account, name) 
     
    14941517                        del gajim.last_message_time[self.account] 
    14951518                        del gajim.status_before_autoaway[self.account] 
     1519                        del gajim.transport_avatar[self.account] 
    14961520                        gajim.connections[self.account].name = name 
    14971521                        gajim.connections[name] = gajim.connections[self.account] 
     
    20552079                        del gajim.last_message_time[gajim.ZEROCONF_ACC_NAME] 
    20562080                        del gajim.status_before_autoaway[gajim.ZEROCONF_ACC_NAME] 
     2081                        del gajim.transport_avatar[gajim.ZEROCONF_ACC_NAME] 
    20572082                        if len(gajim.connections) >= 2: 
    20582083                                # Do not merge accounts if only one exists 
     
    20852110                        gajim.last_message_time[gajim.ZEROCONF_ACC_NAME] = {} 
    20862111                        gajim.status_before_autoaway[gajim.ZEROCONF_ACC_NAME] = '' 
     2112                        gajim.transport_avatar[gajim.ZEROCONF_ACC_NAME] = {} 
    20872113                        # refresh accounts window 
    20882114                        if gajim.interface.instances.has_key('accounts'): 
     
    23332359                self.remove_button = {} 
    23342360                self.affiliation_treeview = {} 
    2335                 self.list_init = {} # list at the begining 
     2361                self.list_init = {} # list at the beginning 
    23362362                ui_list = {'outcast': _('Ban List'), 
    23372363                        'member': _('Member List'), 
     
    24162442                elif affiliation == 'owner': 
    24172443                        title = _('Adding Owner...') 
    2418                         prompt = _('<b>Whom do you want to make a owner?</b>\n\n') 
     2444                        prompt = _('<b>Whom do you want to make an owner?</b>\n\n') 
    24192445                else: 
    24202446                        title = _('Adding Administrator...') 
     
    25882614                del gajim.last_message_time[self.account] 
    25892615                del gajim.status_before_autoaway[self.account] 
     2616                del gajim.transport_avatar[self.account] 
    25902617                if len(gajim.connections) >= 2: # Do not merge accounts if only one exists 
    25912618                        gajim.interface.roster.regroup = gajim.config.get('mergeaccounts')  
     
    30643091                                finish_text = '<big><b>%s</b></big>\n\n%s' % ( 
    30653092                                        _('Account has been added successfully'), 
    3066                                         _('You can set advanced account options by pressing Advanced ' 
    3067                                         'button, or later by clicking in Accounts menuitem under Edit ' 
    3068                                         'menu from the main window.')) 
     3093                                        _('You can set advanced account options by pressing the ' 
     3094                                        'Advanced button, or later by choosing the Accounts menuitem ' 
     3095                                        'under the Edit menu from the main window.')) 
    30693096                                self.finish_label.set_markup(finish_text) 
    30703097                                self.finish_button.show() 
     
    30993126                finish_text = '<big><b>%s</b></big>\n\n%s' % ( 
    31003127                        _('Your new account has been created successfully'), 
    3101                         _('You can set advanced account options by pressing Advanced button, ' 
    3102                         'or later by clicking in Accounts menuitem under Edit menu from the ' 
    3103                         'main window.')) 
     3128                        _('You can set advanced account options by pressing the Advanced ' 
     3129                        'button, or later by choosing the Accounts menuitem under the Edit ' 
     3130                        'menu from the main window.')) 
    31043131                self.finish_label.set_markup(finish_text) 
    31053132                self.notebook.set_current_page(3) # show finish page 
     
    31163143                img = self.xml.get_widget('finish_image') 
    31173144                img.set_from_stock(gtk.STOCK_DIALOG_ERROR, gtk.ICON_SIZE_DIALOG) 
    3118                 finish_text = '<big><b>%s</b></big>\n\n%s' % (_('An error occured during ' 
     3145                finish_text = '<big><b>%s</b></big>\n\n%s' % (_('An error occurred during ' 
    31193146                        'account creation') , reason) 
    31203147                self.finish_label.set_markup(finish_text) 
     
    32313258                gajim.last_message_time[self.account] = {} 
    32323259                gajim.status_before_autoaway[self.account] = '' 
     3260                gajim.transport_avatar[self.account] = {} 
    32333261                # refresh accounts window 
    32343262                if gajim.interface.instances.has_key('accounts'):