Mercurial > pidgin
annotate plugins/ipc-test-client.c @ 11454:201617d49573
[gaim-migrate @ 13693]
This commit includes a number of changes:
1. Aliases are now used consistently in chats. If the prpl uses unique screen names for chats (e.g. Jabber), then aliases are not used at all.
2. The chat list is now colorized to match the colors used in the chat itself.
3. Buddies are bolded in the chat user list.
4. Buddies are sorted above non-buddies in the chat user list.
5. The chat user list is ellipsized when possible (i.e. on GTK+ 2.6.0 or above).
6. I've accepted patch #1178248, by Matt Amato to add "buddy-added" and "buddy-removed" signals. These were used in my implementation of #3 and #4, to update the GUI when users are added or removed from the buddy list.
7. I've added a "blist-node-aliased" signal that is emitted when a buddy, contact, or chat is aliased.
8. Since it was hard to separate and I need it at some point, I'm letting it slip in... I've changed GaimConversation.log to be a GList named logs. This way, we can have multiple logs for a single conversation. This will be necessary to implement unnamed chat logging in some reasonable fasion (see my notes in the TODO file).
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Tue, 06 Sep 2005 03:04:07 +0000 |
| parents | bb0d7b719af2 |
| children |
| rev | line source |
|---|---|
| 6822 | 1 /* |
| 2 * IPC test client plugin. | |
| 3 * | |
| 4 * Copyright (C) 2003 Christian Hammond. | |
| 5 * | |
| 6 * This program is free software; you can redistribute it and/or | |
| 7 * modify it under the terms of the GNU General Public License as | |
| 8 * published by the Free Software Foundation; either version 2 of the | |
| 9 * License, or (at your option) any later version. | |
| 10 * | |
| 11 * This program is distributed in the hope that it will be useful, but | |
| 12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 * General Public License for more details. | |
| 15 * | |
| 16 * You should have received a copy of the GNU General Public License | |
| 17 * along with this program; if not, write to the Free Software | |
| 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
| 19 * 02111-1307, USA. | |
| 20 */ | |
| 21 #include "internal.h" | |
| 22 #include "debug.h" | |
| 23 #include "plugin.h" | |
| 9954 | 24 #include "version.h" |
| 6822 | 25 |
| 26 #define IPC_TEST_CLIENT_PLUGIN_ID "core-ipc-test-client" | |
| 27 | |
| 28 static gboolean | |
| 29 plugin_load(GaimPlugin *plugin) | |
| 30 { | |
| 31 GaimPlugin *server_plugin; | |
| 32 gboolean ok; | |
| 33 int result; | |
| 34 | |
| 35 server_plugin = gaim_plugins_find_with_id("core-ipc-test-server"); | |
| 36 | |
| 37 if (server_plugin == NULL) | |
| 38 { | |
| 39 gaim_debug_error("ipc-test-client", | |
| 40 "Unable to locate plugin core-ipc-test-server, " | |
| 41 "needed for IPC.\n"); | |
| 42 | |
| 43 return TRUE; | |
| 44 } | |
| 45 | |
| 46 result = (int)gaim_plugin_ipc_call(server_plugin, "add", &ok, 36, 6); | |
| 47 | |
| 48 if (!ok) | |
| 49 { | |
| 50 gaim_debug_error("ipc-test-client", | |
| 51 "Unable to call IPC function 'add' in " | |
| 52 "core-ipc-test-server plugin."); | |
| 53 | |
| 54 return TRUE; | |
| 55 } | |
| 56 | |
| 57 gaim_debug_info("ipc-test-client", "36 + 6 = %d\n", result); | |
| 58 | |
| 59 result = (int)gaim_plugin_ipc_call(server_plugin, "sub", &ok, 50, 8); | |
| 60 | |
| 61 if (!ok) | |
| 62 { | |
| 63 gaim_debug_error("ipc-test-client", | |
| 64 "Unable to call IPC function 'sub' in " | |
| 65 "core-ipc-test-server plugin."); | |
| 66 | |
| 67 return TRUE; | |
| 68 } | |
| 69 | |
| 70 gaim_debug_info("ipc-test-client", "50 - 8 = %d\n", result); | |
| 71 | |
| 72 return TRUE; | |
| 73 } | |
| 74 | |
| 75 static GaimPluginInfo info = | |
| 76 { | |
| 9954 | 77 GAIM_PLUGIN_MAGIC, |
| 78 GAIM_MAJOR_VERSION, | |
| 79 GAIM_MINOR_VERSION, | |
| 6822 | 80 GAIM_PLUGIN_STANDARD, /**< type */ |
| 81 NULL, /**< ui_requirement */ | |
| 82 0, /**< flags */ | |
| 83 NULL, /**< dependencies */ | |
| 84 GAIM_PRIORITY_DEFAULT, /**< priority */ | |
| 85 | |
| 86 IPC_TEST_CLIENT_PLUGIN_ID, /**< id */ | |
| 87 N_("IPC Test Client"), /**< name */ | |
| 88 VERSION, /**< version */ | |
| 89 /** summary */ | |
| 90 N_("Test plugin IPC support, as a client."), | |
| 91 /** description */ | |
| 92 N_("Test plugin IPC support, as a client. This locates the server " | |
| 93 "plugin and calls the commands registered."), | |
| 94 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
| 95 GAIM_WEBSITE, /**< homepage */ | |
| 96 | |
| 97 plugin_load, /**< load */ | |
|
11256
bb0d7b719af2
[gaim-migrate @ 13430]
Gary Kramlich <grim@reaperworld.com>
parents:
11033
diff
changeset
|
98 NULL, /**< unload */ |
| 6822 | 99 NULL, /**< destroy */ |
| 100 | |
| 101 NULL, /**< ui_info */ | |
| 8993 | 102 NULL, /**< extra_info */ |
| 103 NULL, | |
| 104 NULL | |
| 6822 | 105 }; |
| 106 | |
| 107 static void | |
| 108 init_plugin(GaimPlugin *plugin) | |
| 109 { | |
| 110 info.dependencies = g_list_append(info.dependencies, | |
| 111 "core-ipc-test-server"); | |
| 112 } | |
| 113 | |
| 114 GAIM_INIT_PLUGIN(ipctestclient, init_plugin, info) |
