diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-10-21 15:36:04 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-10-21 15:36:04 +0000 |
commit | a1db645416cc1ce6a0e775fc2a508695d3608868 (patch) | |
tree | 763ee77b5e91cd056bdaa27fc4a1be7f1f6379be /hardinfo2/shell.c | |
parent | 90b5d774145be3f0929588b751c935e465cb5a44 (diff) |
Disable Network Updater if there are no entries to be updated.
Diffstat (limited to 'hardinfo2/shell.c')
-rw-r--r-- | hardinfo2/shell.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index 180dcc0e..db3a6155 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -24,6 +24,7 @@ #include <hardinfo.h> #include <shell.h> +#include <syncmanager.h> #include <iconcache.h> #include <menu.h> #include <stock.h> @@ -104,7 +105,7 @@ void shell_action_set_property(const gchar * action_name, void shell_action_set_enabled(const gchar * action_name, gboolean setting) { - if (params.gui_running) { + if (params.gui_running && shell->action_group) { GtkAction *action; action = @@ -587,6 +588,8 @@ void shell_init(GSList * modules) shell_action_set_enabled("SaveGraphAction", FALSE); shell_action_set_active("SidePaneAction", TRUE); shell_action_set_active("ToolbarAction", TRUE); + + shell_action_set_enabled("SyncManagerAction", sync_manager_count_entries() > 0); } static gboolean update_field(gpointer data) |