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

Daniel Morales danielm at xfce.org
Mon Sep 22 18:57:04 CEST 2008


Author: danielm
Date: 2008-09-22 16:57:04 +0000 (Mon, 22 Sep 2008)
New Revision: 5433

Modified:
   thunar-shares-plugin/trunk/ChangeLog
   thunar-shares-plugin/trunk/thunar-plugin/tsp-admin-editor.c
   thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c
Log:
Add check for Guest access

Modified: thunar-shares-plugin/trunk/ChangeLog
===================================================================
--- thunar-shares-plugin/trunk/ChangeLog	2008-09-22 16:32:21 UTC (rev 5432)
+++ thunar-shares-plugin/trunk/ChangeLog	2008-09-22 16:57:04 UTC (rev 5433)
@@ -7,7 +7,8 @@
 	* thunar-plugin/tsp-page.c:
 	* thunar-plugin/tsp-admin.c:
 	* thunar-plugin/tsp-admin-editor.c:
-	* libshares/libshares-util.c: Add errors checks.
+	* libshares/libshares-util.c: Add errors checks, and check if guest_ok
+	param is enabled in Samba config.
 	* Better code-tab on edited files.
 
 2008-08-18	Daniel Morales <daniel at daniel.com.uy>

Modified: thunar-shares-plugin/trunk/thunar-plugin/tsp-admin-editor.c
===================================================================
--- thunar-shares-plugin/trunk/thunar-plugin/tsp-admin-editor.c	2008-09-22 16:32:21 UTC (rev 5432)
+++ thunar-shares-plugin/trunk/thunar-plugin/tsp-admin-editor.c	2008-09-22 16:57:04 UTC (rev 5433)
@@ -87,6 +87,7 @@
   GtkWidget *vbox;
   GtkWidget *table;
   GtkWidget *widget;
+  gboolean   guest_ok = FALSE;
 
   vbox = GTK_WIDGET (GTK_DIALOG (editor)->vbox);
 
@@ -144,6 +145,12 @@
 
   /* Show all */
   gtk_widget_show_all (table);
+
+  /* Check if guest access is supported */
+  shares_supports_guest_ok (&guest_ok, NULL);
+  if (!guest_ok){
+    gtk_widget_hide (editor->share_guest);
+  }
 }
 
 static void

Modified: thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c
===================================================================
--- thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c	2008-09-22 16:32:21 UTC (rev 5432)
+++ thunar-shares-plugin/trunk/thunar-plugin/tsp-page.c	2008-09-22 16:57:04 UTC (rev 5433)
@@ -129,6 +129,7 @@
   GtkWidget *vbox1;
   GtkWidget *hbox1;
   GtkWidget *widget;
+  gboolean   guest_ok = FALSE;
 
   /* Main container */
   vbox1 = gtk_vbox_new (FALSE, 0);
@@ -215,6 +216,12 @@
   gtk_container_add (GTK_CONTAINER (page), vbox1);
   gtk_container_set_border_width (GTK_CONTAINER (page), 5);
   gtk_widget_show_all (vbox1);
+
+  /* Check if guest access is supported */
+  shares_supports_guest_ok (&guest_ok, NULL);
+  if (!guest_ok){
+    gtk_widget_hide (page->cb_share_guest);
+  }
 }
 
 static void




More information about the Goodies-commits mailing list