[Goodies-commits] r5209 - in thunar-shares-plugin/trunk: . thunar-plugin

Daniel Morales danielm at xfce.org
Thu Aug 7 19:20:24 CEST 2008


Author: danielm
Date: 2008-08-07 17:20:24 +0000 (Thu, 07 Aug 2008)
New Revision: 5209

Modified:
   thunar-shares-plugin/trunk/ChangeLog
   thunar-shares-plugin/trunk/TODO
   thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c
Log:
	* thunar-plugin/tsp-page.c: Keep the share-page sync if we have 2
	or more dialogs displaying the same folder. $
 

Modified: thunar-shares-plugin/trunk/ChangeLog
===================================================================
--- thunar-shares-plugin/trunk/ChangeLog	2008-08-07 15:14:31 UTC (rev 5208)
+++ thunar-shares-plugin/trunk/ChangeLog	2008-08-07 17:20:24 UTC (rev 5209)
@@ -1,3 +1,8 @@
+2008-08-07	Daniel Morales <daniel at daniel.com.uy>
+
+	* thunar-plugin/tsp-page.c: Keep the share-page sync if we have 2
+	or more dialogs displaying the same folder.
+
 2008-08-06	Daniel Morales <daniel at daniel.com.uy>
 
 	* data/thunar-page.xml:

Modified: thunar-shares-plugin/trunk/TODO
===================================================================
--- thunar-shares-plugin/trunk/TODO	2008-08-07 15:14:31 UTC (rev 5208)
+++ thunar-shares-plugin/trunk/TODO	2008-08-07 17:20:24 UTC (rev 5209)
@@ -9,14 +9,9 @@
   * We need to review the permissions hierarchy check:
     (libshares/libshares-util.c: tsp_check_perms)
 
-MILESONE 0.20
+MILESTONE 0.20
 =======================================================================
 
-  * If we open two or more properties dialogs of the same folder and
-    we change the share options there, those changes aren't reflected
-    in the other dialogs. Also when changing details from shares-admin
-    dialog.
-
   * Add error checks when we call shares_get_share_info_for_path().
 
   * 12 chars share-name check should warn the user, isn't a error.

Modified: thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c
===================================================================
--- thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c	2008-08-07 15:14:31 UTC (rev 5208)
+++ thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c	2008-08-07 17:20:24 UTC (rev 5209)
@@ -244,6 +244,10 @@
 	g_return_if_fail (TSP_IS_PAGE (tsp_page));
 	g_return_if_fail (file == NULL || THUNARX_IS_FILE_INFO (file));
 
+	if (tsp_page->file == file){
+		return;
+	}
+
 	if (tsp_page->file != NULL)
 	{
 		g_signal_handlers_disconnect_by_func (tsp_page->file, tsp_page_file_changed, tsp_page);
@@ -254,7 +258,7 @@
 
 	if (file != NULL)
 	{
-		g_object_ref (file);
+		g_object_ref (tsp_page->file);
 		tsp_page_file_changed (file, tsp_page);
 		g_signal_connect (file, "changed", G_CALLBACK (tsp_page_file_changed), tsp_page);
 	}
@@ -400,13 +404,20 @@
 		{
 			tsp_update_default (tsp_page, share_info);
 			shares_free_share_info (share_info);
+
+			/* Notify other pages of the changes made */
+			thunarx_file_info_changed (tsp_page->file);
 		}
 	} else {
 		/* Un-share the folder */
 		if (tsp_shares_unshare (local_file)){
 			tsp_update_default (tsp_page, NULL);
+
+			/* Notify other pages of the changes made */
+			thunarx_file_info_changed (tsp_page->file);
 		}
 	}
+
 	g_free (local_file);
 }
 
@@ -415,6 +426,7 @@
 tsp_page_sensibility  (TspPage  *tsp_page,
                        gboolean  sens)
 {
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tsp_page->cb_share_folder), sens);
 	gtk_widget_set_sensitive (GTK_WIDGET (tsp_page->entry_share_name), sens);
 	gtk_widget_set_sensitive (GTK_WIDGET (tsp_page->cb_share_write), sens);
 	gtk_widget_set_sensitive (GTK_WIDGET (tsp_page->entry_share_comments), sens);




More information about the Goodies-commits mailing list