[Pkg-privacy-commits] [nautilus-wipe] 157/224: Remove outdated and unportable ProgressDialog test file

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 3c7ded9df84b367087d5b1e9fce524b50cad8f80
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Wed May 16 16:25:13 2012 +0200

    Remove outdated and unportable ProgressDialog test file
---
 nautilus-wipe/Makefile.am | 12 -------
 nautilus-wipe/test.c      | 84 -----------------------------------------------
 2 files changed, 96 deletions(-)

diff --git a/nautilus-wipe/Makefile.am b/nautilus-wipe/Makefile.am
index 32ece52..b7bdc48 100644
--- a/nautilus-wipe/Makefile.am
+++ b/nautilus-wipe/Makefile.am
@@ -2,8 +2,6 @@ nautilus_extensiondir = $(NAUTILUS_EXTENSIONS_DIR)
 
 nautilus_extension_LTLIBRARIES = libnautilus-wipe.la
 
-noinst_PROGRAMS = test
-
 localedir = $(datadir)/locale
 
 libnautilus_wipe_la_SOURCES  = nautilus-wipe.c \
@@ -32,13 +30,3 @@ libnautilus_wipe_la_LDFLAGS  = -module -avoid-version \
                                @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-wipe/test.c b/nautilus-wipe/test.c
deleted file mode 100644
index e6221fd..0000000
--- a/nautilus-wipe/test.c
+++ /dev/null
@@ -1,84 +0,0 @@
-
-#include <gtk/gtk.h>
-#include "progress-dialog.h"
-
-#define STEP 0.001
-
-static gdouble fraction = 0.0;
-
-static gboolean
-progress (gpointer data)
-{
-  NautilusWipeProgressDialog *dialog = NAUTILUS_WIPE_PROGRESS_DIALOG (data);
-  
-  /*fraction = fraction >= (1.0 - STEP) ? 0.0 : fraction + STEP;*/
-  fraction += STEP;
-  
-  if (fraction >= 1.0) {
-    nautilus_wipe_progress_dialog_finish (dialog, TRUE);
-  } else {
-    static const gchar *texts[10] = {
-      "Checking input data integrity",
-      "Preparing environment",
-      "Setting up operation",
-      "Listing files",
-      "Deleting files",
-      "Deleting directories",
-      "Cleaning operation",
-      "Cleaning environment",
-      "Flushing data",
-      "Checking output integrity"
-    };
-    
-    nautilus_wipe_progress_dialog_set_fraction (dialog, fraction);
-    nautilus_wipe_progress_dialog_set_progress_text (dialog, "%s", texts[(gint)(fraction * 10)]);
-  }
-  
-  return ! nautilus_wipe_progress_dialog_is_canceled (dialog) &&
-         ! nautilus_wipe_progress_dialog_is_finished (dialog);
-}
-
-static void
-response_handler (GtkDialog *dialog,
-                  gint       response_id,
-                  gpointer   data)
-{
-  g_debug ("I got response %d", response_id);
-  
-  switch (response_id) {
-    case GTK_RESPONSE_CANCEL:
-    case GTK_RESPONSE_CLOSE:
-      gtk_main_quit ();
-      break;
-    
-    case GTK_RESPONSE_DELETE_EVENT:
-      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_WIPE_PROGRESS_DIALOG_RESPONSE_COMPLETE:
-      nautilus_wipe_progress_dialog_set_progress_text (NAUTILUS_WIPE_PROGRESS_DIALOG (dialog), "Done!");
-      break;
-  }
-}
-
-int
-main (int     argc,
-      char  **argv)
-{
-  GtkWidget *dialog;
-  
-  gtk_init (&argc, &argv);
-  
-  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));
-  
-  g_timeout_add (20, progress, dialog);
-  gtk_main ();
-  
-  return 0;
-}
-

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