Mercurial > pidgin
annotate plugins/notify.c @ 780:c714def9cebb
[gaim-migrate @ 790]
You may be a geek if...
You've ever used a computer on Friday, Saturday and Sunday of the
same weekend.
You find yourself interrupting computer store salesman to correct
something he said.
The first thing you notice when walking in a business is their
computer system. ...and offer advice on how you would change it.
You've ever mounted a magnetic tape reel.
You own any shareware.
You know more IP addresses than phone numbers.
You've ever accidentally dialed an IP address.
Your friends use you as tech support.
You've ever named a computer.
You have your local computer store on speed dial.
You can't carry on a conversation without talking about computers.
Co-workers have to E-mail you about the fire alarm to get you out of
the building.
You've ever found "stray" diskettes when doing laundry.
Your computer has it's own phone line - but your teenager doesn't.
You check the national weather service web page for current weather
conditions (rather than look out the window).
You know more URLs than street addresses.
Your pet has a web page.
You get really excited when Yahoo adds your link.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 29 Aug 2000 03:59:01 +0000 |
parents | 18e147714c4b |
children | 91b7377e7b45 |
rev | line source |
---|---|
191 | 1 #define GAIM_PLUGINS |
2 #include "gaim.h" | |
3 | |
4 #include <gtk/gtk.h> | |
192
e9ca9146ebf1
[gaim-migrate @ 202]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
191
diff
changeset
|
5 #include <string.h> |
191 | 6 |
7 void *handle; | |
8 | |
9 void received_im(char **who, char **what, void *m) { | |
10 char buf[256]; | |
11 struct conversation *cnv = find_conversation(*who); | |
12 GtkWindow *win; | |
13 | |
14 if (cnv == NULL) | |
15 cnv = new_conversation(*who); | |
16 | |
17 win = (GtkWindow *)cnv->window; | |
18 | |
19 g_snprintf(buf, sizeof(buf), "%s", win->title); | |
20 if (!strstr(buf, "(*) ")) { | |
21 g_snprintf(buf, sizeof(buf), "(*) %s", win->title); | |
22 gtk_window_set_title(win, buf); | |
23 } | |
24 } | |
25 | |
26 void sent_im(char *who, char **what, void *m) { | |
27 char buf[256]; | |
28 struct conversation *c = find_conversation(who); | |
29 GtkWindow *win = (GtkWindow *)c->window; | |
30 | |
31 g_snprintf(buf, sizeof(buf), "%s", win->title); | |
32 if (strstr(buf, "(*) ")) { | |
33 g_snprintf(buf, sizeof(buf), "%s", &win->title[4]); | |
34 gtk_window_set_title(win, buf); | |
35 } | |
36 } | |
37 | |
38 void gaim_plugin_init(void *hndl) { | |
39 handle = hndl; | |
40 | |
41 gaim_signal_connect(handle, event_im_recv, received_im, NULL); | |
42 gaim_signal_connect(handle, event_im_send, sent_im, NULL); | |
43 } | |
44 | |
45 char *name() { | |
46 return "Visual Notification"; | |
47 } | |
48 | |
49 char *description() { | |
50 return "Puts an asterisk in the title bar of all conversations" | |
51 " where you have not responded to a message yet."; | |
52 } |