annotate finch/plugins/gntclipboard.c @ 21577:ea34884fd5c3

merge of '7740233c9fca04206ee36d5c66bc83674db5dd9f' and '9ae8e6f2ee9e7fe80c45209b4ba9d96b9122e936'
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 17 Nov 2007 19:58:00 +0000
parents 3cc856ca2338
children ea62e934c80b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file gntclipboard.c
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 * Copyright (C) 2007 Richard Nelson <wabz@whatsbeef.net>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * (at your option) any later version.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 *
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * GNU General Public License for more details.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 *
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19575
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 */
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 #include "internal.h"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 #include <glib.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 #define PLUGIN_STATIC_NAME "GntClipboard"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 #ifdef HAVE_X11
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 #include <X11/Xlib.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 #include <X11/Xutil.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 #include <X11/Xatom.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 #endif
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 #include <sys/types.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 #include <signal.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 #include <glib.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 #include <plugin.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 #include <version.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 #include <debug.h>
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
41 #include <notify.h>
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 #include <gntwm.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 #include <gntplugin.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
46 #ifdef HAVE_X11
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 static pid_t child = 0;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49 static gulong sig_handle;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 static void
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 set_clip(gchar *string)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 Window w;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 XEvent e, respond;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 XSelectionRequestEvent *req;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 const char *ids;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 Display *dpy = XOpenDisplay(NULL);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 if (!dpy)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 return;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 ids = getenv("WINDOWID");
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 if (ids == NULL)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 return;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 w = atoi(ids);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 XSetSelectionOwner(dpy, XA_PRIMARY, w, CurrentTime);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 XFlush(dpy);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 XSelectInput(dpy, w, StructureNotifyMask);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 while (TRUE) {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 XNextEvent(dpy, &e); /* this blocks. */
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 req = &e.xselectionrequest;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 if (e.type == SelectionRequest) {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 XChangeProperty(dpy,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 req->requestor,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 req->property,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 XA_STRING,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 8, PropModeReplace,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 (unsigned char *)string,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 strlen(string));
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 respond.xselection.property = req->property;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 respond.xselection.type = SelectionNotify;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 respond.xselection.display = req->display;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 respond.xselection.requestor = req->requestor;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 respond.xselection.selection = req->selection;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 respond.xselection.target= req->target;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 respond.xselection.time = req->time;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 XSendEvent(dpy, req->requestor, 0, 0, &respond);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 XFlush (dpy);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 } else if (e.type == SelectionClear) {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 return;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 return;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 static void
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 clipboard_changed(GntWM *wm, gchar *string)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98 {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 if (child) {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100 kill(child, SIGTERM);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 if ((child = fork() == 0)) {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103 set_clip(string);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104 _exit(0);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 }
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
106 }
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 #endif
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 static gboolean
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
110 plugin_load(PurplePlugin *plugin)
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 {
15893
886025ef7daa Build gntclipboard plugin by default. If we don't want this, at least
Stu Tomlinson <stu@nosnilmot.com>
parents: 15864
diff changeset
112 #ifdef HAVE_X11
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 if (!XOpenDisplay(NULL)) {
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
114 purple_debug_warning("gntclipboard", "Couldn't find X display\n");
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
115 purple_notify_error(NULL, _("Error"), _("Error loading the plugin."),
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
116 _("Couldn't find X display"));
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117 return FALSE;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 if (!getenv("WINDOWID")) {
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
120 purple_debug_warning("gntclipboard", "Couldn't find window\n");
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
121 purple_notify_error(NULL, _("Error"), _("Error loading the plugin."),
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
122 _("Couldn't find window"));
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123 return FALSE;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 sig_handle = g_signal_connect(G_OBJECT(gnt_get_clipboard()), "clipboard_changed", G_CALLBACK(clipboard_changed), NULL);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126 return TRUE;
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
127 #else
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
128 purple_notify_error(NULL, _("Error"), _("Error loading the plugin."),
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
129 _("This plugin cannot be loaded because it was not built with X11 support."));
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
130 return FALSE;
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
131 #endif
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 static gboolean
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
135 plugin_unload(PurplePlugin *plugin)
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136 {
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
137 #ifdef HAVE_X11
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 if (child) {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 kill(child, SIGTERM);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140 child = 0;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 g_signal_handler_disconnect(G_OBJECT(gnt_get_clipboard()), sig_handle);
19575
87e9d418cbf6 Show a helpful error message when the plugin fails to load.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16677
diff changeset
143 #endif
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 return TRUE;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
147 static PurplePluginInfo info =
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 {
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
149 PURPLE_PLUGIN_MAGIC,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
150 PURPLE_MAJOR_VERSION,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
151 PURPLE_MINOR_VERSION,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
152 PURPLE_PLUGIN_STANDARD,
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
153 FINCH_PLUGIN_TYPE,
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154 0,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 NULL,
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
156 PURPLE_PRIORITY_DEFAULT,
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157 "gntclipboard",
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 N_("GntClipboard"),
21030
3cc856ca2338 Add a --with-extraversion option to ./configure so packagers can fine tune
Stu Tomlinson <stu@nosnilmot.com>
parents: 19680
diff changeset
159 DISPLAY_VERSION,
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160 N_("Clipboard plugin"),
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
161 N_("When the gnt clipboard contents change, "
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
162 "the contents are made available to X, if possible."),
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 "Richard Nelson <wabz@whatsbeef.net>",
15864
4c707efebc0c Use PURPLE_WEBSITE instead of listing the website directly (which was wrong because of the sed).
Richard Laager <rlaager@wiktel.com>
parents: 15823
diff changeset
164 PURPLE_WEBSITE,
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
165 plugin_load,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
166 plugin_unload,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
167 NULL,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
168 NULL,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
169 NULL,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170 NULL,
16677
30829e806dae And finch is up to date
Gary Kramlich <grim@reaperworld.com>
parents: 15893
diff changeset
171 NULL,
30829e806dae And finch is up to date
Gary Kramlich <grim@reaperworld.com>
parents: 15893
diff changeset
172
30829e806dae And finch is up to date
Gary Kramlich <grim@reaperworld.com>
parents: 15893
diff changeset
173 /* padding */
30829e806dae And finch is up to date
Gary Kramlich <grim@reaperworld.com>
parents: 15893
diff changeset
174 NULL,
30829e806dae And finch is up to date
Gary Kramlich <grim@reaperworld.com>
parents: 15893
diff changeset
175 NULL,
30829e806dae And finch is up to date
Gary Kramlich <grim@reaperworld.com>
parents: 15893
diff changeset
176 NULL,
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
177 NULL
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
178 };
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
179
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
180 static void
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
181 init_plugin(PurplePlugin *plugin)
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
182 {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
183 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
184
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15818
diff changeset
185 PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info)