GNOME Bugzilla – Bug 121695
RFE: drag and drop account tree widget
Last modified: 2018-06-29 20:37:12 UTC
Using drag and drop to organize accounts would be very convienient in general. It would be even more useful if 104056 ( alternate account trees ) for reports is implemented. That way, reorganizing accounts for reports would be very easy.
Sorry, wrong bug number referenced above. 121696 is the correct number.
*** Bug 327649 has been marked as a duplicate of this bug. ***
*** Bug 343241 has been marked as a duplicate of this bug. ***
Potentially related to bug#343240
*** Bug 430127 has been marked as a duplicate of this bug. ***
Created attachment 146654 [details] [review] Patch to support drag and drop Here is a patch that implements drag and drop reparenting in the accounts page. The function works for me, and I can't think of anything more that needs to be done, but I'm new to the Gnucash codebase so a thorough review would be great.
Comment on attachment 146654 [details] [review] Patch to support drag and drop Looks good for trunk. One question though: How hard would it be to make this drag&drop to work only if Ctrl key is pressed as well?
Comment on attachment 146654 [details] [review] Patch to support drag and drop r18426, thanks a lot!
I think some problems were introduced with this change. I created a report and tried to modify the set of accounts used for this report. The following showed up in /tmp/gnucash.trace: * 20:14:20 CRIT <Gtk> gtk_tree_model_sort_convert_iter_to_child_iter: assertion `GTK_IS_TREE_MODEL_SORT (tree_model_sort)' failed * 20:14:20 CRIT <Gtk> gtk_tree_model_sort_get_model: assertion `GTK_IS_TREE_MODEL_SORT (tree_model)' failed * 20:14:20 CRIT <Gtk> gtk_tree_model_filter_convert_iter_to_child_iter: assertion `GTK_IS_TREE_MODEL_FILTER (filter)' failed * 20:14:20 CRIT <gnc.gui> gnc_tree_view_account_filter_by_view_info: assertion `GNC_IS_ACCOUNT(acct)' failed * 20:14:20 CRIT <Gtk> gtk_tree_model_sort_convert_iter_to_child_iter: assertion `GTK_IS_TREE_MODEL_SORT (tree_model_sort)' failed * 20:14:20 CRIT <Gtk> gtk_tree_model_sort_get_model: assertion `GTK_IS_TREE_MODEL_SORT (tree_model)' failed * 20:14:20 CRIT <Gtk> gtk_tree_model_filter_convert_iter_to_child_iter: assertion `GTK_IS_TREE_MODEL_FILTER (filter)' failed * 20:14:20 CRIT <gnc.gui> gnc_tree_view_account_filter_by_view_info: assertion `GNC_IS_ACCOUNT(acct)' failed More info: I set a breakpoint down in the logging code, and it stopped on: Breakpoint 3, log4glib_handler (log_domain=0x806c7c "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, message=0xa878208 "invalid cast from `GncTreeModelAccountDrag' to `GtkTreeModelSort'", user_data=0x8052c30) at qoflog.c:112 which may provide some clue to the problem.
Reverted again in r18494 because of the above and also other problems.
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=121695. Please continue processing the bug there and please update any external references or bookmarks.