## Description: embedded filename when encrypting using seahorse 
## Origin/Author: Patrick Toomey <ptoomey3@mac.com> 
## Bug:https://bugzilla.gnome.org/show_bug.cgi?id=588432 
Index: seahorse-plugins-2.30.1/plugins/nautilus/seahorse-tool-files.c
===================================================================
--- seahorse-plugins-2.30.1.orig/plugins/nautilus/seahorse-tool-files.c	2011-05-07 15:21:09.439483212 -0500
+++ seahorse-plugins-2.30.1/plugins/nautilus/seahorse-tool-files.c	2011-05-07 15:20:22.610661878 -0500
@@ -757,6 +757,8 @@
     SeahorseOperation *op;
     FileInfo *finfo;
     GList *l;
+
+    const gchar *filename;	
     
     /* Reset our done counter */
     ctx->done = 0;
@@ -781,6 +783,14 @@
         
         /* Inhibit popping up of progress dialog */
         seahorse_tool_progress_block (TRUE);
+
+        /* Embed filename during encryption */
+        if (mode_encrypt)
+        {
+            filename = g_file_get_basename (finfo->file);
+            gpgme_data_set_file_name (data, filename);
+            g_free (filename);
+        }
     
         /* The start callback */
         if (mode->startcb) {
Index: seahorse-plugins-2.30.1/plugins/nautilus/seahorse-tool.c
===================================================================
--- seahorse-plugins-2.30.1.orig/plugins/nautilus/seahorse-tool.c	2011-05-07 15:21:09.495484259 -0500
+++ seahorse-plugins-2.30.1/plugins/nautilus/seahorse-tool.c	2011-05-07 15:20:30.094787140 -0500
@@ -50,12 +50,12 @@
 
 static gchar **arg_uris = NULL;
 static gboolean read_uris = FALSE;
-static gboolean mode_import = FALSE;
-static gboolean mode_encrypt = FALSE;
-static gboolean mode_sign = FALSE;
-static gboolean mode_encrypt_sign = FALSE;
-static gboolean mode_decrypt = FALSE;
-static gboolean mode_verify = FALSE;
+gboolean mode_import = FALSE;
+gboolean mode_encrypt = FALSE;
+gboolean mode_sign = FALSE;
+gboolean mode_encrypt_sign = FALSE;
+gboolean mode_decrypt = FALSE;
+gboolean mode_verify = FALSE;
 
 static const GOptionEntry options[] = {
     { "import", 'i', 0, G_OPTION_ARG_NONE, &mode_import,
Index: seahorse-plugins-2.30.1/plugins/nautilus/seahorse-tool.h
===================================================================
--- seahorse-plugins-2.30.1.orig/plugins/nautilus/seahorse-tool.h	2011-05-07 15:21:09.539485112 -0500
+++ seahorse-plugins-2.30.1/plugins/nautilus/seahorse-tool.h	2011-05-07 15:21:05.551409077 -0500
@@ -24,6 +24,13 @@
 
 #include "seahorse-pgp-operation.h"
 
+extern gboolean mode_import;
+extern gboolean mode_encrypt;
+extern gboolean mode_sign;
+extern gboolean mode_encrypt_sign;
+extern gboolean mode_decrypt;
+extern gboolean mode_verify;
+
 struct _SeahorseToolMode;
 typedef gboolean (*SeahorseToolCallback) (struct _SeahorseToolMode *mode, const gchar *uri, 
                                           gpgme_data_t uridata, SeahorsePGPOperation *pop, 
