On Sun, 2011-11-27 at 20:07 +0000, nets...@semichrome.net wrote:

> -     parent = tree_get_default_folder_node(hotlist_tree);
> +     if (selected == true) {
> +             parent = tree_get_selected_node(tree_get_root(hotlist_tree));
> +             if (parent && (tree_node_is_folder == false)) {

tree_node_is_folder is a function. Comparing its address to false is
bogus (and generates compiler warnings here). Please make sure that when
committing changes to core code, they are warning-free. I would fix
this, but I've no understanding of what it is you're attempting to do
here.
 
>  /**
>   * Add an entry node.
> - */
> -void hotlist_add_entry(void)
> + *
> + * \param selected add the entry in the currently-selected node
> + */
> +void hotlist_add_entry(bool selected)
>  {
>       struct node *node, *parent;
>       creating_node = true;
>  
> -     parent = tree_get_default_folder_node(hotlist_tree);
> +     if (selected == true) {
> +             parent = tree_get_selected_node(tree_get_root(hotlist_tree));
> +             if (parent && (tree_node_is_folder == false)) {

Ditto.


J.


Reply via email to