/soc/2013/ankitkv/gobjectification: 224906e4600c: removed unnece...

Ankit Vani a at nevitus.org
Sun Sep 22 09:26:35 EDT 2013


Changeset: 224906e4600c27c401f408594615d01609f4d05c
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-22 18:38 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/224906e4600c

Description:

removed unnecessary global variable from helloworld plugin

diffstat:

 libpurple/plugins/helloworld.c |  9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diffs (32 lines):

diff --git a/libpurple/plugins/helloworld.c b/libpurple/plugins/helloworld.c
--- a/libpurple/plugins/helloworld.c
+++ b/libpurple/plugins/helloworld.c
@@ -47,18 +47,13 @@
 #include <plugins.h>
 #include <version.h>
 
-/* we're adding this here and assigning it in plugin_load because we need
- * a valid plugin handle for our call to purple_notify_message() in the
- * plugin_action_test_cb() callback function */
-PurplePlugin *helloworld_plugin = NULL;
-
 /* This function is the callback for the plugin action we added. All we're
  * doing here is displaying a message. When the user selects the plugin
  * action, this function is called. */
 static void
 plugin_action_test_cb (PurplePluginAction * action)
 {
-	purple_notify_message (helloworld_plugin, PURPLE_NOTIFY_MSG_INFO,
+	purple_notify_message (action->plugin, PURPLE_NOTIFY_MSG_INFO,
 		"Plugin Actions Test", "This is a plugin actions test :)", NULL, NULL,
 		NULL, NULL);
 }
@@ -122,8 +117,6 @@ plugin_load (PurplePlugin * plugin, GErr
 		"This is the Hello World! plugin :)", NULL, NULL,
 		NULL, NULL);
 
-	helloworld_plugin = plugin; /* assign this here so we have a valid handle later */
-
 	return TRUE;
 }
 



More information about the Commits mailing list