[SF] move merge accounts to accounts window; also fix spacing in that window
This commit is contained in:
		
							parent
							
								
									e542fff69f
								
							
						
					
					
						commit
						5406f2c3c6
					
				
					 2 changed files with 34 additions and 33 deletions
				
			
		| 
						 | 
				
			
			@ -105,10 +105,6 @@ class PreferencesWindow:
 | 
			
		|||
		st = gajim.config.get('saveposition')
 | 
			
		||||
		self.xml.get_widget('save_position_checkbutton').set_active(st)
 | 
			
		||||
		
 | 
			
		||||
		#Merge accounts
 | 
			
		||||
		st = gajim.config.get('mergeaccounts')
 | 
			
		||||
		self.xml.get_widget('merge_checkbutton').set_active(st)
 | 
			
		||||
 | 
			
		||||
		# Sort contacts by show
 | 
			
		||||
		st = gajim.config.get('sort_by_show')
 | 
			
		||||
		self.xml.get_widget('sort_by_show_checkbutton').set_active(st)
 | 
			
		||||
| 
						 | 
				
			
			@ -470,11 +466,6 @@ class PreferencesWindow:
 | 
			
		|||
	def on_save_position_checkbutton_toggled(self, widget):
 | 
			
		||||
		self.on_checkbutton_toggled(widget, 'saveposition')
 | 
			
		||||
	
 | 
			
		||||
	def on_merge_checkbutton_toggled(self, widget):
 | 
			
		||||
		self.on_checkbutton_toggled(widget, 'mergeaccounts')
 | 
			
		||||
		gajim.interface.roster.regroup = gajim.config.get('mergeaccounts')
 | 
			
		||||
		gajim.interface.roster.draw_roster()
 | 
			
		||||
	
 | 
			
		||||
	def on_sort_by_show_checkbutton_toggled(self, widget):
 | 
			
		||||
		self.on_checkbutton_toggled(widget, 'sort_by_show')
 | 
			
		||||
		gajim.interface.roster.draw_roster()
 | 
			
		||||
| 
						 | 
				
			
			@ -1646,6 +1637,10 @@ class AccountsWindow:
 | 
			
		|||
		self.init_accounts()
 | 
			
		||||
		self.window.show_all()
 | 
			
		||||
 | 
			
		||||
		#Merge accounts
 | 
			
		||||
		st = gajim.config.get('mergeaccounts')
 | 
			
		||||
		self.xml.get_widget('merge_checkbutton').set_active(st)
 | 
			
		||||
 | 
			
		||||
	def on_accounts_window_key_press_event(self, widget, event):
 | 
			
		||||
		if event.keyval == gtk.keysyms.Escape:
 | 
			
		||||
			self.window.destroy()	
 | 
			
		||||
| 
						 | 
				
			
			@ -1710,6 +1705,12 @@ class AccountsWindow:
 | 
			
		|||
			gajim.interface.instances[account]['account_modification'] = \
 | 
			
		||||
				AccountModificationWindow(account)
 | 
			
		||||
 | 
			
		||||
	def on_merge_checkbutton_toggled(self, widget):
 | 
			
		||||
		gajim.config.set('mergeaccounts', widget.get_active())
 | 
			
		||||
		gajim.interface.save_config()
 | 
			
		||||
		gajim.interface.roster.regroup = gajim.config.get('mergeaccounts')
 | 
			
		||||
		gajim.interface.roster.draw_roster()
 | 
			
		||||
 | 
			
		||||
class DataFormWindow:
 | 
			
		||||
	def __init__(self, account, config):
 | 
			
		||||
		self.account = account
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -424,13 +424,13 @@
 | 
			
		|||
  <signal name="key_press_event" handler="on_accounts_window_key_press_event" last_modification_time="Wed, 25 May 2005 23:19:56 GMT"/>
 | 
			
		||||
 | 
			
		||||
  <child>
 | 
			
		||||
    <widget class="GtkVBox" id="vbox5">
 | 
			
		||||
    <widget class="GtkVBox" id="vbox">
 | 
			
		||||
      <property name="visible">True</property>
 | 
			
		||||
      <property name="homogeneous">False</property>
 | 
			
		||||
      <property name="spacing">12</property>
 | 
			
		||||
      <property name="spacing">6</property>
 | 
			
		||||
 | 
			
		||||
      <child>
 | 
			
		||||
	<widget class="GtkScrolledWindow" id="scrolledwindow5">
 | 
			
		||||
	<widget class="GtkScrolledWindow" id="scrolledwindow">
 | 
			
		||||
	  <property name="visible">True</property>
 | 
			
		||||
	  <property name="can_focus">True</property>
 | 
			
		||||
	  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
 | 
			
		||||
| 
						 | 
				
			
			@ -461,6 +461,27 @@
 | 
			
		|||
	</packing>
 | 
			
		||||
      </child>
 | 
			
		||||
 | 
			
		||||
      <child>
 | 
			
		||||
	<widget class="GtkCheckButton" id="merge_checkbutton">
 | 
			
		||||
	  <property name="visible">True</property>
 | 
			
		||||
	  <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>
 | 
			
		||||
	  <property name="can_focus">True</property>
 | 
			
		||||
	  <property name="label" translatable="yes">_Merge accounts</property>
 | 
			
		||||
	  <property name="use_underline">True</property>
 | 
			
		||||
	  <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
			
		||||
	  <property name="focus_on_click">True</property>
 | 
			
		||||
	  <property name="active">False</property>
 | 
			
		||||
	  <property name="inconsistent">False</property>
 | 
			
		||||
	  <property name="draw_indicator">True</property>
 | 
			
		||||
	  <signal name="toggled" handler="on_merge_checkbutton_toggled" last_modification_time="Sun, 06 Mar 2005 15:07:26 GMT"/>
 | 
			
		||||
	</widget>
 | 
			
		||||
	<packing>
 | 
			
		||||
	  <property name="padding">0</property>
 | 
			
		||||
	  <property name="expand">False</property>
 | 
			
		||||
	  <property name="fill">False</property>
 | 
			
		||||
	</packing>
 | 
			
		||||
      </child>
 | 
			
		||||
 | 
			
		||||
      <child>
 | 
			
		||||
	<widget class="GtkHButtonBox" id="hbuttonbox15">
 | 
			
		||||
	  <property name="visible">True</property>
 | 
			
		||||
| 
						 | 
				
			
			@ -3325,27 +3346,6 @@ Agent JID - node</property>
 | 
			
		|||
		</packing>
 | 
			
		||||
	      </child>
 | 
			
		||||
 | 
			
		||||
	      <child>
 | 
			
		||||
		<widget class="GtkCheckButton" id="merge_checkbutton">
 | 
			
		||||
		  <property name="visible">True</property>
 | 
			
		||||
		  <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>
 | 
			
		||||
		  <property name="can_focus">True</property>
 | 
			
		||||
		  <property name="label" translatable="yes">_Merge accounts</property>
 | 
			
		||||
		  <property name="use_underline">True</property>
 | 
			
		||||
		  <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
			
		||||
		  <property name="focus_on_click">True</property>
 | 
			
		||||
		  <property name="active">False</property>
 | 
			
		||||
		  <property name="inconsistent">False</property>
 | 
			
		||||
		  <property name="draw_indicator">True</property>
 | 
			
		||||
		  <signal name="toggled" handler="on_merge_checkbutton_toggled" last_modification_time="Sun, 06 Mar 2005 15:07:26 GMT"/>
 | 
			
		||||
		</widget>
 | 
			
		||||
		<packing>
 | 
			
		||||
		  <property name="padding">0</property>
 | 
			
		||||
		  <property name="expand">False</property>
 | 
			
		||||
		  <property name="fill">False</property>
 | 
			
		||||
		</packing>
 | 
			
		||||
	      </child>
 | 
			
		||||
 | 
			
		||||
	      <child>
 | 
			
		||||
		<widget class="GtkCheckButton" id="sort_by_show_checkbutton">
 | 
			
		||||
		  <property name="visible">True</property>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue