Ticket #1186: mergeacct_in_accountsw.diff
| File mergeacct_in_accountsw.diff, 4.4 kB (added by SF, 3 years ago) |
|---|
-
config.py
105 105 st = gajim.config.get('saveposition') 106 106 self.xml.get_widget('save_position_checkbutton').set_active(st) 107 107 108 #Merge accounts109 st = gajim.config.get('mergeaccounts')110 self.xml.get_widget('merge_checkbutton').set_active(st)111 112 108 # Sort contacts by show 113 109 st = gajim.config.get('sort_by_show') 114 110 self.xml.get_widget('sort_by_show_checkbutton').set_active(st) … … 470 466 def on_save_position_checkbutton_toggled(self, widget): 471 467 self.on_checkbutton_toggled(widget, 'saveposition') 472 468 473 def on_merge_checkbutton_toggled(self, widget):474 self.on_checkbutton_toggled(widget, 'mergeaccounts')475 gajim.interface.roster.regroup = gajim.config.get('mergeaccounts')476 gajim.interface.roster.draw_roster()477 478 469 def on_sort_by_show_checkbutton_toggled(self, widget): 479 470 self.on_checkbutton_toggled(widget, 'sort_by_show') 480 471 gajim.interface.roster.draw_roster() … … 1646 1637 self.init_accounts() 1647 1638 self.window.show_all() 1648 1639 1640 #Merge accounts 1641 st = gajim.config.get('mergeaccounts') 1642 self.xml.get_widget('merge_checkbutton').set_active(st) 1643 1649 1644 def on_accounts_window_key_press_event(self, widget, event): 1650 1645 if event.keyval == gtk.keysyms.Escape: 1651 1646 self.window.destroy() … … 1710 1705 gajim.interface.instances[account]['account_modification'] = \ 1711 1706 AccountModificationWindow(account) 1712 1707 1708 def on_merge_checkbutton_toggled(self, widget): 1709 gajim.config.set('mergeaccounts', widget.get_active()) 1710 gajim.interface.save_config() 1711 gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') 1712 gajim.interface.roster.draw_roster() 1713 1713 1714 class DataFormWindow: 1714 1715 def __init__(self, account, config): 1715 1716 self.account = account -
gtkgui.glade
462 462 </child> 463 463 464 464 <child> 465 <widget class="GtkCheckButton" id="merge_checkbutton"> 466 <property name="visible">True</property> 467 <property name="tooltip" translatable="yes">If you have 2 or more accounts and it is checked, Gajim will list all contacts as if you had one account</property> 468 <property name="can_focus">True</property> 469 <property name="label" translatable="yes">_Merge accounts</property> 470 <property name="use_underline">True</property> 471 <property name="relief">GTK_RELIEF_NORMAL</property> 472 <property name="focus_on_click">True</property> 473 <property name="active">False</property> 474 <property name="inconsistent">False</property> 475 <property name="draw_indicator">True</property> 476 <signal name="toggled" handler="on_merge_checkbutton_toggled" last_modification_time="Sun, 06 Mar 2005 15:07:26 GMT"/> 477 </widget> 478 <packing> 479 <property name="padding">0</property> 480 <property name="expand">False</property> 481 <property name="fill">False</property> 482 </packing> 483 </child> 484 485 <child> 465 486 <widget class="GtkHButtonBox" id="hbuttonbox15"> 466 487 <property name="visible">True</property> 467 488 <property name="layout_style">GTK_BUTTONBOX_END</property> … … 3326 3347 </child> 3327 3348 3328 3349 <child> 3329 <widget class="GtkCheckButton" id="merge_checkbutton">3330 <property name="visible">True</property>3331 <property name="tooltip" translatable="yes">If you have 2 or more accounts and it is checked, Gajim will list all contacts as if you had one account</property>3332 <property name="can_focus">True</property>3333 <property name="label" translatable="yes">_Merge accounts</property>3334 <property name="use_underline">True</property>3335 <property name="relief">GTK_RELIEF_NORMAL</property>3336 <property name="focus_on_click">True</property>3337 <property name="active">False</property>3338 <property name="inconsistent">False</property>3339 <property name="draw_indicator">True</property>3340 <signal name="toggled" handler="on_merge_checkbutton_toggled" last_modification_time="Sun, 06 Mar 2005 15:07:26 GMT"/>3341 </widget>3342 <packing>3343 <property name="padding">0</property>3344 <property name="expand">False</property>3345 <property name="fill">False</property>3346 </packing>3347 </child>3348 3349 <child>3350 3350 <widget class="GtkCheckButton" id="sort_by_show_checkbutton"> 3351 3351 <property name="visible">True</property> 3352 3352 <property name="can_focus">True</property>
