From b95981e6af9a47e09c104c08a448553d19dfa53b Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 15 Jul 2018 16:41:30 +0100 Subject: [PATCH] Bug 796751 - reconcile window usability - R column should be... next to Amount. With the use of the previous update the original order is possible as the scrollbar is not hovering over the reconcile tick box --- gnucash/gnome/reconcile-view.c | 23 ++++++++++++----------- gnucash/gnome/reconcile-view.h | 10 +++++----- gnucash/gnome/window-reconcile.c | 4 ++-- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/gnucash/gnome/reconcile-view.c b/gnucash/gnome/reconcile-view.c index e3d2389f57..713d2de6e3 100644 --- a/gnucash/gnome/reconcile-view.c +++ b/gnucash/gnome/reconcile-view.c @@ -242,6 +242,7 @@ gnc_reconcile_view_add_padding (GNCReconcileView *view, gint column, gint xpaddi GtkCellRenderer *cr0; gint xpad, ypad; + //allow for pointer model column at column 0 col = gtk_tree_view_get_column (GTK_TREE_VIEW (qview), (column - 1)); renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (col)); cr0 = g_list_nth_data (renderers, 0); @@ -328,8 +329,8 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type, /* Create the list store with 6 columns and add to treeview, column 0 will be a pointer to the entry */ - liststore = gtk_list_store_new (6, G_TYPE_POINTER, G_TYPE_BOOLEAN, - G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING ); + liststore = gtk_list_store_new (6, G_TYPE_POINTER, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN ); gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (liststore)); g_object_unref (liststore); @@ -407,6 +408,15 @@ gnc_reconcile_view_init (GNCReconcileView *view) view->account = NULL; view->sibling = NULL; + param = gnc_search_param_simple_new(); + gnc_search_param_set_param_fcn (param, QOF_TYPE_BOOLEAN, + gnc_reconcile_view_is_reconciled, view); + gnc_search_param_set_title ((GNCSearchParam *) param, _("Reconciled:R") + 11); + gnc_search_param_set_justify ((GNCSearchParam *) param, GTK_JUSTIFY_CENTER); + gnc_search_param_set_passive ((GNCSearchParam *) param, FALSE); + gnc_search_param_set_non_resizeable ((GNCSearchParam *) param, TRUE); + columns = g_list_prepend (columns, param); + columns = gnc_search_param_prepend_with_justify (columns, _("Amount"), GTK_JUSTIFY_RIGHT, NULL, GNC_ID_SPLIT, @@ -426,15 +436,6 @@ gnc_reconcile_view_init (GNCReconcileView *view) columns = gnc_search_param_prepend (columns, _("Date"), NULL, GNC_ID_SPLIT, SPLIT_TRANS, TRANS_DATE_POSTED, NULL); - param = gnc_search_param_simple_new(); - gnc_search_param_set_param_fcn (param, QOF_TYPE_BOOLEAN, - gnc_reconcile_view_is_reconciled, view); - gnc_search_param_set_title ((GNCSearchParam *) param, _("Reconciled:R") + 11); - gnc_search_param_set_justify ((GNCSearchParam *) param, GTK_JUSTIFY_CENTER); - gnc_search_param_set_passive ((GNCSearchParam *) param, FALSE); - gnc_search_param_set_non_resizeable ((GNCSearchParam *) param, TRUE); - columns = g_list_prepend (columns, param); - view->column_list = columns; } diff --git a/gnucash/gnome/reconcile-view.h b/gnucash/gnome/reconcile-view.h index 4206935e75..13763d21fc 100644 --- a/gnucash/gnome/reconcile-view.h +++ b/gnucash/gnome/reconcile-view.h @@ -47,11 +47,11 @@ typedef enum enum { REC_POINTER, //0 - REC_RECN, //1 - REC_DATE, //2 - REC_NUM, //3 - REC_DESC, //4 - REC_AMOUNT //5 + REC_DATE, //1 + REC_NUM, //2 + REC_DESC, //3 + REC_AMOUNT, //4 + REC_RECN, //5 }; struct GNCReconcileView diff --git a/gnucash/gnome/window-reconcile.c b/gnucash/gnome/window-reconcile.c index cdb405073c..d4b0dd90cb 100644 --- a/gnucash/gnome/window-reconcile.c +++ b/gnucash/gnome/window-reconcile.c @@ -1190,8 +1190,8 @@ gnc_reconcile_window_create_view_box(Account *account, vscroll = gtk_scrolled_window_get_vscrollbar (GTK_SCROLLED_WINDOW (scrollWin)); gtk_widget_get_preferred_size (vscroll, NULL, &nat_sb); - // add xpadding to amount column so scrollbar does not cover - gnc_reconcile_view_add_padding (GNC_RECONCILE_VIEW(view), REC_AMOUNT, nat_sb.width); + // add xpadding to recn column so scrollbar does not cover + gnc_reconcile_view_add_padding (GNC_RECONCILE_VIEW(view), REC_RECN, nat_sb.width); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5); gtk_box_set_homogeneous (GTK_BOX (hbox), FALSE);