From 058f63cb3c49c53b0798ea61f92ab44c93a968ee Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sun, 29 Jul 2007 19:38:56 +0000 Subject: Remove unneeded locking mechanism. Fix a bug where selecting an entry and collapsing its parent would make it impossible to select another item. --- hardinfo2/shell.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c index fce29d8b..fff24783 100644 --- a/hardinfo2/shell.c +++ b/hardinfo2/shell.c @@ -1121,23 +1121,19 @@ static void module_selected(gpointer data) GtkTreeIter parent; ShellModuleEntry *entry; static ShellModuleEntry *current = NULL; - static gboolean updating = FALSE; - - if (updating) - return; - - updating = TRUE; /* Gets the currently selected item on the left-side TreeView; if there is no selection, silently return */ if (!gtk_tree_selection_get_selected - (shelltree->selection, &model, &parent)) + (shelltree->selection, &model, &parent)) { return; + } /* Mark the currently selected module as "unselected"; this is used to kill the update timeout. */ - if (current) + if (current) { current->selected = FALSE; + } /* Get the current selection and shows its related info */ gtk_tree_model_get(model, &parent, TREE_COL_DATA, &entry, -1); @@ -1188,7 +1184,6 @@ static void module_selected(gpointer data) } current = entry; - updating = FALSE; } static void info_selected(GtkTreeSelection * ts, gpointer data) -- cgit v1.2.3