3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24 #include "conversation.h"
29 #include "gtkplugin.h"
31 #define ICONAWAY_PLUGIN_ID "gtk-iconaway"
34 iconify_windows(PurpleAccount
*account
, PurpleStatus
*old
, PurpleStatus
*newstatus
)
36 PurplePresence
*presence
;
40 presence
= purple_status_get_presence(newstatus
);
42 if (purple_presence_is_available(presence
))
45 purple_blist_set_visible(FALSE
);
47 for (windows
= pidgin_conv_windows_get_list();
49 windows
= windows
->next
) {
51 win
= (PidginWindow
*)windows
->data
;
53 gtk_window_iconify(GTK_WINDOW(win
->window
));
62 plugin_load(PurplePlugin
*plugin
)
64 purple_signal_connect(purple_accounts_get_handle(), "account-status-changed",
65 plugin
, PURPLE_CALLBACK(iconify_windows
), NULL
);
70 static PurplePluginInfo info
=
75 PURPLE_PLUGIN_STANDARD
, /**< type */
76 PIDGIN_PLUGIN_TYPE
, /**< ui_requirement */
78 NULL
, /**< dependencies */
79 PURPLE_PRIORITY_DEFAULT
, /**< priority */
81 ICONAWAY_PLUGIN_ID
, /**< id */
82 N_("Iconify on Away"), /**< name */
83 DISPLAY_VERSION
, /**< version */
85 N_("Iconifies the buddy list and your conversations when you go away."),
87 N_("Iconifies the buddy list and your conversations when you go away."),
88 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */
89 PURPLE_WEBSITE
, /**< homepage */
91 plugin_load
, /**< load */
96 NULL
, /**< extra_info */
108 init_plugin(PurplePlugin
*plugin
)
112 PURPLE_INIT_PLUGIN(iconaway
, init_plugin
, info
)