aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hardinfo2/shell.c13
-rw-r--r--hardinfo2/syncmanager.c4
2 files changed, 17 insertions, 0 deletions
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c
index db3a6155..50f36f6c 100644
--- a/hardinfo2/shell.c
+++ b/hardinfo2/shell.c
@@ -589,7 +589,11 @@ void shell_init(GSList * modules)
shell_action_set_active("SidePaneAction", TRUE);
shell_action_set_active("ToolbarAction", TRUE);
+#ifndef HAS_LIBSOUP
+ shell_action_set_enabled("SyncManagerAction", FALSE);
+#else
shell_action_set_enabled("SyncManagerAction", sync_manager_count_entries() > 0);
+#endif
}
static gboolean update_field(gpointer data)
@@ -1127,6 +1131,8 @@ static void module_selected(gpointer data)
GtkTreeIter parent;
ShellModuleEntry *entry;
static ShellModuleEntry *current = NULL;
+ static gboolean updating = FALSE;
+
/* Gets the currently selected item on the left-side TreeView; if there is no
selection, silently return */
@@ -1141,6 +1147,12 @@ static void module_selected(gpointer data)
current->selected = FALSE;
}
+ if (updating) {
+ return;
+ } else {
+ updating = TRUE;
+ }
+
/* Get the current selection and shows its related info */
gtk_tree_model_get(model, &parent, TREE_COL_DATA, &entry, -1);
if (entry && !entry->selected) {
@@ -1189,6 +1201,7 @@ static void module_selected(gpointer data)
}
current = entry;
+ updating = FALSE;
}
static void info_selected(GtkTreeSelection * ts, gpointer data)
diff --git a/hardinfo2/syncmanager.c b/hardinfo2/syncmanager.c
index ad075a1d..f4949644 100644
--- a/hardinfo2/syncmanager.c
+++ b/hardinfo2/syncmanager.c
@@ -96,7 +96,11 @@ static void sync_dialog_netarea_start_actions(SyncDialog * sd,
gint sync_manager_count_entries(void)
{
+#ifdef HAS_LIBSOUP
return g_slist_length(entries);
+#else
+ return 0;
+#endif
}
void sync_manager_add_entry(SyncEntry * entry)