Mercurial > pidgin.yaz
comparison libpurple/conversation.c @ 18004:d40fd7106ebf
merge of '1c5a391126b5b506a29f0b9e34160d239cb783c6'
and 'e0047b3a4f8f0a76a5b0a315b9d763043a392d33'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 15 Jun 2007 08:16:29 +0000 |
parents | 25d808baa395 7935fe8ed901 |
children | 97b735ca9d7a |
comparison
equal
deleted
inserted
replaced
17883:821ae99678d6 | 18004:d40fd7106ebf |
---|---|
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" |
1991 g_return_val_if_fail(cb != NULL, NULL); | 1992 g_return_val_if_fail(cb != NULL, NULL); |
1992 | 1993 |
1993 return cb->name; | 1994 return cb->name; |
1994 } | 1995 } |
1995 | 1996 |
1997 GList * | |
1998 purple_conversation_get_extended_menu(PurpleConversation *conv) | |
1999 { | |
2000 GList *menu = NULL; | |
2001 | |
2002 g_return_val_if_fail(conv != NULL, NULL); | |
2003 | |
2004 purple_signal_emit(purple_conversations_get_handle(), | |
2005 "conversation-extended-menu", conv, &menu); | |
2006 return menu; | |
2007 } | |
2008 | |
2009 gboolean | |
2010 purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, | |
2011 const gchar *markup, gchar **error) | |
2012 { | |
2013 char *mark = (markup && *markup) ? NULL : g_markup_escape_text(cmdline, -1), *err = NULL; | |
2014 PurpleCmdStatus status = purple_cmd_do_command(conv, cmdline, mark ? mark : markup, error ? error : &err); | |
2015 g_free(mark); | |
2016 g_free(err); | |
2017 return (status == PURPLE_CMD_STATUS_OK); | |
2018 } | |
2019 | |
1996 void * | 2020 void * |
1997 purple_conversations_get_handle(void) | 2021 purple_conversations_get_handle(void) |
1998 { | 2022 { |
1999 static int handle; | 2023 static int handle; |
2000 | 2024 |
2254 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, | 2278 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, |
2255 purple_value_new(PURPLE_TYPE_SUBTYPE, | 2279 purple_value_new(PURPLE_TYPE_SUBTYPE, |
2256 PURPLE_SUBTYPE_CONVERSATION), | 2280 PURPLE_SUBTYPE_CONVERSATION), |
2257 purple_value_new(PURPLE_TYPE_STRING), | 2281 purple_value_new(PURPLE_TYPE_STRING), |
2258 purple_value_new(PURPLE_TYPE_STRING)); | 2282 purple_value_new(PURPLE_TYPE_STRING)); |
2283 | |
2284 purple_signal_register(handle, "conversation-extended-menu", | |
2285 purple_marshal_VOID__POINTER_POINTER, NULL, 2, | |
2286 purple_value_new(PURPLE_TYPE_SUBTYPE, | |
2287 PURPLE_SUBTYPE_CONVERSATION), | |
2288 purple_value_new(PURPLE_TYPE_BOXED, "GList **")); | |
2259 } | 2289 } |
2260 | 2290 |
2261 void | 2291 void |
2262 purple_conversations_uninit(void) | 2292 purple_conversations_uninit(void) |
2263 { | 2293 { |