Mercurial > pidgin
annotate src/gaim-client-example.c @ 11261:b53606580f68
[gaim-migrate @ 13439]
Patch #1226486 from Levi Bard
Fixes bug #1224178
If you change the topic in a chat room and that topic change is rejected, the
topic field is wrong -- it shows the new topic even thought it didn't get set.
This patch resets the GUI's topic immediately when you hit enter. Then, if the
topic change is successful, the server will echo the topic change back to us
and we'll update the GUI to the new topic.
The only question is, does the server always echo the topic back to us? From the
core's point of view, I'm ready to assume yes. It's the case for both IRC and
Jabber*. If someone could test changing a topic in SILC or Zephyr, that'd be
great. If servers using those protocols do not echo the topic back, the prpl
will have to fake it as appropriate.
* I didn't actually test on Jabber, but Nathan said the server will echo the
topic change back. If it's broken, let me know.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 14 Aug 2005 06:55:57 +0000 |
parents | 66f872f30e40 |
children | 421a8523ad04 |
rev | line source |
---|---|
11241 | 1 #define DBUS_API_SUBJECT_TO_CHANGE |
2 | |
3 #include <stdio.h> | |
4 #include <stdlib.h> | |
5 | |
6 #include "gaim-client.h" | |
7 | |
8 /* | |
9 This example demonstrates how to use libgaim-client to communicate | |
10 with gaim. The names and signatures of functions provided by | |
11 libgaim-client are the same as those in gaim. However, all | |
12 structures (such as GaimAccount) are opaque, that is, you can only | |
13 use pointer to them. In fact, these pointers DO NOT actually point | |
14 to anything, they are just integer identifiers of assigned to these | |
15 structures by gaim. So NEVER try to dereference these pointers. | |
16 Integer ids as disguised as pointers to provide type checking and | |
17 prevent mistakes such as passing an id of GaimAccount when an id of | |
18 GaimBuddy is expected. According to glib manual, this technique is | |
19 portable. | |
20 */ | |
21 | |
22 int main (int argc, char **argv) | |
23 { | |
24 GaimAccount *account; | |
25 gaim_init(); | |
26 | |
27 account = gaim_accounts_find_any("", ""); | |
28 g_print("Alias: %s\n", gaim_account_get_alias(account)); | |
29 | |
30 return 0; | |
31 } |