aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/tools/evolution-addressbook-abuse.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-11-03 20:06:34 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-11-03 20:06:34 +0800
commit8228c1b611c46ccc6b8069b1e9a9f442f468e342 (patch)
treecfd51f80c77766f7567e36c5d82f7c96e013f862 /addressbook/tools/evolution-addressbook-abuse.c
parentebf5dd871742c383a01331c4fdb64a1b5d51d33c (diff)
downloadgsoc2013-evolution-8228c1b611c46ccc6b8069b1e9a9f442f468e342.tar.gz
gsoc2013-evolution-8228c1b611c46ccc6b8069b1e9a9f442f468e342.tar.zst
gsoc2013-evolution-8228c1b611c46ccc6b8069b1e9a9f442f468e342.zip
** Remove dead files from source control. The dates below indicate when
2007-11-03 Matthew Barnes <mbarnes@redhat.com> ** Remove dead files from source control. The dates below indicate when the file was removed from Makefile.am. Fixes part of bug #478704. * addressbook/printing/e-contact-print-envelope.c (Apr 2007) * addressbook/printing/e-contact-print-envelope.h (Apr 2007) * addressbook/tools/evolution-addressbook-abuse.c (May 2004) * addressbook/tools/evolution-addressbook-import.c (no history) * calendar/gui/dialogs/calendar-setup.glade (Nov 2004) * calendar/gui/dialogs/meeting-page.etspec (Sep 2003) * calendar/gui/dialogs/new-calendar.glade (Jan 2003) * calendar/gui/dialogs/new-task-list.glade (Jan 2004) * calendar/gui/dialogs/url-editor-dialog.c (Dec 2005) * calendar/gui/dialogs/url-editor-dialog.glade (Dec 2005) * calendar/gui/dialogs/url-editor-dialog.h (Dec 2005) * calendar/gui/e-pub-utils.c (Dec 2005) * calendar/gui/e-pub-utils.h (Dec 2005) * calendar/gui/gnome-calendar-conduit.png (May 2000) * e-util/e-categories-master-list-wombat.c (Jun 2005) * e-util/e-categories-master-list-wombat.h (Jun 2005) * tools/evolution-launch-composer.c (Jun 2003) * configure.in: Remove plugins/mail-remote/Makefile from AC_OUTPUT. Fixes a distcheck error. * po/POTFILES.in: Remove files for mail-remote plugin. svn path=/trunk/; revision=34487
Diffstat (limited to 'addressbook/tools/evolution-addressbook-abuse.c')
-rw-r--r--addressbook/tools/evolution-addressbook-abuse.c91
1 files changed, 0 insertions, 91 deletions
diff --git a/addressbook/tools/evolution-addressbook-abuse.c b/addressbook/tools/evolution-addressbook-abuse.c
deleted file mode 100644
index 3446e15938..0000000000
--- a/addressbook/tools/evolution-addressbook-abuse.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-
-#include <bonobo/bonobo-main.h>
-
-#include <backend/ebook/e-book.h>
-#include <gnome.h>
-
-#define CONTACTS_TO_ADD 2000
-
-static gchar *
-make_random_string (void)
-{
- const gchar *elements = " abcdefghijklmnopqrstuvwxyz1234567890 ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- gint len = strlen (elements);
- gint i, N = 5 + (random () % 10);
- gchar *str = g_malloc (N+1);
-
- for (i = 0; i < N; ++i) {
- str[i] = elements[random () % len];
- }
- str[i] = '\0';
-
- return str;
-}
-
-static gchar *
-make_random_vcard (void)
-{
- gchar *fa = make_random_string ();
- gchar *name = make_random_string ();
- gchar *email = make_random_string ();
- gchar *org = make_random_string ();
-
- gchar *vcard;
-
- vcard = g_strdup_printf ("BEGIN:VCARD\n"
- "X-EVOLUTION-FILE-AS:%s\n"
- "N:%s\n"
- "EMAIL;INTERNET:%s\n"
- "ORG:%s\n"
- "END:VCARD",
- fa, name, email, org);
- g_free (fa);
- g_free (name);
- g_free (email);
- g_free (org);
-
- return vcard;
-}
-
-int
-main (int argc, char *argv[])
-{
- EBook *book;
- int i;
-
- if (getenv ("ABUSE_THE_WOMBAT") == NULL) {
- g_print ("You probably don't want to use this program.\n"
- "It isn't very nice.\n");
- exit(0);
- }
-
- bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("evolution-addressbook-abuse", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- NULL);
-
- if (!e_book_get_default_addressbook (&book, NULL)) {
- g_warning ("couldn't open addressbook");
- exit (1);
- }
-
- for (i = 0; i < CONTACTS_TO_ADD; ++i) {
- gchar *vcard = make_random_vcard ();
- EContact *contact = e_contact_new_from_vcard (vcard);
- g_message ("adding %d", i);
- if (!e_book_add_contact (book, contact, NULL)) {
- g_warning ("something went wrong...");
- exit (1);
- }
- g_free (vcard);
- g_object_unref (contact);
- }
-
- return 0;
-}