annotate plugins/raw.c @ 6195:51fc8c91f38b

[gaim-migrate @ 6681] VERSION NUMBER! committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 18 Jul 2003 00:29:09 +0000
parents 5239a3b4ab33
children 8f94cce8faa5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 #include "gaim.h"
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 #include "prpl.h"
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
3 #include "gtkplugin.h"
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 #ifdef MAX
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 #undef MAX
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 #undef MIN
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 #endif
2824
2c39e70dd07c [gaim-migrate @ 2837]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2495
diff changeset
8 #include "protocols/jabber/jabber.h"
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
9 #include "protocols/msn/session.h"
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
10
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
11 #define RAW_PLUGIN_ID "raw"
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 static GtkWidget *window = NULL;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 static GtkWidget *optmenu = NULL;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 static struct gaim_connection *gc = NULL;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
16 static GaimPlugin *me = NULL;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 static int goodbye()
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 {
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
20 gaim_plugin_unload(me);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 return FALSE;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 static void send_it(GtkEntry *entry)
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 {
4655
fac4c73dd5ad [gaim-migrate @ 4966]
Nathan Walp <nwalp@pidgin.im>
parents: 4165
diff changeset
26 const char *txt;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 if (!gc) return;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 txt = gtk_entry_get_text(entry);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 switch (gc->protocol) {
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
30 case GAIM_PROTO_TOC:
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 int *a = (int *)gc->proto_data;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 unsigned short seqno = htons(a[1]++ & 0xffff);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 unsigned short len = htons(strlen(txt) + 1);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 write(*a, "*\002", 2);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 write(*a, &seqno, 2);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37 write(*a, &len, 2);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 write(*a, txt, ntohs(len));
5227
6d1707dc8c3d [gaim-migrate @ 5597]
Christian Hammond <chipx86@chipx86.com>
parents: 5205
diff changeset
39 gaim_debug(GAIM_DEBUG_MISC, "raw", "TOC C: %s\n", txt);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 break;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
42 case GAIM_PROTO_MSN:
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
43 {
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
44 MsnSession *session = gc->proto_data;
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
45 char buf[strlen(txt) + 3];
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
46
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
47 g_snprintf(buf, sizeof(buf), "%s\r\n", txt);
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
48 msn_servconn_write(session->notification_conn, buf, strlen(buf));
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
49 }
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50 break;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
51 case GAIM_PROTO_IRC:
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 write(*(int *)gc->proto_data, txt, strlen(txt));
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53 write(*(int *)gc->proto_data, "\r\n", 2);
5227
6d1707dc8c3d [gaim-migrate @ 5597]
Christian Hammond <chipx86@chipx86.com>
parents: 5205
diff changeset
54 gaim_debug(GAIM_DEBUG_MISC, "raw", "IRC C: %s\n", txt);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
55 break;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
56 case GAIM_PROTO_JABBER:
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
57 jab_send_raw(*(jconn *)gc->proto_data, txt);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
58 break;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
59 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60 gtk_entry_set_text(entry, "");
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63 static void set_gc(gpointer d, struct gaim_connection *c)
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64 {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
65 gc = c;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
68 static void redo_optmenu(struct gaim_connection *arg, gpointer x)
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
69 {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
70 GtkWidget *menu;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
71 GSList *g = connections;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72 struct gaim_connection *c;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
73
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
74 menu = gtk_menu_new();
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75 gc = NULL;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77 while (g) {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 char buf[256];
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
79 GtkWidget *opt;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
80 c = (struct gaim_connection *)g->data;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
81 g = g->next;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
82 if (x && c == arg)
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
83 continue;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
84 if (c->protocol != GAIM_PROTO_TOC && c->protocol != GAIM_PROTO_MSN &&
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
85 c->protocol != GAIM_PROTO_IRC && c->protocol != GAIM_PROTO_JABBER)
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
86 continue;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87 if (!gc)
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
88 gc = c;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
89 g_snprintf(buf, sizeof buf, "%s (%s)", c->username,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
90 c->prpl->info->name);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 opt = gtk_menu_item_new_with_label(buf);
5314
1f901484599d [gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents: 5227
diff changeset
92 g_signal_connect(G_OBJECT(opt), "activate", G_CALLBACK(set_gc), c);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 gtk_widget_show(opt);
4655
fac4c73dd5ad [gaim-migrate @ 4966]
Nathan Walp <nwalp@pidgin.im>
parents: 4165
diff changeset
94 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
97 gtk_option_menu_remove_menu(GTK_OPTION_MENU(optmenu));
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98 gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99 gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), 0);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
101
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
102 static gboolean
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
103 plugin_load(GaimPlugin *plugin)
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104 {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
105 GtkWidget *hbox;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
106 GtkWidget *entry;
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
108 gaim_signal_connect(plugin, event_signon, redo_optmenu, NULL);
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
109 gaim_signal_connect(plugin, event_signoff, redo_optmenu, me);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
110
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
111 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
112 g_signal_connect(G_OBJECT(window), "delete_event",
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
113 G_CALLBACK(goodbye), NULL);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
114
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
115 hbox = gtk_hbox_new(FALSE, 0);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
116 gtk_container_add(GTK_CONTAINER(window), hbox);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
117
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
118 optmenu = gtk_option_menu_new();
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
119 gtk_box_pack_start(GTK_BOX(hbox), optmenu, FALSE, FALSE, 5);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
121 redo_optmenu(NULL, NULL);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
122
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
123 entry = gtk_entry_new();
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
124 gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 5);
5314
1f901484599d [gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents: 5227
diff changeset
125 g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(send_it), NULL);
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
126
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
127 gtk_widget_show_all(window);
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
128
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
129 return TRUE;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
130 }
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
131
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
132 static gboolean
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
133 plugin_unload(GaimPlugin *plugin)
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
134 {
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
135 if (window)
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
136 gtk_widget_destroy(window);
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
137
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
138 window = NULL;
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
139
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
140 return TRUE;
2495
b46e8a80da4f [gaim-migrate @ 2508]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
141 }
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
142
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
143 static GaimPluginInfo info =
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
144 {
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
145 2,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
146 GAIM_PLUGIN_STANDARD,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
147 GAIM_GTK_PLUGIN_TYPE,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
148 0,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
149 NULL,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
150 GAIM_PRIORITY_DEFAULT,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
151 RAW_PLUGIN_ID,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
152 N_("Raw"),
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
153 VERSION,
5424
88b5c9a45075 [gaim-migrate @ 5803]
Luke Schierer <lschiere@pidgin.im>
parents: 5320
diff changeset
154 N_("Lets you send raw input to text-based protocols."),
88b5c9a45075 [gaim-migrate @ 5803]
Luke Schierer <lschiere@pidgin.im>
parents: 5320
diff changeset
155 N_("Lets you send raw input to text-based protocols (Jabber, MSN, IRC, "
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
156 "TOC). Hit 'Enter' in the entry box to send. Watch the debug window."),
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
157 "Eric Warmenhoven <eric@warmenhoven.org>",
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
158 WEBSITE,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
159 plugin_load,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
160 plugin_unload,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
161 NULL,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
162 NULL,
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
163 NULL
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
164 };
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
165
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
166 static void
5920
7d385de2f9cd [gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents: 5424
diff changeset
167 init_plugin(GaimPlugin *plugin)
5320
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
168 {
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
169 me = plugin;
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
170 }
9445d59d9db8 [gaim-migrate @ 5692]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
171
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 5920
diff changeset
172 GAIM_INIT_PLUGIN(raw, init_plugin, info)