make sure that you can't change an Order or Invoice after it becomes RO

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6709 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2002-02-11 03:19:26 +00:00
parent 8fe6a5f821
commit 22bb2807ec
2 changed files with 13 additions and 0 deletions

View File

@ -83,6 +83,9 @@ static void gnc_ui_to_invoice (InvoiceWindow *iw, GncInvoice *invoice)
Timespec ts;
time_t tt;
if (iw->dialog_type == VIEW_INVOICE)
return;
gnc_suspend_gui_refresh ();
gncInvoiceSetID (invoice, gtk_editable_get_chars
@ -339,6 +342,9 @@ gnc_invoice_owner_changed_cb (GtkWidget *widget, gpointer data)
if (!iw)
return FALSE;
if (iw->dialog_type == VIEW_INVOICE)
return FALSE;
gnc_owner_get_owner (iw->owner_choice, &(iw->owner));
invoice = iw_get_invoice (iw);
gncInvoiceSetOwner (invoice, &(iw->owner));

View File

@ -85,6 +85,10 @@ static void gnc_ui_to_order (OrderWindow *ow, GncOrder *order)
Timespec ts;
time_t tt;
/* Do nothing if this is view only */
if (ow->dialog_type == VIEW_ORDER)
return;
gnc_suspend_gui_refresh ();
gncOrderSetID (order, gtk_editable_get_chars
@ -300,6 +304,9 @@ gnc_order_owner_changed_cb (GtkWidget *widget, gpointer data)
if (!ow)
return FALSE;
if (ow->dialog_type == VIEW_ORDER)
return FALSE;
gnc_owner_get_owner (ow->owner_choice, &(ow->owner));
switch (gncOwnerGetType (&(ow->owner))) {
case GNC_OWNER_JOB: