Mercurial > pidgin.yaz
diff libpurple/protocols/null/nullprpl.c @ 25365:367b3ddcf5c3
propagate from branch 'im.pidgin.pidgin' (head 81aa401ac9855c99eb55a7cf91fa221860dee220)
to branch 'im.pidgin.pidgin.next.minor' (head cf7b71a77c33c3e1d2f392c46d090fb936eb47b7)
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 08 Dec 2008 17:57:09 +0000 |
parents | 0edd1e140b6e c687fd9c379e |
children | 2d4f0dd04334 |
line wrap: on
line diff
--- a/libpurple/protocols/null/nullprpl.c Mon Dec 08 17:53:46 2008 +0000 +++ b/libpurple/protocols/null/nullprpl.c Mon Dec 08 17:57:09 2008 +0000 @@ -220,25 +220,7 @@ */ static const char *nullprpl_list_icon(PurpleAccount *acct, PurpleBuddy *buddy) { - /* shamelessly steal (er, borrow) the meanwhile protocol icon. it's cute! */ - return "meanwhile"; -} - -static const char *nullprpl_list_emblem(PurpleBuddy *buddy) -{ - const char* emblem; - - if (get_nullprpl_gc(buddy->name)) { - PurplePresence *presence = purple_buddy_get_presence(buddy); - PurpleStatus *status = purple_presence_get_active_status(presence); - emblem = purple_status_get_name(status); - } else { - emblem = "offline"; - } - - purple_debug_info("nullprpl", "using emblem %s for %s's buddy %s\n", - emblem, buddy->account->username, buddy->name); - return emblem; + return "null"; } static char *nullprpl_status_text(PurpleBuddy *buddy) { @@ -305,20 +287,20 @@ NULL_STATUS_ONLINE, NULL_STATUS_AWAY, NULL_STATUS_OFFLINE); type = purple_status_type_new(PURPLE_STATUS_AVAILABLE, NULL_STATUS_ONLINE, - NULL_STATUS_ONLINE, TRUE); - purple_status_type_add_attr(type, "message", _("Online"), + NULL, TRUE); + purple_status_type_add_attr(type, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING)); types = g_list_prepend(types, type); type = purple_status_type_new(PURPLE_STATUS_AWAY, NULL_STATUS_AWAY, - NULL_STATUS_AWAY, TRUE); - purple_status_type_add_attr(type, "message", _("Away"), + NULL, TRUE); + purple_status_type_add_attr(type, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING)); types = g_list_prepend(types, type); type = purple_status_type_new(PURPLE_STATUS_OFFLINE, NULL_STATUS_OFFLINE, - NULL_STATUS_OFFLINE, TRUE); - purple_status_type_add_attr(type, "message", _("Offline"), + NULL, TRUE); + purple_status_type_add_attr(type, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING)); types = g_list_prepend(types, type); @@ -1073,7 +1055,7 @@ PURPLE_ICON_SCALE_DISPLAY, /* scale_rules */ }, nullprpl_list_icon, /* list_icon */ - nullprpl_list_emblem, /* list_emblem */ + NULL, /* list_emblem */ nullprpl_status_text, /* status_text */ nullprpl_tooltip_text, /* tooltip_text */ nullprpl_status_types, /* status_types */ @@ -1130,24 +1112,24 @@ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - NULL, /* padding... */ - NULL, - NULL, - sizeof(PurplePluginProtocolInfo), /* struct_size */ - NULL + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL, /* get_account_text_table */ }; static void nullprpl_init(PurplePlugin *plugin) { /* see accountopt.h for information about user splits and protocol options */ PurpleAccountUserSplit *split = purple_account_user_split_new( - _("Example user split (unused)"), /* text shown to user */ - "default", /* default value */ - '@'); /* field separator */ + _("Example user split"), /* text shown to user */ + "default", /* default value */ + '@'); /* field separator */ PurpleAccountOption *option = purple_account_option_string_new( - _("Example option (unused)"), /* text shown to user */ - "example", /* pref name */ - "default"); /* default value */ + _("Example option"), /* text shown to user */ + "example", /* pref name */ + "default"); /* default value */ purple_debug_info("nullprpl", "starting up\n"); @@ -1156,13 +1138,13 @@ /* register whisper chat command, /msg */ purple_cmd_register("msg", - "ws", /* args: recipient and message */ + "ws", /* args: recipient and message */ PURPLE_CMD_P_DEFAULT, /* priority */ PURPLE_CMD_FLAG_CHAT, "prpl-null", send_whisper, "msg <username> <message>: send a private message, aka a whisper", - NULL); /* userdata */ + NULL); /* userdata */ /* get ready to store offline messages */ goffline_messages = g_hash_table_new_full(g_str_hash, /* hash fn */ @@ -1189,12 +1171,12 @@ NULL, /* dependencies */ PURPLE_PRIORITY_DEFAULT, /* priority */ NULLPRPL_ID, /* id */ - "Nullprpl", /* name */ - "0.3", /* version */ - "Null Protocol Plugin", /* summary */ - "Null Protocol Plugin", /* description */ - "Ryan Barrett <nullprpl@ryanb.org>", /* author */ - "http://snarfed.org/space/pidgin+null+protocol+plugin", /* homepage */ + "Null - Testing Plugin", /* name */ + DISPLAY_VERSION, /* version */ + N_("Null Protocol Plugin"), /* summary */ + N_("Null Protocol Plugin"), /* description */ + NULL, /* author */ + PURPLE_WEBSITE, /* homepage */ NULL, /* load */ NULL, /* unload */ nullprpl_destroy, /* destroy */