mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-06-02 Dave Peticolas <dave@krondo.com>
* src/SplitLedger.c: fix mem leak * src/gnome/top-level.c: handle X errors ourselves git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4370 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
2e486a0b0e
commit
29935d54a2
@ -1,3 +1,9 @@
|
||||
2001-06-02 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/SplitLedger.c: fix mem leak
|
||||
|
||||
* src/gnome/top-level.c: handle X errors ourselves
|
||||
|
||||
2001-06-01 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnc-ui-util.c: use new scanf macro below
|
||||
|
@ -3971,6 +3971,9 @@ xaccSRGetDebitString (SplitRegister *reg)
|
||||
if (!reg)
|
||||
return NULL;
|
||||
|
||||
if (reg->debit_str)
|
||||
return reg->debit_str;
|
||||
|
||||
reg->debit_str = gnc_get_debit_string (sr_type_to_account_type (reg->type));
|
||||
|
||||
if (reg->debit_str)
|
||||
@ -3984,6 +3987,9 @@ xaccSRGetDebitString (SplitRegister *reg)
|
||||
const char *
|
||||
xaccSRGetCreditString (SplitRegister *reg)
|
||||
{
|
||||
if (!reg)
|
||||
return NULL;
|
||||
|
||||
if (reg->credit_str)
|
||||
return reg->credit_str;
|
||||
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include <gconf/gconf.h>
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "AccWindow.h"
|
||||
#include "FileBox.h"
|
||||
#include "FileDialog.h"
|
||||
@ -435,6 +437,28 @@ gnc_ui_check_events (gpointer not_used)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
gnc_x_error (Display *display,
|
||||
XErrorEvent *error)
|
||||
{
|
||||
if (error->error_code)
|
||||
{
|
||||
char buf[64];
|
||||
|
||||
XGetErrorText (display, error->error_code, buf, 63);
|
||||
|
||||
g_warning ("X-ERROR **: %s\n serial %ld error_code %d "
|
||||
"request_code %d minor_code %d\n",
|
||||
buf,
|
||||
error->serial,
|
||||
error->error_code,
|
||||
error->request_code,
|
||||
error->minor_code);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
gnc_ui_start_event_loop (void)
|
||||
{
|
||||
@ -442,9 +466,11 @@ gnc_ui_start_event_loop (void)
|
||||
|
||||
gnome_is_running = TRUE;
|
||||
|
||||
id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 10000, /* 10 secs */
|
||||
id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 1, // 0000, /* 10 secs */
|
||||
gnc_ui_check_events, NULL, NULL);
|
||||
|
||||
XSetErrorHandler (gnc_x_error);
|
||||
|
||||
/* Enter gnome event loop */
|
||||
gtk_main ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user