gnome-user-share r178 - trunk



Author: hadess
Date: Fri Jan 18 17:07:15 2008
New Revision: 178
URL: http://svn.gnome.org/viewvc/gnome-user-share?rev=178&view=rev

Log:
2008-01-18  Bastien Nocera  <hadess hadess net>

	* Makefile.am:
	* configure.in:
	* gnome-user-share.desktop.in.in:
	* user_share.c: (main): Use the XDG autostart spec to
	automatically start gnome-user-share on login, exit
	straight away if file sharing isn't enabled
	(Closes: #334173)



Added:
   trunk/gnome-user-share.desktop.in.in
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.in
   trunk/user_share.c

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Fri Jan 18 17:07:15 2008
@@ -12,6 +12,9 @@
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 desktop_in_files = gnome-user-share-properties.desktop.in
 
+autostartdir = $(datadir)/gnome/autostart/
+autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
+autostart_in_files = gnome-user-share.desktop.in
 
 # INTLTOOL_SCHEMAS_RULE@
 %.schemas:   %.schemas.in
@@ -78,7 +81,8 @@
 	gnome-user-share.spec 	\
 	intltool-extract.in 	\
 	intltool-merge.in 	\
-	intltool-update.in	
+	intltool-update.in	\
+	gnome-user-share.desktop.in.in
 
 CLEANFILES = $(desktop_DATA)
 

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri Jan 18 17:07:15 2008
@@ -100,6 +100,16 @@
 
 AM_GCONF_SOURCE_2
 
+dnl where to install the gnome-user-share binary
+if test "x$prefix" = "xNONE"; then
+  prefix=$ac_default_prefix
+fi
+if test "x$exec_prefix" = "xNONE"; then
+   exec_prefix=$prefix
+fi
+installdir="`eval echo $libexecdir`"
+AC_SUBST(installdir, $installdir)
+
 dnl ==========================================================================
 
 ALL_LINGUAS="ar bg ca cs da de dz el en_CA en_GB fi fr gl gu hu it ja ko lt nb ne nl oc pa pl pt pt_BR ru rw sk sl sq sv uk vi zh_TW"
@@ -165,6 +175,7 @@
 			       
 AC_OUTPUT([
 Makefile
+gnome-user-share.desktop.in
 po/Makefile.in
 ])
 

Added: trunk/gnome-user-share.desktop.in.in
==============================================================================
--- (empty file)
+++ trunk/gnome-user-share.desktop.in.in	Fri Jan 18 17:07:15 2008
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=User Sharing
+Comment=Launch User Sharing if enabled
+Icon=apacheconf
+Exec= installdir@/gnome-user-share
+Terminal=false
+Type=Application
+Categories=
+OnlyShowIn=GNOME;

Modified: trunk/user_share.c
==============================================================================
--- trunk/user_share.c	(original)
+++ trunk/user_share.c	Fri Jan 18 17:07:15 2008
@@ -822,7 +822,11 @@
 		/* Didn't get the selection */
 		return 1;
     }
-    
+
+    client = gconf_client_get_default ();
+    if (gconf_client_get_bool (client, FILE_SHARING_ENABLED, NULL) == FALSE)
+	    return 1;
+
     x_fd = ConnectionNumber (xdisplay);
     XSetIOErrorHandler (x_io_error_handler);
     
@@ -851,7 +855,6 @@
     set_up_howl_session (howl_session);
 #endif
 
-    client = gconf_client_get_default ();
     gconf_client_add_dir (client,
 			  FILE_SHARING_DIR,
 			  GCONF_CLIENT_PRELOAD_RECURSIVE,



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