view plugins/iconaway.c @ 3493:4b204c262376

[gaim-migrate @ 3553] Rob committed some bug fixes to gtk1-stable, but not to HEAD. now his computer is acting up again, so i'm making the corresponding commits to HEAD. this should help with yahoo i18n, segfaults on jabber, a problem in gaimrc, and word wrapping on new mail notification. Modified Files: ChangeLog src/gaim.h src/gaimrc.c src/prpl.c src/protocols/msn/msn.c src/protocols/yahoo/yahoo.c ---------------------------------------------------------------------- committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 10 Sep 2002 15:31:34 +0000
parents d33ec392a5e1
children cd938f18f3f8
line wrap: on
line source

#include "../config.h"
#include "gaim.h"

#include <gtk/gtk.h>

void *handle;

extern GtkWidget *imaway;
extern GtkWidget *blist;
extern GtkWidget *all_chats;
extern GtkWidget *all_convos;

#ifdef USE_APPLET
extern void applet_destroy_buddy();
#endif

void iconify_windows(struct gaim_connection *gc, char *state, char *message, void *data) {
	if (!imaway || !gc->away)
		return;
	gtk_window_iconify(GTK_WINDOW(imaway));
	hide_buddy_list();
	if (all_convos)
		gtk_window_iconify(GTK_WINDOW(all_convos));
	if (all_chats)
		gtk_window_iconify(GTK_WINDOW(all_chats));
}

char *gaim_plugin_init(GModule *h) {
	handle = h;

	gaim_signal_connect(handle, event_away, iconify_windows, NULL);

	return NULL;
}

char *name() {
	return "Iconify On Away";
}

char *description() {
	return "Iconifies the away box and the buddy list when you go away.";
}