# HG changeset patch # User John Bailey # Date 1189737680 0 # Node ID 26f562916f98e05f9df632a791154e7eaf605127 # Parent 6583988a57aeffa7734d5929a945550555c5e613 Comment tweaks to be closer to the version handed out via the wiki as well as removing an unused variable I neglected to remove previously (eliminates an unused variable warning, obviously). diff -r 6583988a57ae -r 26f562916f98 libpurple/plugins/notify_example.c --- a/libpurple/plugins/notify_example.c Fri Sep 14 00:37:11 2007 +0000 +++ b/libpurple/plugins/notify_example.c Fri Sep 14 02:41:20 2007 +0000 @@ -42,6 +42,8 @@ static PurplePlugin *notify_example = NULL; +/* The next four functions and the calls within them should cause dialog boxes to appear + * when you select the plugin action from the Tools->Notify Example menu */ static void notify_error_cb(PurplePluginAction *action) { @@ -74,6 +76,7 @@ static void notify_uri_cb(PurplePluginAction *action) { + /* This one should open your web browser of choice. */ purple_notify_uri(notify_example, "http://www.pidgin.im/"); } @@ -81,8 +84,8 @@ plugin_actions(PurplePlugin *plugin, gpointer context) { GList *actions = NULL; - PurplePluginAction *action = NULL; + /* Here we take advantage of return values to avoid the need for a temp variable */ actions = g_list_prepend(actions, purple_plugin_action_new("Show Error Notification", notify_error_cb)); @@ -104,6 +107,7 @@ static gboolean plugin_load(PurplePlugin *plugin) { + /* we need a handle for all the notify calls */ notify_example = plugin; return TRUE;