[Pkg-privacy-commits] [nautilus-wipe] 159/224: Move Nautilus extension methods to extension.c

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 19:45:45 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 19a5663fafd6bc1ef7fd941185edda0079dd8aee
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Wed May 16 18:56:21 2012 +0200

    Move Nautilus extension methods to extension.c
---
 nautilus-wipe/Makefile.am     |  3 ++-
 nautilus-wipe/extension.c     | 59 +++++++++++++++++++++++++++++++++++++++++++
 nautilus-wipe/nautilus-wipe.c | 32 -----------------------
 3 files changed, 61 insertions(+), 33 deletions(-)

diff --git a/nautilus-wipe/Makefile.am b/nautilus-wipe/Makefile.am
index a9e3188..97048cc 100644
--- a/nautilus-wipe/Makefile.am
+++ b/nautilus-wipe/Makefile.am
@@ -4,7 +4,8 @@ nautilus_extension_LTLIBRARIES = libnautilus-wipe.la
 
 localedir = $(datadir)/locale
 
-libnautilus_wipe_la_SOURCES  = nautilus-wipe.c \
+libnautilus_wipe_la_SOURCES  = extension.c \
+                               nautilus-wipe.c \
                                nautilus-wipe.h \
                                operation-manager.c \
                                operation-manager.h \
diff --git a/nautilus-wipe/extension.c b/nautilus-wipe/extension.c
new file mode 100644
index 0000000..a658dff
--- /dev/null
+++ b/nautilus-wipe/extension.c
@@ -0,0 +1,59 @@
+/*
+ *  nautilus-wipe - a nautilus extension to wipe file(s)
+ * 
+ *  Copyright (C) 2009-2012 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.
+ *
+ */
+
+/* Nautilus extension */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "nautilus-wipe.h"
+
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#include <glib-object.h>
+
+
+static GType provider_types[1];
+
+/* initialization */
+void
+nautilus_module_initialize (GTypeModule *module)
+{
+  g_message ("Initializing");
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  provider_types[0] = nautilus_wipe_register_type (module);
+}
+
+/* extension points types registration */
+void
+nautilus_module_list_types (const GType **types,
+                            int          *num_types)
+{
+  *types = provider_types;
+  *num_types = G_N_ELEMENTS (provider_types);
+}
+
+/* cleanup */
+void
+nautilus_module_shutdown (void)
+{
+}
diff --git a/nautilus-wipe/nautilus-wipe.c b/nautilus-wipe/nautilus-wipe.c
index 5bff93e..25adc6f 100644
--- a/nautilus-wipe/nautilus-wipe.c
+++ b/nautilus-wipe/nautilus-wipe.c
@@ -43,8 +43,6 @@
 #include "type-utils.h"
 
 
-static GType provider_types[1];
-
 /* private prototypes */
 static GList *nautilus_wipe_get_file_items            (NautilusMenuProvider *provider,
                                                        GtkWidget            *window,
@@ -54,37 +52,7 @@ static GList *nautilus_wipe_get_background_items      (NautilusMenuProvider *pro
                                                        NautilusFileInfo     *current_folder);
 static void   nautilus_wipe_menu_provider_iface_init  (NautilusMenuProviderIface *iface);
 
-/*=== Nautilus interface functions ===*/
-
-/* Initialize our extension */
-void
-nautilus_module_initialize (GTypeModule *module)
-{
-  g_message ("Initializing");
-  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-  provider_types[0] = nautilus_wipe_register_type (module);
-}
-
-/* The next function returns the type of object Nautilus needs to create for your extension. */
-
-void
-nautilus_module_list_types (const GType **types,
-                            int          *num_types)
-{
-  *types = provider_types;
-  *num_types = G_N_ELEMENTS (provider_types);
-}
-
-/*Then comes the function that handles any tasks required to shut the Extension down cleanly.*/
-
-void
-nautilus_module_shutdown (void)
-{
-  /* Any module-specific shutdown code*/
-}
-
 
-/*=== Type registration ===*/
 
 GQuark
 nautilus_wipe_error_quark (void)

-- 
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