gvfs r2052 - in trunk: . client daemon



Author: alexl
Date: Thu Oct 16 16:54:31 2008
New Revision: 2052
URL: http://svn.gnome.org/viewvc/gvfs?rev=2052&view=rev

Log:
2008-10-16  Alexander Larsson  <alexl redhat com>

        * daemon/gvfsbackendftp.c:
        (do_mount):
	Show username in auth dialog if specified in uri (#554156)

2008-10-16  Alexander Larsson  <alexl redhat com>

	* client/gvfsfusedaemon.c (getattr_for_file):
	Set st_blocks & co so that du works (#554682)
	Patch from Andreas Henriksson




Modified:
   trunk/ChangeLog
   trunk/client/gvfsfusedaemon.c
   trunk/daemon/gvfsbackendftp.c

Modified: trunk/client/gvfsfusedaemon.c
==============================================================================
--- trunk/client/gvfsfusedaemon.c	(original)
+++ trunk/client/gvfsfusedaemon.c	Thu Oct 16 16:54:31 2008
@@ -744,6 +744,13 @@
       if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_TIME_ACCESS))
         sbuf->st_atime = file_info_get_attribute_as_uint (file_info, G_FILE_ATTRIBUTE_TIME_ACCESS);
 
+      if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE))
+	sbuf->st_blksize = file_info_get_attribute_as_uint (file_info, G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE);
+      if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_UNIX_BLOCKS))
+	sbuf->st_blocks = file_info_get_attribute_as_uint (file_info, G_FILE_ATTRIBUTE_UNIX_BLOCKS);
+      else /* fake it to make 'du' work like 'du --apparent'. */
+	sbuf->st_blocks = (sbuf->st_size + 1) / 512;
+
       /* Setting st_nlink to 1 for directories makes 'find' work */
       sbuf->st_nlink = 1;
 

Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c	(original)
+++ trunk/daemon/gvfsbackendftp.c	Thu Oct 16 16:54:31 2008
@@ -1339,9 +1339,15 @@
     {
       GAskPasswordFlags flags;
       if (prompt == NULL)
-	/* translators: %s here is the hostname */
-	prompt = g_strdup_printf (_("Enter password for ftp on %s"), host);
-
+	{
+	  if (ftp->has_initial_user)
+	    /* Translators: the first %s is the username, the second the host name */
+	    prompt = g_strdup_printf (_("Enter password for ftp as %s on %s"), ftp->user, host);
+	  else
+	    /* translators: %s here is the hostname */
+	    prompt = g_strdup_printf (_("Enter password for ftp on %s"), host);
+	}
+	  
       flags = G_ASK_PASSWORD_NEED_PASSWORD;
         
       if (!ftp->has_initial_user)



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