aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/copy-tool
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/copy-tool')
-rw-r--r--plugins/copy-tool/.cvsignore5
-rw-r--r--plugins/copy-tool/ChangeLog21
-rw-r--r--plugins/copy-tool/Makefile.am13
-rw-r--r--plugins/copy-tool/copy-tool.c100
-rw-r--r--plugins/copy-tool/org-gnome-copy-tool.eplug.in24
5 files changed, 0 insertions, 163 deletions
diff --git a/plugins/copy-tool/.cvsignore b/plugins/copy-tool/.cvsignore
deleted file mode 100644
index 683d5ddbe2..0000000000
--- a/plugins/copy-tool/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.eplug \ No newline at end of file
diff --git a/plugins/copy-tool/ChangeLog b/plugins/copy-tool/ChangeLog
deleted file mode 100644
index 761df6d9fe..0000000000
--- a/plugins/copy-tool/ChangeLog
+++ /dev/null
@@ -1,21 +0,0 @@
-2004-11-03 Not Zed <NotZed@Ximian.com>
-
- * org-gnome-copy-tool.eplug.in: gave it a better name and fixed
- the description and author tags.
-
-2004-11-01 JP Rosevear <jpr@novell.com>
-
- * Makefile.am: dist .eplug.in file
-
-2004-10-28 Not Zed <NotZed@Ximian.com>
-
- * org-gnome-copy-tool.eplug.in: fix folderview popup hook id.
-
-2004-10-21 JP Rosevear <jpr@novell.com>
-
- * org-gnome-copy-tool.eplug.in: s/image/icon/
-
-2004-10-20 Not Zed <NotZed@Ximian.com>
-
- * implemented a copy-utils plugin.
-
diff --git a/plugins/copy-tool/Makefile.am b/plugins/copy-tool/Makefile.am
deleted file mode 100644
index 73092c3d20..0000000000
--- a/plugins/copy-tool/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- $(EVOLUTION_MAIL_CFLAGS)
-
-@EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-copy-tool.eplug
-plugin_LTLIBRARIES = liborg-gnome-copy-tool.la
-
-liborg_gnome_copy_tool_la_SOURCES = copy-tool.c
-liborg_gnome_copy_tool_la_LDFLAGS = -module -avoid-version
-
-EXTRA_DIST = org-gnome-copy-tool.eplug.in \ No newline at end of file
diff --git a/plugins/copy-tool/copy-tool.c b/plugins/copy-tool/copy-tool.c
deleted file mode 100644
index 5571ba25c1..0000000000
--- a/plugins/copy-tool/copy-tool.c
+++ /dev/null
@@ -1,100 +0,0 @@
-
-/* Copyright (C) 2004 Michael Zucchi */
-
-/* This file is licensed under the GNU GPL v2 or later */
-
-/* Add 'copy to clipboard' things to various menu's.
-
- Uh, so far only to copy mail addresses from mail content */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <glib/gi18n-lib.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "mail/em-popup.h"
-
-#include <gtk/gtkmain.h>
-#include <gtk/gtkinvisible.h>
-#include <gtk/gtkselection.h>
-
-#include "camel/camel-internet-address.h"
-#include "camel/camel-url.h"
-
-static GtkWidget *invisible;
-static char *address_uri;
-
-void org_gnome_copy_tool_copy_address(void *ep, EMPopupTargetURI *t);
-
-void
-org_gnome_copy_tool_copy_address(void *ep, EMPopupTargetURI *t)
-{
- g_free(address_uri);
- address_uri = g_strdup(t->uri);
-
- printf("copying address '%s'\n", address_uri);
-
- gtk_selection_owner_set(invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time());
- gtk_selection_owner_set(invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time());
-}
-
-static void
-ct_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint time_stamp, void *dummy)
-{
- printf("get selection, address is '%s'\n", address_uri);
-
- if (address_uri == NULL)
- return;
-
- if (strncmp (address_uri, "mailto:", 7) == 0) {
- CamelInternetAddress *cia = camel_internet_address_new();
- CamelURL *curl;
- char *addr;
- const char *tmp;
-
- curl = camel_url_new(address_uri, NULL);
- camel_address_decode((CamelAddress *)cia, curl->path);
- /* should it perhaps use address format? */
- addr = camel_address_encode((CamelAddress *)cia);
- tmp = addr && addr[0] ? addr : address_uri + 7;
- printf("get selection, setting to' %s'\n", tmp);
-
- gtk_selection_data_set(data, data->target, 8, tmp, strlen(tmp));
- g_free(addr);
- camel_url_free(curl);
- camel_object_unref(cia);
- }
-}
-
-static void
-ct_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, void *dummy)
-{
- printf("selection clear event\n");
-
- g_free(address_uri);
- address_uri = NULL;
-}
-
-int e_plugin_lib_enable(EPluginLib *ep, int enable);
-
-int
-e_plugin_lib_enable(EPluginLib *ep, int enable)
-{
- if (enable) {
- invisible = gtk_invisible_new();
- g_signal_connect(invisible, "selection_get", G_CALLBACK(ct_selection_get), NULL);
- g_signal_connect(invisible, "selection_clear_event", G_CALLBACK(ct_selection_clear_event), NULL);
- gtk_selection_add_target(invisible, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 0);
- gtk_selection_add_target(invisible, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 1);
- } else {
- g_free(address_uri);
- address_uri = NULL;
- gtk_widget_destroy(invisible);
- invisible = NULL;
- }
-
- return 0;
-}
diff --git a/plugins/copy-tool/org-gnome-copy-tool.eplug.in b/plugins/copy-tool/org-gnome-copy-tool.eplug.in
deleted file mode 100644
index 10c2a5d6be..0000000000
--- a/plugins/copy-tool/org-gnome-copy-tool.eplug.in
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<e-plugin-list>
- <e-plugin
- type="shlib"
- id="org.gnome.evolution.plugin.copyTool"
- location="@PLUGINDIR@/liborg-gnome-copy-tool.so"
- name="Copy tool">
- <description>A test plugin which demonstrates a popup menu plugin which lets you copy things to the clipboard</description>
- <author name="Michael Zucchi" email="notzed@ximian.com"/>
-
- <!-- hook into the uri popup menu -->
- <hook class="org.gnome.evolution.mail.popup:1.0">
- <menu id="org.gnome.evolution.mail.folderview.popup" target="uri">
- <item
- type="item"
- path="80.test"
- icon="gtk-copy"
- label="Copy _Email Address"
- visible="mailto"
- activate="org_gnome_copy_tool_copy_address"/>
- </menu>
- </hook>
- </e-plugin>
-</e-plugin-list>