mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/business/business-gnome/dialog-invoice.c:
* src/business/business-gnome/glade/invoice.glade: add handlers to immediately save the active and notes fields as they are edited. Fixes #104954 NOTE: This has a side effect of removing an invoice from any open searches, but NOT replacing it if you click on the "active" button. * src/business/business-gnome/business-gnome.scm: fix the "bill reminder" so it doesn't create a query if there are no payables accounts. * src/gnome-utils/gnc-menu-extensions.c: dgettext() and gettext() return const char*. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7901 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0f55f75988
commit
93d0b4abb5
16
ChangeLog
16
ChangeLog
@ -14,6 +14,22 @@
|
|||||||
|
|
||||||
Fixes Morrison J. Chang's QIF import problem.
|
Fixes Morrison J. Chang's QIF import problem.
|
||||||
|
|
||||||
|
* src/business/business-gnome/dialog-invoice.c:
|
||||||
|
* src/business/business-gnome/glade/invoice.glade:
|
||||||
|
add handlers to immediately save the active and notes fields
|
||||||
|
as they are edited. Fixes #104954
|
||||||
|
|
||||||
|
NOTE: This has a side effect of removing an invoice from any
|
||||||
|
open searches, but NOT replacing it if you click on the "active"
|
||||||
|
button.
|
||||||
|
|
||||||
|
* src/business/business-gnome/business-gnome.scm: fix the "bill
|
||||||
|
reminder" so it doesn't create a query if there are no payables
|
||||||
|
accounts.
|
||||||
|
|
||||||
|
* src/gnome-utils/gnc-menu-extensions.c: dgettext() and gettext()
|
||||||
|
return const char*.
|
||||||
|
|
||||||
2003-01-30 Derek Atkins <derek@ihtfp.com>
|
2003-01-30 Derek Atkins <derek@ihtfp.com>
|
||||||
|
|
||||||
* po/np.po -- add the proper "Plural" header so it builds again.
|
* po/np.po -- add the proper "Plural" header so it builds again.
|
||||||
|
@ -39,10 +39,12 @@
|
|||||||
accts))
|
accts))
|
||||||
|
|
||||||
(define (make-query book accts)
|
(define (make-query book accts)
|
||||||
|
(if (and accts (not (null? accts)))
|
||||||
(let ((q (gnc:malloc-query)))
|
(let ((q (gnc:malloc-query)))
|
||||||
(gnc:query-add-account-match q accts 'guid-match-any 'query-and)
|
(gnc:query-add-account-match q accts 'guid-match-any 'query-and)
|
||||||
(gnc:query-set-book q book)
|
(gnc:query-set-book q book)
|
||||||
q))
|
q)
|
||||||
|
#f))
|
||||||
|
|
||||||
(define (get-open-lots query)
|
(define (get-open-lots query)
|
||||||
(let ((all-lots (gnc:query-get-lots query 'query-txn-match-any))
|
(let ((all-lots (gnc:query-get-lots query 'query-txn-match-any))
|
||||||
@ -64,13 +66,13 @@
|
|||||||
(let* ((book (gnc:session-get-book session))
|
(let* ((book (gnc:session-get-book session))
|
||||||
(payables-accounts (get-payables book))
|
(payables-accounts (get-payables book))
|
||||||
(query (make-query book payables-accounts))
|
(query (make-query book payables-accounts))
|
||||||
(open-lots (get-open-lots query))
|
(open-lots (if query (get-open-lots query) '()))
|
||||||
(days (option-value "Bills Due Days"))
|
(days (option-value "Bills Due Days"))
|
||||||
(compare-date (compute-date (gnc:get-today) days))
|
(compare-date (compute-date (gnc:get-today) days))
|
||||||
(bills '()))
|
(bills '()))
|
||||||
|
|
||||||
;; free up the space we don't need right now...
|
;; free up the space we don't need right now...
|
||||||
(gnc:free-query query)
|
(if query (gnc:free-query query))
|
||||||
|
|
||||||
;; compute the bills that are soon to be (or over-) due
|
;; compute the bills that are soon to be (or over-) due
|
||||||
(for-each
|
(for-each
|
||||||
|
@ -179,6 +179,9 @@ void gnc_invoice_window_toolbar_cb (GtkWidget *widget, gpointer data);
|
|||||||
void gnc_invoice_window_statusbar_cb (GtkWidget *widget, gpointer data);
|
void gnc_invoice_window_statusbar_cb (GtkWidget *widget, gpointer data);
|
||||||
void gnc_invoice_window_summarybar_cb (GtkWidget *widget, gpointer data);
|
void gnc_invoice_window_summarybar_cb (GtkWidget *widget, gpointer data);
|
||||||
|
|
||||||
|
void gnc_invoice_window_active_toggled_cb (GtkWidget *widget, gpointer data);
|
||||||
|
void gnc_invoice_window_leave_notes_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data);
|
||||||
|
|
||||||
#define INV_WIDTH_PREFIX "invoice_reg"
|
#define INV_WIDTH_PREFIX "invoice_reg"
|
||||||
#define BILL_WIDTH_PREFIX "bill_reg"
|
#define BILL_WIDTH_PREFIX "bill_reg"
|
||||||
static int inv_last_width = 0;
|
static int inv_last_width = 0;
|
||||||
@ -853,6 +856,31 @@ gnc_invoice_window_summarybar_cb (GtkWidget *widget, gpointer data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gnc_invoice_window_active_toggled_cb (GtkWidget *widget, gpointer data)
|
||||||
|
{
|
||||||
|
InvoiceWindow *iw = data;
|
||||||
|
GncInvoice *invoice = iw_get_invoice(iw);
|
||||||
|
|
||||||
|
if (!invoice) return;
|
||||||
|
|
||||||
|
gncInvoiceSetActive (invoice,
|
||||||
|
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gnc_invoice_window_leave_notes_cb (GtkWidget *widget, GdkEventFocus *event,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
InvoiceWindow *iw = data;
|
||||||
|
GncInvoice *invoice = iw_get_invoice(iw);
|
||||||
|
|
||||||
|
if (!invoice) return;
|
||||||
|
|
||||||
|
gncInvoiceSetNotes (invoice, gtk_editable_get_chars
|
||||||
|
(GTK_EDITABLE (widget), 0, -1));
|
||||||
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
add_summary_label (GtkWidget *summarybar, const char *label_str)
|
add_summary_label (GtkWidget *summarybar, const char *label_str)
|
||||||
{
|
{
|
||||||
|
@ -1636,6 +1636,12 @@
|
|||||||
<class>GtkCheckButton</class>
|
<class>GtkCheckButton</class>
|
||||||
<name>active_check</name>
|
<name>active_check</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
|
<signal>
|
||||||
|
<name>toggled</name>
|
||||||
|
<handler>gnc_invoice_window_active_toggled_cb</handler>
|
||||||
|
<data>Invoice Entry Window</data>
|
||||||
|
<last_modification_time>Sat, 01 Feb 2003 01:03:48 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<label>Active</label>
|
<label>Active</label>
|
||||||
<active>False</active>
|
<active>False</active>
|
||||||
<draw_indicator>True</draw_indicator>
|
<draw_indicator>True</draw_indicator>
|
||||||
@ -1898,6 +1904,12 @@
|
|||||||
<class>GtkText</class>
|
<class>GtkText</class>
|
||||||
<name>notes_text</name>
|
<name>notes_text</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
|
<signal>
|
||||||
|
<name>focus-out-event</name>
|
||||||
|
<handler>gnc_invoice_window_leave_notes_cb</handler>
|
||||||
|
<data>Invoice Entry Window</data>
|
||||||
|
<last_modification_time>Sat, 01 Feb 2003 01:12:00 GMT</last_modification_time>
|
||||||
|
</signal>
|
||||||
<editable>True</editable>
|
<editable>True</editable>
|
||||||
<text></text>
|
<text></text>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -369,7 +369,7 @@ g_strncmp_ignore_char( const gchar *first, const gchar *second, gint length, gch
|
|||||||
static const gchar *
|
static const gchar *
|
||||||
gnc_gnome_app_helper_gettext (const gchar *str)
|
gnc_gnome_app_helper_gettext (const gchar *str)
|
||||||
{
|
{
|
||||||
char *s;
|
const char *s;
|
||||||
|
|
||||||
/* First try to look up the string in gettext domain gnome-libs,
|
/* First try to look up the string in gettext domain gnome-libs,
|
||||||
* since this is where the original gnome stock labels have been
|
* since this is where the original gnome stock labels have been
|
||||||
|
Loading…
Reference in New Issue
Block a user