Skip to content

Commit

Permalink
Bug 796751 - reconcile window usability - R column should be...
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Bob-IT authored and jralls committed Jul 15, 2018
1 parent aa77b21 commit b95981e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
23 changes: 12 additions & 11 deletions gnucash/gnome/reconcile-view.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand All @@ -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;
}

Expand Down
10 changes: 5 additions & 5 deletions gnucash/gnome/reconcile-view.h
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions gnucash/gnome/window-reconcile.c
Expand Up @@ -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);
Expand Down

0 comments on commit b95981e

Please sign in to comment.