/soc/2013/ankitkv/gobjectification: 40bae9b0c9fc: Updated nullpr...

Ankit Vani a at nevitus.org
Sat Aug 10 15:36:11 EDT 2013


Changeset: 40bae9b0c9fcf501c53474832f7ea67f1d38ee03
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-11 01:05 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/40bae9b0c9fc

Description:

Updated nullprpl according to the changes

diffstat:

 libpurple/protocols/null/nullprpl.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (59 lines):

diff --git a/libpurple/protocols/null/nullprpl.c b/libpurple/protocols/null/nullprpl.c
--- a/libpurple/protocols/null/nullprpl.c
+++ b/libpurple/protocols/null/nullprpl.c
@@ -87,7 +87,7 @@ typedef struct {
 
 /*
  * stores offline messages that haven't been delivered yet. maps username
- * (char *) to GList * of GOfflineMessages. initialized in gplugin_plugin_load.
+ * (char *) to GList * of GOfflineMessages. initialized in plugin_load.
  */
 GHashTable* goffline_messages = NULL;
 
@@ -203,10 +203,16 @@ static void nullprpl_input_user_info(Pur
   purple_account_request_change_user_info(acct);
 }
 
-
 /*
  * prpl functions
  */
+static GList *nullprpl_get_actions(PurpleConnection *gc)
+{
+  PurpleProtocolAction *action = purple_protocol_action_new(
+    _("Set User Info..."), nullprpl_input_user_info);
+  return g_list_append(NULL, action);
+}
+
 static const char *nullprpl_list_icon(PurpleAccount *acct, PurpleBuddy *buddy)
 {
   return "null";
@@ -1054,9 +1060,8 @@ static PurplePluginProtocolInfo prpl_inf
   "Null - Testing protocol",           /* name */
   sizeof(PurplePluginProtocolInfo),    /* struct_size */
   OPT_PROTO_NO_PASSWORD | OPT_PROTO_CHAT_TOPIC,  /* options */
-  NULL,               /* user_splits, initialized in gplugin_plugin_load() */
-  NULL,               /* protocol_options, initialized in gplugin_plugin_load() */
-  NULL,               /* actions, initialized in gplugin_plugin_load() */
+  NULL,               /* user_splits, initialized in plugin_load() */
+  NULL,               /* protocol_options, initialized in plugin_load() */
   {   /* icon_spec, a PurpleBuddyIconSpec */
       "png,jpg,gif",                   /* format */
       0,                               /* min_width */
@@ -1066,6 +1071,7 @@ static PurplePluginProtocolInfo prpl_inf
       10000,                           /* max_filesize */
       PURPLE_ICON_SCALE_DISPLAY,       /* scale_rules */
   },
+  nullprpl_get_actions,                /* get_actions */
   nullprpl_list_icon,                  /* list_icon */
   NULL,                                /* list_emblem */
   nullprpl_status_text,                /* status_text */
@@ -1190,8 +1196,6 @@ plugin_load(PurplePlugin *plugin, GError
                                             NULL);       /* value free fn */
 
   _null_protocol = &prpl_info;
-
-  purple_protocol_add_action(_null_protocol, _("Set User Info..."), nullprpl_input_user_info);
   purple_protocols_add(_null_protocol);
 
   return TRUE;



More information about the Commits mailing list