Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
evolution
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
114
Issues
114
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
evolution
Commits
68c01454
Commit
68c01454
authored
Sep 15, 2014
by
Jonas Hahnfeld
Committed by
Milan Crha
Sep 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 728329 - Evolution fails to get back online
parent
9a775b5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
shell/e-shell.c
shell/e-shell.c
+34
-1
No files found.
shell/e-shell.c
View file @
68c01454
...
@@ -46,6 +46,8 @@
...
@@ -46,6 +46,8 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL, EShellPrivate))
((obj), E_TYPE_SHELL, EShellPrivate))
#define SET_ONLINE_TIMEOUT_SECONDS 5
struct
_EShellPrivate
{
struct
_EShellPrivate
{
GQueue
alerts
;
GQueue
alerts
;
ESourceRegistry
*
registry
;
ESourceRegistry
*
registry
;
...
@@ -64,6 +66,7 @@ struct _EShellPrivate {
...
@@ -64,6 +66,7 @@ struct _EShellPrivate {
gchar
*
module_directory
;
gchar
*
module_directory
;
guint
inhibit_cookie
;
guint
inhibit_cookie
;
guint
set_online_timeout_id
;
gulong
backend_died_handler_id
;
gulong
backend_died_handler_id
;
...
@@ -263,6 +266,20 @@ shell_add_actions (GApplication *application)
...
@@ -263,6 +266,20 @@ shell_add_actions (GApplication *application)
g_object_unref
(
action
);
g_object_unref
(
action
);
}
}
static
gboolean
e_shell_set_online_cb
(
gpointer
user_data
)
{
EShell
*
shell
=
user_data
;
g_return_val_if_fail
(
E_IS_SHELL
(
shell
),
FALSE
);
shell
->
priv
->
set_online_timeout_id
=
0
;
e_shell_set_online
(
shell
,
TRUE
);
return
FALSE
;
}
static
void
static
void
shell_ready_for_offline
(
EShell
*
shell
,
shell_ready_for_offline
(
EShell
*
shell
,
EActivity
*
activity
,
EActivity
*
activity
,
...
@@ -662,6 +679,11 @@ shell_dispose (GObject *object)
...
@@ -662,6 +679,11 @@ shell_dispose (GObject *object)
priv
=
E_SHELL_GET_PRIVATE
(
object
);
priv
=
E_SHELL_GET_PRIVATE
(
object
);
if
(
priv
->
set_online_timeout_id
>
0
)
{
g_source_remove
(
priv
->
set_online_timeout_id
);
priv
->
set_online_timeout_id
=
0
;
}
while
((
alert
=
g_queue_pop_head
(
&
priv
->
alerts
))
!=
NULL
)
{
while
((
alert
=
g_queue_pop_head
(
&
priv
->
alerts
))
!=
NULL
)
{
g_signal_handlers_disconnect_by_func
(
g_signal_handlers_disconnect_by_func
(
alert
,
shell_alert_response_cb
,
object
);
alert
,
shell_alert_response_cb
,
object
);
...
@@ -1666,7 +1688,18 @@ e_shell_set_network_available (EShell *shell,
...
@@ -1666,7 +1688,18 @@ e_shell_set_network_available (EShell *shell,
shell
->
priv
->
auto_reconnect
=
TRUE
;
shell
->
priv
->
auto_reconnect
=
TRUE
;
}
else
if
(
network_available
&&
shell
->
priv
->
auto_reconnect
)
{
}
else
if
(
network_available
&&
shell
->
priv
->
auto_reconnect
)
{
g_message
(
"Connection established. Going online."
);
g_message
(
"Connection established. Going online."
);
e_shell_set_online
(
shell
,
TRUE
);
/* Wait some seconds to give the network enough time to become
* fully available. */
if
(
shell
->
priv
->
set_online_timeout_id
>
0
)
{
g_source_remove
(
shell
->
priv
->
set_online_timeout_id
);
shell
->
priv
->
set_online_timeout_id
=
0
;
}
shell
->
priv
->
set_online_timeout_id
=
e_named_timeout_add_seconds_full
(
G_PRIORITY_DEFAULT
,
SET_ONLINE_TIMEOUT_SECONDS
,
e_shell_set_online_cb
,
g_object_ref
(
shell
),
g_object_unref
);
shell
->
priv
->
auto_reconnect
=
FALSE
;
shell
->
priv
->
auto_reconnect
=
FALSE
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment