[gaim-migrate @ 16122]
SF Patch #1479292 from resiak
This cleans up the Ctrl-Tab and Ctrl-Shift-Tab handling so it's easier to understand.
committer: Tailor Script <tailor@pidgin.im>
line source
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /*
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * System tray icon (aka docklet) plugin for Gaim
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * Copyright (C) 2002-3 Robert McQueen <robot101@debian.org>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * Inspired by a similar plugin by:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * John (J5) Palmieri <johnp@martianrock.com>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * This program is free software; you can redistribute it and/or
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * modify it under the terms of the GNU General Public License as
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * published by the Free Software Foundation; either version 2 of the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * License, or (at your option) any later version.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * This program is distributed in the hope that it will be useful, but
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * WITHOUT ANY WARRANTY; without even the implied warranty of
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * General Public License for more details.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * You should have received a copy of the GNU General Public License
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * along with this program; if not, write to the Free Software
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * 02111-1307, USA.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "internal.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkgaim.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "core.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "conversation.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "debug.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "prefs.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "signals.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "sound.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "version.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkaccount.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkblist.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkconv.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkft.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkplugin.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkprefs.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtksavedstatuses.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtksound.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkutils.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkstock.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "docklet.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gaim.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "gtkdialogs.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #define DOCKLET_PLUGIN_ID "gtk-docklet"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifndef DOCKLET_TOOLTIP_LINE_LIMIT
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #define DOCKLET_TOOLTIP_LINE_LIMIT 5
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* globals */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimPlugin *handle = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static struct docklet_ui_ops *ui_ops = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static DockletStatus status = DOCKLET_STATUS_OFFLINE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean enable_join_chat = FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static guint docklet_blinking_timer = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean visibility_manager = FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /**************************************************************************
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * docklet status and utility functions
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 **************************************************************************/
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_blink_icon()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean blinked = FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gboolean ret = FALSE; /* by default, don't keep blinking */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 blinked = !blinked;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 switch (status) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 case DOCKLET_STATUS_ONLINE_PENDING:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 case DOCKLET_STATUS_AWAY_PENDING:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (blinked) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (ui_ops && ui_ops->blank_icon)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->blank_icon();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (ui_ops && ui_ops->update_icon)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->update_icon(status);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ret = TRUE; /* keep blinking */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 break;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 default:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_blinking_timer = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 blinked = FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 break;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return ret;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static GList *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 get_pending_list(guint max)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 const char *im = gaim_prefs_get_string("/plugins/gtk/docklet/blink_im");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 const char *chat = gaim_prefs_get_string("/plugins/gtk/docklet/blink_chat");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *l_im = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *l_chat = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (im != NULL && strcmp(im, "always") == 0) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 l_im = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_IM,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_UNSEEN_TEXT,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 FALSE, max);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else if (im != NULL && strcmp(im, "hidden") == 0) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 l_im = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_IM,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_UNSEEN_TEXT,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 TRUE, max);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (chat != NULL && strcmp(chat, "always") == 0) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 l_chat = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_CHAT,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_UNSEEN_TEXT,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 FALSE, max);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else if (chat != NULL && strcmp(chat, "nick") == 0) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 l_chat = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_CHAT,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_UNSEEN_NICK,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 FALSE, max);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (l_im != NULL && l_chat != NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return g_list_concat(l_im, l_chat);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else if (l_im != NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return l_im;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return l_chat;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *convs;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *l;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int count;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 DockletStatus newstatus = DOCKLET_STATUS_OFFLINE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gboolean pending = FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* determine if any ims have unseen messages */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 convs = get_pending_list(DOCKLET_TOOLTIP_LINE_LIMIT);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (convs != NULL) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 pending = TRUE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* set tooltip if messages are pending */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (ui_ops->set_tooltip) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GString *tooltip_text = g_string_new("");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (l = convs, count = 0 ; l != NULL ; l = l->next, count++) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (GAIM_IS_GTK_CONVERSATION(l->data)) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION((GaimConversation *)l->data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (count == DOCKLET_TOOLTIP_LINE_LIMIT - 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_string_append(tooltip_text, _("Right-click for more unread messages...\n"));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_string_append_printf(tooltip_text,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ngettext("%d unread message from %s\n", "%d unread messages from %s\n", gtkconv->unseen_count),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtkconv->unseen_count,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_label_get_text(GTK_LABEL(gtkconv->tab_label)));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* get rid of the last newline */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (tooltip_text->len > 0)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 tooltip_text = g_string_truncate(tooltip_text, tooltip_text->len - 1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->set_tooltip(tooltip_text->str);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_string_free(tooltip_text, TRUE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_list_free(convs);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else if (ui_ops->set_tooltip) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->set_tooltip(NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* iterate through all accounts and determine which
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * status to show in the tray icon based on the following
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * ranks (highest encountered rank will be used):
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * 1) OFFLINE
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * 2) ONLINE
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * 3) ONLINE_PENDING
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * 4) AWAY
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * 5) AWAY_PENDING
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * 6) CONNECTING
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for(l = gaim_accounts_get_all(); l != NULL; l = l->next) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 DockletStatus tmpstatus = DOCKLET_STATUS_OFFLINE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimAccount *account = (GaimAccount*)l->data;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimStatus *account_status;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!gaim_account_get_enabled(account, GAIM_GTK_UI))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 continue;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (gaim_account_is_disconnected(account))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 continue;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 account_status = gaim_account_get_active_status(account);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (gaim_account_is_connecting(account)) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 tmpstatus = DOCKLET_STATUS_CONNECTING;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else if (gaim_status_is_online(account_status)) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!gaim_status_is_available(account_status)) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (pending)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 tmpstatus = DOCKLET_STATUS_AWAY_PENDING;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 tmpstatus = DOCKLET_STATUS_AWAY;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (pending)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 tmpstatus = DOCKLET_STATUS_ONLINE_PENDING;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 tmpstatus = DOCKLET_STATUS_ONLINE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (tmpstatus > newstatus)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 newstatus = tmpstatus;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* update the icon if we changed status */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (status != newstatus) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 status = newstatus;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (ui_ops && ui_ops->update_icon)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->update_icon(status);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* and schedule the blinker function if messages are pending */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if ((status == DOCKLET_STATUS_ONLINE_PENDING
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 || status == DOCKLET_STATUS_AWAY_PENDING)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 && docklet_blinking_timer == 0) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_blinking_timer = g_timeout_add(500, docklet_blink_icon, &handle);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return FALSE; /* for when we're called by the glib idle handler */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 online_account_supports_chat()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *c = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 c = gaim_connections_get_all();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 while(c != NULL) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimConnection *gc = c->data;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimPluginProtocolInfo *prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (prpl_info != NULL && prpl_info->chat_info != NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return TRUE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 c = c->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /**************************************************************************
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * callbacks and signal handlers
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 **************************************************************************/
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_quit_cb()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* TODO: confirm quit while pending */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status_cb(void *data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_prefs_cb(const char *name, GaimPrefType type,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gconstpointer val, gpointer data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_conv_updated_cb(GaimConversation *conv, GaimConvUpdateType type)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (type == GAIM_CONV_UPDATE_UNSEEN)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_signed_on_cb(GaimConnection *gc)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!enable_join_chat) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 enable_join_chat = TRUE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_signed_off_cb(GaimConnection *gc)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (enable_join_chat) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 enable_join_chat = online_account_supports_chat();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /**************************************************************************
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * docklet pop-up menu
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 **************************************************************************/
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_toggle_mute(GtkWidget *toggle, void *data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_prefs_set_bool("/gaim/gtk/sound/mute", GTK_CHECK_MENU_ITEM(toggle)->active);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_toggle_blist(GtkWidget *toggle, void *data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_blist_set_visible(GTK_CHECK_MENU_ITEM(toggle)->active);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef _WIN32
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* This is a workaround for a bug in windows GTK+. Clicking outside of the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menu does not get rid of it, so instead we get rid of it as soon as the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 pointer leaves the menu. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 hide_docklet_menu(gpointer data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (data != NULL) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_popdown(GTK_MENU(data));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_menu_leave_enter(GtkWidget *menu, GdkEventCrossing *event, void *data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static guint hide_docklet_timer = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (event->type == GDK_LEAVE_NOTIFY && event->detail == GDK_NOTIFY_ANCESTOR) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_debug(GAIM_DEBUG_INFO, "docklet", "menu leave-notify-event\n");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Add some slop so that the menu doesn't annoyingly disappear when mousing around */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (hide_docklet_timer == 0) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 hide_docklet_timer = gaim_timeout_add(500,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 hide_docklet_menu, menu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else if (event->type == GDK_ENTER_NOTIFY && event->detail == GDK_NOTIFY_ANCESTOR) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_debug(GAIM_DEBUG_INFO, "docklet", "menu enter-notify-event\n");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (hide_docklet_timer != 0) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Cancel the hiding if we reenter */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_timeout_remove(hide_docklet_timer);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 hide_docklet_timer = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 show_custom_status_editor_cb(GtkMenuItem *menuitem, gpointer user_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimSavedStatus *saved_status;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 saved_status = gaim_savedstatus_get_current();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_gtk_status_editor_show(FALSE,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_savedstatus_is_transient(saved_status) ? saved_status : NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 activate_status_primitive_cb(GtkMenuItem *menuitem, gpointer user_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimStatusPrimitive primitive;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimSavedStatus *saved_status;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 primitive = GPOINTER_TO_INT(user_data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Try to lookup an already existing transient saved status */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 saved_status = gaim_savedstatus_find_transient_by_type_and_message(primitive, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Create a new transient saved status if we weren't able to find one */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (saved_status == NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 saved_status = gaim_savedstatus_new(NULL, primitive);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Set the status for each account */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_savedstatus_activate(saved_status);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 activate_saved_status_cb(GtkMenuItem *menuitem, gpointer user_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 time_t creation_time;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimSavedStatus *saved_status;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 creation_time = GPOINTER_TO_INT(user_data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 saved_status = gaim_savedstatus_find_by_creation_time(creation_time);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (saved_status != NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_savedstatus_activate(saved_status);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static GtkWidget *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(GtkWidget *menu, const char *str, GaimStatusPrimitive primitive, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *menuitem;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GdkPixbuf *pixbuf;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *image;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menuitem = gtk_image_menu_item_new_with_mnemonic(str);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (menu)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (sf)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_signal_connect(G_OBJECT(menuitem), "activate", sf, data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 pixbuf = gaim_gtk_create_gaim_icon_with_status(primitive, 0.5);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 image = gtk_image_new_from_pixbuf(pixbuf);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_object_unref(pixbuf);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_show_all(menuitem);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return menuitem;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static GtkWidget *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_status_submenu()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *submenu, *menuitem;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *popular_statuses, *cur;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 submenu = gtk_menu_new();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menuitem = gtk_menu_item_new_with_label(_("Change Status"));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(submenu, _("Available"),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_STATUS_AVAILABLE, G_CALLBACK(activate_status_primitive_cb),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GINT_TO_POINTER(GAIM_STATUS_AVAILABLE), 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(submenu, _("Away"),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_STATUS_AWAY, G_CALLBACK(activate_status_primitive_cb),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GINT_TO_POINTER(GAIM_STATUS_AWAY), 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(submenu, _("Invisible"),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_STATUS_INVISIBLE, G_CALLBACK(activate_status_primitive_cb),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GINT_TO_POINTER(GAIM_STATUS_INVISIBLE), 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(submenu, _("Offline"),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_STATUS_OFFLINE, G_CALLBACK(activate_status_primitive_cb),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GINT_TO_POINTER(GAIM_STATUS_OFFLINE), 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 popular_statuses = gaim_savedstatuses_get_popular(6);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (popular_statuses != NULL)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_separator(submenu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (cur = popular_statuses; cur != NULL; cur = cur->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GaimSavedStatus *saved_status = cur->data;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 time_t creation_time = gaim_savedstatus_get_creation_time(saved_status);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(submenu,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_savedstatus_get_title(saved_status),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_savedstatus_get_type(saved_status), G_CALLBACK(activate_saved_status_cb),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GINT_TO_POINTER(creation_time), 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_list_free(popular_statuses);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_separator(submenu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(submenu, _("New..."), GAIM_STATUS_AVAILABLE, G_CALLBACK(show_custom_status_editor_cb), NULL, 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_menu_item_with_gaim_icon(submenu, _("Saved..."), GAIM_STATUS_AVAILABLE, G_CALLBACK(gaim_gtk_status_window_show), NULL, 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return menuitem;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_menu() {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static GtkWidget *menu = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *menuitem;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (menu) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_destroy(menu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menu = gtk_menu_new();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menuitem = gtk_check_menu_item_new_with_label(_("Show Buddy List"));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), gaim_prefs_get_bool("/gaim/gtk/blist/list_visible"));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_signal_connect(G_OBJECT(menuitem), "toggled", G_CALLBACK(docklet_toggle_blist), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menuitem = gtk_menu_item_new_with_label(_("Unread Messages"));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (status == DOCKLET_STATUS_ONLINE_PENDING || status == DOCKLET_STATUS_AWAY_PENDING) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *submenu = gtk_menu_new();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *l = get_pending_list(0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (l == NULL) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_set_sensitive(menuitem, FALSE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_debug_warning("docklet",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 "status indicates messages pending, but no conversations with unseen messages were found.");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_gtk_conversations_fill_menu(submenu, l);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_list_free(l);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_set_sensitive(menuitem, FALSE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_separator(menu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menuitem = gaim_new_item_from_stock(menu, _("New Message..."), GAIM_STOCK_IM, G_CALLBACK(gaim_gtkdialogs_im), NULL, 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (status == DOCKLET_STATUS_OFFLINE)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_set_sensitive(menuitem, FALSE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menuitem = docklet_status_submenu();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_separator(menu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_new_item_from_stock(menu, _("Accounts"), GAIM_STOCK_ACCOUNTS, G_CALLBACK(gaim_gtk_accounts_window_show), NULL, 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_new_item_from_stock(menu, _("Plugins"), GAIM_STOCK_PLUGIN, G_CALLBACK(gaim_gtk_plugin_dialog_show), NULL, 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_new_item_from_stock(menu, _("Preferences"), GTK_STOCK_PREFERENCES, G_CALLBACK(gaim_gtk_prefs_show), NULL, 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_separator(menu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menuitem = gtk_check_menu_item_new_with_label(_("Mute Sounds"));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), gaim_prefs_get_bool("/gaim/gtk/sound/mute"));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!strcmp(gaim_prefs_get_string("/gaim/gtk/sound/method"), "none"))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_set_sensitive(GTK_WIDGET(menuitem), FALSE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_signal_connect(G_OBJECT(menuitem), "toggled", G_CALLBACK(docklet_toggle_mute), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_separator(menu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* TODO: need a submenu to change status, this needs to "link"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * to the status in the buddy list gtkstatusbox
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_new_item_from_stock(menu, _("Quit"), GTK_STOCK_QUIT, G_CALLBACK(gaim_core_quit), NULL, 0, 0, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef _WIN32
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_signal_connect(menu, "leave-notify-event", G_CALLBACK(docklet_menu_leave_enter), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_signal_connect(menu, "enter-notify-event", G_CALLBACK(docklet_menu_leave_enter), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_show_all(menu);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_menu_popup(GTK_MENU(menu), NULL, NULL,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->position_menu,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL, 0, gtk_get_current_event_time());
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /**************************************************************************
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * public api for ui_ops
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 **************************************************************************/
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_clicked(int button_type)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 switch (button_type) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 case 1:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (status == DOCKLET_STATUS_ONLINE_PENDING || status == DOCKLET_STATUS_AWAY_PENDING) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GList *l = get_pending_list(1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (l != NULL) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_gtkconv_present_conversation((GaimConversation *)l->data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 g_list_free(l);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 } else {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_gtk_blist_toggle_visibility();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 break;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 case 3:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_menu();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 break;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_embedded()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!visibility_manager) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_gtk_blist_visibility_manager_add();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 visibility_manager = TRUE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_update_status();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (ui_ops && ui_ops->update_icon)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->update_icon(status);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_remove()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (visibility_manager) {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_gtk_blist_visibility_manager_remove();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 visibility_manager = FALSE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_unload()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_plugin_unload(handle);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_set_ui_ops(struct docklet_ui_ops *ops)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops = ops;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /**************************************************************************
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 * plugin glue
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 **************************************************************************/
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin_load(GaimPlugin *plugin)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void *conn_handle = gaim_connections_get_handle();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void *conv_handle = gaim_conversations_get_handle();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void *accounts_handle = gaim_accounts_get_handle();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void *core_handle = gaim_get_core();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_debug(GAIM_DEBUG_INFO, "docklet", "plugin loaded\n");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 handle = plugin;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_ui_init();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (ui_ops && ui_ops->create)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->create();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(conn_handle, "signed-on",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(docklet_signed_on_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(conn_handle, "signed-off",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(docklet_signed_off_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(accounts_handle, "account-status-changed",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(docklet_update_status_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(conv_handle, "received-im-msg",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(docklet_update_status_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(conv_handle, "conversation-created",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(docklet_update_status_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(conv_handle, "deleting-conversation",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(docklet_update_status_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(conv_handle, "conversation-updated",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(docklet_conv_updated_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signal_connect(core_handle, "quitting",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin, GAIM_CALLBACK(gaim_quit_cb), NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_prefs_connect_callback(plugin, "/plugins/gtk/docklet/blink_im",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_prefs_cb, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_prefs_connect_callback(plugin, "/plugins/gtk/docklet/blink_chat",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 docklet_prefs_cb, NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 enable_join_chat = online_account_supports_chat();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return TRUE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static gboolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin_unload(GaimPlugin *plugin)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (ui_ops && ui_ops->destroy)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ui_ops->destroy();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* remove callbacks */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_signals_disconnect_by_handle(handle);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_prefs_disconnect_by_handle(handle);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_debug(GAIM_DEBUG_INFO, "docklet", "plugin unloaded\n");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return TRUE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static GtkWidget *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin_config_frame(GaimPlugin *plugin)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *frame;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *vbox;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkSizeGroup *sg;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GtkWidget *dd;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 frame = gtk_vbox_new(FALSE, 18);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_container_set_border_width(GTK_CONTAINER(frame), 12);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 vbox = gaim_gtk_make_frame(frame, _("Blink tray icon for unread..."));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 dd = gaim_gtk_prefs_dropdown(vbox, _("_Instant Messages:"),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_PREF_STRING, "/plugins/gtk/docklet/blink_im",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 _("Never"), "never",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 _("In hidden conversations"), "hidden",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 _("Always"), "always",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_size_group_add_widget(sg, dd);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 dd = gaim_gtk_prefs_dropdown(vbox, _("C_hat Messages:"),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_PREF_STRING, "/plugins/gtk/docklet/blink_chat",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 _("Never"), "never",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 _("When my nick is said"), "nick",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 _("Always"), "always",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_size_group_add_widget(sg, dd);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gtk_widget_show_all(frame);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return frame;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static GaimGtkPluginUiInfo ui_info =
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin_config_frame,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0 /* page_num (Reserved) */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 };
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static GaimPluginInfo info =
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_PLUGIN_MAGIC,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_MAJOR_VERSION,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_MINOR_VERSION,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_PLUGIN_STANDARD, /**< type */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0, /**< flags */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL, /**< dependencies */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_PRIORITY_DEFAULT, /**< priority */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 DOCKLET_PLUGIN_ID, /**< id */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 N_("System Tray Icon"), /**< name */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 VERSION, /**< version */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /** summary */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 N_("Displays an icon for Gaim in the system tray."),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /** description */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 N_("Displays a system tray icon (in GNOME, KDE, or Windows for example) "
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 "to show the current status of Gaim, allow fast access to commonly "
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 "used functions, and to toggle display of the buddy list. "
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 "Also provides options to blink for unread messages."),
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /** author */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 "Robert McQueen <robot101@debian.org>"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 "\n\t\t\tCasey Harkins <charkins@users.sf.net>",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_WEBSITE, /**< homepage */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin_load, /**< load */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin_unload, /**< unload */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL, /**< destroy */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 &ui_info, /**< ui_info */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL, /**< extra_info */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 NULL
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 };
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 plugin_init(GaimPlugin *plugin)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_prefs_add_none("/plugins/gtk/docklet");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_prefs_add_string("/plugins/gtk/docklet/blink_im", "hidden");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 gaim_prefs_add_string("/plugins/gtk/docklet/blink_chat", "never");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GAIM_INIT_PLUGIN(docklet, plugin_init, info)