Mercurial > pidgin
view src/protocols/gg/lib/obsolete.c @ 12116:e75ef7aa913e
[gaim-migrate @ 14416]
" This patch implements a replacement for the queuing
system from 1.x. It also obsoletes a previous patch
[#1338873] I submitted to prioritize the unseen states
in gtk conversations.
The attached envelope.png is ripped from the
msgunread.png already included in gaim. It should be
dropped in the pixmaps directory (Makefile.am is
updated accordingly in this patch).
The two separate queuing preferences from 1.x, queuing
messages while away and queuing all new messages (from
docklet), are replaced with a single 3-way preference
for conversations. The new preference is "Hide new IM
conversations". This preference can be set to never,
away and always.
When a gtk conversation is created, it may be placed in
a hidden conversation window instead of being placed
normally. This decision is based upon the preference
and possibly the away state of the account the
conversation is being created for. This *will* effect
conversations the user explicitly requests to be
created, so in these cases the caller must be sure to
present the conversation to the user, using
gaim_gtkconv_present_conversation(). This is done
already in gtkdialogs.c which handles creating
conversations requested by the user from gaim proper
(menus, double-clicking on budy in blist, etc.).
The main advantage to not queuing messages is that the
conversations exist, the message is written to the
conversation (and logged if appropriate) and the unseen
state is set on the conversation. This means no
additional features are needed to track whether there
are queued messages or not, just use the unseen state
on conversations.
Since conversations may not be visible (messages
"queued"), gaim proper needs some notification that
there are messages waiting. I opted for a menutray icon
that shows up when an im conversation has an unseen
message. Clicking this icon will focus (and show if
hidden) the first conversation with an unseen message.
This is essentially the same behavior of the docklet in
cvs right now, except that the icon is only visible
when there is a conversation with an unread message.
The api that is added is flexible enough to allow
either the docklet or the new blist menutray icon to be
visible for conversations of any/all types and for
unseen messages >= any state. Currently they are set to
only IM conversations and only unseen states >= TEXT
(system messages and no log messages will not trigger
blinking the docklet or showing the blist tray icon),
but these could be made preferences relatively easily
in the future. Other plugins could probably benefit as
well: gaim_gtk_conversations_get_first_unseen().
There is probably some limit to comment size, so I'll
stop rambling now. If anyone has more
questions/comments, catch me in #gaim, here or on
gaim-devel."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 16 Nov 2005 18:17:01 +0000 |
parents | cf15c1cdcfbd |
children |
line wrap: on
line source
/* $Id: obsolete.c 13582 2005-08-28 22:46:01Z boler $ */ /* * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License Version * 2.1 as published by the Free Software Foundation. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser 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. */ /* * Plik zawiera deklaracje funkcji, które są już nieaktualne ze względu * na zmiany w protokole, ale są wymagane przez aplikacje linkowane ze * starszymi wersjami bibliotek. */ #include <errno.h> #include "libgadu.h" struct gg_http *gg_userlist_get(uin_t uin, const char *passwd, int async) { gg_debug(GG_DEBUG_MISC, "// gg_userlist_get() is obsolete. use gg_userlist_request() instead!\n"); errno = EINVAL; return NULL; } int gg_userlist_get_watch_fd(struct gg_http *h) { errno = EINVAL; return -1; } void gg_userlist_get_free(struct gg_http *h) { } struct gg_http *gg_userlist_put(uin_t uin, const char *password, const char *contacts, int async) { gg_debug(GG_DEBUG_MISC, "// gg_userlist_put() is obsolete. use gg_userlist_request() instead!\n"); errno = EINVAL; return NULL; } int gg_userlist_put_watch_fd(struct gg_http *h) { errno = EINVAL; return -1; } void gg_userlist_put_free(struct gg_http *h) { } struct gg_http *gg_userlist_remove(uin_t uin, const char *passwd, int async) { gg_debug(GG_DEBUG_MISC, "// gg_userlist_remove() is obsolete. use gg_userlist_request() instead!\n"); errno = EINVAL; return NULL; } int gg_userlist_remove_watch_fd(struct gg_http *h) { errno = EINVAL; return -1; } void gg_userlist_remove_free(struct gg_http *h) { } struct gg_http *gg_search(const struct gg_search_request *r, int async) { gg_debug(GG_DEBUG_MISC, "// gg_search() is obsolete. use gg_search50() instead!\n"); errno = EINVAL; return NULL; } int gg_search_watch_fd(struct gg_http *h) { errno = EINVAL; return -1; } void gg_search_free(struct gg_http *h) { } const struct gg_search_request *gg_search_request_mode_0(char *nickname, char *first_name, char *last_name, char *city, int gender, int min_birth, int max_birth, int active, int start) { return NULL; } const struct gg_search_request *gg_search_request_mode_1(char *email, int active, int start) { return NULL; } const struct gg_search_request *gg_search_request_mode_2(char *phone, int active, int start) { return NULL; } const struct gg_search_request *gg_search_request_mode_3(uin_t uin, int active, int start) { return NULL; } void gg_search_request_free(struct gg_search_request *r) { } struct gg_http *gg_register(const char *email, const char *password, int async) { gg_debug(GG_DEBUG_MISC, "// gg_register() is obsolete. use gg_register3() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_register2(const char *email, const char *password, const char *qa, int async) { gg_debug(GG_DEBUG_MISC, "// gg_register2() is obsolete. use gg_register3() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_unregister(uin_t uin, const char *password, const char *email, int async) { gg_debug(GG_DEBUG_MISC, "// gg_unregister() is obsolete. use gg_unregister3() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_unregister2(uin_t uin, const char *password, const char *qa, int async) { gg_debug(GG_DEBUG_MISC, "// gg_unregister2() is obsolete. use gg_unregister3() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_change_passwd(uin_t uin, const char *passwd, const char *newpasswd, const char *newemail, int async) { gg_debug(GG_DEBUG_MISC, "// gg_change_passwd() is obsolete. use gg_change_passwd4() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_change_passwd2(uin_t uin, const char *passwd, const char *newpasswd, const char *email, const char *newemail, int async) { gg_debug(GG_DEBUG_MISC, "// gg_change_passwd2() is obsolete. use gg_change_passwd4() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_change_passwd3(uin_t uin, const char *passwd, const char *newpasswd, const char *qa, int async) { gg_debug(GG_DEBUG_MISC, "// gg_change_passwd3() is obsolete. use gg_change_passwd4() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_remind_passwd(uin_t uin, int async) { gg_debug(GG_DEBUG_MISC, "// gg_remind_passwd() is obsolete. use gg_remind_passwd3() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_remind_passwd2(uin_t uin, const char *tokenid, const char *tokenval, int async) { gg_debug(GG_DEBUG_MISC, "// gg_remind_passwd2() is obsolete. use gg_remind_passwd3() instead!\n"); errno = EINVAL; return NULL; } struct gg_http *gg_change_info(uin_t uin, const char *passwd, const struct gg_change_info_request *request, int async) { gg_debug(GG_DEBUG_MISC, "// gg_change_info() is obsolete. use gg_pubdir50() instead\n"); errno = EINVAL; return NULL; } struct gg_change_info_request *gg_change_info_request_new(const char *first_name, const char *last_name, const char *nickname, const char *email, int born, int gender, const char *city) { return NULL; } void gg_change_info_request_free(struct gg_change_info_request *r) { }