Skip to content

Commit

Permalink
Repair unintended indent changes,
Browse files Browse the repository at this point in the history
This happened in commit 126dc3a for bug 797168
  • Loading branch information
EvansMike committed May 6, 2019
1 parent 6e246ef commit 0cb60dd
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions gnucash/gnome/dialog-invoice.c
Expand Up @@ -161,7 +161,8 @@ struct _invoice_window
GtkWidget * posted_date_hbox;
GtkWidget * posted_date;
GtkWidget * active_check;

GtkWidget * paid_label;

GtkWidget * owner_box;
GtkWidget * owner_label;
GtkWidget * owner_choice;
Expand Down Expand Up @@ -760,12 +761,12 @@ gnc_dialog_post_invoice(InvoiceWindow *iw, char *message,
*ddue = *postdate;
*memo = NULL;
{
GncGUID *guid = NULL;
owner_inst = qofOwnerGetOwner (gncOwnerGetEndOwner (&(iw->owner)));
qof_instance_get (owner_inst,
"invoice-last-posted-account", &guid,
NULL);
*acc = xaccAccountLookup (guid, iw->book);
GncGUID *guid = NULL;
owner_inst = qofOwnerGetOwner (gncOwnerGetEndOwner (&(iw->owner)));
qof_instance_get (owner_inst,
"invoice-last-posted-account", &guid,
NULL);
*acc = xaccAccountLookup (guid, iw->book);
}
/* Get the default for the accumulate option */
*accumulate = gnc_prefs_get_bool(GNC_PREFS_GROUP_INVOICE, GNC_PREF_ACCUM_SPLITS);
Expand Down Expand Up @@ -957,12 +958,12 @@ gnc_invoice_post(InvoiceWindow *iw, struct post_invoice_params *post_params)
*/
owner_inst = qofOwnerGetOwner (gncOwnerGetEndOwner (&(iw->owner)));
{
const GncGUID *guid = qof_instance_get_guid (QOF_INSTANCE (acc));
qof_begin_edit (owner_inst);
qof_instance_set (owner_inst,
"invoice-last-posted-account", guid,
NULL);
qof_commit_edit (owner_inst);
const GncGUID *guid = qof_instance_get_guid (QOF_INSTANCE (acc));
qof_begin_edit (owner_inst);
qof_instance_set (owner_inst,
"invoice-last-posted-account", guid,
NULL);
qof_commit_edit (owner_inst);
}

/* ... post it ... */
Expand Down Expand Up @@ -1874,8 +1875,6 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
{
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide3"));
gtk_widget_hide (hide);
hide = GTK_WIDGET (gtk_builder_get_object (iw->builder, "hide4"));
gtk_widget_hide (hide);

show = GTK_WIDGET (gtk_builder_get_object (iw->builder, "posted_label"));
gtk_widget_show (show);
Expand Down Expand Up @@ -1933,6 +1932,7 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
/* Setup viewer for read-only access */
gtk_widget_set_sensitive (acct_entry, FALSE);
gtk_widget_set_sensitive (iw->id_entry, FALSE);
gtk_widget_set_selectable (iw->id_entry, TRUE);
gtk_widget_set_sensitive (iw->terms_menu, FALSE);
gtk_widget_set_sensitive (iw->owner_box, FALSE);
gtk_widget_set_sensitive (iw->job_box, FALSE);
Expand All @@ -1949,6 +1949,11 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
gtk_widget_set_sensitive (iw->notes_text, TRUE);
}

if(gncInvoiceIsPaid (invoice))
gtk_label_set_text(GTK_LABEL(iw->paid_label), _("PAID"));
else
gtk_label_set_text(GTK_LABEL(iw->paid_label), _("UNPAID"));

if (widget)
gtk_widget_show (widget);
else
Expand Down Expand Up @@ -2317,6 +2322,7 @@ gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
iw->owner_label = GTK_WIDGET (gtk_builder_get_object (builder, "page_owner_label"));
iw->job_label = GTK_WIDGET (gtk_builder_get_object (builder, "page_job_label"));
iw->job_box = GTK_WIDGET (gtk_builder_get_object (builder, "page_job_hbox"));
iw->paid_label = GTK_WIDGET (gtk_builder_get_object (builder, "hide4"));

/* grab the project widgets */
iw->proj_frame = GTK_WIDGET (gtk_builder_get_object (builder, "page_proj_frame"));
Expand Down Expand Up @@ -3358,7 +3364,7 @@ gnc_invoice_show_docs_due (GtkWindow *parent, QofBook *book, double days_in_adva
if (param_list == NULL)
{
/* Translators: This abbreviation is the column heading for
the condition "Is this invoice a Credit Note?" */
the condition "Is this invoice a Credit Note?" */
param_list = gnc_search_param_prepend (param_list, _("CN?"), NULL, type,
INVOICE_IS_CN, NULL);
param_list = gnc_search_param_prepend (param_list, _("Amount"), NULL, type,
Expand Down

0 comments on commit 0cb60dd

Please sign in to comment.