diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-07-29 19:38:56 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-07-29 19:38:56 +0000 | 
| commit | 058f63cb3c49c53b0798ea61f92ab44c93a968ee (patch) | |
| tree | 04e821e96819356814ec9f5fced590ffa5bac787 /hardinfo2 | |
| parent | 9ee42c7226a0571f78dd21319f226b8a48aa7fc0 (diff) | |
Remove unneeded locking mechanism. Fix a bug where selecting an entry and collapsing its parent would make it impossible to select another item.
Diffstat (limited to 'hardinfo2')
| -rw-r--r-- | hardinfo2/shell.c | 13 | 
1 files 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) | 
