Mercurial > pidgin
annotate plugins/toc_commands.c @ 2349:60c716c32c40
[gaim-migrate @ 2362]
(Names changed to protect the innocent.)
blue:~/gaim/app/src $ ls -l ~/.gaim/logs/mid.log
-rw-r--r-- 1 eric eric 607043 Sep 20 03:28 /home/eric/.gaim/logs/mid.log
Previously on my 1.4GHz Athlon, displaying this 600k log file in the Log Viewer took 42 seconds:
time start: 1001157353
time end : 1001157395
Now, with the new smiley checker, it takes 23:
time start: 1001157199
time end : 1001157222
That's still horrible, but it's only a little more than half the time it previously took.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 22 Sep 2001 11:22:59 +0000 |
parents | c9c20663e05b |
children |
rev | line source |
---|---|
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)); | |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
9 /* this is bad, but you really shouldn't be using this plugin */ |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
10 sflap_send(connections->data, entry_text, strlen(entry_text), TYPE_DATA); |
179 | 11 } |
12 | |
425
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
13 void destroy_callback(GtkWidget *widget, void *handle) { |
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
14 gtk_widget_destroy(widget); |
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
15 gaim_plugin_unload(handle); |
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
16 } |
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
17 |
179 | 18 GtkWidget *window; |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
19 char *gaim_plugin_init(GModule *h) { |
179 | 20 GtkWidget *entry; |
21 | |
1956
c9c20663e05b
[gaim-migrate @ 1966]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1943
diff
changeset
|
22 window = gtk_window_new(GTK_WINDOW_DIALOG); |
179 | 23 gtk_window_set_title(GTK_WINDOW(window), "Gaim - SFLAP interface"); |
24 | |
25 entry = gtk_entry_new(); | |
26 gtk_signal_connect(GTK_OBJECT(entry), "activate", | |
27 (GtkSignalFunc)enter_callback, | |
28 entry); | |
29 gtk_container_add(GTK_CONTAINER(window), entry); | |
30 gtk_widget_show(entry); | |
31 | |
425
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
32 gtk_signal_connect(GTK_OBJECT(window), "destroy", |
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
33 (GtkSignalFunc)destroy_callback, |
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
34 h); |
ae7c762775cd
[gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
179
diff
changeset
|
35 |
179 | 36 gtk_widget_show(window); |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
37 |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
38 return NULL; |
179 | 39 } |
40 | |
41 void gaim_plugin_remove() { | |
42 gtk_widget_destroy(window); | |
43 } | |
44 | |
45 char *name() { | |
46 return "TOC Interface"; | |
47 } | |
48 | |
49 char *description() { | |
50 return "Allows you to talk directly to the TOC server, bypassing gaim."; | |
51 } |