Mercurial > pidgin.yaz
comparison libpurple/conversation.c @ 18043:6b7b13adb9b1
propagate from branch 'im.pidgin.pidgin' (head ac83216c7b78e652b47f1fd0bcb91f1eaf2cdf36)
to branch 'im.pidgin.pidgin.2.1.0' (head 30a48520e9bc26b0d3914edad456b063cd6cf9fe)
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 04 Jun 2007 23:48:54 +0000 |
parents | 2a6fb7c6d030 70fb7663a918 |
children | 2f9eabdc6011 |
comparison
equal
deleted
inserted
replaced
18036:ee9f7ee0be66 | 18043:6b7b13adb9b1 |
---|---|
19 * along with this program; if not, write to the Free Software | 19 * along with this program; if not, write to the Free Software |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 */ | 21 */ |
22 #include "internal.h" | 22 #include "internal.h" |
23 #include "blist.h" | 23 #include "blist.h" |
24 #include "cmds.h" | |
24 #include "conversation.h" | 25 #include "conversation.h" |
25 #include "dbus-maybe.h" | 26 #include "dbus-maybe.h" |
26 #include "debug.h" | 27 #include "debug.h" |
27 #include "imgstore.h" | 28 #include "imgstore.h" |
28 #include "notify.h" | 29 #include "notify.h" |
1997 g_return_val_if_fail(cb != NULL, NULL); | 1998 g_return_val_if_fail(cb != NULL, NULL); |
1998 | 1999 |
1999 return cb->name; | 2000 return cb->name; |
2000 } | 2001 } |
2001 | 2002 |
2003 GList * | |
2004 purple_conversation_get_extended_menu(PurpleConversation *conv) | |
2005 { | |
2006 GList *menu = NULL; | |
2007 | |
2008 g_return_val_if_fail(conv != NULL, NULL); | |
2009 | |
2010 purple_signal_emit(purple_conversations_get_handle(), | |
2011 "conversation-extended-menu", conv, &menu); | |
2012 return menu; | |
2013 } | |
2014 | |
2015 gboolean | |
2016 purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, | |
2017 const gchar *markup, gchar **error) | |
2018 { | |
2019 char *mark = (markup && *markup) ? NULL : g_markup_escape_text(cmdline, -1), *err = NULL; | |
2020 PurpleCmdStatus status = purple_cmd_do_command(conv, cmdline, mark ? mark : markup, error ? error : &err); | |
2021 g_free(mark); | |
2022 g_free(err); | |
2023 return (status == PURPLE_CMD_STATUS_OK); | |
2024 } | |
2025 | |
2002 void * | 2026 void * |
2003 purple_conversations_get_handle(void) | 2027 purple_conversations_get_handle(void) |
2004 { | 2028 { |
2005 static int handle; | 2029 static int handle; |
2006 | 2030 |
2260 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, | 2284 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, |
2261 purple_value_new(PURPLE_TYPE_SUBTYPE, | 2285 purple_value_new(PURPLE_TYPE_SUBTYPE, |
2262 PURPLE_SUBTYPE_CONVERSATION), | 2286 PURPLE_SUBTYPE_CONVERSATION), |
2263 purple_value_new(PURPLE_TYPE_STRING), | 2287 purple_value_new(PURPLE_TYPE_STRING), |
2264 purple_value_new(PURPLE_TYPE_STRING)); | 2288 purple_value_new(PURPLE_TYPE_STRING)); |
2289 | |
2290 purple_signal_register(handle, "conversation-extended-menu", | |
2291 purple_marshal_VOID__POINTER_POINTER, NULL, 2, | |
2292 purple_value_new(PURPLE_TYPE_SUBTYPE, | |
2293 PURPLE_SUBTYPE_CONVERSATION), | |
2294 purple_value_new(PURPLE_TYPE_BOXED, "GList **")); | |
2265 } | 2295 } |
2266 | 2296 |
2267 void | 2297 void |
2268 purple_conversations_uninit(void) | 2298 purple_conversations_uninit(void) |
2269 { | 2299 { |