/soc/2012/sanket/statscollector-2.x.y: 85f4f14e0dcc: Change serv...
sanket
sanket at soc.pidgin.im
Sun Aug 12 09:21:57 EDT 2012
Changeset: 85f4f14e0dcc2029eaa5a6ecee4bf5b8fd3d889a
Author: sanket <sanket at soc.pidgin.im>
Date: 2012-08-12 06:21 +0530
Branch: soc.2012.statscollector
URL: http://hg.pidgin.im/soc/2012/sanket/statscollector-2.x.y/rev/85f4f14e0dcc
Description:
Change server URL to stats.pidgin im
diffstat:
libpurple/plugins/statscollector.c | 2 +-
pidgin/plugins/statscollector.c | 57 +++++++++++++++++++++++++++++--------
2 files changed, 45 insertions(+), 14 deletions(-)
diffs (105 lines):
diff --git a/libpurple/plugins/statscollector.c b/libpurple/plugins/statscollector.c
--- a/libpurple/plugins/statscollector.c
+++ b/libpurple/plugins/statscollector.c
@@ -42,7 +42,7 @@ enum
#define RESEND_SEC (24*3600)
/* Sending URL */
-#define SEND_URL "http://localhost:8000/collectstats/collect/"
+#define SEND_URL "http://stats.pidgin.im:8000/collect/"
/* Version of XML this plugin supports writing */
diff --git a/pidgin/plugins/statscollector.c b/pidgin/plugins/statscollector.c
--- a/pidgin/plugins/statscollector.c
+++ b/pidgin/plugins/statscollector.c
@@ -1,7 +1,6 @@
/* Log the activity of users */
#include "internal.h"
-#include "pidgin.h"
#include "debug.h"
#include "log.h"
@@ -14,6 +13,7 @@
#include "core.h"
#include "accountopt.h"
#include "pidginstock.h"
+#include "request.h"
#include <glib.h>
/* #include <gtkplugin.h> */
@@ -1073,22 +1073,52 @@ init_stats(){
static gboolean
show_confirm_dialog(gpointer data){
- GtkWidget *confirm_dialog;
-
/* Display a confirmation dialog whether the user would like
* to collect the stats
*/
- confirm_dialog = pidgin_make_mini_dialog(
- NULL, PIDGIN_STOCK_DIALOG_INFO,
- "Usage statistics collection",
- "Allow pidgin to collect and send usage statistics anonymously?",
+ /* PurpleRequestFields *request; */
+ /* PurpleRequestFieldGroup *group; */
+ /* PurpleRequestField *field; */
+
+ /* group = purple_request_field_group_new(NULL); */
+
+ /* field = purple_request_field_label_new("confirm_dialog", \\ */
+ /* "Would you like to collect statistics anonymously?"); */
+ /* field = purple_request_field_account_new("acct", _("Account"), NULL); */
+ /* purple_request_field_account_set_filter(field, NULL); */
+ /* purple_request_field_account_set_show_all(field, FALSE); */
+ /* purple_request_field_group_add_field(group, field); */
+
+ /* field = purple_request_field_int_new("mins", _("Minutes"), 10); */
+ /* purple_request_field_group_add_field(group, field); */
+
+ /* request = purple_request_fields_new(); */
+ /* purple_request_fields_add_group(request, group); */
+
+ /* purple_request_fields(NULL, */
+ /* "Statisitcs collection", */
+ /* "Looks like this is the first time you are using the plugin!", */
+ /* NULL, */
+ /* request, */
+ /* "Allow", confirm_allow, */
+ /* "Deny", confirm_deny, */
+ /* NULL, NULL, NULL, */
+ /* NULL); */
+
+ purple_request_action(NULL,
+ "Statistics Collection Plugin",
+ "Do you wish pidgin to collect and send statistics anonymously",
+ "Policy and links follow here",
+ 2,
NULL,
- "Allow", PURPLE_CALLBACK(confirm_allow),
- "Deny", PURPLE_CALLBACK(confirm_deny),
- "Later", PURPLE_CALLBACK(confirm_later),
- NULL);
- pidgin_blist_add_alert(confirm_dialog);
+ NULL,
+ NULL,
+ NULL,
+ 3,
+ "_Allow", confirm_allow,
+ "_Deny", confirm_deny,
+ "_Ask Later", confirm_later);
return FALSE;
@@ -1116,7 +1146,8 @@ plugin_load(PurplePlugin *plugin) {
if(check_ask == ASK){
- purple_timeout_add_seconds(5, show_confirm_dialog, NULL);
+ /* purple_timeout_add_seconds(5, show_confirm_dialog, NULL); */
+ show_confirm_dialog(NULL);
}
More information about the Commits
mailing list