aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-08-21 23:52:31 +0800
committerMilan Crha <mcrha@redhat.com>2012-08-21 23:52:31 +0800
commitb97a43817982d259244eae23130feec890955929 (patch)
tree3f5f172cfff3acf1d3ba3223bf5c2fb525417c84 /modules
parente9749faddd37636c205db088aa2775da92d7494f (diff)
downloadgsoc2013-evolution-b97a43817982d259244eae23130feec890955929.tar
gsoc2013-evolution-b97a43817982d259244eae23130feec890955929.tar.gz
gsoc2013-evolution-b97a43817982d259244eae23130feec890955929.tar.bz2
gsoc2013-evolution-b97a43817982d259244eae23130feec890955929.tar.lz
gsoc2013-evolution-b97a43817982d259244eae23130feec890955929.tar.xz
gsoc2013-evolution-b97a43817982d259244eae23130feec890955929.tar.zst
gsoc2013-evolution-b97a43817982d259244eae23130feec890955929.zip
Bug #678476 - Critical warnings on calendar factory console
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c16
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c16
-rw-r--r--modules/calendar/e-task-shell-sidebar.c16
3 files changed, 48 insertions, 0 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 1f4ab0219c..d734b21d58 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -61,6 +61,8 @@ struct _ECalShellSidebarPrivate {
* which is bound by an EBinding to ECalModel. */
ECalClient *default_client;
+ ESource *loading_default_source_instance; /* not-reffed, only for comparison */
+
GCancellable *loading_default_client;
GCancellable *loading_clients;
};
@@ -368,6 +370,14 @@ cal_shell_sidebar_default_loaded_cb (GObject *source_object,
e_client_utils_open_new_finish (source, result, &client, &error);
+ if (priv->loading_default_client) {
+ g_object_unref (priv->loading_default_client);
+ priv->loading_default_client = NULL;
+ }
+
+ if (source == priv->loading_default_source_instance)
+ priv->loading_default_source_instance = NULL;
+
/* Ignore cancellations. */
if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
@@ -412,6 +422,10 @@ cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar,
priv = cal_shell_sidebar->priv;
+ /* already loading that source as default source */
+ if (source == priv->loading_default_source_instance)
+ return;
+
/* FIXME Sidebar should not be accessing the EShellContent.
* This probably needs to be moved to ECalShellView. */
shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar);
@@ -436,6 +450,8 @@ cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar,
return;
}
+ /* it's only for pointer comparison, no need to ref it */
+ priv->loading_default_source_instance = source;
priv->loading_default_client = g_cancellable_new ();
e_client_utils_open_new (
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index f7cbea9183..f59e0a8605 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -57,6 +57,8 @@ struct _EMemoShellSidebarPrivate {
* which is bound by an EBinding to ECalModel. */
ECalClient *default_client;
+ ESource *loading_default_source_instance; /* not-reffed, only for comparison */
+
GCancellable *loading_default_client;
GCancellable *loading_clients;
};
@@ -363,6 +365,14 @@ memo_shell_sidebar_default_loaded_cb (GObject *source_object,
e_client_utils_open_new_finish (source, result, &client, &error);
+ if (priv->loading_default_client) {
+ g_object_unref (priv->loading_default_client);
+ priv->loading_default_client = NULL;
+ }
+
+ if (source == priv->loading_default_source_instance)
+ priv->loading_default_source_instance = NULL;
+
/* Ignore cancellations. */
if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
@@ -407,6 +417,10 @@ memo_shell_sidebar_set_default (EMemoShellSidebar *memo_shell_sidebar,
priv = memo_shell_sidebar->priv;
+ /* already loading that source as default source */
+ if (source == priv->loading_default_source_instance)
+ return;
+
/* FIXME Sidebar should not be accessing the EShellContent.
* This probably needs to be moved to EMemoShellView. */
shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar);
@@ -431,6 +445,8 @@ memo_shell_sidebar_set_default (EMemoShellSidebar *memo_shell_sidebar,
return;
}
+ /* it's only for pointer comparison, no need to ref it */
+ priv->loading_default_source_instance = source;
priv->loading_default_client = g_cancellable_new ();
e_client_utils_open_new (
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index 1be397ed1c..1653fe287b 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -57,6 +57,8 @@ struct _ETaskShellSidebarPrivate {
* which is bound by an EBinding to ECalModel. */
ECalClient *default_client;
+ ESource *loading_default_source_instance; /* not-reffed, only for comparison */
+
GCancellable *loading_default_client;
GCancellable *loading_clients;
};
@@ -363,6 +365,14 @@ task_shell_sidebar_default_loaded_cb (GObject *source_object,
e_client_utils_open_new_finish (source, result, &client, &error);
+ if (priv->loading_default_client) {
+ g_object_unref (priv->loading_default_client);
+ priv->loading_default_client = NULL;
+ }
+
+ if (source == priv->loading_default_source_instance)
+ priv->loading_default_source_instance = NULL;
+
/* Ignore cancellations. */
if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
@@ -407,6 +417,10 @@ task_shell_sidebar_set_default (ETaskShellSidebar *task_shell_sidebar,
priv = task_shell_sidebar->priv;
+ /* already loading that source as default source */
+ if (source == priv->loading_default_source_instance)
+ return;
+
/* FIXME Sidebar should not be accessing the EShellContent.
* This probably needs to be moved to ETaskShellView. */
shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar);
@@ -431,6 +445,8 @@ task_shell_sidebar_set_default (ETaskShellSidebar *task_shell_sidebar,
return;
}
+ /* it's only for pointer comparison, no need to ref it */
+ priv->loading_default_source_instance = source;
priv->loading_default_client = g_cancellable_new ();
e_client_utils_open_new (