mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[assistant-stock-transaction] ellipsise memo, add tooltip to summary
Tooltip contains the full Memo field.
This commit is contained in:
parent
7e1cb7e2fa
commit
78f3b33b0c
@ -75,6 +75,7 @@ enum split_cols
|
||||
{
|
||||
SPLIT_COL_ACCOUNT = 0,
|
||||
SPLIT_COL_MEMO,
|
||||
SPLIT_COL_MEMO_ESCAPED,
|
||||
SPLIT_COL_DEBIT,
|
||||
SPLIT_COL_CREDIT,
|
||||
NUM_SPLIT_COLS
|
||||
@ -674,6 +675,7 @@ check_page (GtkListStore *list, gnc_numeric& debit, gnc_numeric& credit,
|
||||
}
|
||||
|
||||
auto memostr = gtk_entry_get_text (GTK_ENTRY (memo));
|
||||
auto memostr_escaped = g_markup_escape_text (memostr, -1);
|
||||
const gchar *acctstr;
|
||||
|
||||
if (ignore_account)
|
||||
@ -693,9 +695,11 @@ check_page (GtkListStore *list, gnc_numeric& debit, gnc_numeric& credit,
|
||||
gtk_list_store_set (list, &iter,
|
||||
SPLIT_COL_ACCOUNT, acctstr,
|
||||
SPLIT_COL_MEMO, memostr,
|
||||
SPLIT_COL_MEMO_ESCAPED, memostr_escaped,
|
||||
SPLIT_COL_DEBIT, debit_side ? amtstr : "",
|
||||
SPLIT_COL_CREDIT, !debit_side ? amtstr : "",
|
||||
-1);
|
||||
g_free (memostr_escaped);
|
||||
}
|
||||
|
||||
static inline Account*
|
||||
@ -1152,6 +1156,7 @@ get_treeview (GtkBuilder *builder, const gchar *treeview_label)
|
||||
gtk_tree_view_append_column(view, column);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new();
|
||||
g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, nullptr);
|
||||
column = gtk_tree_view_column_new_with_attributes
|
||||
(_("Memo"), renderer, "text", SPLIT_COL_MEMO, nullptr);
|
||||
gtk_tree_view_column_set_expand (column, true);
|
||||
@ -1247,6 +1252,8 @@ stock_assistant_create (StockTransactionInfo *info)
|
||||
info->finish_summary = get_widget (builder, "finish_summary");
|
||||
g_signal_connect (G_OBJECT(info->window), "destroy",
|
||||
G_CALLBACK (stock_assistant_window_destroy_cb), info);
|
||||
gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (info->finish_split_view),
|
||||
SPLIT_COL_MEMO_ESCAPED);
|
||||
|
||||
gtk_assistant_set_forward_page_func (GTK_ASSISTANT(info->window),
|
||||
(GtkAssistantPageFunc)forward_page_func,
|
||||
|
Loading…
Reference in New Issue
Block a user