diff options
author | carlosg <carlosg> | 2006-09-15 10:23:56 +0000 |
---|---|---|
committer | carlosg <carlosg> | 2006-09-15 10:23:56 +0000 |
commit | 544e9c9e3d8342f2f35b5e2ebe7a522840627865 (patch) | |
tree | c96e1430975753e9487841a5c387b78ed6972d39 | |
parent | ee7cc254ce8dfff06f4db34df989e074e7c9d3f4 (diff) |
2006-09-15 Carlos Garnacho <carlosg@gnome.org>
* SystemToolsBackends.pl.in, Utils/Monitor.pm: only initialize the
file monitor if Sys::Gamin is found.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | SystemToolsBackends.pl.in | 2 | ||||
-rw-r--r-- | Utils/Monitor.pm | 7 |
3 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-09-15 Carlos Garnacho <carlosg@gnome.org> + + * SystemToolsBackends.pl.in, Utils/Monitor.pm: only initialize the + file monitor if Sys::Gamin is found. + 2006-09-08 Carlos Garnacho <carlosg@gnome.org> * Utils/Parse.pm (get_from_ini) diff --git a/SystemToolsBackends.pl.in b/SystemToolsBackends.pl.in index 8c8d185..954b0a8 100755 --- a/SystemToolsBackends.pl.in +++ b/SystemToolsBackends.pl.in @@ -70,5 +70,5 @@ my $hosts_config = HostsConfig->new ($service); my $ifaces_config = IfacesConfig->new ($service); my $services_config = ServicesConfig->new ($service); -Net::DBus::Reactor->main->add_timeout (50, Net::DBus::Callback->new(method => \&Utils::Monitor::do_monitor_files)); +Utils::Monitor::init_file_monitor (); Net::DBus::Reactor->main->run (); diff --git a/Utils/Monitor.pm b/Utils/Monitor.pm index 73e8b30..f2d558f 100644 --- a/Utils/Monitor.pm +++ b/Utils/Monitor.pm @@ -89,4 +89,11 @@ sub monitor_files } } +sub init_file_monitor +{ + return if (!$has_gamin); + + Net::DBus::Reactor->main->add_timeout (500, Net::DBus::Callback->new(method => \&Utils::Monitor::do_monitor_files)); +} + 1; |