From a1db645416cc1ce6a0e775fc2a508695d3608868 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sun, 21 Oct 2007 15:36:04 +0000 Subject: Disable Network Updater if there are no entries to be updated. --- hardinfo2/shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hardinfo2/shell.c') 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 #include +#include #include #include #include @@ -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) -- cgit v1.2.3