/soc/2013/ankitkv/gobjectification: 05ef6e29ea04: Rename nullpro...

Ankit Vani a at nevitus.org
Thu Jan 23 06:26:26 EST 2014


Changeset: 05ef6e29ea04d1e5e01b5929434470b254b29f8a
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-01-23 16:30 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/05ef6e29ea04

Description:

Rename nullprotocol back to nullprpl

diffstat:

 libpurple/protocols/null/Makefile.am    |    6 +-
 libpurple/protocols/null/Makefile.mingw |    2 +-
 libpurple/protocols/null/README         |   27 ++--
 libpurple/protocols/null/nullprotocol.c |  154 ++++++++++++++++----------------
 libpurple/protocols/null/nullprotocol.h |    0 
 5 files changed, 94 insertions(+), 95 deletions(-)

diffs (truncated from 715 to 300 lines):

diff --git a/libpurple/protocols/null/Makefile.am b/libpurple/protocols/null/Makefile.am
--- a/libpurple/protocols/null/Makefile.am
+++ b/libpurple/protocols/null/Makefile.am
@@ -5,14 +5,14 @@ EXTRA_DIST = \
 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 NULLSOURCES = \
-	nullprotocol.h \
-	nullprotocol.c
+	nullprpl.h \
+	nullprpl.c
 
 AM_CFLAGS = $(st)
 
 libnull_la_LDFLAGS = -module -avoid-version
 
-# nullprotocol isn't built by default; when it is built, it's dynamically linked
+# nullprpl isn't built by default; when it is built, it's dynamically linked
 st =
 pkg_LTLIBRARIES    = libnull.la
 libnull_la_SOURCES = $(NULLSOURCES)
diff --git a/libpurple/protocols/null/Makefile.mingw b/libpurple/protocols/null/Makefile.mingw
--- a/libpurple/protocols/null/Makefile.mingw
+++ b/libpurple/protocols/null/Makefile.mingw
@@ -37,7 +37,7 @@ LIB_PATHS +=		-L$(GTK_TOP)/lib \
 ##
 ##  SOURCES, OBJECTS
 ##
-C_SRC =	nullprotocol.c
+C_SRC =	nullprpl.c
 
 OBJECTS = $(C_SRC:%.c=%.o)
 
diff --git a/libpurple/protocols/null/README b/libpurple/protocols/null/README
--- a/libpurple/protocols/null/README
+++ b/libpurple/protocols/null/README
@@ -1,24 +1,24 @@
-nullprotocol
+nullprpl
 
 --------
 OVERVIEW
 --------
-Nullprotocol is a mock protocol plugin for Pidgin and libpurple. You can create
+Nullprpl is a mock protocol plugin for Pidgin and libpurple. You can create
 accounts with it, sign on and off, add buddies, and send and receive IMs, all
 without connecting to a server!
 
-Beyond that basic functionality, nullprotocol supports presence and
-away/available messages, offline messages, user info, typing notification,
-privacy allow/block lists, chat rooms, whispering, room lists, and protocol
-icons and emblems. Notable missing features are file transfer and account
-registration and authentication.
+Beyond that basic functionality, nullprpl supports presence and away/available
+messages, offline messages, user info, typing notification, privacy
+allow/block lists, chat rooms, whispering, room lists, and protocol icons and
+emblems. Notable missing features are file transfer and account registration
+and authentication.
 
-Nullprotocol is intended as an example of how to write a libpurple protocol
+Nullprpl is intended as an example of how to write a libpurple protocol
 plugin. It doesn't contain networking code or an event loop, but it does
-demonstrate how to use the libpurple API to do pretty much everything a protocol
-might need to do.
+demonstrate how to use the libpurple API to do pretty much everything a
+protocol might need to do.
 
-Nullprotocol is also a useful tool for hacking on Pidgin, Finch, and other
+Nullprpl is also a useful tool for hacking on Pidgin, Finch, and other
 libpurple clients. It's a full-featured protocol plugin, but doesn't depend on
 an external server, so it's a quick and easy way to exercise test new code. It
 also allows you to work while you're disconnected.
@@ -31,13 +31,12 @@ To build, just run ./configure as usual 
 source distribution. Then cd libpurple/protocols/null and then make.  To
 install, run make install.  Then run Pidgin.
 
-To build nullprotocol on Windows (with Cygwin/MinGW), use:
-make -f Makefile.mingw
+To build nullprpl on Windows (with Cygwin/MinGW), use: make -f Makefile.mingw
 
 -----
 USAGE
 -----
-To add a nullprotocol account, go to the account editor window and click Add.
+To add a nullprpl account, go to the account editor window and click Add.
 Select Null Protocol from the protocol drop-down list, and enter any username
 you want.
 
diff --git a/libpurple/protocols/null/nullprotocol.c b/libpurple/protocols/null/nullprpl.c
rename from libpurple/protocols/null/nullprotocol.c
rename to libpurple/protocols/null/nullprpl.c
--- a/libpurple/protocols/null/nullprotocol.c
+++ b/libpurple/protocols/null/nullprpl.c
@@ -5,22 +5,22 @@
  * to list here.  Please refer to the COPYRIGHT file distributed with this
  * source distribution.
  *
- * NullProtocol is a mock protocol plugin for Pidgin and libpurple. You can
- * create accounts with it, sign on and off, add buddies, and send and receive
- * IMs, all without connecting to a server!
+ * Nullprpl is a mock protocol plugin for Pidgin and libpurple. You can create
+ * accounts with it, sign on and off, add buddies, and send and receive IMs,
+ * all without connecting to a server!
  *
- * Beyond that basic functionality, nullprotocol supports presence and
+ * Beyond that basic functionality, nullprpl supports presence and
  * away/available messages, offline messages, user info, typing notification,
  * privacy allow/block lists, chat rooms, whispering, room lists, and protocol
  * icons and emblems. Notable missing features are file transfer and account
  * registration and authentication.
  *
- * NullProtocol is intended as an example of how to write a libpurple protocol
+ * Nullprpl is intended as an example of how to write a libpurple protocol
  * plugin. It doesn't contain networking code or an event loop, but it does
  * demonstrate how to use the libpurple API to do pretty much everything a
  * protocol might need to do.
  *
- * NullProtocol is also a useful tool for hacking on Pidgin, Finch, and other
+ * Nullprpl is also a useful tool for hacking on Pidgin, Finch, and other
  * libpurple clients. It's a full-featured protocol plugin, but doesn't depend
  * on an external server, so it's a quick and easy way to exercise test new
  * code. It also allows you to work while you're disconnected.
@@ -52,7 +52,7 @@
  * provide for translation, you'll also need to setup the gettext macros. */
 #include "internal.h"
 
-#include "nullprotocol.h"
+#include "nullprpl.h"
 
 #include "account.h"
 #include "accountopt.h"
@@ -180,12 +180,12 @@ static void discover_status(PurpleConnec
     if (!strcmp(status_id, NULL_STATUS_ONLINE) ||
         !strcmp(status_id, NULL_STATUS_AWAY) ||
         !strcmp(status_id, NULL_STATUS_OFFLINE)) {
-      purple_debug_info("nullprotocol", "%s sees that %s is %s: %s\n",
+      purple_debug_info("nullprpl", "%s sees that %s is %s: %s\n",
                         from_username, to_username, status_id, message);
       purple_protocol_got_user_status(purple_connection_get_account(from), to_username, status_id,
                                   (message) ? "message" : NULL, message, NULL);
     } else {
-      purple_debug_error("nullprotocol",
+      purple_debug_error("nullprpl",
                          "%s's buddy %s has an unknown status: %s, %s",
                          from_username, to_username, status_id, message);
     }
@@ -194,7 +194,7 @@ static void discover_status(PurpleConnec
 
 static void report_status_change(PurpleConnection *from, PurpleConnection *to,
                                  gpointer userdata) {
-  purple_debug_info("nullprotocol", "notifying %s that %s changed status\n",
+  purple_debug_info("nullprpl", "notifying %s that %s changed status\n",
                     purple_account_get_username(purple_connection_get_account(to)), purple_account_get_username(purple_connection_get_account(from)));
   discover_status(to, from, NULL);
 }
@@ -207,7 +207,7 @@ static void null_input_user_info(PurpleP
 {
   PurpleConnection *gc = action->connection;
   PurpleAccount *acct = purple_connection_get_account(gc);
-  purple_debug_info("nullprotocol", "showing 'Set User Info' dialog for %s\n",
+  purple_debug_info("nullprpl", "showing 'Set User Info' dialog for %s\n",
                     purple_account_get_username(acct));
 
   purple_account_request_change_user_info(acct);
@@ -229,7 +229,7 @@ static const char *null_list_icon(Purple
 }
 
 static char *null_status_text(PurpleBuddy *buddy) {
-  purple_debug_info("nullprotocol", "getting %s's status text for %s\n",
+  purple_debug_info("nullprpl", "getting %s's status text for %s\n",
                     purple_buddy_get_name(buddy),
                     purple_account_get_username(purple_buddy_get_account(buddy)));
 
@@ -245,12 +245,12 @@ static char *null_status_text(PurpleBudd
     else
       text = g_strdup(name);
 
-    purple_debug_info("nullprotocol", "%s's status text is %s\n",
+    purple_debug_info("nullprpl", "%s's status text is %s\n",
                       purple_buddy_get_name(buddy), text);
     return text;
 
   } else {
-    purple_debug_info("nullprotocol", "...but %s is not logged in\n", purple_buddy_get_name(buddy));
+    purple_debug_info("nullprpl", "...but %s is not logged in\n", purple_buddy_get_name(buddy));
     return g_strdup("Not logged in");
   }
 }
@@ -284,7 +284,7 @@ static void null_tooltip_text(PurpleBudd
     purple_notify_user_info_add_pair_plaintext(info, _("User info"), _("not logged in"));
   }
 
-  purple_debug_info("nullprotocol", "showing %s tooltip for %s\n",
+  purple_debug_info("nullprpl", "showing %s tooltip for %s\n",
                     (full) ? "full" : "short", purple_buddy_get_name(buddy));
 }
 
@@ -293,7 +293,7 @@ static GList *null_status_types(PurpleAc
   GList *types = NULL;
   PurpleStatusType *type;
 
-  purple_debug_info("nullprotocol", "returning status types for %s: %s, %s, %s\n",
+  purple_debug_info("nullprpl", "returning status types for %s: %s, %s, %s\n",
                     purple_account_get_username(acct),
                     NULL_STATUS_ONLINE, NULL_STATUS_AWAY, NULL_STATUS_OFFLINE);
 
@@ -319,18 +319,18 @@ static GList *null_status_types(PurpleAc
 }
 
 static void blist_example_menu_item(PurpleBlistNode *node, gpointer userdata) {
-  purple_debug_info("nullprotocol", "example menu item clicked on user %s\n",
+  purple_debug_info("nullprpl", "example menu item clicked on user %s\n",
                     purple_buddy_get_name(PURPLE_BUDDY(node)));
 
   purple_notify_info(NULL,  /* plugin handle or PurpleConnection */
                      _("Primary title"),
                      _("Secondary title"),
-                     _("This is the callback for the nullprotocol menu item."),
+                     _("This is the callback for the NullProtocol menu item."),
                      NULL);
 }
 
 static GList *null_blist_node_menu(PurpleBlistNode *node) {
-  purple_debug_info("nullprotocol", "providing buddy list context menu item\n");
+  purple_debug_info("nullprpl", "providing buddy list context menu item\n");
 
   if (PURPLE_IS_BUDDY(node)) {
     PurpleMenuAction *action = purple_menu_action_new(
@@ -347,7 +347,7 @@ static GList *null_blist_node_menu(Purpl
 static GList *null_chat_info(PurpleConnection *gc) {
   PurpleProtocolChatEntry *pce; /* defined in protocols.h */
 
-  purple_debug_info("nullprotocol", "returning chat setting 'room'\n");
+  purple_debug_info("nullprpl", "returning chat setting 'room'\n");
 
   pce = g_new0(PurpleProtocolChatEntry, 1);
   pce->label = _("Chat _room");
@@ -361,7 +361,7 @@ static GHashTable *null_chat_info_defaul
                                                const char *room) {
   GHashTable *defaults;
 
-  purple_debug_info("nullprotocol", "returning chat default setting "
+  purple_debug_info("nullprpl", "returning chat default setting "
                     "'room' = 'default'\n");
 
   defaults = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
@@ -374,7 +374,7 @@ static void null_login(PurpleAccount *ac
   PurpleConnection *gc = purple_account_get_connection(acct);
   GList *offline_messages;
 
-  purple_debug_info("nullprotocol", "logging in %s\n", purple_account_get_username(acct));
+  purple_debug_info("nullprpl", "logging in %s\n", purple_account_get_username(acct));
 
   purple_connection_update_progress(gc, _("Connecting"),
                                     0,   /* which connection step this is */
@@ -392,12 +392,12 @@ static void null_login(PurpleAccount *ac
   foreach_null_gc(report_status_change, gc, NULL);
 
   /* fetch stored offline messages */
-  purple_debug_info("nullprotocol", "checking for offline messages for %s\n",
+  purple_debug_info("nullprpl", "checking for offline messages for %s\n",
                     purple_account_get_username(acct));
   offline_messages = g_hash_table_lookup(goffline_messages, purple_account_get_username(acct));
   while (offline_messages) {
     GOfflineMessage *message = (GOfflineMessage *)offline_messages->data;
-    purple_debug_info("nullprotocol", "delivering offline message to %s: %s\n",
+    purple_debug_info("nullprpl", "delivering offline message to %s: %s\n",
                       purple_account_get_username(acct), message->message);
     serv_got_im(gc, message->from, message->message, message->flags,
                 message->mtime);
@@ -427,7 +427,7 @@ static int null_send_im(PurpleConnection
   PurpleAccount *to_acct = purple_accounts_find(who, "null");
   PurpleConnection *to;
 
-  purple_debug_info("nullprotocol", "sending message from %s to %s: %s\n",
+  purple_debug_info("nullprpl", "sending message from %s to %s: %s\n",
                     from_username, who, message);
 
   /* is the sender blocked by the recipient's privacy settings? */
@@ -435,7 +435,7 @@ static int null_send_im(PurpleConnection
       !purple_account_privacy_check(to_acct, purple_account_get_username(purple_connection_get_account(gc)))) {
     char *msg = g_strdup_printf(
       _("Your message was blocked by %s's privacy settings."), who);
-    purple_debug_info("nullprotocol",
+    purple_debug_info("nullprpl",
                       "discarding; %s is blocked by %s's privacy settings\n",
                       from_username, who);
     purple_conversation_present_error(who, purple_connection_get_account(gc), msg);
@@ -452,7 +452,7 @@ static int null_send_im(PurpleConnection
     GOfflineMessage *offline_message;
     GList *messages;
 
-    purple_debug_info("nullprotocol",
+    purple_debug_info("nullprpl",
                       "%s is offline, sending as offline message\n", who);
     offline_message = g_new0(GOfflineMessage, 1);
     offline_message->from = g_strdup(from_username);
@@ -469,7 +469,7 @@ static int null_send_im(PurpleConnection
 }
 



More information about the Commits mailing list