179
|
1 #define GAIM_PLUGINS
|
|
2 #include "gaim.h"
|
|
3
|
|
4 #include <gtk/gtk.h>
|
|
5
|
|
6 void enter_callback(GtkWidget *widget, GtkWidget *entry) {
|
|
7 gchar *entry_text;
|
|
8 entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
|
|
9 sflap_send(entry_text, strlen(entry_text), TYPE_DATA);
|
|
10 }
|
|
11
|
|
12 GtkWidget *window;
|
|
13 void gaim_plugin_init(void *h) {
|
|
14 GtkWidget *entry;
|
|
15
|
|
16 window = gtk_window_new(GTK_WINDOW_DIALOG);
|
|
17 gtk_window_set_title(GTK_WINDOW(window), "Gaim - SFLAP interface");
|
|
18
|
|
19 entry = gtk_entry_new();
|
|
20 gtk_signal_connect(GTK_OBJECT(entry), "activate",
|
|
21 (GtkSignalFunc)enter_callback,
|
|
22 entry);
|
|
23 gtk_container_add(GTK_CONTAINER(window), entry);
|
|
24 gtk_widget_show(entry);
|
|
25
|
|
26 gtk_widget_show(window);
|
|
27 }
|
|
28
|
|
29 void gaim_plugin_remove() {
|
|
30 gtk_widget_destroy(window);
|
|
31 }
|
|
32
|
|
33 char *name() {
|
|
34 return "TOC Interface";
|
|
35 }
|
|
36
|
|
37 char *description() {
|
|
38 return "Allows you to talk directly to the TOC server, bypassing gaim.";
|
|
39 }
|