Mercurial > pidgin
view plugins/notify.c @ 306:a8f964718837
[gaim-migrate @ 316]
Ok, one last time, for the record:
- It tries to load the requested font in the requested size.
- It tries to load the requested font at *any* size.
- It tries to load either courier or helvetica with the requested features at
any size.
- It tries to load the other of the two with the requested features at any size.
- It tries to load the chosen outgoing font with the requested features at any
size, if one exists.
- It tries to load courier with no features (bold, italics, etc) at any size.
- It tries to load helvetica with no features (bold, italics, etc) at any size.
- It tries to load times with no features (bold, italics, etc) at any size.
- It tries to load *any* font, generally the first one GDK can find, which ends
up usually being something like Arial Bold.
It returns after it gets a font, or after it gets *any* font. If you didn't get
one, your system is screwy.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 01 Jun 2000 19:27:18 +0000 |
parents | e9ca9146ebf1 |
children | 18e147714c4b |
line wrap: on
line source
#define GAIM_PLUGINS #include "gaim.h" #include <gtk/gtk.h> #include <string.h> void *handle; void received_im(char **who, char **what, void *m) { char buf[256]; struct conversation *cnv = find_conversation(*who); GtkWindow *win; if (!strcmp(*what, LAGOMETER_STR)) return; if (cnv == NULL) cnv = new_conversation(*who); win = (GtkWindow *)cnv->window; g_snprintf(buf, sizeof(buf), "%s", win->title); if (!strstr(buf, "(*) ")) { g_snprintf(buf, sizeof(buf), "(*) %s", win->title); gtk_window_set_title(win, buf); } } void sent_im(char *who, char **what, void *m) { char buf[256]; struct conversation *c = find_conversation(who); GtkWindow *win = (GtkWindow *)c->window; g_snprintf(buf, sizeof(buf), "%s", win->title); if (strstr(buf, "(*) ")) { g_snprintf(buf, sizeof(buf), "%s", &win->title[4]); gtk_window_set_title(win, buf); } } void gaim_plugin_init(void *hndl) { handle = hndl; gaim_signal_connect(handle, event_im_recv, received_im, NULL); gaim_signal_connect(handle, event_im_send, sent_im, NULL); } char *name() { return "Visual Notification"; } char *description() { return "Puts an asterisk in the title bar of all conversations" " where you have not responded to a message yet."; }