[Pkg-privacy-commits] [nautilus-wipe] 113/224: Rename to Nautilus Wipe to be more tool-agnostic
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Jul 7 19:45:40 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 6016554bc6517dd708cb663c7cac7bed02a15972
Author: Colomban Wendling <ban at herbesfolles.org>
Date: Sat Apr 30 20:08:49 2011 +0200
Rename to Nautilus Wipe to be more tool-agnostic
This will avoid incoherent names if we switch to/add support to another
wiping tool such as scrub.
---
Makefile.am | 2 +-
README | 6 +-
configure.ac | 6 +-
help/C/{nautilus-srm.xml => nautilus-wipe.xml} | 192 +++++++-------
help/Makefile.am | 2 +-
help/{nautilus-srm.omf.in => nautilus-wipe.omf.in} | 0
nautilus-srm/Makefile.am | 44 ----
nautilus-srm/fill-operation.h | 71 ------
nautilus-srm/progress-dialog.h | 106 --------
nautilus-wipe/Makefile.am | 44 ++++
{nautilus-srm => nautilus-wipe}/compat.h | 10 +-
{nautilus-srm => nautilus-wipe}/delete-operation.c | 28 +-
{nautilus-srm => nautilus-wipe}/delete-operation.h | 26 +-
{nautilus-srm => nautilus-wipe}/fill-operation.c | 106 ++++----
.../fill-operation.h | 34 ++-
.../nautilus-wipe.c | 168 ++++++------
.../nautilus-wipe.h | 46 ++--
.../operation-manager.c | 64 ++---
.../operation-manager.h | 28 +-
{nautilus-srm => nautilus-wipe}/progress-dialog.c | 282 ++++++++++-----------
nautilus-wipe/progress-dialog.h | 96 +++++++
{nautilus-srm => nautilus-wipe}/test.c | 26 +-
po/POTFILES.in | 8 +-
po/fr.po | 92 +++----
24 files changed, 707 insertions(+), 780 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 001de95..15f1eb1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = nautilus-srm po help
+SUBDIRS = nautilus-wipe po help
ACLOCAL_AMFLAGS = -I build/m4 -I m4
diff --git a/README b/README
index 067909b..7417257 100644
--- a/README
+++ b/README
@@ -1,10 +1,10 @@
-Nautilus Secure Delete
+Nautilus Wipe
Overwiew
========
-Nautilus Secure Delete allows you to wipe files or available diskspace
-from Nautilus.
+Nautilus Wipe allows you to wipe files or available diskspace from
+Nautilus.
Dependancies
============
diff --git a/configure.ac b/configure.ac
index 7e9236f..987dff8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
# Initially based on NautilusActions configure & build system.
AC_PREREQ([2.64])
-AC_INIT([nautilus-srm],[0.1])
-AC_CONFIG_SRCDIR([nautilus-srm/nautilus-srm.h])
+AC_INIT([nautilus-wipe],[0.1])
+AC_CONFIG_SRCDIR([nautilus-wipe/nautilus-wipe.h])
AC_CONFIG_AUX_DIR([build/aux])
AC_CONFIG_MACRO_DIR([build/m4])
AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror foreign])
@@ -74,6 +74,6 @@ AC_CHECK_FUNCS([nautilus_file_info_get_location])
# Output
AC_CONFIG_FILES([Makefile
po/Makefile.in
- nautilus-srm/Makefile
+ nautilus-wipe/Makefile
help/Makefile])
AC_OUTPUT
diff --git a/help/C/nautilus-srm.xml b/help/C/nautilus-wipe.xml
similarity index 84%
rename from help/C/nautilus-srm.xml
rename to help/C/nautilus-wipe.xml
index 5fd50e3..ed8f0fe 100644
--- a/help/C/nautilus-srm.xml
+++ b/help/C/nautilus-wipe.xml
@@ -1,20 +1,20 @@
<?xml version="1.0"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
<!ENTITY appversion "0.1">
<!ENTITY manrevision "0.1">
- <!ENTITY date "March 2010">
- <!ENTITY appname "Nautilus Secure Delete">
+ <!ENTITY date "April 2011">
+ <!ENTITY appname "Nautilus Wipe">
<!ENTITY app "<application>&appname;</application>">
<!-- Information about the entities
- The legal.xml file contains legal information, there is no need to edit the file.
+ The legal.xml file contains legal information, there is no need to edit the file.
Use the appversion entity to specify the version of the application.
Use the manrevision entity to specify the revision number of this manual.
Use the date entity to specify the release date of this manual.
Use the app entity to specify the name of the application. -->
]>
-<!--
+<!--
(Do not remove this comment block.)
Maintained by the GNOME Documentation Project
http://developer.gnome.org/projects/gdp
@@ -25,7 +25,7 @@
<article id="index" lang="en">
<!-- please do not change the id; for translations, change lang to -->
<!-- appropriate code -->
- <articleinfo>
+ <articleinfo>
<title>&app; Manual V&manrevision;</title>
<abstract role="description">
@@ -33,10 +33,10 @@
<application>Nautilus</application></para>
</abstract>
- <copyright>
- <year>2010</year>
- <holder>The Nautilus Secure Delete Team</holder>
- </copyright>
+ <copyright>
+ <year>2010</year>
+ <holder>The Nautilus Wipe Team</holder>
+ </copyright>
<!-- translators: uncomment this:
<copyright>
@@ -45,49 +45,49 @@
</copyright>
-->
-<!-- An address can be added to the publisher information. If a role is
- not specified, the publisher/author is the same for all versions of the
+<!-- An address can be added to the publisher information. If a role is
+ not specified, the publisher/author is the same for all versions of the
document. -->
- <publisher>
- <publishername> GNOME Documentation Project </publishername>
- </publisher>
+ <publisher>
+ <publishername> GNOME Documentation Project </publishername>
+ </publisher>
&legal;
- <!-- This file contains link to license for the documentation (GNU FDL), and
- other legal stuff such as "NO WARRANTY" statement. Please do not change
+ <!-- This file contains link to license for the documentation (GNU FDL), and
+ other legal stuff such as "NO WARRANTY" statement. Please do not change
any of this. -->
- <authorgroup>
+ <authorgroup>
<!-- XXX -->
<author role="maintainer">
- <firstname>The Nautilus Secure Delete Team</firstname>
+ <firstname>The Nautilus Wipe Team</firstname>
<!--
- <surname>Writer 2</surname>
- <affiliation>
- <orgname>GNOME Documentation Project</orgname>
- <address> <email>doc-writer2 at gnome.org</email> </address>
- </affiliation>
+ <surname>Writer 2</surname>
+ <affiliation>
+ <orgname>GNOME Documentation Project</orgname>
+ <address> <email>doc-writer2 at gnome.org</email> </address>
+ </affiliation>
-->
- </author>
+ </author>
<!--
- <author>
- <firstname>Documentation</firstname>
- <surname>Writer 1</surname>
- <affiliation>
- <orgname>GNOME Documentation Project</orgname>
- <address> <email>doc-writer1 at gnome.org</email> </address>
- </affiliation>
- </author>
+ <author>
+ <firstname>Documentation</firstname>
+ <surname>Writer 1</surname>
+ <affiliation>
+ <orgname>GNOME Documentation Project</orgname>
+ <address> <email>doc-writer1 at gnome.org</email> </address>
+ </affiliation>
+ </author>
-->
<!-- This is appropriate place for other contributors: translators,
maintainers, etc. Commented out by default.
-
+
<othercredit role="translator">
- <firstname>Latin</firstname>
- <surname>Translator 1</surname>
- <affiliation>
- <orgname>Latin Translation Team</orgname>
- <address> <email>translator at gnome.org</email> </address>
+ <firstname>Latin</firstname>
+ <surname>Translator 1</surname>
+ <affiliation>
+ <orgname>Latin Translation Team</orgname>
+ <address> <email>translator at gnome.org</email> </address>
</affiliation>
<contrib>Latin translation</contrib>
</othercredit>
@@ -107,30 +107,30 @@
<!-- For example, if the GNOME desktop release is V2.x, the first version of the manual that -->
<!-- is written in that desktop timeframe is V2.0, the second version of the manual is V2.1, etc. -->
<!-- When the desktop release version changes to V3.x, the revision number of the manual changes -->
-<!-- to V3.0, and so on. -->
+<!-- to V3.0, and so on. -->
<!-- XXX
<revhistory>
- <revision>
- <revnumber>MY-GNOME-APPLICATION Manual V&manrevision;</revnumber>
- <date>&date;</date>
- <revdescription>
+ <revision>
+ <revnumber>MY-GNOME-APPLICATION Manual V&manrevision;</revnumber>
+ <date>&date;</date>
+ <revdescription>
<para role="author">Documentation Writer 2
<email>docwriter2 at gnome.org</email>
</para>
<para role="publisher">GNOME Documentation Project</para>
- </revdescription>
- </revision>
- <revision>
- <revnumber>Full title of previous manual.</revnumber>
- <date>Release date of previous manual.</date>
- <revdescription>
- <para role="author">Documentation Writer 1
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>Full title of previous manual.</revnumber>
+ <date>Release date of previous manual.</date>
+ <revdescription>
+ <para role="author">Documentation Writer 1
<email>docwriter1 at gnome.org</email>
</para>
<para role="publisher">GNOME Documentation Project</para>
- </revdescription>
- </revision>
- </revhistory>
+ </revdescription>
+ </revision>
+ </revhistory>
-->
<revhistory>
<revision>
@@ -139,32 +139,32 @@
</revision>
</revhistory>
- <releaseinfo>This manual describes version &appversion; of Nautilus Secure Delete
- </releaseinfo>
- <legalnotice>
- <title>Feedback</title>
+ <releaseinfo>This manual describes version &appversion; of Nautilus Wipe
+ </releaseinfo>
+ <legalnotice>
+ <title>Feedback</title>
<!-- XXX: FIXME -->
<para>To report a bug or make a suggestion regarding the &app; application or
this manual, follow the directions in the <ulink url="ghelp:gnome-feedback"
- type="help">GNOME Feedback Page</ulink>.
+ type="help">GNOME Feedback Page</ulink>.
</para>
<!-- Translators may also add here feedback address for translations -->
- </legalnotice>
- </articleinfo>
+ </legalnotice>
+ </articleinfo>
- <indexterm zone="index">
- <primary>Nautilus Secure Delete</primary>
- </indexterm>
- <indexterm zone="index">
- <primary>nautilus-secure-delete</primary>
+ <indexterm zone="index">
+ <primary>Nautilus Wipe</primary>
+ </indexterm>
+ <indexterm zone="index">
+ <primary>nautilus-wipe</primary>
</indexterm>
<!-- ============= Document Body ============================= -->
<!-- ============= Introduction ============================== -->
<!-- Use the Introduction section to give a brief overview of what
the application is and what it does. -->
- <sect1 id="nautilus-secure-delete-overview">
- <title>Overview</title>
+ <sect1 id="nautilus-wipe-overview">
+ <title>Overview</title>
<para>
&app; allows you to wipe files or
available diskspace from <application>Nautilus</application>.
@@ -192,9 +192,9 @@
</para>
</sect1>
- <sect1 id="nautilus-secure-delete-data-deletion-intro">
+ <sect1 id="nautilus-wipe-data-deletion-intro">
<title>An introduction to data deletion</title>
- <sect2 id="nautilus-secure-delete-not-the-data">
+ <sect2 id="nautilus-wipe-not-the-data">
<title>Deleting doesn't affect data</title>
<para>
When you delete a file, even when bypassing or emptying the trash,
@@ -212,7 +212,7 @@
operation, automated by numerous softwares.
</para>
</sect2>
- <sect2 id="nautilus-secure-delete-an-answer">
+ <sect2 id="nautilus-wipe-an-answer">
<title>An answer : overwriting data several times</title>
<para>
If you want to make the content of a file really hard to recover,
@@ -239,7 +239,7 @@
space of a storage media.
</para>
</sect2>
- <sect2 id="nautilus-secure-delete-limitations">
+ <sect2 id="nautilus-wipe-limitations">
<title>Limitations</title>
<para>
This section is quite technical. In a nutshell, there's a lot of
@@ -293,7 +293,7 @@
<sect2>
<title>The wipe algorithm</title>
<para>
- nautilus-secure-delete enables you to wipe files and free disk
+ nautilus-wipe enables you to wipe files and free disk
space from <application>Nautilus</application> using the
<application>secure-delete</application> program written by van Hauser /
THC
@@ -339,11 +339,11 @@
</sect2>
</sect1>
- <sect1 id="nautilus-secure-delete-usage">
+ <sect1 id="nautilus-wipe-usage">
<title>Using &app;</title>
- <sect2 id="nautilus-secure-delete-start">
+ <sect2 id="nautilus-wipe-start">
<title>Launching &app;</title>
- <sect3 id="nautilus-secure-delete-srm">
+ <sect3 id="nautilus-wipe-wipe">
<title>Wiping file(s) or directory(es)</title>
<para>
Select the file(s) you want to wipe, and right-click on them. If
@@ -351,7 +351,7 @@
there will be a <guimenuitem>Wipe</guimenuitem> entry in the context menu.
</para>
</sect3>
- <sect3 id="nautilus-secure-delete-sfill">
+ <sect3 id="nautilus-wipe-fill">
<title>Wiping available diskspace on storage media</title>
<para>
Select a file or a directory which is on the partition on which you
@@ -362,15 +362,15 @@
</para>
</sect3>
</sect2>
- <sect2 id="nautilus-secure-delete-confirmation-dialog">
+ <sect2 id="nautilus-wipe-confirmation-dialog">
<title>The confirmation dialog</title>
<para>
Once you click a menu item, a confirmation dialog will appear,
where you can confirm or abort the wipe, and choose options (see
- <xref linkend="nautilus-secure-delete-config" />).
+ <xref linkend="nautilus-wipe-config" />).
</para>
</sect2>
- <sect2 id="nautilus-secure-delete-progress-dialog">
+ <sect2 id="nautilus-wipe-progress-dialog">
<title>The progress dialog</title>
<para>
If you confirm the wipe, a dialog will appear to let you see the
@@ -389,21 +389,21 @@
</para>
</sect2>
</sect1>
- <sect1 id="nautilus-secure-delete-config">
+ <sect1 id="nautilus-wipe-config">
<title>Configuring &app;</title>
<para>
In the confirmation dialog, you can click on the arrow left to the
<guilabel>Options</guilabel> word to display options. To understand these
options, you must have a good overview of the wipe process. If it's
- not already the case, please read <xref linkend="nautilus-secure-delete-data-deletion-intro" />.
+ not already the case, please read <xref linkend="nautilus-wipe-data-deletion-intro" />.
</para>
- <sect2 id="nautilus-secure-delete-passes">
+ <sect2 id="nautilus-wipe-passes">
<title>Number of passes</title>
<para>
You can configure the number of times that the data to be wiped is
overwritten by new data.
</para>
-
+
<variablelist>
<title>Number of passes</title>
<varlistentry>
@@ -441,7 +441,7 @@
</varlistentry>
</variablelist>
</sect2>
- <sect2 id="nautilus-secure-delete-fast-mode">
+ <sect2 id="nautilus-wipe-fast-mode">
<title>Fast and insecure mode (no /dev/urandom, no synchronize mode)</title>
<para>
Fastens the wipe at the expense of security:
@@ -460,7 +460,7 @@
</listitem>
</itemizedlist>
</sect2>
- <sect2 id="nautilus-secure-delete-zeros">
+ <sect2 id="nautilus-wipe-zeros">
<title>Last pass with zeros instead of random data</title>
<para>
Use zeros for the last overwrite, which is the data that will be
@@ -469,11 +469,11 @@
</sect2>
</sect1>
<!-- ============= Bugs ================================== -->
-<!-- This section is optional and is commented out by default.
- You can use it to describe known bugs and limitations of the
+<!-- This section is optional and is commented out by default.
+ You can use it to describe known bugs and limitations of the
program if there are any - please be frank and list all
- problems you know of.
-
+ problems you know of.
+
<sect1 id="mayapp-bugs">
<title>Known Bugs and Limitations</title>
<para> </para>
@@ -486,12 +486,12 @@
the program. However, if you do wish to include this info in the
manual, this is the place to put it. Alternatively, you can put this
information in the title page.-->
- <sect1 id="nautilus-secure-delete-about">
- <title>About &app;</title>
- <para> &app; was written by The Nautilus Secure Delete Team
+ <sect1 id="nautilus-wipe-about">
+ <title>About &app;</title>
+ <para> &app; was written by The Nautilus Wipe Team
<!-- XXX
(<email>hacker at gnome.org</email>). To find more information about
- &app;, please visit the
+ &app;, please visit the
<ulink url="http://www.my-gnome-app.org" type="http">MY-GNOME-APP Web
page</ulink>.
-->
@@ -499,7 +499,7 @@
<!--
<para>
To report a bug or make a suggestion regarding this application or
- this manual, follow the directions in this
+ this manual, follow the directions in this
<ulink url="ghelp:gnome-feedback" type="help">document</ulink>.
</para>
-->
@@ -511,5 +511,5 @@
<ulink url="ghelp:gpl" type="help">link</ulink>, or in the file
COPYING included with the source code of this program.
</para>
- </sect1>
+ </sect1>
</article>
diff --git a/help/Makefile.am b/help/Makefile.am
index 307a681..e4687b0 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -1,7 +1,7 @@
include $(top_srcdir)/build/aux/gnome-doc-utils.make
dist-hook: doc-dist-hook
-DOC_MODULE = nautilus-srm
+DOC_MODULE = nautilus-wipe
DOC_ENTITIES = legal.xml
DOC_INCLUDES =
DOC_FIGURES =
diff --git a/help/nautilus-srm.omf.in b/help/nautilus-wipe.omf.in
similarity index 100%
rename from help/nautilus-srm.omf.in
rename to help/nautilus-wipe.omf.in
diff --git a/nautilus-srm/Makefile.am b/nautilus-srm/Makefile.am
deleted file mode 100644
index 12d48e6..0000000
--- a/nautilus-srm/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-nautilus_extensiondir = $(NAUTILUS_EXTENSIONS_DIR)
-
-nautilus_extension_LTLIBRARIES = libnautilus-srm.la
-
-noinst_PROGRAMS = test
-
-localedir = $(datadir)/locale
-
-libnautilus_srm_la_SOURCES = nautilus-srm.c \
- nautilus-srm.h \
- operation-manager.c \
- operation-manager.h \
- delete-operation.c \
- delete-operation.h \
- fill-operation.c \
- fill-operation.h \
- progress-dialog.c \
- progress-dialog.h \
- compat.h
-libnautilus_srm_la_CPPFLAGS = -DG_LOG_DOMAIN=\"$(PACKAGE)\" \
- -DLOCALEDIR=\"$(localedir)\"
-libnautilus_srm_la_CFLAGS = @GLIB_CFLAGS@ \
- @GTK_CFLAGS@ \
- @GCONF_CFLAGS@ \
- @LIBNAUTILUS_EXTENSION_CFLAGS@ \
- @GSECUREDELETE_CFLAGS@ \
- @GIO_UNIX_CFLAGS@
-libnautilus_srm_la_LDFLAGS = -module -avoid-version \
- @GLIB_LIBS@ \
- @GTK_LIBS@ \
- @GCONF_LIBS@ \
- @LIBNAUTILUS_EXTENSION_LIBS@ \
- @GSECUREDELETE_LIBS@ \
- @GIO_UNIX_LIBS@
-
-test_CFLAGS = @GLIB_CFLAGS@ \
- @GTK_CFLAGS@
-test_LDFLAGS = @GLIB_LIBS@ \
- @GTK_LIBS@
-# Linking against a loadable module is not portable according to libtool.
-# However, I don't really care about portability issue here because it is only a
-# test program (that might even be removed at a time).
-test_LDADD = libnautilus-srm.la
-test_SOURCES = test.c
diff --git a/nautilus-srm/fill-operation.h b/nautilus-srm/fill-operation.h
deleted file mode 100644
index 825124a..0000000
--- a/nautilus-srm/fill-operation.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
- *
- * Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef NAUTILUS_SRM_FILL_OPERATION_H
-#define NAUTILUS_SRM_FILL_OPERATION_H
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gsecuredelete/gsecuredelete.h>
-
-G_BEGIN_DECLS
-
-
-/**
- * NautilusSrmFillOperationError:
- * @NAUTILUS_SRM_FILL_OPERATION_ERROR_MISSING_MOUNT: A file have no mount
- * @NAUTILUS_SRM_FILL_OPERATION_ERROR_REMOTE_MOUNT: A mount is not local
- * @NAUTILUS_SRM_FILL_OPERATION_ERROR_FAILED: An error occurred
- *
- * Possible errors from the %NAUTILUS_SRM_FILL_OPERATION_ERROR domain.
- */
-typedef enum
-{
- NAUTILUS_SRM_FILL_OPERATION_ERROR_MISSING_MOUNT,
- NAUTILUS_SRM_FILL_OPERATION_ERROR_REMOTE_MOUNT,
- NAUTILUS_SRM_FILL_OPERATION_ERROR_FAILED
-} NautilusSrmFillOperationError;
-
-/**
- * NAUTILUS_SRM_FILL_OPERATION_ERROR:
- *
- * Domain for error coming from a NautilusSrm's fill operation.
- */
-#define NAUTILUS_SRM_FILL_OPERATION_ERROR (nautilus_srm_fill_operation_error_quark ())
-
-GQuark nautilus_srm_fill_operation_error_quark (void) G_GNUC_CONST;
-gboolean nautilus_srm_fill_operation_filter_files (GList *paths,
- GList **work_paths_,
- GList **work_mounts_,
- GError **error);
-GsdAsyncOperation *nautilus_srm_fill_operation (GList *files,
- gboolean fast,
- GsdSecureDeleteOperationMode mode,
- gboolean zeroise,
- GCallback finished_handler,
- GCallback progress_handler,
- gpointer data,
- GError **error);
-
-
-G_END_DECLS
-
-#endif /* guard */
diff --git a/nautilus-srm/progress-dialog.h b/nautilus-srm/progress-dialog.h
deleted file mode 100644
index ebb8387..0000000
--- a/nautilus-srm/progress-dialog.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
- *
- * Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef NAUTILUS_SRM_PROGRESS_DIALOG_H
-#define NAUTILUS_SRM_PROGRESS_DIALOG_H
-
-#include <stdarg.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-
-
-G_BEGIN_DECLS
-
-
-#define NAUTILUS_TYPE_SRM_PROGRESS_DIALOG (nautilus_srm_progress_dialog_get_type ())
-#define NAUTILUS_SRM_PROGRESS_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_SRM_PROGRESS_DIALOG, NautilusSrmProgressDialog))
-#define NAUTILUS_SRM_PROGRESS_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), NAUTILUS_TYPE_SRM_PROGRESS_DIALOG, NautilusSrmProgressDialogClass))
-#define NAUTILUS_IS_SRM_PROGRESS_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_SRM_PROGRESS_DIALOG))
-#define NAUTILUS_IS_SRM_PROGRESS_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_SRM_PROGRESS_DIALOG))
-#define NAUTILUS_SRM_PROGRESS_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_SRM_PROGRESS_DIALOG, NautilusSrmProgressDialogClass))
-
-typedef struct _NautilusSrmProgressDialog NautilusSrmProgressDialog;
-typedef struct _NautilusSrmProgressDialogClass NautilusSrmProgressDialogClass;
-typedef struct _NautilusSrmProgressDialogPrivate NautilusSrmProgressDialogPrivate;
-
-struct _NautilusSrmProgressDialog {
- GtkDialog parent_instance;
- NautilusSrmProgressDialogPrivate *priv;
-};
-
-struct _NautilusSrmProgressDialogClass {
- GtkDialogClass parent_class;
-};
-
-#define NAUTILUS_SRM_PROGRESS_DIALOG_RESPONSE_COMPLETE 1
-
-
-GType nautilus_srm_progress_dialog_get_type (void) G_GNUC_CONST;
-
-GtkWidget *nautilus_srm_progress_dialog_new (GtkWindow *parent,
- GtkDialogFlags flags,
- const gchar *format,
- ...);
-void nautilus_srm_progress_dialog_set_fraction (NautilusSrmProgressDialog *dialog,
- gdouble fraction);
-gdouble nautilus_srm_progress_dialog_get_fraction (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_pulse (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_set_pulse_step (NautilusSrmProgressDialog *dialog,
- gdouble fraction);
-gdouble nautilus_srm_progress_dialog_get_pulse_step (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_set_progress_text
- (NautilusSrmProgressDialog *dialog,
- const gchar *format,
- ...);
-const gchar *
- nautilus_srm_progress_dialog_get_progress_text
- (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_set_text (NautilusSrmProgressDialog *dialog,
- const gchar *format,
- ...);
-const gchar *
- nautilus_srm_progress_dialog_get_text (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_cancel (NautilusSrmProgressDialog *dialog);
-gboolean nautilus_srm_progress_dialog_is_canceled (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_finish (NautilusSrmProgressDialog *dialog,
- gboolean success);
-gboolean nautilus_srm_progress_dialog_is_finished (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_set_has_close_button
- (NautilusSrmProgressDialog *dialog,
- gboolean has_close_button);
-gboolean nautilus_srm_progress_dialog_get_has_close_button
- (NautilusSrmProgressDialog *dialog);
-void nautilus_srm_progress_dialog_set_has_cancel_button
- (NautilusSrmProgressDialog *dialog,
- gboolean has_close_button);
-gboolean nautilus_srm_progress_dialog_get_has_cancel_button
- (NautilusSrmProgressDialog *dialog);
-
-void nautilus_srm_progress_dialog_set_auto_hide_action_area
- (NautilusSrmProgressDialog *dialog,
- gboolean auto_hide);
-gboolean nautilus_srm_progress_dialog_get_auto_hide_action_area
- (NautilusSrmProgressDialog *dialog);
-
-
-G_END_DECLS
-
-#endif /* guard */
diff --git a/nautilus-wipe/Makefile.am b/nautilus-wipe/Makefile.am
new file mode 100644
index 0000000..32ece52
--- /dev/null
+++ b/nautilus-wipe/Makefile.am
@@ -0,0 +1,44 @@
+nautilus_extensiondir = $(NAUTILUS_EXTENSIONS_DIR)
+
+nautilus_extension_LTLIBRARIES = libnautilus-wipe.la
+
+noinst_PROGRAMS = test
+
+localedir = $(datadir)/locale
+
+libnautilus_wipe_la_SOURCES = nautilus-wipe.c \
+ nautilus-wipe.h \
+ operation-manager.c \
+ operation-manager.h \
+ delete-operation.c \
+ delete-operation.h \
+ fill-operation.c \
+ fill-operation.h \
+ progress-dialog.c \
+ progress-dialog.h \
+ compat.h
+libnautilus_wipe_la_CPPFLAGS = -DG_LOG_DOMAIN=\"$(PACKAGE)\" \
+ -DLOCALEDIR=\"$(localedir)\"
+libnautilus_wipe_la_CFLAGS = @GLIB_CFLAGS@ \
+ @GTK_CFLAGS@ \
+ @GCONF_CFLAGS@ \
+ @LIBNAUTILUS_EXTENSION_CFLAGS@ \
+ @GSECUREDELETE_CFLAGS@ \
+ @GIO_UNIX_CFLAGS@
+libnautilus_wipe_la_LDFLAGS = -module -avoid-version \
+ @GLIB_LIBS@ \
+ @GTK_LIBS@ \
+ @GCONF_LIBS@ \
+ @LIBNAUTILUS_EXTENSION_LIBS@ \
+ @GSECUREDELETE_LIBS@ \
+ @GIO_UNIX_LIBS@
+
+test_CFLAGS = @GLIB_CFLAGS@ \
+ @GTK_CFLAGS@
+test_LDFLAGS = @GLIB_LIBS@ \
+ @GTK_LIBS@
+# Linking against a loadable module is not portable according to libtool.
+# However, I don't really care about portability issue here because it is only a
+# test program (that might even be removed at a time).
+test_LDADD = libnautilus-wipe.la
+test_SOURCES = test.c
diff --git a/nautilus-srm/compat.h b/nautilus-wipe/compat.h
similarity index 93%
rename from nautilus-srm/compat.h
rename to nautilus-wipe/compat.h
index b3b3185..4487443 100644
--- a/nautilus-srm/compat.h
+++ b/nautilus-wipe/compat.h
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -21,8 +21,8 @@
/* Contains compatibility things for old GTK and Nautilus */
-#ifndef NAUTILUS_SRM_COMPAT_H
-#define NAUTILUS_SRM_COMPAT_H
+#ifndef NAUTILUS_WIPE_COMPAT_H
+#define NAUTILUS_WIPE_COMPAT_H
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -104,7 +104,7 @@ nautilus_file_info_get_location (NautilusFileInfo *nfi)
* the user thinks we use the remote one).
*/
static gchar *
-NAUTILUS_SRM_g_file_get_path (GFile *file)
+NAUTILUS_WIPE_g_file_get_path (GFile *file)
{
gchar *path = NULL;
@@ -115,7 +115,7 @@ NAUTILUS_SRM_g_file_get_path (GFile *file)
return path;
}
/* overwrite the GIO implementation */
-#define g_file_get_path NAUTILUS_SRM_g_file_get_path
+#define g_file_get_path NAUTILUS_WIPE_g_file_get_path
#endif /* HAVE_NAUTILUS_FILE_INFO_GET_LOCATION */
diff --git a/nautilus-srm/delete-operation.c b/nautilus-wipe/delete-operation.c
similarity index 78%
rename from nautilus-srm/delete-operation.c
rename to nautilus-wipe/delete-operation.c
index ac3aa32..4b69dea 100644
--- a/nautilus-srm/delete-operation.c
+++ b/nautilus-wipe/delete-operation.c
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -33,19 +33,19 @@
GQuark
-nautilus_srm_delete_operation_error_quark (void)
+nautilus_wipe_delete_operation_error_quark (void)
{
static GQuark q = 0;
if (G_UNLIKELY (q == 0)) {
- q = g_quark_from_static_string ("NautilusSrmDeleteOperationError");
+ q = g_quark_from_static_string ("NautilusWipeDeleteOperationError");
}
return q;
}
/*
- * nsrm_delete_operation:
+ * nautilus_wipe_delete_operation:
* @files: A list of paths to delete.
* @fast: The Gsd.SecureDeleteOperation:fast setting
* @mode: The Gsd.SecureDeleteOperation:mode setting
@@ -63,14 +63,14 @@ nautilus_srm_delete_operation_error_quark (void)
* no longer needed.
*/
GsdAsyncOperation *
-nautilus_srm_delete_operation (GList *files,
- gboolean fast,
- GsdSecureDeleteOperationMode mode,
- gboolean zeroise,
- GCallback finished_handler,
- GCallback progress_handler,
- gpointer data,
- GError **error)
+nautilus_wipe_delete_operation (GList *files,
+ gboolean fast,
+ GsdSecureDeleteOperationMode mode,
+ gboolean zeroise,
+ GCallback finished_handler,
+ GCallback progress_handler,
+ gpointer data,
+ GError **error)
{
gboolean success = TRUE;
GsdDeleteOperation *operation;
@@ -83,8 +83,8 @@ nautilus_srm_delete_operation (GList *files,
}
if (n_files < 1) {
g_set_error (error,
- NAUTILUS_SRM_DELETE_OPERATION_ERROR,
- NAUTILUS_SRM_DELETE_OPERATION_ERROR_FAILED,
+ NAUTILUS_WIPE_DELETE_OPERATION_ERROR,
+ NAUTILUS_WIPE_DELETE_OPERATION_ERROR_FAILED,
_("Nothing to do!"));
success = FALSE;
} else {
diff --git a/nautilus-srm/delete-operation.h b/nautilus-wipe/delete-operation.h
similarity index 68%
copy from nautilus-srm/delete-operation.h
copy to nautilus-wipe/delete-operation.h
index 1e9315e..0ff391a 100644
--- a/nautilus-srm/delete-operation.h
+++ b/nautilus-wipe/delete-operation.h
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -19,8 +19,8 @@
*
*/
-#ifndef NAUTILUS_SRM_DELETE_OPERATION_H
-#define NAUTILUS_SRM_DELETE_OPERATION_H
+#ifndef NAUTILUS_WIPE_DELETE_OPERATION_H
+#define NAUTILUS_WIPE_DELETE_OPERATION_H
#include <glib.h>
#include <glib-object.h>
@@ -30,25 +30,25 @@ G_BEGIN_DECLS
/**
- * NautilusSrmDeleteOperationError:
- * @NAUTILUS_SRM_DELETE_OPERATION_ERROR_FAILED: An error occurred
+ * NautilusWipeDeleteOperationError:
+ * @NAUTILUS_WIPE_DELETE_OPERATION_ERROR_FAILED: An error occurred
*
- * Possible errors from the %NAUTILUS_SRM_DELETE_OPERATION_ERROR domain.
+ * Possible errors from the %NAUTILUS_WIPE_DELETE_OPERATION_ERROR domain.
*/
typedef enum
{
- NAUTILUS_SRM_DELETE_OPERATION_ERROR_FAILED
-} NautilusSrmDeleteOperationError;
+ NAUTILUS_WIPE_DELETE_OPERATION_ERROR_FAILED
+} NautilusWipeDeleteOperationError;
/**
- * NAUTILUS_SRM_DELETE_OPERATION_ERROR:
+ * NAUTILUS_WIPE_DELETE_OPERATION_ERROR:
*
- * Domain for error coming from a NautilusSrm's delete operation.
+ * Domain for error coming from a NautilusWipe's delete operation.
*/
-#define NAUTILUS_SRM_DELETE_OPERATION_ERROR (nautilus_srm_delete_operation_error_quark ())
+#define NAUTILUS_WIPE_DELETE_OPERATION_ERROR (nautilus_wipe_delete_operation_error_quark ())
-GQuark nautilus_srm_delete_operation_error_quark (void) G_GNUC_CONST;
-GsdAsyncOperation *nautilus_srm_delete_operation (GList *files,
+GQuark nautilus_wipe_delete_operation_error_quark (void) G_GNUC_CONST;
+GsdAsyncOperation *nautilus_wipe_delete_operation (GList *files,
gboolean fast,
GsdSecureDeleteOperationMode mode,
gboolean zeroise,
diff --git a/nautilus-srm/fill-operation.c b/nautilus-wipe/fill-operation.c
similarity index 78%
rename from nautilus-srm/fill-operation.c
rename to nautilus-wipe/fill-operation.c
index 149c58e..0b52737 100644
--- a/nautilus-srm/fill-operation.c
+++ b/nautilus-wipe/fill-operation.c
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -33,16 +33,16 @@
# include <gio/gunixmounts.h>
#endif
#include <gsecuredelete/gsecuredelete.h>
-#include "nautilus-srm.h"
+#include "nautilus-wipe.h"
GQuark
-nautilus_srm_fill_operation_error_quark (void)
+nautilus_wipe_fill_operation_error_quark (void)
{
static GQuark q = 0;
if (G_UNLIKELY (q == 0)) {
- q = g_quark_from_static_string ("NautilusSrmFillOperationError");
+ q = g_quark_from_static_string ("NautilusWipeFillOperationError");
}
return q;
@@ -114,8 +114,8 @@ find_mountpoint (const gchar *path,
gchar *uri = g_file_get_uri (mountpoint_file);
g_set_error (&err,
- NAUTILUS_SRM_FILL_OPERATION_ERROR,
- NAUTILUS_SRM_FILL_OPERATION_ERROR_REMOTE_MOUNT,
+ NAUTILUS_WIPE_FILL_OPERATION_ERROR,
+ NAUTILUS_WIPE_FILL_OPERATION_ERROR_REMOTE_MOUNT,
_("Mount \"%s\" is not local"), uri);
g_free (uri);
}
@@ -130,8 +130,8 @@ find_mountpoint (const gchar *path,
mountpoint_path = find_mountpoint_unix (path);
if (! mountpoint_path) {
g_set_error (&err,
- NAUTILUS_SRM_FILL_OPERATION_ERROR,
- NAUTILUS_SRM_FILL_OPERATION_ERROR_MISSING_MOUNT,
+ NAUTILUS_WIPE_FILL_OPERATION_ERROR,
+ NAUTILUS_WIPE_FILL_OPERATION_ERROR_MISSING_MOUNT,
_("No mount point found for path \"%s\""), path);
}
}
@@ -172,19 +172,19 @@ struct FillOperationData
gpointer cbdata;
};
-static void nautilus_srm_fill_finished_handler (GsdFillOperation *operation,
+static void nautilus_wipe_fill_finished_handler (GsdFillOperation *operation,
gboolean success,
const gchar *message,
struct FillOperationData *opdata);
-static void nautilus_srm_fill_progress_handler (GsdFillOperation *operation,
+static void nautilus_wipe_fill_progress_handler (GsdFillOperation *operation,
gdouble fraction,
struct FillOperationData *opdata);
/* Actually calls libgsecuredelete */
static gboolean
-do_sfill_operation (struct FillOperationData *opdata,
- GError **error)
+do_fill_operation (struct FillOperationData *opdata,
+ GError **error)
{
g_message ("Starting work on %s", (const gchar *)opdata->dir->data);
/* FIXME: don't launch sfill in a useful directory since it can leave a bunch
@@ -194,7 +194,7 @@ do_sfill_operation (struct FillOperationData *opdata,
/* Removes the current directory to proceed */
static void
-nautilus_srm_fill_pop_dir (struct FillOperationData *opdata)
+nautilus_wipe_fill_pop_dir (struct FillOperationData *opdata)
{
GList *tmp;
@@ -206,7 +206,7 @@ nautilus_srm_fill_pop_dir (struct FillOperationData *opdata)
/* Cleans up the opdata structure and frees it */
static void
-nautilus_srm_fill_cleanup (struct FillOperationData *opdata)
+nautilus_wipe_fill_cleanup (struct FillOperationData *opdata)
{
g_signal_handler_disconnect (opdata->operation, opdata->progress_hid);
g_signal_handler_disconnect (opdata->operation, opdata->finished_hid);
@@ -214,7 +214,7 @@ nautilus_srm_fill_cleanup (struct FillOperationData *opdata)
g_object_unref (opdata->operation);
}
while (opdata->dir) {
- nautilus_srm_fill_pop_dir (opdata);
+ nautilus_wipe_fill_pop_dir (opdata);
}
g_slice_free1 (sizeof *opdata, opdata);
}
@@ -222,9 +222,9 @@ nautilus_srm_fill_cleanup (struct FillOperationData *opdata)
/* wrapper for the progress handler returning the current progression over all
* operations */
static void
-nautilus_srm_fill_progress_handler (GsdFillOperation *operation,
- gdouble fraction,
- struct FillOperationData *opdata)
+nautilus_wipe_fill_progress_handler (GsdFillOperation *operation,
+ gdouble fraction,
+ struct FillOperationData *opdata)
{
opdata->progress_handler (operation,
(opdata->n_op_done + fraction) / opdata->n_op,
@@ -235,7 +235,7 @@ nautilus_srm_fill_progress_handler (GsdFillOperation *operation,
* operation.
* we need this kind of hack since operation are locked while running. */
static gboolean
-launch_next_sfill_operation (struct FillOperationData *opdata)
+launch_next_fill_operation (struct FillOperationData *opdata)
{
gboolean busy;
@@ -244,10 +244,10 @@ launch_next_sfill_operation (struct FillOperationData *opdata)
GError *err = NULL;
gboolean success;
- success = do_sfill_operation (opdata, &err);
+ success = do_fill_operation (opdata, &err);
if (! success) {
- nautilus_srm_fill_finished_handler (opdata->operation,
- success, err->message, opdata);
+ nautilus_wipe_fill_finished_handler (opdata->operation,
+ success, err->message, opdata);
g_error_free (err);
}
}
@@ -259,14 +259,14 @@ launch_next_sfill_operation (struct FillOperationData *opdata)
* It launches the next operation if there is one left, or call the user's
* handler if done or on error. */
static void
-nautilus_srm_fill_finished_handler (GsdFillOperation *operation,
- gboolean success,
- const gchar *message,
- struct FillOperationData *opdata)
+nautilus_wipe_fill_finished_handler (GsdFillOperation *operation,
+ gboolean success,
+ const gchar *message,
+ struct FillOperationData *opdata)
{
opdata->n_op_done++;
/* remove the directory just proceeded */
- nautilus_srm_fill_pop_dir (opdata);
+ nautilus_wipe_fill_pop_dir (opdata);
/* if the last operation succeeded and we have work left */
if (success && opdata->dir) {
/* we can't launch the next operation right here since the previous must
@@ -275,15 +275,15 @@ nautilus_srm_fill_finished_handler (GsdFillOperation *operation,
* To work around this, we add a timeout function that will try to launch
* the next operation if the current one is not busy, which fixes the
* problem. */
- g_timeout_add (10, (GSourceFunc)launch_next_sfill_operation, opdata);
+ g_timeout_add (10, (GSourceFunc)launch_next_fill_operation, opdata);
} else {
opdata->finished_handler (operation, success, message, opdata->cbdata);
- nautilus_srm_fill_cleanup (opdata);
+ nautilus_wipe_fill_cleanup (opdata);
}
}
/*
- * nautilus_srm_fill_operation_filter_files:
+ * nautilus_wipe_fill_operation_filter_files:
* @paths: A list of paths to filter
* @work_paths_: return location for filtered paths
* @work_mounts_: return location for filtered paths' mounts
@@ -295,15 +295,15 @@ nautilus_srm_fill_finished_handler (GsdFillOperation *operation,
* The returned lists (@work_paths_ and @work_mounts_) have the same length, and
* an index in a list correspond to the same in the other:
* g_list_index(work_paths_, 0) is the path of g_list_index(work_mounts_, 0).
- * Free returned lists with nautilus_srm_path_list_free().
+ * Free returned lists with nautilus_wipe_path_list_free().
*
* Returns: %TRUE on success, %FALSE otherwise.
*/
gboolean
-nautilus_srm_fill_operation_filter_files (GList *paths,
- GList **work_paths_,
- GList **work_mounts_,
- GError **error)
+nautilus_wipe_fill_operation_filter_files (GList *paths,
+ GList **work_paths_,
+ GList **work_mounts_,
+ GError **error)
{
GList *work_paths = NULL;
GError *err = NULL;
@@ -338,12 +338,12 @@ nautilus_srm_fill_operation_filter_files (GList *paths,
}
}
if (err || ! work_paths_) {
- nautilus_srm_path_list_free (work_paths);
+ nautilus_wipe_path_list_free (work_paths);
} else {
*work_paths_ = work_paths;
}
if (err || ! work_mounts_) {
- nautilus_srm_path_list_free (work_mounts);
+ nautilus_wipe_path_list_free (work_mounts);
} else {
*work_mounts_ = work_mounts;
}
@@ -355,9 +355,9 @@ nautilus_srm_fill_operation_filter_files (GList *paths,
}
/*
- * nautilus_srm_fill_operation:
+ * nautilus_wipe_fill_operation:
* @directories: A list of paths to work on (should have been filtered with
- * nautilus_srm_fill_operation_filter_files() or so)
+ * nautilus_wipe_fill_operation_filter_files() or so)
* @fast: The Gsd.SecureDeleteOperation:fast setting
* @mode: The Gsd.SecureDeleteOperation:mode setting
* @zeroise: The Gsd.ZeroableOperation:zeroise setting
@@ -367,21 +367,21 @@ nautilus_srm_fill_operation_filter_files (GList *paths,
* @error: Return location for errors or %NULL to ignore them. The errors are
* those from gsd_fill_operation_run().
*
- * "sfill"s the given directories.
+ * fills the given directories to overwrite available diskspace.
*
* Returns: The operation object that was launched, or %NULL on failure.
* The operation object should be unref'd with g_object_unref() when
* no longer needed.
*/
GsdAsyncOperation *
-nautilus_srm_fill_operation (GList *directories,
- gboolean fast,
- GsdSecureDeleteOperationMode mode,
- gboolean zeroise,
- GCallback finished_handler,
- GCallback progress_handler,
- gpointer data,
- GError **error)
+nautilus_wipe_fill_operation (GList *directories,
+ gboolean fast,
+ GsdSecureDeleteOperationMode mode,
+ gboolean zeroise,
+ GCallback finished_handler,
+ GCallback progress_handler,
+ gpointer data,
+ GError **error)
{
gboolean success = FALSE;
struct FillOperationData *opdata;
@@ -389,7 +389,7 @@ nautilus_srm_fill_operation (GList *directories,
g_return_val_if_fail (directories != NULL, NULL);
- dirs = nautilus_srm_path_list_copy (directories);
+ dirs = nautilus_wipe_path_list_copy (directories);
if (dirs) {
opdata = g_slice_alloc (sizeof *opdata);
opdata->dir = dirs;
@@ -403,13 +403,13 @@ nautilus_srm_fill_operation (GList *directories,
gsd_secure_delete_operation_set_mode (GSD_SECURE_DELETE_OPERATION (opdata->operation), mode);
gsd_zeroable_operation_set_zeroise (GSD_ZEROABLE_OPERATION (opdata->operation), zeroise);
opdata->progress_hid = g_signal_connect (opdata->operation, "progress",
- G_CALLBACK (nautilus_srm_fill_progress_handler), opdata);
+ G_CALLBACK (nautilus_wipe_fill_progress_handler), opdata);
opdata->finished_hid = g_signal_connect (opdata->operation, "finished",
- G_CALLBACK (nautilus_srm_fill_finished_handler), opdata);
+ G_CALLBACK (nautilus_wipe_fill_finished_handler), opdata);
/* launches the operation */
- success = do_sfill_operation (opdata, error);
+ success = do_fill_operation (opdata, error);
if (! success) {
- nautilus_srm_fill_cleanup (opdata);
+ nautilus_wipe_fill_cleanup (opdata);
}
}
diff --git a/nautilus-srm/delete-operation.h b/nautilus-wipe/fill-operation.h
similarity index 56%
rename from nautilus-srm/delete-operation.h
rename to nautilus-wipe/fill-operation.h
index 1e9315e..7fc0c20 100644
--- a/nautilus-srm/delete-operation.h
+++ b/nautilus-wipe/fill-operation.h
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -19,8 +19,8 @@
*
*/
-#ifndef NAUTILUS_SRM_DELETE_OPERATION_H
-#define NAUTILUS_SRM_DELETE_OPERATION_H
+#ifndef NAUTILUS_WIPE_FILL_OPERATION_H
+#define NAUTILUS_WIPE_FILL_OPERATION_H
#include <glib.h>
#include <glib-object.h>
@@ -30,25 +30,33 @@ G_BEGIN_DECLS
/**
- * NautilusSrmDeleteOperationError:
- * @NAUTILUS_SRM_DELETE_OPERATION_ERROR_FAILED: An error occurred
+ * NautilusWipeFillOperationError:
+ * @NAUTILUS_WIPE_FILL_OPERATION_ERROR_MISSING_MOUNT: A file have no mount
+ * @NAUTILUS_WIPE_FILL_OPERATION_ERROR_REMOTE_MOUNT: A mount is not local
+ * @NAUTILUS_WIPE_FILL_OPERATION_ERROR_FAILED: An error occurred
*
- * Possible errors from the %NAUTILUS_SRM_DELETE_OPERATION_ERROR domain.
+ * Possible errors from the %NAUTILUS_WIPE_FILL_OPERATION_ERROR domain.
*/
typedef enum
{
- NAUTILUS_SRM_DELETE_OPERATION_ERROR_FAILED
-} NautilusSrmDeleteOperationError;
+ NAUTILUS_WIPE_FILL_OPERATION_ERROR_MISSING_MOUNT,
+ NAUTILUS_WIPE_FILL_OPERATION_ERROR_REMOTE_MOUNT,
+ NAUTILUS_WIPE_FILL_OPERATION_ERROR_FAILED
+} NautilusWipeFillOperationError;
/**
- * NAUTILUS_SRM_DELETE_OPERATION_ERROR:
+ * NAUTILUS_WIPE_FILL_OPERATION_ERROR:
*
- * Domain for error coming from a NautilusSrm's delete operation.
+ * Domain for error coming from a NautilusWipe's fill operation.
*/
-#define NAUTILUS_SRM_DELETE_OPERATION_ERROR (nautilus_srm_delete_operation_error_quark ())
+#define NAUTILUS_WIPE_FILL_OPERATION_ERROR (nautilus_wipe_fill_operation_error_quark ())
-GQuark nautilus_srm_delete_operation_error_quark (void) G_GNUC_CONST;
-GsdAsyncOperation *nautilus_srm_delete_operation (GList *files,
+GQuark nautilus_wipe_fill_operation_error_quark (void) G_GNUC_CONST;
+gboolean nautilus_wipe_fill_operation_filter_files (GList *paths,
+ GList **work_paths_,
+ GList **work_mounts_,
+ GError **error);
+GsdAsyncOperation *nautilus_wipe_fill_operation (GList *files,
gboolean fast,
GsdSecureDeleteOperationMode mode,
gboolean zeroise,
diff --git a/nautilus-srm/nautilus-srm.c b/nautilus-wipe/nautilus-wipe.c
similarity index 74%
rename from nautilus-srm/nautilus-srm.c
rename to nautilus-wipe/nautilus-wipe.c
index 21d756b..79d3f90 100644
--- a/nautilus-srm/nautilus-srm.c
+++ b/nautilus-wipe/nautilus-wipe.c
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -23,7 +23,7 @@
# include "config.h"
#endif
-#include "nautilus-srm.h"
+#include "nautilus-wipe.h"
#include <libnautilus-extension/nautilus-menu-provider.h>
#include <libnautilus-extension/nautilus-file-info.h>
@@ -43,16 +43,16 @@
static GType provider_types[1];
-static GType nautilus_srm_type = 0;
+static GType nautilus_wipe_type = 0;
/* private prototypes */
-static void nautilus_srm_register_type (GTypeModule *module);
-static GList *nautilus_srm_get_file_items (NautilusMenuProvider *provider,
- GtkWidget *window,
- GList *files);
-static GList *nautilus_srm_get_background_items (NautilusMenuProvider *provider,
- GtkWidget *window,
- NautilusFileInfo *current_folder);
+static void nautilus_wipe_register_type (GTypeModule *module);
+static GList *nautilus_wipe_get_file_items (NautilusMenuProvider *provider,
+ GtkWidget *window,
+ GList *files);
+static GList *nautilus_wipe_get_background_items (NautilusMenuProvider *provider,
+ GtkWidget *window,
+ NautilusFileInfo *current_folder);
/*=== Nautilus interface functions ===*/
@@ -62,8 +62,8 @@ nautilus_module_initialize (GTypeModule *module)
{
g_message ("Initializing");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- nautilus_srm_register_type (module);
- provider_types[0] = nautilus_srm_get_type ();
+ nautilus_wipe_register_type (module);
+ provider_types[0] = nautilus_wipe_get_type ();
}
/* The next function returns the type of object Nautilus needs to create for your extension. */
@@ -88,69 +88,69 @@ nautilus_module_shutdown (void)
/*=== Type registration ===*/
GQuark
-nautilus_srm_error_quark (void)
+nautilus_wipe_error_quark (void)
{
static GQuark error_quark = 0;
if (G_UNLIKELY (error_quark == 0)) {
- error_quark = g_quark_from_static_string ("NautilusSrmError");
+ error_quark = g_quark_from_static_string ("NautilusWipeError");
}
return error_quark;
}
static void
-nautilus_srm_menu_provider_iface_init (NautilusMenuProviderIface *iface)
+nautilus_wipe_menu_provider_iface_init (NautilusMenuProviderIface *iface)
{
- iface->get_file_items = nautilus_srm_get_file_items;
- iface->get_background_items = nautilus_srm_get_background_items;
+ iface->get_file_items = nautilus_wipe_get_file_items;
+ iface->get_background_items = nautilus_wipe_get_background_items;
}
static void
-nautilus_srm_instance_init (NautilusSrm *srm)
+nautilus_wipe_instance_init (NautilusWipe *self)
{
/* instance initialization */
}
static void
-nautilus_srm_class_init (NautilusSrmClass *class)
+nautilus_wipe_class_init (NautilusWipeClass *class)
{
/* class initialization */
}
GType
-nautilus_srm_get_type (void)
+nautilus_wipe_get_type (void)
{
- return nautilus_srm_type;
+ return nautilus_wipe_type;
}
/* Register our type into glib */
static void
-nautilus_srm_register_type (GTypeModule *module)
+nautilus_wipe_register_type (GTypeModule *module)
{
static const GTypeInfo info = {
- sizeof (NautilusSrmClass),
+ sizeof (NautilusWipeClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
- (GClassInitFunc) nautilus_srm_class_init,
+ (GClassInitFunc) nautilus_wipe_class_init,
NULL,
NULL,
- sizeof (NautilusSrm),
+ sizeof (NautilusWipe),
0,
- (GInstanceInitFunc) nautilus_srm_instance_init,
+ (GInstanceInitFunc) nautilus_wipe_instance_init,
};
/* Nautilus Menu Provider Interface */
static const GInterfaceInfo menu_provider_iface_info = {
- (GInterfaceInitFunc) nautilus_srm_menu_provider_iface_init,
+ (GInterfaceInitFunc) nautilus_wipe_menu_provider_iface_init,
NULL,
NULL
};
- nautilus_srm_type = g_type_module_register_type (module,
- G_TYPE_OBJECT,
- "NautilusSrm",
- &info, 0);
- g_type_module_add_interface (module, nautilus_srm_type,
+ nautilus_wipe_type = g_type_module_register_type (module,
+ G_TYPE_OBJECT,
+ "NautilusWipe",
+ &info, 0);
+ g_type_module_add_interface (module, nautilus_wipe_type,
NAUTILUS_TYPE_MENU_PROVIDER,
&menu_provider_iface_info);
}
@@ -169,7 +169,7 @@ static void run_delete_operation (GtkWindow *parent,
/* gets the Nautilus' desktop path (to handle x-nautilus-desktop:// URIs)
* heavily based on the implementation from nautilus-open-terminal */
static gchar *
-nautilus_srm_get_desktop_path (void)
+nautilus_wipe_get_desktop_path (void)
{
gchar *path = NULL;
GConfClient *conf_client;
@@ -189,8 +189,8 @@ nautilus_srm_get_desktop_path (void)
/* checks whether a #NautilusFileInfo have the given URI scheme */
static gboolean
-nautilus_srm_nfi_has_uri_scheme (NautilusFileInfo *nfi,
- const gchar *scheme)
+nautilus_wipe_nfi_has_uri_scheme (NautilusFileInfo *nfi,
+ const gchar *scheme)
{
gboolean matches = FALSE;
gchar *nfi_scheme;
@@ -208,7 +208,7 @@ nautilus_srm_nfi_has_uri_scheme (NautilusFileInfo *nfi,
* this is different from getting if GFile then getting the path since it tries
* handle x-nautilus-desktop */
static gchar *
-nautilus_srm_nfi_get_path (NautilusFileInfo *nfi)
+nautilus_wipe_nfi_get_path (NautilusFileInfo *nfi)
{
GFile *file;
gchar *path;
@@ -216,8 +216,8 @@ nautilus_srm_nfi_get_path (NautilusFileInfo *nfi)
file = nautilus_file_info_get_location (nfi);
path = g_file_get_path (file);
if (! path) {
- if (nautilus_srm_nfi_has_uri_scheme (nfi, "x-nautilus-desktop")) {
- path = nautilus_srm_get_desktop_path ();
+ if (nautilus_wipe_nfi_has_uri_scheme (nfi, "x-nautilus-desktop")) {
+ path = nautilus_wipe_get_desktop_path ();
}
}
@@ -226,16 +226,16 @@ nautilus_srm_nfi_get_path (NautilusFileInfo *nfi)
/* frees a list of paths */
void
-nautilus_srm_path_list_free (GList *paths)
+nautilus_wipe_path_list_free (GList *paths)
{
g_list_foreach (paths, (GFunc)g_free, NULL);
g_list_free (paths);
}
/* copies a list of paths
- * free the returned list with nautilus_srm_path_list_free() */
+ * free the returned list with nautilus_wipe_path_list_free() */
GList *
-nautilus_srm_path_list_copy (GList *src)
+nautilus_wipe_path_list_copy (GList *src)
{
GList *paths = NULL;
@@ -248,12 +248,12 @@ nautilus_srm_path_list_copy (GList *src)
}
/* converts a list of #NautilusFileInfo to a list of paths.
- * free the returned list with nautilus_srm_path_list_free()
+ * free the returned list with nautilus_wipe_path_list_free()
*
* Returns: The list of paths on success, or %NULL on failure. This function
* will always fail on non-local-mounted (then without paths) files */
static GList *
-nautilus_srm_nfi_list_to_path_list (GList *nfis)
+nautilus_wipe_nfi_list_to_path_list (GList *nfis)
{
gboolean success = TRUE;
GList *paths = NULL;
@@ -261,7 +261,7 @@ nautilus_srm_nfi_list_to_path_list (GList *nfis)
while (nfis && success) {
gchar *path;
- path = nautilus_srm_nfi_get_path (nfis->data);
+ path = nautilus_wipe_nfi_get_path (nfis->data);
if (path) {
paths = g_list_append (paths, path);
} else {
@@ -270,7 +270,7 @@ nautilus_srm_nfi_list_to_path_list (GList *nfis)
nfis = g_list_next (nfis);
}
if (! success) {
- nautilus_srm_path_list_free (paths);
+ nautilus_wipe_path_list_free (paths);
paths = NULL;
}
@@ -296,8 +296,8 @@ struct ItemData
static void
item_data_free (struct ItemData *idata)
{
- nautilus_srm_path_list_free (idata->paths);
- nautilus_srm_path_list_free (idata->mountpoints);
+ nautilus_wipe_path_list_free (idata->paths);
+ nautilus_wipe_path_list_free (idata->mountpoints);
g_slice_free1 (sizeof *idata, idata);
}
@@ -318,9 +318,9 @@ add_item_data (NautilusMenuItem *item,
* GtkWindow. This would not be a problem since at this time the user will
* not (even be able to) activate our button. */
idata->window = GTK_IS_WINDOW (window) ? GTK_WINDOW (window) : NULL;
- idata->paths = nautilus_srm_path_list_copy (paths);
- idata->mountpoints = nautilus_srm_path_list_copy (mountpoints);
- g_object_set_data_full (G_OBJECT (item), "NautilusSrm::item-data",
+ idata->paths = nautilus_wipe_path_list_copy (paths);
+ idata->mountpoints = nautilus_wipe_path_list_copy (mountpoints);
+ g_object_set_data_full (G_OBJECT (item), "NautilusWipe::item-data",
idata, (GDestroyNotify)item_data_free);
}
@@ -328,13 +328,13 @@ add_item_data (NautilusMenuItem *item,
static struct ItemData *
get_item_data (NautilusMenuItem *item)
{
- return g_object_get_data (G_OBJECT (item), "NautilusSrm::item-data");
+ return g_object_get_data (G_OBJECT (item), "NautilusWipe::item-data");
}
/*= Menu items =*/
-/* srm item */
+/* wipe item */
static void
menu_item_delete_activate_handler (NautilusMenuItem *item,
NautilusMenuProvider *provider)
@@ -345,10 +345,10 @@ menu_item_delete_activate_handler (NautilusMenuItem *item,
}
static NautilusMenuItem *
-nautilus_srm_menu_item_srm (NautilusMenuProvider *provider,
- const gchar *item_name,
- GtkWidget *window,
- GList *paths)
+nautilus_wipe_menu_item_wipe (NautilusMenuProvider *provider,
+ const gchar *item_name,
+ GtkWidget *window,
+ GList *paths)
{
NautilusMenuItem *item;
@@ -363,7 +363,7 @@ nautilus_srm_menu_item_srm (NautilusMenuProvider *provider,
return item;
}
-/* sfill item */
+/* wipe free space item */
static void
menu_item_fill_activate_handler (NautilusMenuItem *item,
NautilusMenuProvider *provider)
@@ -374,7 +374,7 @@ menu_item_fill_activate_handler (NautilusMenuItem *item,
}
static NautilusMenuItem *
-nautilus_srm_menu_item_sfill (NautilusMenuProvider *provider,
+nautilus_wipe_menu_item_fill (NautilusMenuProvider *provider,
const gchar *item_name,
GtkWidget *window,
GList *files)
@@ -384,8 +384,8 @@ nautilus_srm_menu_item_sfill (NautilusMenuProvider *provider,
GList *folders = NULL;
GError *err = NULL;
- if (! nautilus_srm_fill_operation_filter_files (files, &folders, &mountpoints,
- &err)) {
+ if (! nautilus_wipe_fill_operation_filter_files (files, &folders,
+ &mountpoints, &err)) {
g_warning (_("File filtering failed: %s"), err->message);
g_error_free (err);
} else {
@@ -396,8 +396,8 @@ nautilus_srm_menu_item_sfill (NautilusMenuProvider *provider,
add_item_data (item, window, folders, mountpoints);
g_signal_connect (item, "activate",
G_CALLBACK (menu_item_fill_activate_handler), provider);
- nautilus_srm_path_list_free (folders);
- nautilus_srm_path_list_free (mountpoints);
+ nautilus_wipe_path_list_free (folders);
+ nautilus_wipe_path_list_free (mountpoints);
}
return item;
@@ -415,43 +415,43 @@ nautilus_srm_menu_item_sfill (NautilusMenuProvider *provider,
/* populates Nautilus' file menu */
static GList *
-nautilus_srm_get_file_items (NautilusMenuProvider *provider,
- GtkWidget *window,
- GList *files)
+nautilus_wipe_get_file_items (NautilusMenuProvider *provider,
+ GtkWidget *window,
+ GList *files)
{
GList *items = NULL;
GList *paths;
- paths = nautilus_srm_nfi_list_to_path_list (files);
+ paths = nautilus_wipe_nfi_list_to_path_list (files);
if (paths) {
- ADD_ITEM (items, nautilus_srm_menu_item_srm (provider,
- "nautilus-srm::files-items::srm",
+ ADD_ITEM (items, nautilus_wipe_menu_item_wipe (provider,
+ "nautilus-wipe::files-items::wipe",
window, paths));
- ADD_ITEM (items, nautilus_srm_menu_item_sfill (provider,
- "nautilus-srm::files-items::sfill",
+ ADD_ITEM (items, nautilus_wipe_menu_item_fill (provider,
+ "nautilus-wipe::files-items::fill",
window, paths));
}
- nautilus_srm_path_list_free (paths);
+ nautilus_wipe_path_list_free (paths);
return items;
}
/* populates Nautilus' background menu */
static GList *
-nautilus_srm_get_background_items (NautilusMenuProvider *provider,
- GtkWidget *window,
- NautilusFileInfo *current_folder)
+nautilus_wipe_get_background_items (NautilusMenuProvider *provider,
+ GtkWidget *window,
+ NautilusFileInfo *current_folder)
{
GList *items = NULL;
GList *paths = NULL;
- paths = g_list_append (paths, nautilus_srm_nfi_get_path (current_folder));
+ paths = g_list_append (paths, nautilus_wipe_nfi_get_path (current_folder));
if (paths && paths->data) {
- ADD_ITEM (items, nautilus_srm_menu_item_sfill (provider,
- "nautilus-srm::background-items::sfill",
+ ADD_ITEM (items, nautilus_wipe_menu_item_fill (provider,
+ "nautilus-wipe::background-items::fill",
window, paths));
}
- nautilus_srm_path_list_free (paths);
+ nautilus_wipe_path_list_free (paths);
return items;
}
@@ -459,7 +459,7 @@ nautilus_srm_get_background_items (NautilusMenuProvider *provider,
#undef ADD_ITEM
-/* Runs the srm operation */
+/* Runs the wipe operation */
static void
run_delete_operation (GtkWindow *parent,
GList *files)
@@ -481,7 +481,7 @@ run_delete_operation (GtkWindow *parent,
name);
g_free (name);
}
- nautilus_srm_operation_manager_run (
+ nautilus_wipe_operation_manager_run (
parent, files,
/* confirm dialog */
confirm_primary_text,
@@ -491,7 +491,7 @@ run_delete_operation (GtkWindow *parent,
/* progress dialog */
_("Wiping files..."),
/* operation launcher */
- nautilus_srm_delete_operation,
+ nautilus_wipe_delete_operation,
/* failed dialog */
_("Wipe failed."),
/* success dialog */
@@ -501,7 +501,7 @@ run_delete_operation (GtkWindow *parent,
g_free (confirm_primary_text);
}
-/* Runs the sfill operation */
+/* Runs the fill operation */
static void
run_fill_operation (GtkWindow *parent,
GList *paths,
@@ -557,7 +557,7 @@ run_fill_operation (GtkWindow *parent,
name);
g_free (name);
}
- nautilus_srm_operation_manager_run (
+ nautilus_wipe_operation_manager_run (
parent, paths,
/* confirm dialog */
confirm_primary_text,
@@ -567,7 +567,7 @@ run_fill_operation (GtkWindow *parent,
/* progress dialog */
_("Wiping available diskspace..."),
/* operation launcher */
- nautilus_srm_fill_operation,
+ nautilus_wipe_fill_operation,
/* failed dialog */
_("Wipe failed"),
/* success dialog */
diff --git a/nautilus-srm/nautilus-srm.h b/nautilus-wipe/nautilus-wipe.h
similarity index 56%
rename from nautilus-srm/nautilus-srm.h
rename to nautilus-wipe/nautilus-wipe.h
index 914a1c8..14d4ab6 100644
--- a/nautilus-srm/nautilus-srm.h
+++ b/nautilus-wipe/nautilus-wipe.h
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -19,8 +19,8 @@
*
*/
-#ifndef NAUTILUS_SRM_H
-#define NAUTILUS_SRM_H
+#ifndef NAUTILUS_WIPE_H
+#define NAUTILUS_WIPE_H
#include <glib.h>
#include <glib-object.h>
@@ -38,36 +38,36 @@ G_BEGIN_DECLS
* exported by libnautilus. */
-#define NAUTILUS_TYPE_SRM (nautilus_srm_get_type ())
-#define NAUTILUS_SRM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_SRM, NautilusSrm))
-#define NAUTILUS_IS_SRM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_SRM))
-typedef struct _NautilusSrm NautilusSrm;
-typedef struct _NautilusSrmClass NautilusSrmClass;
+#define NAUTILUS_TYPE_WIPE (nautilus_wipe_get_type ())
+#define NAUTILUS_WIPE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_WIPE, NautilusWipe))
+#define NAUTILUS_IS_WIPE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_WIPE))
+typedef struct _NautilusWipe NautilusWipe;
+typedef struct _NautilusWipeClass NautilusWipeClass;
-#define NAUTILUS_SRM_ERROR (nautilus_srm_error_quark ())
+#define NAUTILUS_WIPE_ERROR (nautilus_wipe_error_quark ())
typedef enum {
- NAUTILUS_SRM_ERROR_SPAWN_FAILED,
- NAUTILUS_SRM_ERROR_CHILD_CRASHED,
- NAUTILUS_SRM_ERROR_CHILD_FAILED,
- NAUTILUS_SRM_ERROR_UNSUPPORTED_LOCATION,
- NAUTILUS_SRM_ERROR_NOT_IMPLEMENTED,
- NAUTILUS_SRM_ERROR_FAILED
-} NautilusSrmError;
-
-struct _NautilusSrm {
+ NAUTILUS_WIPE_ERROR_SPAWN_FAILED,
+ NAUTILUS_WIPE_ERROR_CHILD_CRASHED,
+ NAUTILUS_WIPE_ERROR_CHILD_FAILED,
+ NAUTILUS_WIPE_ERROR_UNSUPPORTED_LOCATION,
+ NAUTILUS_WIPE_ERROR_NOT_IMPLEMENTED,
+ NAUTILUS_WIPE_ERROR_FAILED
+} NautilusWipeError;
+
+struct _NautilusWipe {
GObject parent_slot;
};
-struct _NautilusSrmClass {
+struct _NautilusWipeClass {
GObjectClass parent_slot;
};
-GType nautilus_srm_get_type (void) G_GNUC_CONST;
-GQuark nautilus_srm_error_quark (void) G_GNUC_CONST;
+GType nautilus_wipe_get_type (void) G_GNUC_CONST;
+GQuark nautilus_wipe_error_quark (void) G_GNUC_CONST;
-void nautilus_srm_path_list_free (GList *paths);
-GList *nautilus_srm_path_list_copy (GList *src);
+void nautilus_wipe_path_list_free (GList *paths);
+GList *nautilus_wipe_path_list_copy (GList *src);
G_END_DECLS
diff --git a/nautilus-srm/operation-manager.c b/nautilus-wipe/operation-manager.c
similarity index 90%
rename from nautilus-srm/operation-manager.c
rename to nautilus-wipe/operation-manager.c
index 779b0a4..1201ea3 100644
--- a/nautilus-srm/operation-manager.c
+++ b/nautilus-wipe/operation-manager.c
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -32,7 +32,7 @@
#include <gtk/gtk.h>
#include <gsecuredelete/gsecuredelete.h>
-#include "nautilus-srm.h"
+#include "nautilus-wipe.h"
#include "progress-dialog.h"
#include "compat.h"
@@ -139,20 +139,20 @@ string_last_line (const gchar *str)
-struct NautilusSrmOperationData
+struct NautilusWipeOperationData
{
GsdAsyncOperation *operation;
GtkWindow *window;
gulong window_destroy_hid;
- NautilusSrmProgressDialog *progress_dialog;
+ NautilusWipeProgressDialog *progress_dialog;
gchar *failed_primary_text;
gchar *success_primary_text;
gchar *success_secondary_text;
};
-/* Frees a NautilusSrmOperationData structure */
+/* Frees a NautilusWipeOperationData structure */
static void
-free_opdata (struct NautilusSrmOperationData *opdata)
+free_opdata (struct NautilusWipeOperationData *opdata)
{
if (opdata->window_destroy_hid) {
g_signal_handler_disconnect (opdata->window, opdata->window_destroy_hid);
@@ -169,8 +169,8 @@ free_opdata (struct NautilusSrmOperationData *opdata)
/* if the parent window get destroyed, we honor gently the thing and leave it
* to the death. doing this is useful not to have a bad window pointer later */
static void
-opdata_window_destroy_handler (GtkObject *obj,
- struct NautilusSrmOperationData *opdata)
+opdata_window_destroy_handler (GtkObject *obj,
+ struct NautilusWipeOperationData *opdata)
{
g_signal_handler_disconnect (opdata->window, opdata->window_destroy_hid);
opdata->window_destroy_hid = 0;
@@ -179,8 +179,8 @@ opdata_window_destroy_handler (GtkObject *obj,
/* Displays an operation's error */
static void
-display_operation_error (struct NautilusSrmOperationData *opdata,
- const gchar *error)
+display_operation_error (struct NautilusWipeOperationData *opdata,
+ const gchar *error)
{
GtkWidget *dialog;
GtkWidget *content_area;
@@ -228,7 +228,7 @@ operation_finished_handler (GsdDeleteOperation *operation,
const gchar *error,
gpointer data)
{
- struct NautilusSrmOperationData *opdata = data;
+ struct NautilusWipeOperationData *opdata = data;
gtk_widget_destroy (GTK_WIDGET (opdata->progress_dialog));
if (! success) {
@@ -248,10 +248,10 @@ operation_progress_handler (GsdDeleteOperation *operation,
gdouble fraction,
gpointer data)
{
- struct NautilusSrmOperationData *opdata = data;
+ struct NautilusWipeOperationData *opdata = data;
- nautilus_srm_progress_dialog_set_fraction (opdata->progress_dialog,
- fraction);
+ nautilus_wipe_progress_dialog_set_fraction (opdata->progress_dialog,
+ fraction);
}
/* sets @pref according to state of @toggle */
@@ -284,7 +284,7 @@ help_button_clicked_handler (GtkWidget *widget,
GError *err = NULL;
if (! gtk_show_uri (gtk_widget_get_screen (widget),
- "ghelp:nautilus-srm?nautilus-secure-delete-config",
+ "ghelp:nautilus-wipe?nautilus-secure-delete-config",
gtk_get_current_event_time (),
&err)) {
/* display the error.
@@ -464,7 +464,7 @@ progress_dialog_response_handler (GtkDialog *dialog,
gint response_id,
gpointer data)
{
- struct NautilusSrmOperationData *opdata = data;
+ struct NautilusWipeOperationData *opdata = data;
switch (response_id) {
case GTK_RESPONSE_CANCEL:
@@ -486,7 +486,7 @@ progress_dialog_response_handler (GtkDialog *dialog,
}
/*
- * nautilus_srm_operation_manager_run:
+ * nautilus_wipe_operation_manager_run:
* @parent: Parent window for dialogs
* @files: List of paths to pass to @operation_launcher_func
* @confirm_primary_text: Primary text for the confirmation dialog
@@ -506,17 +506,17 @@ progress_dialog_response_handler (GtkDialog *dialog,
*
*/
void
-nautilus_srm_operation_manager_run (GtkWindow *parent,
- GList *files,
- const gchar *confirm_primary_text,
- const gchar *confirm_secondary_text,
- const gchar *confirm_button_text,
- GtkWidget *confirm_button_icon,
- const gchar *progress_dialog_text,
- NautilusSrmOperationFunc operation_launcher_func,
- const gchar *failed_primary_text,
- const gchar *success_primary_text,
- const gchar *success_secondary_text)
+nautilus_wipe_operation_manager_run (GtkWindow *parent,
+ GList *files,
+ const gchar *confirm_primary_text,
+ const gchar *confirm_secondary_text,
+ const gchar *confirm_button_text,
+ GtkWidget *confirm_button_icon,
+ const gchar *progress_dialog_text,
+ NautilusWipeOperationFunc operation_launcher_func,
+ const gchar *failed_primary_text,
+ const gchar *success_primary_text,
+ const gchar *success_secondary_text)
{
/* if the user confirms, try to launch the operation */
gboolean fast = FALSE;
@@ -528,15 +528,15 @@ nautilus_srm_operation_manager_run (GtkWindow *parent,
confirm_button_text, confirm_button_icon,
&fast, &delete_mode, &zeroise)) {
GError *err = NULL;
- struct NautilusSrmOperationData *opdata;
+ struct NautilusWipeOperationData *opdata;
opdata = g_slice_alloc (sizeof *opdata);
opdata->window = parent;
opdata->window_destroy_hid = g_signal_connect (opdata->window, "destroy",
G_CALLBACK (opdata_window_destroy_handler), opdata);
- opdata->progress_dialog = NAUTILUS_SRM_PROGRESS_DIALOG (nautilus_srm_progress_dialog_new (opdata->window, 0,
- progress_dialog_text));
- nautilus_srm_progress_dialog_set_has_cancel_button (opdata->progress_dialog, TRUE);
+ opdata->progress_dialog = NAUTILUS_WIPE_PROGRESS_DIALOG (nautilus_wipe_progress_dialog_new (opdata->window, 0,
+ progress_dialog_text));
+ nautilus_wipe_progress_dialog_set_has_cancel_button (opdata->progress_dialog, TRUE);
g_signal_connect (opdata->progress_dialog, "response",
G_CALLBACK (progress_dialog_response_handler), opdata);
opdata->failed_primary_text = g_strdup (failed_primary_text);
diff --git a/nautilus-srm/operation-manager.h b/nautilus-wipe/operation-manager.h
similarity index 68%
rename from nautilus-srm/operation-manager.h
rename to nautilus-wipe/operation-manager.h
index 667716d..9374656 100644
--- a/nautilus-srm/operation-manager.h
+++ b/nautilus-wipe/operation-manager.h
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -19,8 +19,8 @@
*
*/
-#ifndef NAUTILUS_SRM_OPERATION_MANAGER_H
-#define NAUTILUS_SRM_OPERATION_MANAGER_H
+#ifndef NAUTILUS_WIPE_OPERATION_MANAGER_H
+#define NAUTILUS_WIPE_OPERATION_MANAGER_H
#include <glib.h>
#include <glib-object.h>
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
/**
- * NautilusSrmOperationFunc:
+ * NautilusWipeOperationFunc:
* @files: Paths to work on
* @fast: The Gsd.SecureDeleteOperation:fast setting
* @mode: The Gsd.SecureDeleteOperation:mode setting
@@ -46,23 +46,23 @@ G_BEGIN_DECLS
* The operation object should be unref'd with g_object_unref() when
* no longer needed.
*/
-typedef GsdAsyncOperation *(*NautilusSrmOperationFunc) (GList *files,
- gboolean fast,
- GsdSecureDeleteOperationMode mode,
- gboolean zeroise,
- GCallback finished_handler,
- GCallback progress_handler,
- gpointer data,
- GError **error);
+typedef GsdAsyncOperation *(*NautilusWipeOperationFunc) (GList *files,
+ gboolean fast,
+ GsdSecureDeleteOperationMode mode,
+ gboolean zeroise,
+ GCallback finished_handler,
+ GCallback progress_handler,
+ gpointer data,
+ GError **error);
-void nautilus_srm_operation_manager_run (GtkWindow *parent,
+void nautilus_wipe_operation_manager_run (GtkWindow *parent,
GList *files,
const gchar *confirm_primary_text,
const gchar *confirm_secondary_text,
const gchar *confirm_button_text,
GtkWidget *confirm_button_icon,
const gchar *progress_dialog_text,
- NautilusSrmOperationFunc operation_launcher_func,
+ NautilusWipeOperationFunc operation_launcher_func,
const gchar *failed_primary_text,
const gchar *success_primary_text,
const gchar *success_secondary_text);
diff --git a/nautilus-srm/progress-dialog.c b/nautilus-wipe/progress-dialog.c
similarity index 58%
rename from nautilus-srm/progress-dialog.c
rename to nautilus-wipe/progress-dialog.c
index 688e994..cb33d21 100644
--- a/nautilus-srm/progress-dialog.c
+++ b/nautilus-wipe/progress-dialog.c
@@ -1,5 +1,5 @@
/*
- * nautilus-srm - a nautilus extension to wipe file(s) with srm
+ * nautilus-wipe - a nautilus extension to wipe file(s)
*
* Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
*
@@ -31,7 +31,7 @@
-struct _NautilusSrmProgressDialogPrivate {
+struct _NautilusWipeProgressDialogPrivate {
GtkLabel *label;
GtkProgressBar *progress;
GtkWidget *cancel_button;
@@ -41,7 +41,7 @@ struct _NautilusSrmProgressDialogPrivate {
gboolean auto_hide_action_area;
};
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NAUTILUS_TYPE_SRM_PROGRESS_DIALOG, NautilusSrmProgressDialogPrivate))
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG, NautilusWipeProgressDialogPrivate))
enum
{
@@ -52,31 +52,31 @@ enum
PROP_AUTO_HIDE_ACTION_AREA
};
-G_DEFINE_TYPE (NautilusSrmProgressDialog, nautilus_srm_progress_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE (NautilusWipeProgressDialog, nautilus_wipe_progress_dialog, GTK_TYPE_DIALOG)
static void
-nautilus_srm_progress_dialog_set_property (GObject *obj,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+nautilus_wipe_progress_dialog_set_property (GObject *obj,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- NautilusSrmProgressDialog *self = NAUTILUS_SRM_PROGRESS_DIALOG (obj);
+ NautilusWipeProgressDialog *self = NAUTILUS_WIPE_PROGRESS_DIALOG (obj);
switch (prop_id) {
case PROP_TEXT:
- nautilus_srm_progress_dialog_set_text (self, "%s", g_value_get_string (value));
+ nautilus_wipe_progress_dialog_set_text (self, "%s", g_value_get_string (value));
break;
case PROP_HAS_CANCEL_BUTTON:
- nautilus_srm_progress_dialog_set_has_cancel_button (self, g_value_get_boolean (value));
+ nautilus_wipe_progress_dialog_set_has_cancel_button (self, g_value_get_boolean (value));
break;
case PROP_HAS_CLOSE_BUTTON:
- nautilus_srm_progress_dialog_set_has_close_button (self, g_value_get_boolean (value));
+ nautilus_wipe_progress_dialog_set_has_close_button (self, g_value_get_boolean (value));
break;
case PROP_AUTO_HIDE_ACTION_AREA:
- nautilus_srm_progress_dialog_set_auto_hide_action_area (self, g_value_get_boolean (value));
+ nautilus_wipe_progress_dialog_set_auto_hide_action_area (self, g_value_get_boolean (value));
break;
default:
@@ -85,28 +85,28 @@ nautilus_srm_progress_dialog_set_property (GObject *obj,
}
static void
-nautilus_srm_progress_dialog_get_property (GObject *obj,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+nautilus_wipe_progress_dialog_get_property (GObject *obj,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- NautilusSrmProgressDialog *self = NAUTILUS_SRM_PROGRESS_DIALOG (obj);
+ NautilusWipeProgressDialog *self = NAUTILUS_WIPE_PROGRESS_DIALOG (obj);
switch (prop_id) {
case PROP_TEXT:
- g_value_set_string (value, nautilus_srm_progress_dialog_get_text (self));
+ g_value_set_string (value, nautilus_wipe_progress_dialog_get_text (self));
break;
case PROP_HAS_CANCEL_BUTTON:
- g_value_set_boolean (value, nautilus_srm_progress_dialog_get_has_cancel_button (self));
+ g_value_set_boolean (value, nautilus_wipe_progress_dialog_get_has_cancel_button (self));
break;
case PROP_HAS_CLOSE_BUTTON:
- g_value_set_boolean (value, nautilus_srm_progress_dialog_get_has_close_button (self));
+ g_value_set_boolean (value, nautilus_wipe_progress_dialog_get_has_close_button (self));
break;
case PROP_AUTO_HIDE_ACTION_AREA:
- g_value_set_boolean (value, nautilus_srm_progress_dialog_get_auto_hide_action_area (self));
+ g_value_set_boolean (value, nautilus_wipe_progress_dialog_get_auto_hide_action_area (self));
break;
default:
@@ -115,10 +115,10 @@ nautilus_srm_progress_dialog_get_property (GObject *obj,
}
static void
-nautilus_srm_progress_dialog_response (GtkDialog *dialog,
- gint response_id)
+nautilus_wipe_progress_dialog_response (GtkDialog *dialog,
+ gint response_id)
{
- NautilusSrmProgressDialog *self = NAUTILUS_SRM_PROGRESS_DIALOG (dialog);
+ NautilusWipeProgressDialog *self = NAUTILUS_WIPE_PROGRESS_DIALOG (dialog);
if (GTK_IS_WIDGET (self->priv->cancel_button)) {
gtk_widget_set_sensitive (self->priv->cancel_button,
@@ -129,14 +129,14 @@ nautilus_srm_progress_dialog_response (GtkDialog *dialog,
self->priv->finished || self->priv->canceled);
}
- if (GTK_DIALOG_CLASS (nautilus_srm_progress_dialog_parent_class)->response) {
- GTK_DIALOG_CLASS (nautilus_srm_progress_dialog_parent_class)->response (dialog, response_id);
+ if (GTK_DIALOG_CLASS (nautilus_wipe_progress_dialog_parent_class)->response) {
+ GTK_DIALOG_CLASS (nautilus_wipe_progress_dialog_parent_class)->response (dialog, response_id);
}
}
static void
-update_action_area_visibility (NautilusSrmProgressDialog *dialog,
- gboolean force_show)
+update_action_area_visibility (NautilusWipeProgressDialog *dialog,
+ gboolean force_show)
{
if (dialog->priv->auto_hide_action_area || force_show) {
GtkWidget *container;
@@ -163,7 +163,7 @@ update_action_area_visibility (NautilusSrmProgressDialog *dialog,
}
static void
-nautilus_srm_progress_dialog_init (NautilusSrmProgressDialog *self)
+nautilus_wipe_progress_dialog_init (NautilusWipeProgressDialog *self)
{
GtkWidget *vbox;
@@ -188,40 +188,40 @@ nautilus_srm_progress_dialog_init (NautilusSrmProgressDialog *self)
}
static void
-nautilus_srm_progress_dialog_finalize (GObject *obj)
+nautilus_wipe_progress_dialog_finalize (GObject *obj)
{
- NautilusSrmProgressDialog *self = NAUTILUS_SRM_PROGRESS_DIALOG (obj);
+ NautilusWipeProgressDialog *self = NAUTILUS_WIPE_PROGRESS_DIALOG (obj);
- G_OBJECT_CLASS (nautilus_srm_progress_dialog_parent_class)->finalize (obj);
+ G_OBJECT_CLASS (nautilus_wipe_progress_dialog_parent_class)->finalize (obj);
}
static gboolean
-nautilus_srm_progress_dialog_delete_event (GtkWidget *widget,
- /* The doc says GdkEvent but it is
- * actually GdkEventAny. Nothing
- * bad as it is a sort of "base
- * class" for all other events.
- * See the doc. */
- GdkEventAny *event)
+nautilus_wipe_progress_dialog_delete_event (GtkWidget *widget,
+ /* The doc says GdkEvent but it is
+ * actually GdkEventAny. Nothing
+ * bad as it is a sort of "base
+ * class" for all other events.
+ * See the doc. */
+ GdkEventAny *event)
{
return TRUE;
}
static void
-nautilus_srm_progress_dialog_class_init (NautilusSrmProgressDialogClass *klass)
+nautilus_wipe_progress_dialog_class_init (NautilusWipeProgressDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkDialogClass *dialog_class = GTK_DIALOG_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- object_class->set_property = nautilus_srm_progress_dialog_set_property;
- object_class->get_property = nautilus_srm_progress_dialog_get_property;
- object_class->finalize = nautilus_srm_progress_dialog_finalize;
- dialog_class->response = nautilus_srm_progress_dialog_response;
+ object_class->set_property = nautilus_wipe_progress_dialog_set_property;
+ object_class->get_property = nautilus_wipe_progress_dialog_get_property;
+ object_class->finalize = nautilus_wipe_progress_dialog_finalize;
+ dialog_class->response = nautilus_wipe_progress_dialog_response;
/* our default handler prevent the dialog to be destroyed if the user tries to
* close the dialog. This doesn't prevent the DELETE_EVENT response to be
* triggered */
- widget_class->delete_event = nautilus_srm_progress_dialog_delete_event;
+ widget_class->delete_event = nautilus_wipe_progress_dialog_delete_event;
g_object_class_install_property (object_class, PROP_TEXT,
g_param_spec_string ("text",
@@ -251,28 +251,28 @@ nautilus_srm_progress_dialog_class_init (NautilusSrmProgressDialogClass *klass)
FALSE,
G_PARAM_READWRITE));
- g_type_class_add_private (klass, sizeof (NautilusSrmProgressDialogPrivate));
+ g_type_class_add_private (klass, sizeof (NautilusWipeProgressDialogPrivate));
}
/**
- * nautilus_srm_progress_dialog_new:
+ * nautilus_wipe_progress_dialog_new:
* @parent: The parent window for the dialog, or %NULL for none
* @flags: Some #GtkDialogFlags or 0
* @format: format for the dialog's text
* @...: printf-like argument for @format.
*
- * Creates a new NautilusSrmProgressDialog.
+ * Creates a new NautilusWipeProgressDialog.
* For the @format and @... arguments, see
- * nautilus_srm_progress_dialog_set_text().
+ * nautilus_wipe_progress_dialog_set_text().
*
* Returns: The newly created dialog.
*/
GtkWidget *
-nautilus_srm_progress_dialog_new (GtkWindow *parent,
- GtkDialogFlags flags,
- const gchar *format,
- ...)
+nautilus_wipe_progress_dialog_new (GtkWindow *parent,
+ GtkDialogFlags flags,
+ const gchar *format,
+ ...)
{
GtkWidget *self;
gchar *text;
@@ -281,7 +281,7 @@ nautilus_srm_progress_dialog_new (GtkWindow *parent,
va_start (ap, format);
text = g_strdup_vprintf (format, ap);
va_end (ap);
- self = g_object_new (NAUTILUS_TYPE_SRM_PROGRESS_DIALOG,
+ self = g_object_new (NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG,
"transient-for", parent,
"has-separator", ! (flags & GTK_DIALOG_NO_SEPARATOR),
"modal", flags & GTK_DIALOG_MODAL,
@@ -289,108 +289,108 @@ nautilus_srm_progress_dialog_new (GtkWindow *parent,
"text", text,
NULL);
g_free (text);
- update_action_area_visibility (NAUTILUS_SRM_PROGRESS_DIALOG (self), FALSE);
+ update_action_area_visibility (NAUTILUS_WIPE_PROGRESS_DIALOG (self), FALSE);
return self;
}
/**
- * nautilus_srm_progress_dialog_set_fraction:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_set_fraction:
+ * @dialog: A #NautilusWipeProgressDialog
* @fraction: The current progression.
*
* See gtk_progress_bar_set_fraction().
*/
void
-nautilus_srm_progress_dialog_set_fraction (NautilusSrmProgressDialog *dialog,
- gdouble fraction)
+nautilus_wipe_progress_dialog_set_fraction (NautilusWipeProgressDialog *dialog,
+ gdouble fraction)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
gtk_progress_bar_set_fraction (dialog->priv->progress, fraction);
}
/**
- * nautilus_srm_progress_dialog_get_fraction:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_get_fraction:
+ * @dialog: A #NautilusWipeProgressDialog
*
* See gtk_progress_bar_get_fraction().
*
* Returns: The current progress of the dialog's progress bar.
*/
gdouble
-nautilus_srm_progress_dialog_get_fraction (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_get_fraction (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), 0.0);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), 0.0);
return gtk_progress_bar_get_fraction (dialog->priv->progress);
}
/**
- * nautilus_srm_progress_dialog_pulse:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_pulse:
+ * @dialog: A #NautilusWipeProgressDialog
*
* See gtk_progress_bar_pulse().
*/
void
-nautilus_srm_progress_dialog_pulse (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_pulse (NautilusWipeProgressDialog *dialog)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
gtk_progress_bar_pulse (dialog->priv->progress);
}
/**
- * nautilus_srm_progress_dialog_set_pulse_step:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_set_pulse_step:
+ * @dialog: A #NautilusWipeProgressDialog
* @fraction: The pulse step of the dialog's progress bar.
*
* See gtk_progress_bar_set_pulse_step().
*/
void
-nautilus_srm_progress_dialog_set_pulse_step (NautilusSrmProgressDialog *dialog,
- gdouble fraction)
+nautilus_wipe_progress_dialog_set_pulse_step (NautilusWipeProgressDialog *dialog,
+ gdouble fraction)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
gtk_progress_bar_set_pulse_step (dialog->priv->progress, fraction);
}
/**
- * nautilus_srm_progress_dialog_get_pulse_step:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_get_pulse_step:
+ * @dialog: A #NautilusWipeProgressDialog
*
* See gtk_progress_bar_get_pulse_step().
*
* Returns: The progress step of the dialog's progress bar.
*/
gdouble
-nautilus_srm_progress_dialog_get_pulse_step (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_get_pulse_step (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), 0.0);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), 0.0);
return gtk_progress_bar_get_pulse_step (dialog->priv->progress);
}
/**
- * nautilus_srm_progress_dialog_set_progress_text:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_set_progress_text:
+ * @dialog: A #NautilusWipeProgressDialog
* @format: Text format (printf-like)
* @...: Arguments for @format
*
* Sets the progress text. For details about @format and @..., see the
* documentation of g_strdup_printf().
- * Don't mistake this function for nautilus_srm_progress_dialog_set_text().
+ * Don't mistake this function for nautilus_wipe_progress_dialog_set_text().
*/
void
-nautilus_srm_progress_dialog_set_progress_text (NautilusSrmProgressDialog *dialog,
- const gchar *format,
- ...)
+nautilus_wipe_progress_dialog_set_progress_text (NautilusWipeProgressDialog *dialog,
+ const gchar *format,
+ ...)
{
gchar *text;
va_list ap;
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
va_start (ap, format);
text = g_strdup_vprintf (format, ap);
@@ -400,43 +400,43 @@ nautilus_srm_progress_dialog_set_progress_text (NautilusSrmProgressDialog *dialo
}
/**
- * nautilus_srm_progress_dialog_get_progress_text:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_get_progress_text:
+ * @dialog: A #NautilusWipeProgressDialog
*
* Gets the current progress text of @dialog. Don't mistake for
- * nautilus_srm_progress_dialog_get_text().
+ * nautilus_wipe_progress_dialog_get_text().
*
* Returns: The progress text of the dialog.
*/
const gchar *
-nautilus_srm_progress_dialog_get_progress_text (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_get_progress_text (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), NULL);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), NULL);
return gtk_progress_bar_get_text (dialog->priv->progress);
}
/**
- * nautilus_srm_progress_dialog_set_text:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_set_text:
+ * @dialog: A #NautilusWipeProgressDialog
* @format: Text format (printf-like)
* @...: Arguments for @format
*
* Sets the dialog's text. For details about @format and @..., see the
* documentation of g_strdup_printf().
* Don't mistake this function for
- * nautilus_srm_progress_dialog_set_progress_text() that do the same but for the
+ * nautilus_wipe_progress_dialog_set_progress_text() that do the same but for the
* progress text instead of the dialog's main text.
*/
void
-nautilus_srm_progress_dialog_set_text (NautilusSrmProgressDialog *dialog,
- const gchar *format,
- ...)
+nautilus_wipe_progress_dialog_set_text (NautilusWipeProgressDialog *dialog,
+ const gchar *format,
+ ...)
{
gchar *text;
va_list ap;
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
va_start (ap, format);
text = g_strdup_vprintf (format, ap);
@@ -446,26 +446,26 @@ nautilus_srm_progress_dialog_set_text (NautilusSrmProgressDialog *dialog,
}
/**
- * nautilus_srm_progress_dialog_get_text:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_get_text:
+ * @dialog: A #NautilusWipeProgressDialog
*
* Gets the text message of the dialog. Don't mistake this function for
- * nautilus_srm_progress_dialog_get_progress_text().
+ * nautilus_wipe_progress_dialog_get_progress_text().
*
* Returns: The text of @dialog.
*/
const gchar *
-nautilus_srm_progress_dialog_get_text (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_get_text (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), NULL);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), NULL);
return gtk_label_get_text (dialog->priv->label);
}
void
-nautilus_srm_progress_dialog_cancel (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_cancel (NautilusWipeProgressDialog *dialog)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
if (! dialog->priv->canceled) {
dialog->priv->canceled = TRUE;
@@ -476,57 +476,57 @@ nautilus_srm_progress_dialog_cancel (NautilusSrmProgressDialog *dialog)
}
gboolean
-nautilus_srm_progress_dialog_is_canceled (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_is_canceled (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), FALSE);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), FALSE);
return dialog->priv->canceled;
}
/**
- * nautilus_srm_progress_dialog_finish:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_finish:
+ * @dialog: A #NautilusWipeProgressDialog
* @success: Whether the operation finished successfully or not
*
*
*/
void
-nautilus_srm_progress_dialog_finish (NautilusSrmProgressDialog *dialog,
- gboolean success)
+nautilus_wipe_progress_dialog_finish (NautilusWipeProgressDialog *dialog,
+ gboolean success)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
dialog->priv->finished = TRUE;
if (success) {
/* ensure the progression is shown completed */
- nautilus_srm_progress_dialog_set_fraction (dialog, 1.0);
+ nautilus_wipe_progress_dialog_set_fraction (dialog, 1.0);
}
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL,
FALSE);
gtk_dialog_response (GTK_DIALOG (dialog),
- NAUTILUS_SRM_PROGRESS_DIALOG_RESPONSE_COMPLETE);
+ NAUTILUS_WIPE_PROGRESS_DIALOG_RESPONSE_COMPLETE);
}
/**
- * nautilus_srm_progress_dialog_is_finished:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_is_finished:
+ * @dialog: A #NautilusWipeProgressDialog
*
* Gets whether the operation that @dialog displays is finished or not.
- * This is set by nautilus_srm_progress_dialog_finish().
+ * This is set by nautilus_wipe_progress_dialog_finish().
*
* Returns: Whether the operation displayed by @dialog is finished or not.
*/
gboolean
-nautilus_srm_progress_dialog_is_finished (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_is_finished (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), FALSE);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), FALSE);
return dialog->priv->finished;
}
/**
- * nautilus_srm_progress_dialog_set_has_close_button:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_set_has_close_button:
+ * @dialog: A #NautilusWipeProgressDialog
* @has_close_button: Whether the dialog should have a close button.
*
* Sets whether the dialog has a close button. Enabling close button at the
@@ -535,10 +535,10 @@ nautilus_srm_progress_dialog_is_finished (NautilusSrmProgressDialog *dialog)
* either finished or canceled).
*/
void
-nautilus_srm_progress_dialog_set_has_close_button (NautilusSrmProgressDialog *dialog,
- gboolean has_close_button)
+nautilus_wipe_progress_dialog_set_has_close_button (NautilusWipeProgressDialog *dialog,
+ gboolean has_close_button)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
if (has_close_button != (dialog->priv->close_button != NULL)) {
if (has_close_button) {
@@ -556,22 +556,22 @@ nautilus_srm_progress_dialog_set_has_close_button (NautilusSrmProgressDialog *di
}
/**
- * nautilus_srm_progress_dialog_get_has_close_button:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_get_has_close_button:
+ * @dialog: A #NautilusWipeProgressDialog
*
* Returns: Whether @dialog has a close button or not.
*/
gboolean
-nautilus_srm_progress_dialog_get_has_close_button (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_get_has_close_button (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), FALSE);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), FALSE);
return dialog->priv->close_button != NULL;
}
/**
- * nautilus_srm_progress_dialog_set_has_cancel_button:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_set_has_cancel_button:
+ * @dialog: A #NautilusWipeProgressDialog
* @has_cancel_button: Whether the dialog should have a cancel button.
*
* Sets whether the dialog has a cancel button. Enabling cancel button at the
@@ -580,10 +580,10 @@ nautilus_srm_progress_dialog_get_has_close_button (NautilusSrmProgressDialog *di
* neither finished nor canceled).
*/
void
-nautilus_srm_progress_dialog_set_has_cancel_button (NautilusSrmProgressDialog *dialog,
- gboolean has_cancel_button)
+nautilus_wipe_progress_dialog_set_has_cancel_button (NautilusWipeProgressDialog *dialog,
+ gboolean has_cancel_button)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
if (has_cancel_button != (dialog->priv->cancel_button != NULL)) {
if (has_cancel_button) {
@@ -601,24 +601,24 @@ nautilus_srm_progress_dialog_set_has_cancel_button (NautilusSrmProgressDialog *d
}
/**
- * nautilus_srm_progress_dialog_get_has_cancel_button:
- * @dialog: A #NautilusSrmProgressDialog
+ * nautilus_wipe_progress_dialog_get_has_cancel_button:
+ * @dialog: A #NautilusWipeProgressDialog
*
* Returns: Whether @dialog has a cancel button.
*/
gboolean
-nautilus_srm_progress_dialog_get_has_cancel_button (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_get_has_cancel_button (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), FALSE);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), FALSE);
return dialog->priv->cancel_button != NULL;
}
void
-nautilus_srm_progress_dialog_set_auto_hide_action_area (NautilusSrmProgressDialog *dialog,
- gboolean auto_hide)
+nautilus_wipe_progress_dialog_set_auto_hide_action_area (NautilusWipeProgressDialog *dialog,
+ gboolean auto_hide)
{
- g_return_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog));
+ g_return_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog));
if (auto_hide != dialog->priv->auto_hide_action_area) {
dialog->priv->auto_hide_action_area = auto_hide;
@@ -627,9 +627,9 @@ nautilus_srm_progress_dialog_set_auto_hide_action_area (NautilusSrmProgressDialo
}
gboolean
-nautilus_srm_progress_dialog_get_auto_hide_action_area (NautilusSrmProgressDialog *dialog)
+nautilus_wipe_progress_dialog_get_auto_hide_action_area (NautilusWipeProgressDialog *dialog)
{
- g_return_val_if_fail (NAUTILUS_IS_SRM_PROGRESS_DIALOG (dialog), FALSE);
+ g_return_val_if_fail (NAUTILUS_IS_WIPE_PROGRESS_DIALOG (dialog), FALSE);
return dialog->priv->auto_hide_action_area;
}
diff --git a/nautilus-wipe/progress-dialog.h b/nautilus-wipe/progress-dialog.h
new file mode 100644
index 0000000..d34e57a
--- /dev/null
+++ b/nautilus-wipe/progress-dialog.h
@@ -0,0 +1,96 @@
+/*
+ * nautilus-wipe - a nautilus extension to wipe file(s)
+ *
+ * Copyright (C) 2009-2011 Colomban Wendling <ban at herbesfolles.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifndef NAUTILUS_WIPE_PROGRESS_DIALOG_H
+#define NAUTILUS_WIPE_PROGRESS_DIALOG_H
+
+#include <stdarg.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+
+
+G_BEGIN_DECLS
+
+
+#define NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG (nautilus_wipe_progress_dialog_get_type ())
+#define NAUTILUS_WIPE_PROGRESS_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG, NautilusWipeProgressDialog))
+#define NAUTILUS_WIPE_PROGRESS_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG, NautilusWipeProgressDialogClass))
+#define NAUTILUS_IS_WIPE_PROGRESS_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG))
+#define NAUTILUS_IS_WIPE_PROGRESS_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG))
+#define NAUTILUS_WIPE_PROGRESS_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG, NautilusWipeProgressDialogClass))
+
+typedef struct _NautilusWipeProgressDialog NautilusWipeProgressDialog;
+typedef struct _NautilusWipeProgressDialogClass NautilusWipeProgressDialogClass;
+typedef struct _NautilusWipeProgressDialogPrivate NautilusWipeProgressDialogPrivate;
+
+struct _NautilusWipeProgressDialog {
+ GtkDialog parent_instance;
+ NautilusWipeProgressDialogPrivate *priv;
+};
+
+struct _NautilusWipeProgressDialogClass {
+ GtkDialogClass parent_class;
+};
+
+#define NAUTILUS_WIPE_PROGRESS_DIALOG_RESPONSE_COMPLETE 1
+
+
+GType nautilus_wipe_progress_dialog_get_type (void) G_GNUC_CONST;
+
+GtkWidget *nautilus_wipe_progress_dialog_new (GtkWindow *parent,
+ GtkDialogFlags flags,
+ const gchar *format,
+ ...);
+void nautilus_wipe_progress_dialog_set_fraction (NautilusWipeProgressDialog *dialog,
+ gdouble fraction);
+gdouble nautilus_wipe_progress_dialog_get_fraction (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_pulse (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_set_pulse_step (NautilusWipeProgressDialog *dialog,
+ gdouble fraction);
+gdouble nautilus_wipe_progress_dialog_get_pulse_step (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_set_progress_text (NautilusWipeProgressDialog *dialog,
+ const gchar *format,
+ ...);
+const gchar *nautilus_wipe_progress_dialog_get_progress_text (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_set_text (NautilusWipeProgressDialog *dialog,
+ const gchar *format,
+ ...);
+const gchar *nautilus_wipe_progress_dialog_get_text (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_cancel (NautilusWipeProgressDialog *dialog);
+gboolean nautilus_wipe_progress_dialog_is_canceled (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_finish (NautilusWipeProgressDialog *dialog,
+ gboolean success);
+gboolean nautilus_wipe_progress_dialog_is_finished (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_set_has_close_button (NautilusWipeProgressDialog *dialog,
+ gboolean has_close_button);
+gboolean nautilus_wipe_progress_dialog_get_has_close_button (NautilusWipeProgressDialog *dialog);
+void nautilus_wipe_progress_dialog_set_has_cancel_button (NautilusWipeProgressDialog *dialog,
+ gboolean has_close_button);
+gboolean nautilus_wipe_progress_dialog_get_has_cancel_button (NautilusWipeProgressDialog *dialog);
+
+void nautilus_wipe_progress_dialog_set_auto_hide_action_area (NautilusWipeProgressDialog *dialog,
+ gboolean auto_hide);
+gboolean nautilus_wipe_progress_dialog_get_auto_hide_action_area (NautilusWipeProgressDialog *dialog);
+
+
+G_END_DECLS
+
+#endif /* guard */
diff --git a/nautilus-srm/test.c b/nautilus-wipe/test.c
similarity index 53%
rename from nautilus-srm/test.c
rename to nautilus-wipe/test.c
index 29e7104..e6221fd 100644
--- a/nautilus-srm/test.c
+++ b/nautilus-wipe/test.c
@@ -9,13 +9,13 @@ static gdouble fraction = 0.0;
static gboolean
progress (gpointer data)
{
- NautilusSrmProgressDialog *dialog = NAUTILUS_SRM_PROGRESS_DIALOG (data);
+ NautilusWipeProgressDialog *dialog = NAUTILUS_WIPE_PROGRESS_DIALOG (data);
/*fraction = fraction >= (1.0 - STEP) ? 0.0 : fraction + STEP;*/
fraction += STEP;
if (fraction >= 1.0) {
- nautilus_srm_progress_dialog_finish (dialog, TRUE);
+ nautilus_wipe_progress_dialog_finish (dialog, TRUE);
} else {
static const gchar *texts[10] = {
"Checking input data integrity",
@@ -30,12 +30,12 @@ progress (gpointer data)
"Checking output integrity"
};
- nautilus_srm_progress_dialog_set_fraction (dialog, fraction);
- nautilus_srm_progress_dialog_set_progress_text (dialog, "%s", texts[(gint)(fraction * 10)]);
+ nautilus_wipe_progress_dialog_set_fraction (dialog, fraction);
+ nautilus_wipe_progress_dialog_set_progress_text (dialog, "%s", texts[(gint)(fraction * 10)]);
}
- return ! nautilus_srm_progress_dialog_is_canceled (dialog) &&
- ! nautilus_srm_progress_dialog_is_finished (dialog);
+ return ! nautilus_wipe_progress_dialog_is_canceled (dialog) &&
+ ! nautilus_wipe_progress_dialog_is_finished (dialog);
}
static void
@@ -52,12 +52,12 @@ response_handler (GtkDialog *dialog,
break;
case GTK_RESPONSE_DELETE_EVENT:
- nautilus_srm_progress_dialog_set_has_close_button (NAUTILUS_SRM_PROGRESS_DIALOG (dialog),
- ! nautilus_srm_progress_dialog_get_has_close_button (NAUTILUS_SRM_PROGRESS_DIALOG (dialog)));
+ nautilus_wipe_progress_dialog_set_has_close_button (NAUTILUS_WIPE_PROGRESS_DIALOG (dialog),
+ ! nautilus_wipe_progress_dialog_get_has_close_button (NAUTILUS_WIPE_PROGRESS_DIALOG (dialog)));
break;
- case NAUTILUS_SRM_PROGRESS_DIALOG_RESPONSE_COMPLETE:
- nautilus_srm_progress_dialog_set_progress_text (NAUTILUS_SRM_PROGRESS_DIALOG (dialog), "Done!");
+ case NAUTILUS_WIPE_PROGRESS_DIALOG_RESPONSE_COMPLETE:
+ nautilus_wipe_progress_dialog_set_progress_text (NAUTILUS_WIPE_PROGRESS_DIALOG (dialog), "Done!");
break;
}
}
@@ -70,9 +70,9 @@ main (int argc,
gtk_init (&argc, &argv);
- dialog = nautilus_srm_progress_dialog_new (NULL, 0, "Progress...");
- /*nautilus_srm_progress_dialog_set_has_cancel_button (NAUTILUS_SRM_PROGRESS_DIALOG (dialog), TRUE);*/
- /*nautilus_srm_progress_dialog_set_has_close_button (NAUTILUS_SRM_PROGRESS_DIALOG (dialog), TRUE);*/
+ dialog = nautilus_wipe_progress_dialog_new (NULL, 0, "Progress...");
+ /*nautilus_wipe_progress_dialog_set_has_cancel_button (NAUTILUS_WIPE_PROGRESS_DIALOG (dialog), TRUE);*/
+ /*nautilus_wipe_progress_dialog_set_has_close_button (NAUTILUS_WIPE_PROGRESS_DIALOG (dialog), TRUE);*/
g_signal_connect (dialog, "response", G_CALLBACK (response_handler), NULL);
gtk_widget_show (GTK_WIDGET (dialog));
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 92823d6..dd396f6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,5 @@
# List of source files which contain translatable strings.
-nautilus-srm/delete-operation.c
-nautilus-srm/fill-operation.c
-nautilus-srm/nautilus-srm.c
-nautilus-srm/operation-manager.c
+nautilus-wipe/delete-operation.c
+nautilus-wipe/fill-operation.c
+nautilus-wipe/nautilus-wipe.c
+nautilus-wipe/operation-manager.c
diff --git a/po/fr.po b/po/fr.po
index 9f79d5e..8dd3abd 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,11 +1,11 @@
-# French translations for nautilus-srm package
-# Traductions françaises du paquet nautilus-srm.
+# French translations for nautilus-wipe package
+# Traductions françaises du paquet nautilus-wipe.
# Copyright (C) 2010-2011 Colomban Wendling <ban at herbesfolles.org>
-# This file is distributed under the same license as the nautilus-srm package.
+# This file is distributed under the same license as the nautilus-wipe package.
# Colomban Wendling <ban at herbesfolles.org>, 2010.
msgid ""
msgstr ""
-"Project-Id-Version: nautilus-srm 0.1\n"
+"Project-Id-Version: nautilus-wipe 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-26 23:16+0200\n"
"PO-Revision-Date: 2011-04-26 23:25+0200\n"
@@ -17,97 +17,97 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: ../nautilus-srm/delete-operation.c:88
+#: ../nautilus-wipe/delete-operation.c:88
#, c-format
msgid "Nothing to do!"
msgstr "Rien à faire !"
-#: ../nautilus-srm/fill-operation.c:119
+#: ../nautilus-wipe/fill-operation.c:119
#, c-format
msgid "Mount \"%s\" is not local"
msgstr "Le montage « %s » n'est pas local"
-#: ../nautilus-srm/fill-operation.c:135
+#: ../nautilus-wipe/fill-operation.c:135
#, c-format
msgid "No mount point found for path \"%s\""
msgstr "Aucun point de montage trouvé pour le chemin « %s »"
-#: ../nautilus-srm/nautilus-srm.c:361
+#: ../nautilus-wipe/nautilus-wipe.c:361
msgid "Wipe"
msgstr "Écraser"
-#: ../nautilus-srm/nautilus-srm.c:362
+#: ../nautilus-wipe/nautilus-wipe.c:362
msgid "Delete each selected item and overwrite its data"
msgstr "Supprime chaque élément sélectionné et écraser son contenu"
-#: ../nautilus-srm/nautilus-srm.c:394
+#: ../nautilus-wipe/nautilus-wipe.c:394
#, c-format
msgid "File filtering failed: %s"
msgstr "Le filtrage des fichiers a échoué : %s"
-#: ../nautilus-srm/nautilus-srm.c:398
+#: ../nautilus-wipe/nautilus-wipe.c:398
msgid "Wipe available diskspace"
msgstr "Écraser l'espace disque disponible"
-#: ../nautilus-srm/nautilus-srm.c:399
+#: ../nautilus-wipe/nautilus-wipe.c:399
msgid "Overwrite available diskspace in this device(s)"
msgstr ""
"Écrase l'espace disque disponible sur le(s) périphérique(s) sélectionné(s)"
-#: ../nautilus-srm/nautilus-srm.c:478
+#: ../nautilus-wipe/nautilus-wipe.c:478
#, c-format
msgid "Are you sure you want to wipe the %u selected items?"
msgstr "Êtes-vous sûr de vouloir écraser les %u éléments sélectionnés ?"
-#: ../nautilus-srm/nautilus-srm.c:484
+#: ../nautilus-wipe/nautilus-wipe.c:484
#, c-format
msgid "Are you sure you want to wipe \"%s\"?"
msgstr "Êtes-vous sûr de vouloir écraser « %s » ?"
-#: ../nautilus-srm/nautilus-srm.c:493
+#: ../nautilus-wipe/nautilus-wipe.c:493
msgid "If you wipe an item, it will not be recoverable."
msgstr "Si vous écrasez un élément, il ne pourra plus être récupéré."
-#: ../nautilus-srm/nautilus-srm.c:494
+#: ../nautilus-wipe/nautilus-wipe.c:494
msgid "_Wipe"
msgstr "Éc_raser"
#. progress dialog
-#: ../nautilus-srm/nautilus-srm.c:497
+#: ../nautilus-wipe/nautilus-wipe.c:497
msgid "Wiping files..."
msgstr "Écrasement des fichiers…"
#. failed dialog
-#: ../nautilus-srm/nautilus-srm.c:501
+#: ../nautilus-wipe/nautilus-wipe.c:501
msgid "Wipe failed."
msgstr "L'écrasement a échoué."
#. success dialog
-#: ../nautilus-srm/nautilus-srm.c:503
+#: ../nautilus-wipe/nautilus-wipe.c:503
msgid "Wipe successful."
msgstr "L'écrasement a réussi."
-#: ../nautilus-srm/nautilus-srm.c:504
+#: ../nautilus-wipe/nautilus-wipe.c:504
msgid "Item(s) have been successfully wiped."
msgstr "Le(s) élément(s) ont été écrasé(s) avec succès."
#. TRANSLATORS: this is the last device names separator
-#: ../nautilus-srm/nautilus-srm.c:532
+#: ../nautilus-wipe/nautilus-wipe.c:532
msgid " and "
msgstr " et "
#. TRANSLATORS: this is the device names separator (except last)
-#: ../nautilus-srm/nautilus-srm.c:535
+#: ../nautilus-wipe/nautilus-wipe.c:535
msgid ", "
msgstr ", "
#. TRANSLATORS: this is the device name
-#: ../nautilus-srm/nautilus-srm.c:539
+#: ../nautilus-wipe/nautilus-wipe.c:539
#, c-format
msgid "\"%s\""
msgstr "« %s »"
-#: ../nautilus-srm/nautilus-srm.c:542
+#: ../nautilus-wipe/nautilus-wipe.c:542
#, c-format
msgid ""
"Are you sure you want to wipe the available diskspace on the %s partitions "
@@ -116,7 +116,7 @@ msgstr ""
"Êtes-vous sûr de vouloir écraser l'espace disque libre sur les partitions ou "
"périphériques %s ?"
-#: ../nautilus-srm/nautilus-srm.c:546
+#: ../nautilus-wipe/nautilus-wipe.c:546
#, c-format
msgid ""
"Available diskspace on the partitions or devices %s have been successfully "
@@ -125,7 +125,7 @@ msgstr ""
"L'espace disque disponible sur les partitions ou périphériques %s a été "
"écrasé avec succès."
-#: ../nautilus-srm/nautilus-srm.c:555
+#: ../nautilus-wipe/nautilus-wipe.c:555
#, c-format
msgid ""
"Are you sure you want to wipe the available diskspace on the \"%s\" "
@@ -134,7 +134,7 @@ msgstr ""
"Êtes-vous sûr de vouloir écraser l'espace disque disponible sur la partition "
"ou le périphérique « %s » ?"
-#: ../nautilus-srm/nautilus-srm.c:559
+#: ../nautilus-wipe/nautilus-wipe.c:559
#, c-format
msgid ""
"Available diskspace on the partition or device \"%s\" have been successfully "
@@ -143,88 +143,88 @@ msgstr ""
"L'espace disque disponible sur la partition ou le périphérique « %s » a été "
"écrasé avec succès."
-#: ../nautilus-srm/nautilus-srm.c:569
+#: ../nautilus-wipe/nautilus-wipe.c:569
msgid "This operation may take a while."
msgstr "Cette opération peut prendre du temps."
-#: ../nautilus-srm/nautilus-srm.c:570
+#: ../nautilus-wipe/nautilus-wipe.c:570
msgid "_Wipe available diskspace"
msgstr "Éc_raser l'espace disque disponible"
#. progress dialog
-#: ../nautilus-srm/nautilus-srm.c:573
+#: ../nautilus-wipe/nautilus-wipe.c:573
msgid "Wiping available diskspace..."
msgstr "Écrasement de l'espace disque disponible…"
#. failed dialog
-#: ../nautilus-srm/nautilus-srm.c:577
+#: ../nautilus-wipe/nautilus-wipe.c:577
msgid "Wipe failed"
msgstr "L'écrasement a échoué"
#. success dialog
-#: ../nautilus-srm/nautilus-srm.c:579
+#: ../nautilus-wipe/nautilus-wipe.c:579
msgid "Wipe successful"
msgstr "L'écrasement a réussi"
-#: ../nautilus-srm/operation-manager.c:205
+#: ../nautilus-wipe/operation-manager.c:205
msgid "_Details"
msgstr "_Détails"
-#: ../nautilus-srm/operation-manager.c:294
+#: ../nautilus-wipe/operation-manager.c:294
msgid "Failed to open help"
msgstr "Impossible d'ouvrir l'aide"
-#: ../nautilus-srm/operation-manager.c:367
+#: ../nautilus-wipe/operation-manager.c:367
msgid "_Options"
msgstr "_Options"
-#: ../nautilus-srm/operation-manager.c:381
+#: ../nautilus-wipe/operation-manager.c:381
msgid "Number of _passes:"
msgstr "Nombre de _passes :"
-#: ../nautilus-srm/operation-manager.c:416
+#: ../nautilus-wipe/operation-manager.c:416
msgid "(Gutmann method for old disks)"
msgstr "(méthode de Gutmann pour les vieux disques)"
-#: ../nautilus-srm/operation-manager.c:418
+#: ../nautilus-wipe/operation-manager.c:418
msgid "(advised for modern hard disks)"
msgstr "(méthode recommandée pour les disques actuels)"
-#: ../nautilus-srm/operation-manager.c:420
+#: ../nautilus-wipe/operation-manager.c:420
msgid "(only protects against software attacks)"
msgstr "(protège seulement des attaques logicielles)"
-#: ../nautilus-srm/operation-manager.c:433
+#: ../nautilus-wipe/operation-manager.c:433
msgid "_Fast and insecure mode (no /dev/urandom, no synchronize mode)"
msgstr ""
"_Mode rapide et peu sûr (pas de /dev/urandom, pas de mode de synchronisation)"
-#: ../nautilus-srm/operation-manager.c:445
+#: ../nautilus-wipe/operation-manager.c:445
msgid "Last pass with _zeros instead of random data"
msgstr "Dernière passe avec des _zéros à la place de données aléatoires"
-#: ../nautilus-srm/operation-manager.c:472
+#: ../nautilus-wipe/operation-manager.c:472
msgid "Are you sure you want to cancel this operation?"
msgstr "Êtes-vous sûr de vouloir annuler cette opération ?"
-#: ../nautilus-srm/operation-manager.c:473
+#: ../nautilus-wipe/operation-manager.c:473
msgid ""
"Canceling this operation might leave some item(s) in an intermediate state."
msgstr ""
"Annuler cette opération peut laisser certains éléments dans un état "
"intermédiaire."
-#: ../nautilus-srm/operation-manager.c:475
+#: ../nautilus-wipe/operation-manager.c:475
msgid "Resume operation"
msgstr "Reprendre l'opération"
-#: ../nautilus-srm/operation-manager.c:476
+#: ../nautilus-wipe/operation-manager.c:476
msgid "Cancel operation"
msgstr "Annuler l'opération"
#. Merge the error message with our. Pretty much a hack, but should be
#. * correct and more precise.
-#: ../nautilus-srm/operation-manager.c:554
+#: ../nautilus-wipe/operation-manager.c:554
#, c-format
msgid ""
"%s. Please make sure you have the secure-delete package properly installed "
--
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