diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2013-02-20 19:17:08 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2013-02-20 19:17:08 +0000 |
commit | 6feb984156f7e504a00ad8edfef84993ad1b3e74 (patch) | |
tree | a66d80c8e0f77def2b7e7d4002c090ef81866c48 /src/trg-files-model.c | |
parent | 2ebc0a5cd92b753271316e0e00a5fddc51d0cbf0 (diff) |
update year in copyright headers, fix the jumbled file lists (caused by unsorted files)
Diffstat (limited to 'src/trg-files-model.c')
-rw-r--r-- | src/trg-files-model.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/trg-files-model.c b/src/trg-files-model.c index f082bd8..a0a2a37 100644 --- a/src/trg-files-model.c +++ b/src/trg-files-model.c @@ -1,6 +1,6 @@ /* * transmission-remote-gtk - A GTK RPC client to Transmission - * Copyright (C) 2011 Alan Fitton + * Copyright (C) 2011-2013 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -192,6 +192,9 @@ static trg_files_tree_node *trg_file_parser_node_insert(trg_files_tree_node } } + if (!target_node && lastIter && lastIter->childrenHash) + target_node = g_hash_table_lookup(lastIter->childrenHash, path_el); + /* Node needs creating */ if (!target_node) { @@ -201,11 +204,10 @@ static trg_files_tree_node *trg_file_parser_node_insert(trg_files_tree_node /* Under the parent of the last iteration. */ if (lastIter) - lastIter->children = - g_list_append(lastIter->children, target_node); + trg_files_tree_node_add_child(lastIter, target_node); /* None set, so under the top node. */ else - top->children = g_list_append(top->children, target_node); + trg_files_tree_node_add_child(top, target_node); } lastIter = target_node; |