comparison plugins/notify.c @ 1047:ece2d1543b20

[gaim-migrate @ 1057] Plugins now use GModule. Protocol plugins can be dynamically updated. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 01 Nov 2000 22:30:36 +0000
parents 91b7377e7b45
children 25f121faa75e
comparison
equal deleted inserted replaced
1046:4593605da0e2 1047:ece2d1543b20
8 8
9 void received_im(struct gaim_connection *gc, char **who, char **what, void *m) { 9 void received_im(struct gaim_connection *gc, char **who, char **what, void *m) {
10 char buf[256]; 10 char buf[256];
11 struct conversation *cnv = find_conversation(*who); 11 struct conversation *cnv = find_conversation(*who);
12 GtkWindow *win; 12 GtkWindow *win;
13 char *me = g_strdup(normalize(gc->username));
14
15 if (!strcmp(me, normalize(*who))) {
16 g_free(me);
17 return;
18 }
19 g_free(me);
13 20
14 if (cnv == NULL) 21 if (cnv == NULL)
15 cnv = new_conversation(*who); 22 cnv = new_conversation(*who);
16 23
17 win = (GtkWindow *)cnv->window; 24 win = (GtkWindow *)cnv->window;
33 g_snprintf(buf, sizeof(buf), "%s", &win->title[4]); 40 g_snprintf(buf, sizeof(buf), "%s", &win->title[4]);
34 gtk_window_set_title(win, buf); 41 gtk_window_set_title(win, buf);
35 } 42 }
36 } 43 }
37 44
38 void gaim_plugin_init(void *hndl) { 45 char *gaim_plugin_init(GModule *hndl) {
39 handle = hndl; 46 handle = hndl;
40 47
41 gaim_signal_connect(handle, event_im_recv, received_im, NULL); 48 gaim_signal_connect(handle, event_im_recv, received_im, NULL);
42 gaim_signal_connect(handle, event_im_send, sent_im, NULL); 49 gaim_signal_connect(handle, event_im_send, sent_im, NULL);
43 } 50 }