/soc/2012/sanket/statscollector-2.x.y: 4cdc61f7a7b5: Adding a ti...
sanket
sanket at soc.pidgin.im
Wed Aug 1 09:12:44 EDT 2012
Changeset: 4cdc61f7a7b5a7b351e233dfddfd4233328600bf
Author: sanket <sanket at soc.pidgin.im>
Date: 2012-08-01 06:11 +0530
Branch: soc.2012.statscollector
URL: http://hg.pidgin.im/soc/2012/sanket/statscollector-2.x.y/rev/4cdc61f7a7b5
Description:
Adding a time-lag to the confirm dialog works for now!
... though this is not a prowd to be moment ;-).
diffstat:
pidgin/plugins/statscollector.c | 38 +++++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 13 deletions(-)
diffs (56 lines):
diff --git a/pidgin/plugins/statscollector.c b/pidgin/plugins/statscollector.c
--- a/pidgin/plugins/statscollector.c
+++ b/pidgin/plugins/statscollector.c
@@ -1071,6 +1071,30 @@ 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?",
+ NULL,
+ "Allow", PURPLE_CALLBACK(confirm_allow),
+ "Deny", PURPLE_CALLBACK(confirm_deny),
+ "Later", PURPLE_CALLBACK(confirm_later),
+ NULL);
+ pidgin_blist_add_alert(confirm_dialog);
+
+ return FALSE;
+
+}
+
+static gboolean
plugin_load(PurplePlugin *plugin) {
int check_ask;
@@ -1092,20 +1116,8 @@ plugin_load(PurplePlugin *plugin) {
if(check_ask == ASK){
- /* Display a confirmation dialog whether the user would like
- * to collect the stats
- */
+ purple_timeout_add_seconds(5, show_confirm_dialog, NULL);
- confirm_dialog = pidgin_make_mini_dialog(
- NULL, PIDGIN_STOCK_DIALOG_INFO,
- "Usage statistics collection",
- "Allow pidgin to collect and send usage statistics anonymously?",
- NULL,
- "Allow", PURPLE_CALLBACK(confirm_allow),
- "Deny", PURPLE_CALLBACK(confirm_deny),
- "Later", PURPLE_CALLBACK(confirm_later),
- NULL);
- pidgin_blist_add_alert(confirm_dialog);
}
else if(check_ask == ALLOW){
More information about the Commits
mailing list