comparison finch/plugins/gntclipboard.c @ 15823:32c366eeeb99

sed -ie 's/gaim/purple/g'
author Sean Egan <seanegan@gmail.com>
date Mon, 19 Mar 2007 07:01:17 +0000
parents 0e3a8505ebbe
children 4c707efebc0c
comparison
equal deleted inserted replaced
15822:84b0f9b23ede 15823:32c366eeeb99
106 } 106 }
107 #endif 107 #endif
108 } 108 }
109 109
110 static gboolean 110 static gboolean
111 plugin_load(GaimPlugin *plugin) 111 plugin_load(PurplePlugin *plugin)
112 { 112 {
113 if (!XOpenDisplay(NULL)) { 113 if (!XOpenDisplay(NULL)) {
114 gaim_debug_warning("gntclipboard", "Couldn't find X display\n"); 114 purple_debug_warning("gntclipboard", "Couldn't find X display\n");
115 return FALSE; 115 return FALSE;
116 } 116 }
117 if (!getenv("WINDOWID")) { 117 if (!getenv("WINDOWID")) {
118 gaim_debug_warning("gntclipboard", "Couldn't find window\n"); 118 purple_debug_warning("gntclipboard", "Couldn't find window\n");
119 return FALSE; 119 return FALSE;
120 } 120 }
121 sig_handle = g_signal_connect(G_OBJECT(gnt_get_clipboard()), "clipboard_changed", G_CALLBACK(clipboard_changed), NULL); 121 sig_handle = g_signal_connect(G_OBJECT(gnt_get_clipboard()), "clipboard_changed", G_CALLBACK(clipboard_changed), NULL);
122 return TRUE; 122 return TRUE;
123 } 123 }
124 124
125 static gboolean 125 static gboolean
126 plugin_unload(GaimPlugin *plugin) 126 plugin_unload(PurplePlugin *plugin)
127 { 127 {
128 if (child) { 128 if (child) {
129 kill(child, SIGTERM); 129 kill(child, SIGTERM);
130 child = 0; 130 child = 0;
131 } 131 }
132 g_signal_handler_disconnect(G_OBJECT(gnt_get_clipboard()), sig_handle); 132 g_signal_handler_disconnect(G_OBJECT(gnt_get_clipboard()), sig_handle);
133 return TRUE; 133 return TRUE;
134 } 134 }
135 135
136 static GaimPluginInfo info = 136 static PurplePluginInfo info =
137 { 137 {
138 GAIM_PLUGIN_MAGIC, 138 PURPLE_PLUGIN_MAGIC,
139 GAIM_MAJOR_VERSION, 139 PURPLE_MAJOR_VERSION,
140 GAIM_MINOR_VERSION, 140 PURPLE_MINOR_VERSION,
141 GAIM_PLUGIN_STANDARD, 141 PURPLE_PLUGIN_STANDARD,
142 GAIM_GNT_PLUGIN_TYPE, 142 FINCH_PLUGIN_TYPE,
143 0, 143 0,
144 NULL, 144 NULL,
145 GAIM_PRIORITY_DEFAULT, 145 PURPLE_PRIORITY_DEFAULT,
146 "gntclipboard", 146 "gntclipboard",
147 N_("GntClipboard"), 147 N_("GntClipboard"),
148 VERSION, 148 VERSION,
149 N_("Clipboard plugin"), 149 N_("Clipboard plugin"),
150 N_("When the gnt clipboard contents change, " 150 N_("When the gnt clipboard contents change, "
151 "the contents are made available to X, if possible."), 151 "the contents are made available to X, if possible."),
152 "Richard Nelson <wabz@whatsbeef.net>", 152 "Richard Nelson <wabz@whatsbeef.net>",
153 "http://gaim.sourceforge.net", 153 "http://purple.sourceforge.net",
154 plugin_load, 154 plugin_load,
155 plugin_unload, 155 plugin_unload,
156 NULL, 156 NULL,
157 NULL, 157 NULL,
158 NULL, 158 NULL,
159 NULL, 159 NULL,
160 NULL 160 NULL
161 }; 161 };
162 162
163 static void 163 static void
164 init_plugin(GaimPlugin *plugin) 164 init_plugin(PurplePlugin *plugin)
165 { 165 {
166 } 166 }
167 167
168 GAIM_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info) 168 PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info)