9 void received_im(struct gaim_connection
*gc
, char **who
, char **what
, void *m
) {
11 struct conversation
*cnv
= find_conversation(*who
);
13 char *me
= g_strdup(normalize(gc
->username
));
15 if (!strcmp(me
, normalize(*who
))) {
23 if (away_options
& OPT_AWAY_QUEUE
)
26 cnv
= new_conversation(*who
);
29 win
= (GtkWindow
*)cnv
->window
;
31 g_snprintf(buf
, sizeof(buf
), "%s", win
->title
);
32 if (!strstr(buf
, "(*) ")) {
33 g_snprintf(buf
, sizeof(buf
), "(*) %s", win
->title
);
34 gtk_window_set_title(win
, buf
);
38 void sent_im(struct gaim_connection
*gc
, char *who
, char **what
, void *m
) {
40 struct conversation
*c
= find_conversation(who
);
41 GtkWindow
*win
= (GtkWindow
*)c
->window
;
43 g_snprintf(buf
, sizeof(buf
), "%s", win
->title
);
44 if (strstr(buf
, "(*) ")) {
45 g_snprintf(buf
, sizeof(buf
), "%s", &win
->title
[4]);
46 gtk_window_set_title(win
, buf
);
50 char *gaim_plugin_init(GModule
*hndl
) {
53 gaim_signal_connect(handle
, event_im_recv
, received_im
, NULL
);
54 gaim_signal_connect(handle
, event_im_send
, sent_im
, NULL
);
60 return "Visual Notification";
64 return "Puts an asterisk in the title bar of all conversations"
65 " where you have not responded to a message yet.";