[Pkg-privacy-commits] [nautilus-wipe] 53/224: Fix background item

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 19:45:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository nautilus-wipe.

commit dd56e38c4bd827bf719e74c0e50ce73afba28a23
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Wed Feb 24 17:57:12 2010 +0100

    Fix background item
    
    We were providing a single item for both menus since Nautilus
    identifies items by their name, and they are global; then our
    background item got overwritten by our files one.
---
 nautilus-srm/nautilus-srm.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/nautilus-srm/nautilus-srm.c b/nautilus-srm/nautilus-srm.c
index 9038b91..06fc315 100644
--- a/nautilus-srm/nautilus-srm.c
+++ b/nautilus-srm/nautilus-srm.c
@@ -240,12 +240,13 @@ menu_item_delete_activate_handler (NautilusMenuItem     *item,
 
 static NautilusMenuItem *
 nautilus_srm_menu_item_srm (NautilusMenuProvider *provider,
+                            const gchar          *item_name,
                             GtkWidget            *window,
                             GList                *files)
 {
   NautilusMenuItem *item;
   
-  item = nautilus_menu_item_new ("NautilusSrm::srm_item",
+  item = nautilus_menu_item_new (item_name,
                                  _("Delete and overwrite content"),
                                  g_dngettext (NULL, "Delete the selected file and overwrite its data",
                                                     "Delete the selected files and overwrite their data",
@@ -270,12 +271,13 @@ menu_item_fill_activate_handler (NautilusMenuItem     *item,
 
 static NautilusMenuItem *
 nautilus_srm_menu_item_sfill (NautilusMenuProvider *provider,
+                              const gchar          *item_name,
                               GtkWidget            *window,
                               GList                *folders)
 {
   NautilusMenuItem *item;
 
-  item = nautilus_menu_item_new ("NautilusSrm::sfill_item",
+  item = nautilus_menu_item_new (item_name,
                                  _("Overwrite free space here"),
                                  g_dngettext (NULL, "Overwrite free space in the device containing this file",
                                                     "Overwrite free space in the device(s) containing these files",
@@ -295,10 +297,15 @@ nautilus_srm_get_file_items (NautilusMenuProvider *provider,
                              GList                *files)
 {
   GList *items = NULL;
-  items = g_list_append (items, nautilus_srm_menu_item_srm (provider,
-                                                            window, files));
-  items = g_list_append (items, nautilus_srm_menu_item_sfill (provider,
+  
+  if (files) {
+    items = g_list_append (items, nautilus_srm_menu_item_srm (provider,
+                                                              "nautilus-srm::files-items::srm",
                                                               window, files));
+    items = g_list_append (items, nautilus_srm_menu_item_sfill (provider,
+                                                                "nautilus-srm::files-items::sfill",
+                                                                window, files));
+  }
   
   return items;
 }
@@ -313,6 +320,7 @@ nautilus_srm_get_background_items (NautilusMenuProvider *provider,
   GList *files = g_list_append (NULL, current_folder);
   
   items = g_list_append (items, nautilus_srm_menu_item_sfill (provider,
+                                                              "nautilus-srm::background-items::sfill",
                                                               window, files));
   g_list_free (files);
   

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/nautilus-wipe.git



More information about the Pkg-privacy-commits mailing list