Mercurial > pidgin
comparison finch/gntconv.c @ 23911:e22bcca9f2b2
propagate from branch 'im.pidgin.pidgin' (head 9db6cf3ac465ef3a7aca0eee0f47e02d3ea7b162)
to branch 'im.pidgin.soc.2008.vv' (head 3a78233bf1c7dba3fc3750e55a55ec3656f02b29)
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Mon, 18 Aug 2008 06:31:08 +0000 |
parents | 240d847e9e88 |
children | c1e58cfd1107 |
comparison
equal
deleted
inserted
replaced
23877:c48f5c9600c3 | 23911:e22bcca9f2b2 |
---|---|
1287 void (*callback)(void) = data; | 1287 void (*callback)(void) = data; |
1288 callback(); | 1288 callback(); |
1289 return PURPLE_CMD_STATUS_OK; | 1289 return PURPLE_CMD_STATUS_OK; |
1290 } | 1290 } |
1291 | 1291 |
1292 #if GLIB_CHECK_VERSION(2,6,0) | |
1292 static PurpleCmdRet | 1293 static PurpleCmdRet |
1293 cmd_message_color(PurpleConversation *conv, const char *cmd, char **args, char **error, gpointer data) | 1294 cmd_message_color(PurpleConversation *conv, const char *cmd, char **args, char **error, gpointer data) |
1294 { | 1295 { |
1295 int *msgclass = NULL; | 1296 int *msgclass = NULL; |
1296 int fg, bg; | 1297 int fg, bg; |
1327 | 1328 |
1328 init_pair(*msgclass, fg, bg); | 1329 init_pair(*msgclass, fg, bg); |
1329 | 1330 |
1330 return PURPLE_CMD_STATUS_OK; | 1331 return PURPLE_CMD_STATUS_OK; |
1331 } | 1332 } |
1333 #endif | |
1332 | 1334 |
1333 static PurpleCmdRet | 1335 static PurpleCmdRet |
1334 users_command_cb(PurpleConversation *conv, const char *cmd, char **args, char **error, gpointer data) | 1336 users_command_cb(PurpleConversation *conv, const char *cmd, char **args, char **error, gpointer data) |
1335 { | 1337 { |
1336 FinchConv *fc = FINCH_GET_DATA(conv); | 1338 FinchConv *fc = FINCH_GET_DATA(conv); |
1412 cmd_show_window, _("prefs: Show the preference window."), finch_prefs_show_all); | 1414 cmd_show_window, _("prefs: Show the preference window."), finch_prefs_show_all); |
1413 purple_cmd_register("status", "", PURPLE_CMD_P_DEFAULT, | 1415 purple_cmd_register("status", "", PURPLE_CMD_P_DEFAULT, |
1414 PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL, | 1416 PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL, |
1415 cmd_show_window, _("statuses: Show the savedstatuses window."), finch_savedstatus_show_all); | 1417 cmd_show_window, _("statuses: Show the savedstatuses window."), finch_savedstatus_show_all); |
1416 | 1418 |
1419 #if GLIB_CHECK_VERSION(2,6,0) | |
1417 /* Allow customizing the message colors using a command during run-time */ | 1420 /* Allow customizing the message colors using a command during run-time */ |
1418 purple_cmd_register("msgcolor", "www", PURPLE_CMD_P_DEFAULT, | 1421 purple_cmd_register("msgcolor", "www", PURPLE_CMD_P_DEFAULT, |
1419 PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL, | 1422 PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL, |
1420 cmd_message_color, _("msgcolor <class> <foreground> <background>: " | 1423 cmd_message_color, _("msgcolor <class> <foreground> <background>: " |
1421 "Set the color for different classes of messages in the conversation window.<br>" | 1424 "Set the color for different classes of messages in the conversation window.<br>" |
1422 " <class>: receive, send, highlight, action, timestamp<br>" | 1425 " <class>: receive, send, highlight, action, timestamp<br>" |
1423 " <foreground/background>: black, red, green, blue, white, gray, darkgray, magenta, cyan, default<br><br>" | 1426 " <foreground/background>: black, red, green, blue, white, gray, darkgray, magenta, cyan, default<br><br>" |
1424 "EXAMPLE:<br> msgcolor send cyan default"), | 1427 "EXAMPLE:<br> msgcolor send cyan default"), |
1425 NULL); | 1428 NULL); |
1429 #endif | |
1426 | 1430 |
1427 purple_signal_connect(purple_conversations_get_handle(), "buddy-typing", finch_conv_get_handle(), | 1431 purple_signal_connect(purple_conversations_get_handle(), "buddy-typing", finch_conv_get_handle(), |
1428 PURPLE_CALLBACK(update_buddy_typing), NULL); | 1432 PURPLE_CALLBACK(update_buddy_typing), NULL); |
1429 purple_signal_connect(purple_conversations_get_handle(), "buddy-typing-stopped", finch_conv_get_handle(), | 1433 purple_signal_connect(purple_conversations_get_handle(), "buddy-typing-stopped", finch_conv_get_handle(), |
1430 PURPLE_CALLBACK(update_buddy_typing), NULL); | 1434 PURPLE_CALLBACK(update_buddy_typing), NULL); |