Mercurial > pidgin
view plugins/autorecon.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 | c754e5ae442a |
children | d96b511972fe |
line wrap: on
line source
#define GAIM_PLUGINS #include "gaim.h" #include <gtk/gtk.h> extern GtkWidget *imaway; static int recon; static int away_state; static int forced_off = 0; static struct away_message *last_away; char *name() { return "Auto Reconnect"; } char *description() { return "When AOL kicks you off, this auto-reconnects you."; } extern void dologin(GtkWidget *, GtkWidget *); void do_signon() { dologin(NULL, NULL); if (blist) { gtk_timeout_remove(recon); forced_off = 0; if (away_state) do_away_message(NULL, last_away); return; } } void reconnect(void *m) { recon = gtk_timeout_add(2000, (GtkFunction)do_signon, NULL); forced_off = 1; } void away_toggle(void *m) { if ((int)m == 1) { last_away = awaymessage; away_state = 1; } else if (!forced_off) away_state = 0; } void gaim_plugin_init(void *handle) { if (imaway) { away_state = 1; last_away = awaymessage; } else away_state = 0; gaim_signal_connect(handle, event_away, away_toggle, (void *)1); gaim_signal_connect(handle, event_back, away_toggle, (void *)0); gaim_signal_connect(handle, event_signoff, reconnect, NULL); }