aboutsummaryrefslogtreecommitdiffstats
path: root/modules/offline-alert
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-09-08 00:31:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-09-08 07:08:54 +0800
commit3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch)
tree479d6153d31e03cb7a65990683b5271402e5ec29 /modules/offline-alert
parent2e5031cb4538b4819e5fce5d717668c3445df80a (diff)
downloadgsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.gz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.bz2
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.lz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.xz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.zst
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.zip
Miscellaneous cleanups.
Diffstat (limited to 'modules/offline-alert')
-rw-r--r--modules/offline-alert/evolution-offline-alert.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/offline-alert/evolution-offline-alert.c b/modules/offline-alert/evolution-offline-alert.c
index 767f41a757..d6cb0463bc 100644
--- a/modules/offline-alert/evolution-offline-alert.c
+++ b/modules/offline-alert/evolution-offline-alert.c
@@ -108,6 +108,7 @@ offline_alert_window_added_cb (GtkApplication *application,
{
EShell *shell = E_SHELL (application);
GtkAction *action;
+ const gchar *alert_id;
if (!E_IS_SHELL_WINDOW (window))
return;
@@ -137,7 +138,11 @@ offline_alert_window_added_cb (GtkApplication *application,
action = E_SHELL_WINDOW_ACTION_WORK_ONLINE (window);
- extension->alert = e_alert_new (e_shell_get_network_available (shell) ? "offline-alert:offline" : "offline-alert:no-network", NULL);
+ if (e_shell_get_network_available (shell))
+ alert_id = "offline-alert:offline";
+ else
+ alert_id = "offline-alert:no-network";
+ extension->alert = e_alert_new (alert_id, NULL);
e_alert_add_action (extension->alert, action, GTK_RESPONSE_NONE);
g_object_add_weak_pointer (