pidgin.next.minor: eed6f461: Various nullprpl fixes.
rlaager at pidgin.im
rlaager at pidgin.im
Mon Dec 1 12:26:04 EST 2008
-----------------------------------------------------------------
Revision: eed6f461a9a71f5160e088549f9039fbc36ab496
Ancestor: 216860c045365f72f05cbd8ab9467d7cd529bbdc
Author: rlaager at pidgin.im
Date: 2008-11-30T06:37:29
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/eed6f461a9a71f5160e088549f9039fbc36ab496
Modified files:
libpurple/protocols/null/README
libpurple/protocols/null/nullprpl.c
ChangeLog:
Various nullprpl fixes.
-------------- next part --------------
============================================================
--- libpurple/protocols/null/README 5e35257b4688fd4538215f71cd8508eafcea1987
+++ libpurple/protocols/null/README 3b2353f600846adf4100febdb76c44c3e06c3f3e
@@ -28,11 +28,10 @@ To build, just run ./configure as usual
-----------------------
To build, just run ./configure as usual in the root directory of the pidgin
-source distribution. Then cd libpurple/protocols/null and type make. To
-install, copy libnull.la and .libs/libnull.so into your ~/.purple/plugins
-directory. Then run Pidgin.
+source distribution. Then cd libpurple/protocols/null and then make. To
+install, run make install. Then run Pidgin.
-To build nullprpl on Windows (with Cygwin/MinGW), use Makefile.mingw.
+To build nullprpl on Windows (with Cygwin/MinGW), use: make -f Makefile.mingw
-----
USAGE
============================================================
--- libpurple/protocols/null/nullprpl.c 15bf0da42c6bbe95b1b8723110171d331c33e13a
+++ libpurple/protocols/null/nullprpl.c 549267a8bf014116e5c7ee8716b5e96a43df77db
@@ -220,27 +220,9 @@ static const char *nullprpl_list_icon(Pu
*/
static const char *nullprpl_list_icon(PurpleAccount *acct, PurpleBuddy *buddy)
{
- /* shamelessly steal (er, borrow) the meanwhile protocol icon. it's cute! */
- return "meanwhile";
+ return "null";
}
-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;
-}
-
static char *nullprpl_status_text(PurpleBuddy *buddy) {
purple_debug_info("nullprpl", "getting %s's status text for %s\n",
buddy->name, buddy->account->username);
@@ -304,20 +286,20 @@ static GList *nullprpl_status_types(Purp
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_append(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_append(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_append(types, type);
@@ -1069,7 +1051,7 @@ static PurplePluginProtocolInfo prpl_inf
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 */
@@ -1126,24 +1108,24 @@ static PurplePluginProtocolInfo prpl_inf
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");
@@ -1152,13 +1134,13 @@ static void nullprpl_init(PurplePlugin *
/* 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 */
@@ -1185,12 +1167,12 @@ static PurplePluginInfo info =
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 at 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 */
More information about the Commits
mailing list