Changeset 7787 for branches/gajim_0.11/src/config.py
- Timestamp:
- 01/06/07 12:00:50 (23 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/config.py (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/config.py
r7646 r7787 85 85 self.one_window_type_combobox =\ 86 86 self.xml.get_widget('one_window_type_combobox') 87 self.treat_incoming_messages_combobox =\ 88 self.xml.get_widget('treat_incoming_messages_combobox') 87 89 88 90 #FIXME: remove when ANC will be implemented … … 141 143 emoticons_combobox.set_active(len(l)-1) 142 144 143 # iconset145 # iconset 144 146 iconsets_list = os.listdir(os.path.join(gajim.DATA_DIR, 'iconsets')) 145 147 # new model, image in 0, string in 1 … … 183 185 self.one_window_type_combobox.set_active(0) 184 186 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 185 195 # Use transports iconsets 186 196 st = gajim.config.get('use_transports_iconsets') … … 354 364 break 355 365 356 # sounds treeview366 # sounds treeview 357 367 self.sound_tree = self.xml.get_widget('sounds_treeview') 358 368 … … 381 391 self.auto_away_checkbutton.set_active(st) 382 392 383 # Autoawaytime393 # Autoawaytime 384 394 st = gajim.config.get('autoawaytime') 385 395 self.auto_away_time_spinbutton.set_value(st) 386 396 self.auto_away_time_spinbutton.set_sensitive(gajim.config.get('autoaway')) 387 397 388 # autoaway message398 # autoaway message 389 399 st = gajim.config.get('autoaway_message') 390 400 self.auto_away_message_entry.set_text(st) 391 401 self.auto_away_message_entry.set_sensitive(gajim.config.get('autoaway')) 392 402 393 # Autoxa403 # Autoxa 394 404 st = gajim.config.get('autoxa') 395 405 self.auto_xa_checkbutton.set_active(st) 396 406 397 # Autoxatime407 # Autoxatime 398 408 st = gajim.config.get('autoxatime') 399 409 self.auto_xa_time_spinbutton.set_value(st) 400 410 self.auto_xa_time_spinbutton.set_sensitive(gajim.config.get('autoxa')) 401 411 402 # autoxa message412 # autoxa message 403 413 st = gajim.config.get('autoxa_message') 404 414 self.auto_xa_message_entry.set_text(st) 405 415 self.auto_xa_message_entry.set_sensitive(gajim.config.get('autoxa')) 406 416 407 # ask_status when online / offline417 # ask_status when online / offline 408 418 st = gajim.config.get('ask_online_status') 409 419 self.xml.get_widget('prompt_online_status_message_checkbutton').\ … … 439 449 self.fill_default_msg_treeview() 440 450 441 # Status messages451 # Status messages 442 452 self.msg_tree = self.xml.get_widget('msg_treeview') 443 453 model = gtk.ListStore(str, str) … … 454 464 buf.connect('changed', self.on_msg_textview_changed) 455 465 456 # open links with466 # open links with 457 467 if os.name == 'nt': 458 468 applications_frame = self.xml.get_widget('applications_frame') … … 493 503 self.xml.get_widget('send_os_info_checkbutton').set_active(st) 494 504 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 495 509 # set status msg from currently playing music track 496 510 widget = self.xml.get_widget( … … 646 660 gajim.interface.save_config() 647 661 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) 648 667 649 668 def apply_speller(self): … … 998 1017 def on_send_os_info_checkbutton_toggled(self, widget): 999 1018 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 1001 1023 def on_notify_gmail_checkbutton_toggled(self, widget): 1002 1024 self.on_checkbutton_toggled(widget, 'notify_on_new_gmail_email') … … 1004 1026 def on_notify_gmail_extra_checkbutton_toggled(self, widget): 1005 1027 self.on_checkbutton_toggled(widget, 'notify_on_new_gmail_email_extra') 1006 1028 1007 1029 def fill_msg_treeview(self): 1008 1030 self.xml.get_widget('delete_msg_button').set_sensitive(False) … … 1468 1490 gajim.status_before_autoaway[name] = \ 1469 1491 gajim.status_before_autoaway[self.account] 1492 gajim.transport_avatar[name] = gajim.transport_avatar[self.account] 1470 1493 1471 1494 gajim.contacts.change_account_name(self.account, name) … … 1494 1517 del gajim.last_message_time[self.account] 1495 1518 del gajim.status_before_autoaway[self.account] 1519 del gajim.transport_avatar[self.account] 1496 1520 gajim.connections[self.account].name = name 1497 1521 gajim.connections[name] = gajim.connections[self.account] … … 2055 2079 del gajim.last_message_time[gajim.ZEROCONF_ACC_NAME] 2056 2080 del gajim.status_before_autoaway[gajim.ZEROCONF_ACC_NAME] 2081 del gajim.transport_avatar[gajim.ZEROCONF_ACC_NAME] 2057 2082 if len(gajim.connections) >= 2: 2058 2083 # Do not merge accounts if only one exists … … 2085 2110 gajim.last_message_time[gajim.ZEROCONF_ACC_NAME] = {} 2086 2111 gajim.status_before_autoaway[gajim.ZEROCONF_ACC_NAME] = '' 2112 gajim.transport_avatar[gajim.ZEROCONF_ACC_NAME] = {} 2087 2113 # refresh accounts window 2088 2114 if gajim.interface.instances.has_key('accounts'): … … 2333 2359 self.remove_button = {} 2334 2360 self.affiliation_treeview = {} 2335 self.list_init = {} # list at the begin ing2361 self.list_init = {} # list at the beginning 2336 2362 ui_list = {'outcast': _('Ban List'), 2337 2363 'member': _('Member List'), … … 2416 2442 elif affiliation == 'owner': 2417 2443 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') 2419 2445 else: 2420 2446 title = _('Adding Administrator...') … … 2588 2614 del gajim.last_message_time[self.account] 2589 2615 del gajim.status_before_autoaway[self.account] 2616 del gajim.transport_avatar[self.account] 2590 2617 if len(gajim.connections) >= 2: # Do not merge accounts if only one exists 2591 2618 gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') … … 3064 3091 finish_text = '<big><b>%s</b></big>\n\n%s' % ( 3065 3092 _('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.')) 3069 3096 self.finish_label.set_markup(finish_text) 3070 3097 self.finish_button.show() … … 3099 3126 finish_text = '<big><b>%s</b></big>\n\n%s' % ( 3100 3127 _('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 'm ain 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.')) 3104 3131 self.finish_label.set_markup(finish_text) 3105 3132 self.notebook.set_current_page(3) # show finish page … … 3116 3143 img = self.xml.get_widget('finish_image') 3117 3144 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 occur ed during '3145 finish_text = '<big><b>%s</b></big>\n\n%s' % (_('An error occurred during ' 3119 3146 'account creation') , reason) 3120 3147 self.finish_label.set_markup(finish_text) … … 3231 3258 gajim.last_message_time[self.account] = {} 3232 3259 gajim.status_before_autoaway[self.account] = '' 3260 gajim.transport_avatar[self.account] = {} 3233 3261 # refresh accounts window 3234 3262 if gajim.interface.instances.has_key('accounts'):
