Mercurial > pidgin
diff plugins/gaim-remote/remote.c @ 9608:204f5d66a863
[gaim-migrate @ 10451]
" I added two possible commands to gtk-remote: away and back.
away causes the away dialog to appear with the default
message and sets the status to away, back hides the
dialog and sets the status to online.
To implement this, I added to new CUI packet subtypes:
CUI_USER_AWAY and CUI_USER_BACK. This are processed in
core.c by calling do_away_message and do_im_back,
respectively." --Istv?n V?radi
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 28 Jul 2004 00:29:52 +0000 |
parents | eae7e049d639 |
children | 4d05b6e9e9cd |
line wrap: on
line diff
--- a/plugins/gaim-remote/remote.c Wed Jul 28 00:13:37 2004 +0000 +++ b/plugins/gaim-remote/remote.c Wed Jul 28 00:29:52 2004 +0000 @@ -42,6 +42,7 @@ #include "gtkplugin.h" #include "gaim.h" #include "ui.h" +#include "prefs.h" #include <gaim-remote/remote.h> @@ -394,6 +395,22 @@ gaim_account_connect(account); /* don't need to do anything here because the UI will get updates from other handlers */ break; + case CUI_USER_AWAY: + { + GSList* l; + const char* default_away_name = gaim_prefs_get_string("/core/away/default_message"); + + for(l = away_messages; l; l = l->next) { + if(!strcmp(default_away_name, ((struct away_message *)l->data)->name)) { + do_away_message(NULL, l->data); + break; + } + } + } + break; + case CUI_USER_BACK: + do_im_back(NULL, NULL); + break; default: gaim_debug(GAIM_DEBUG_WARNING, "cui", "Unhandled user subtype %d\n", subtype);