273.1.1
by martin at piware
* Add check for /var/run/avahi-daemon/disabled-for-unicast-local, which |
1 |
#ifdef HAVE_CONFIG_H
|
2 |
#include "config.h" |
|
3 |
#endif
|
|
4 |
||
5 |
#include <libnotify/notify.h> |
|
6 |
||
7 |
#include "update-notifier.h" |
|
8 |
||
9 |
static gint |
|
10 |
show_notification (void* data) |
|
11 |
{
|
|
12 |
NotifyNotification *n; |
|
13 |
||
14 |
/* Create and show the notification */
|
|
15 |
n = notify_notification_new (_("Network service discovery disabled"), |
|
16 |
_("Your current network has a .local " |
|
17 |
"domain, which is not recommended "
|
|
18 |
"and incompatible with the Avahi "
|
|
276
by martin at piware
* src/avahi.c: Fix string quotes to fix FTBFS on the buildds (worked just |
19 |
"network service discovery. The service "
|
20 |
"has been disabled."
|
|
273.1.1
by martin at piware
* Add check for /var/run/avahi-daemon/disabled-for-unicast-local, which |
21 |
),
|
22 |
GTK_STOCK_DIALOG_INFO, |
|
23 |
NULL); |
|
24 |
notify_notification_set_timeout (n, 60000); |
|
25 |
notify_notification_show (n, NULL); |
|
26 |
||
27 |
return FALSE; |
|
28 |
}
|
|
29 |
||
30 |
gboolean
|
|
31 |
avahi_disabled_check() |
|
32 |
{
|
|
33 |
if (g_file_test (UNICAST_LOCAL_AVAHI_FILE, G_FILE_TEST_EXISTS)) { |
|
34 |
/* Show the notification, after a delay so it doesn't look ugly
|
|
35 |
* if we've just logged in */
|
|
36 |
g_timeout_add(5000, (GSourceFunc)(show_notification), NULL); |
|
37 |
}
|
|
38 |
||
39 |
return TRUE; |
|
40 |
}
|