Mercurial > pidgin.yaz
comparison libpurple/conversation.c @ 18002:38a72d6dce7f
merge of '9e832cea16395c9007bc9e384ee379b293b99abd'
and 'bda8b30520ae63b1ce117a6799cb41a65c55018d'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 04 Jun 2007 06:32:21 +0000 |
parents | 70fb7663a918 |
children | 7935fe8ed901 6b7b13adb9b1 |
comparison
equal
deleted
inserted
replaced
17707:01021bb5c709 | 18002:38a72d6dce7f |
---|---|
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" |
1987 g_return_val_if_fail(cb != NULL, NULL); | 1988 g_return_val_if_fail(cb != NULL, NULL); |
1988 | 1989 |
1989 return cb->name; | 1990 return cb->name; |
1990 } | 1991 } |
1991 | 1992 |
1993 GList * | |
1994 purple_conversation_get_extended_menu(PurpleConversation *conv) | |
1995 { | |
1996 GList *menu = NULL; | |
1997 | |
1998 g_return_val_if_fail(conv != NULL, NULL); | |
1999 | |
2000 purple_signal_emit(purple_conversations_get_handle(), | |
2001 "conversation-extended-menu", conv, &menu); | |
2002 return menu; | |
2003 } | |
2004 | |
2005 gboolean | |
2006 purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, | |
2007 const gchar *markup, gchar **error) | |
2008 { | |
2009 char *mark = (markup && *markup) ? NULL : g_markup_escape_text(cmdline, -1), *err = NULL; | |
2010 PurpleCmdStatus status = purple_cmd_do_command(conv, cmdline, mark ? mark : markup, error ? error : &err); | |
2011 g_free(mark); | |
2012 g_free(err); | |
2013 return (status == PURPLE_CMD_STATUS_OK); | |
2014 } | |
2015 | |
1992 void * | 2016 void * |
1993 purple_conversations_get_handle(void) | 2017 purple_conversations_get_handle(void) |
1994 { | 2018 { |
1995 static int handle; | 2019 static int handle; |
1996 | 2020 |
2250 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, | 2274 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, |
2251 purple_value_new(PURPLE_TYPE_SUBTYPE, | 2275 purple_value_new(PURPLE_TYPE_SUBTYPE, |
2252 PURPLE_SUBTYPE_CONVERSATION), | 2276 PURPLE_SUBTYPE_CONVERSATION), |
2253 purple_value_new(PURPLE_TYPE_STRING), | 2277 purple_value_new(PURPLE_TYPE_STRING), |
2254 purple_value_new(PURPLE_TYPE_STRING)); | 2278 purple_value_new(PURPLE_TYPE_STRING)); |
2279 | |
2280 purple_signal_register(handle, "conversation-extended-menu", | |
2281 purple_marshal_VOID__POINTER_POINTER, NULL, 2, | |
2282 purple_value_new(PURPLE_TYPE_SUBTYPE, | |
2283 PURPLE_SUBTYPE_CONVERSATION), | |
2284 purple_value_new(PURPLE_TYPE_BOXED, "GList **")); | |
2255 } | 2285 } |
2256 | 2286 |
2257 void | 2287 void |
2258 purple_conversations_uninit(void) | 2288 purple_conversations_uninit(void) |
2259 { | 2289 { |