aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2009-07-14 18:15:50 +0800
committerChenthill Palanisamy <pchenthill@novell.com>2009-07-14 18:19:09 +0800
commite5fe0c9a3b74bf4910d768d65bb59a53c3792001 (patch)
tree96a10c71e038c6f5e3aca0052afd9655a3892a8d /widgets/misc
parent7be980d44ee12c563966bdd9361fe83ae19a430f (diff)
downloadgsoc2013-evolution-e5fe0c9a3b74bf4910d768d65bb59a53c3792001.tar.gz
gsoc2013-evolution-e5fe0c9a3b74bf4910d768d65bb59a53c3792001.tar.zst
gsoc2013-evolution-e5fe0c9a3b74bf4910d768d65bb59a53c3792001.zip
Add an environment variable to show all errors as intrusive
if needed.
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-activity-handler.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/widgets/misc/e-activity-handler.c b/widgets/misc/e-activity-handler.c
index ed5db04b18..471d585cf9 100644
--- a/widgets/misc/e-activity-handler.c
+++ b/widgets/misc/e-activity-handler.c
@@ -533,6 +533,19 @@ error_cleanup (EActivityHandler *activity_handler)
return berror;
}
+static gboolean
+show_intrusive_errors (void)
+{
+ const char *intrusive = NULL;
+
+ intrusive = g_getenv ("EVO-SHOW-INTRUSIVE-ERRORS");
+
+ if (intrusive && g_str_equal (intrusive, "1"))
+ return TRUE;
+ else
+ return FALSE;
+}
+
guint
e_activity_handler_make_error (EActivityHandler *activity_handler,
const gchar *component_id,
@@ -549,6 +562,11 @@ e_activity_handler_make_error (EActivityHandler *activity_handler,
priv = activity_handler->priv;
activity_id = get_new_activity_id (activity_handler);
+ if (show_intrusive_errors ()) {
+ gtk_widget_show (error);
+ return activity_id;
+ }
+
activity_info = activity_info_new (component_id, activity_id, information, TRUE);
activity_info->error = error;
activity_info->error_time = time (NULL);
@@ -622,8 +640,9 @@ e_activity_handler_operation_set_error(EActivityHandler *activity_handler,
g_object_set_data ((GObject *) task_widget, "activity", GINT_TO_POINTER(activity_id));
g_object_set_data ((GObject *) task_widget, "error-type", GINT_TO_POINTER(E_LOG_ERROR));
g_signal_connect_swapped (tool, "clicked", G_CALLBACK(handle_error), task_widget);
+ handle_error (task_widget);
}
-
+
if (!activity_handler->priv->error_timer)
activity_handler->priv->error_timer = g_timeout_add (activity_handler->priv->error_flush_interval, (GSourceFunc) error_cleanup, activity_handler);
}