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
This commit is contained in:
Robert Fewell 2018-07-15 16:41:30 +01:00 committed by John Ralls
parent aa77b21dfb
commit b95981e6af
3 changed files with 19 additions and 18 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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);