Bug 620848 - Transfer Funds window - add Notes field

This commit is contained in:
Christopher Lam 2020-04-01 23:04:30 +08:00
parent 90d3e6c672
commit bedc9631f8
2 changed files with 35 additions and 1 deletions
gnucash

View File

@ -72,6 +72,7 @@ struct _xferDialog
GtkWidget *date_entry;
GtkWidget *num_entry;
GtkWidget *description_entry;
GtkWidget *notes_entry;
GtkWidget *memo_entry;
GtkWidget *conv_forward;
GtkWidget *conv_reverse;
@ -1269,6 +1270,7 @@ gnc_xfer_dialog_is_exchange_dialog (XferDialog *xferData,
gtk_widget_set_sensitive (xferData->date_entry, FALSE);
gtk_widget_set_sensitive (xferData->num_entry, FALSE);
gtk_widget_set_sensitive (xferData->description_entry, FALSE);
gtk_widget_set_sensitive (xferData->notes_entry, FALSE);
gtk_widget_set_sensitive (xferData->memo_entry, FALSE);
@ -1543,6 +1545,10 @@ create_transaction(XferDialog *xferData, time64 time,
string = gtk_entry_get_text(GTK_ENTRY(xferData->num_entry));
gnc_set_num_action (trans, from_split, string, NULL);
/* Set the transaction notes */
string = gtk_entry_get_text(GTK_ENTRY(xferData->notes_entry));
xaccTransSetNotes(trans, string);
/* Set the memo fields */
string = gtk_entry_get_text(GTK_ENTRY(xferData->memo_entry));
xaccSplitSetMemo(from_split, string);
@ -1931,6 +1937,9 @@ gnc_xfer_dialog_create(GtkWidget *parent, XferDialog *xferData)
entry = GTK_WIDGET(gtk_builder_get_object (builder, "description_entry"));
xferData->description_entry = entry;
entry = GTK_WIDGET(gtk_builder_get_object (builder, "notes_entry"));
xferData->notes_entry = entry;
entry = GTK_WIDGET(gtk_builder_get_object (builder, "memo_entry"));
xferData->memo_entry = entry;
}

View File

@ -223,7 +223,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
@ -233,6 +233,31 @@
<property name="hexpand">True</property>
<property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">12</property>
<property name="label" translatable="yes">Notes</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="notes_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>