gyrus r330 - in branches/gyrus-python: . src



Author: csaavedra
Date: Thu Mar  6 02:56:13 2008
New Revision: 330
URL: http://svn.gnome.org/viewvc/gyrus?rev=330&view=rev

Log:
2008-03-05  Alejandro Valdes Jimenez  <avaldes utalca cl>

	* src/gyrus.py:  Add the class "admin" into the parameters of callback
	function of the button close. Fixes bug #520327.




Modified:
   branches/gyrus-python/ChangeLog
   branches/gyrus-python/src/gyrus.py

Modified: branches/gyrus-python/src/gyrus.py
==============================================================================
--- branches/gyrus-python/src/gyrus.py	(original)
+++ branches/gyrus-python/src/gyrus.py	Thu Mar  6 02:56:13 2008
@@ -202,6 +202,14 @@
 		 return True
 
 	def append_page_to_notebook(self,session):
+		# load a new instance of table_page
+		admin = self.load_table_page()
+
+		admin.entry_quota_new.set_properties(editable=False)
+
+		admin.label_cnx.set_text(_("Connect"))
+		admin.image_cnx.set_from_stock (gtk.STOCK_DISCONNECT,gtk.ICON_SIZE_BUTTON)
+
 		# create a new page on notebook
                 hbox_image = gtk.HBox(False,0)
                 image = gtk.Image()
@@ -211,7 +219,7 @@
                 button = gtk.Button()
                 button.set_relief('GTK_RELIEF_NONE')
                 button.add(hbox_image)
-		button.connect('clicked',self.on_button_page_clicked)
+		button.connect('clicked',self.on_button_page_clicked,admin)
 
 		hbox_b = gtk.HBox(False,0)
                 label = gtk.Label(session.name)
@@ -223,19 +231,10 @@
                 button.show()
 		label.show()
 
-		# load a new instance of table_page
-		admin = self.load_table_page()
-
-		admin.entry_quota_new.set_properties(editable=False)
-
-		admin.label_cnx.set_text(_("Connect"))
-		admin.image_cnx.set_from_stock (gtk.STOCK_DISCONNECT,gtk.ICON_SIZE_BUTTON)
-
 		# create treeview/treemodel for users
 		model = gtk.TreeStore(gtk.gdk.Pixbuf,
 					gobject.TYPE_STRING)
 
-
         	col = gtk.TreeViewColumn (_("Mailboxs"))
 	        col.set_resizable (True)
 		admin.treeview_users.append_column (col)
@@ -425,8 +424,8 @@
 		dialog.destroy()
 		
 	
-	def on_button_page_clicked (self,button):
-		page = self.notebook.get_current_page()
+	def on_button_page_clicked (self,button,admin):
+		page = self.notebook.page_num(admin.table_page)
 		self.notebook.remove_page(page)
 
 		page = self.notebook.get_current_page()
@@ -442,8 +441,6 @@
 
 
 	def on_notebook_switch_page(self,notebook,page,page_num):
-		print "switch"		
-
 		admin = self.get_current_gyrus_admin()
 		self.verify_sensitive_actiongroup (admin)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]