pidgin: b11803e1: Allow toggling debug and verbose debug f...

qulogic at pidgin.im qulogic at pidgin.im
Tue Aug 23 23:55:31 EDT 2011


----------------------------------------------------------------------
Revision: b11803e108556a29e1204a3ff1fd00a0890d7733
Parent:   e4758002eaeecbc33a4c70f5d66aec13bf13abce
Author:   qulogic at pidgin.im
Date:     08/23/11 23:52:06
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b11803e108556a29e1204a3ff1fd00a0890d7733

Changelog: 

Allow toggling debug and verbose debug from a conversation window.

Changes against parent e4758002eaeecbc33a4c70f5d66aec13bf13abce

  patched  pidgin/gtkconv.c

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	803b53a6cc5ba36e948ddb4b6951ff51add54bce
+++ pidgin/gtkconv.c	a62ad364c257afb4d5df7725438c7b460ebff628
@@ -356,8 +356,32 @@ debug_command_cb(PurpleConversation *con
 		}
 
 		tmp = g_string_free(str, FALSE);
+	} else if (!g_ascii_strcasecmp(args[0], "unsafe")) {
+		if (purple_debug_is_unsafe()) {
+			purple_debug_set_unsafe(FALSE);
+			purple_conversation_write(conv, NULL, _("Unsafe debugging is now disabled."),
+			                          PURPLE_MESSAGE_NO_LOG|PURPLE_MESSAGE_SYSTEM, time(NULL));
+		} else {
+			purple_debug_set_unsafe(TRUE);
+			purple_conversation_write(conv, NULL, _("Unsafe debugging is now enabled."),
+			                          PURPLE_MESSAGE_NO_LOG|PURPLE_MESSAGE_SYSTEM, time(NULL));
+		}
+
+		return PURPLE_CMD_RET_OK;
+	} else if (!g_ascii_strcasecmp(args[0], "verbose")) {
+		if (purple_debug_is_verbose()) {
+			purple_debug_set_verbose(FALSE);
+			purple_conversation_write(conv, NULL, _("Verbose debugging is now disabled."),
+			                          PURPLE_MESSAGE_NO_LOG|PURPLE_MESSAGE_SYSTEM, time(NULL));
+		} else {
+			purple_debug_set_verbose(TRUE);
+			purple_conversation_write(conv, NULL, _("Verbose debugging is now enabled."),
+			                          PURPLE_MESSAGE_NO_LOG|PURPLE_MESSAGE_SYSTEM, time(NULL));
+		}
+
+		return PURPLE_CMD_RET_OK;
 	} else {
-		purple_conversation_write(conv, NULL, _("Supported debug options are: plugins version"),
+		purple_conversation_write(conv, NULL, _("Supported debug options are: plugins version unsafe verbose"),
 		                        PURPLE_MESSAGE_NO_LOG|PURPLE_MESSAGE_ERROR, time(NULL));
 		return PURPLE_CMD_RET_OK;
 	}


More information about the Commits mailing list