mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-23 01:16:43 -06:00
*** empty log message ***
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2077 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
aabbb5691b
commit
71736a4883
11
ChangeLog
11
ChangeLog
@ -1,5 +1,16 @@
|
||||
2000-03-12 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* src/scm/c-interface.scm (gnc:error->string tag args): print a
|
||||
stack backtrace.
|
||||
|
||||
* src/gnome/cursors.c: when given a NULL argument, the set and
|
||||
unset busy cursor function change all top-level window cursors.
|
||||
This breaks the motif side though, in that the cursor will no
|
||||
longer get set there. Oh well.
|
||||
|
||||
* src/gnome/window-register.c (duplicateCB): new callback for
|
||||
duplicating the current transaction/split.
|
||||
|
||||
* src/SplitLedger.c (xaccSRDuplicateCurrent): new function to
|
||||
duplicate the current split or transaction.
|
||||
|
||||
|
@ -180,7 +180,6 @@ gncPostFileOpen (const char * filename)
|
||||
int io_error, uh_oh=0;
|
||||
char buf[BUFSIZE];
|
||||
AccountGroup *newgrp;
|
||||
gncUIWidget app;
|
||||
char * newfile;
|
||||
|
||||
if (!filename) return;
|
||||
@ -200,12 +199,11 @@ gncPostFileOpen (const char * filename)
|
||||
/* disable logging while we move over to the new set of accounts to
|
||||
* edit; the mass deletetion of accounts and transactions during
|
||||
* switchover is not something we want to keep in a journal. */
|
||||
app = gnc_get_ui_data();
|
||||
gnc_set_busy_cursor(app);
|
||||
gnc_set_busy_cursor(NULL);
|
||||
xaccLogDisable();
|
||||
newgrp = xaccSessionBeginFile (newsess, newfile);
|
||||
xaccLogEnable();
|
||||
gnc_unset_busy_cursor(app);
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
|
||||
/* check for session errors, put up appropriate dialog */
|
||||
SHOW_LOCK_ERR_MSG (newsess);
|
||||
@ -305,19 +303,16 @@ gncFileQIFImport (void)
|
||||
char buf[BUFSIZE];
|
||||
int io_error, uh_oh = 0;
|
||||
AccountGroup *newgrp;
|
||||
gncUIWidget app;
|
||||
|
||||
app = gnc_get_ui_data();
|
||||
|
||||
newfile = fileBox(IMPORT_QIF_STR, "*.qif");
|
||||
if (!newfile) return;
|
||||
|
||||
gnc_set_busy_cursor(app);
|
||||
gnc_set_busy_cursor(NULL);
|
||||
|
||||
/* load the accounts from the file the user specified */
|
||||
newgrp = xaccReadQIFAccountGroup (newfile);
|
||||
|
||||
gnc_unset_busy_cursor(app);
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
|
||||
/* check for i/o error, put up appropriate error message */
|
||||
io_error = xaccGetQIFIOError();
|
||||
@ -330,7 +325,7 @@ gncFileQIFImport (void)
|
||||
topgroup = xaccMallocAccountGroup();
|
||||
}
|
||||
|
||||
gnc_set_busy_cursor(app);
|
||||
gnc_set_busy_cursor(NULL);
|
||||
|
||||
/* since quicken will not export all accounts
|
||||
* into one file, we must merge them in one by one */
|
||||
@ -338,7 +333,7 @@ gncFileQIFImport (void)
|
||||
xaccMergeAccounts (topgroup);
|
||||
xaccConsolidateGrpTransactions (topgroup);
|
||||
|
||||
gnc_unset_busy_cursor(app);
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
}
|
||||
|
||||
/* ======================================================== */
|
||||
@ -351,7 +346,7 @@ gncFileSave (void)
|
||||
char * newfile;
|
||||
char buf[BUFSIZE];
|
||||
int io_error, norr, uh_oh = 0;
|
||||
gncUIWidget app;
|
||||
|
||||
/* hack alert -- Somehow make sure all in-progress edits get committed! */
|
||||
|
||||
/* if no session exists, then we don't have a filename/path
|
||||
@ -364,10 +359,9 @@ gncFileSave (void)
|
||||
}
|
||||
|
||||
/* use the current session to save to file */
|
||||
app = gnc_get_ui_data();
|
||||
gnc_set_busy_cursor(app);
|
||||
gnc_set_busy_cursor(NULL);
|
||||
xaccSessionSave (current_session);
|
||||
gnc_unset_busy_cursor(app);
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
|
||||
/* in theory, no error should have occured, but just in case,
|
||||
* we're gonna check and handle ... */
|
||||
|
@ -656,7 +656,7 @@ xaccSRDuplicateCurrent (SplitRegister *reg)
|
||||
Split *split;
|
||||
|
||||
split = xaccSRGetCurrentSplit(reg);
|
||||
trans = xaccSplitGetParent(split);
|
||||
trans = xaccSRGetCurrentTrans(reg);
|
||||
|
||||
/* This shouldn't happen, but be paranoid. */
|
||||
if (trans == NULL)
|
||||
|
@ -357,7 +357,7 @@ disable for now till we figure out what the right thing is.
|
||||
|
||||
void
|
||||
xaccAccountRemoveSplit ( Account *acc, Split *split )
|
||||
{
|
||||
{
|
||||
int i,j;
|
||||
|
||||
if (!acc) return;
|
||||
|
@ -45,7 +45,7 @@ gnc_ui_set_cursor (GdkWindow *win, int type)
|
||||
{
|
||||
GdkCursor *cursor = NULL;
|
||||
|
||||
if (!win)
|
||||
if (win == NULL)
|
||||
return;
|
||||
|
||||
if (type != GNC_CURSOR_NORMAL)
|
||||
@ -61,9 +61,20 @@ gnc_ui_set_cursor (GdkWindow *win, int type)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
set_cursor_helper(gpointer window, gpointer data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET(window);
|
||||
int type = GPOINTER_TO_INT(data);
|
||||
|
||||
gnc_ui_set_cursor(widget->window, type);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_set_busy_cursor *
|
||||
* sets the cursor to the busy watch *
|
||||
* sets the cursor to the busy watch for the given window. *
|
||||
* if the window is null, sets the cursor for all toplevel windows*
|
||||
* *
|
||||
* Args: w - the widget over which to make cursor busy *
|
||||
* Return: none *
|
||||
@ -73,12 +84,17 @@ gnc_set_busy_cursor(GtkWidget *w)
|
||||
{
|
||||
if (w != NULL)
|
||||
gnc_ui_set_cursor(w->window, GNC_CURSOR_BUSY);
|
||||
else
|
||||
g_list_foreach(gtk_container_get_toplevels(),
|
||||
set_cursor_helper,
|
||||
GINT_TO_POINTER(GNC_CURSOR_BUSY));
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_unset_busy_cursor *
|
||||
* sets the cursor to the default cursor *
|
||||
* sets the cursor to the default cursor for the given window. *
|
||||
* if the window is null, sets the cursor for all toplevel windows*
|
||||
* *
|
||||
* Args: w - the widget over which to make cursor normal *
|
||||
* Return: none *
|
||||
@ -88,6 +104,10 @@ gnc_unset_busy_cursor(GtkWidget *w)
|
||||
{
|
||||
if (w != NULL)
|
||||
gnc_ui_set_cursor(w->window, GNC_CURSOR_NORMAL);
|
||||
else
|
||||
g_list_foreach(gtk_container_get_toplevels(),
|
||||
set_cursor_helper,
|
||||
GINT_TO_POINTER(GNC_CURSOR_NORMAL));
|
||||
}
|
||||
|
||||
/************************* END OF FILE ******************************\
|
||||
|
@ -121,6 +121,7 @@ static void helpCB(GtkWidget *w, gpointer data);
|
||||
static void startAdjBCB(GtkWidget * w, gpointer data);
|
||||
static void newAccountCB(GtkWidget * w, gpointer data);
|
||||
static void deleteCB(GtkWidget *w, gpointer data);
|
||||
static void duplicateCB(GtkWidget *w, gpointer data);
|
||||
static void recordCB(GtkWidget *w, gpointer data);
|
||||
static void cancelCB(GtkWidget *w, gpointer data);
|
||||
static void closeCB(GtkWidget *w, gpointer data);
|
||||
@ -1095,6 +1096,14 @@ gnc_register_create_menu_bar(RegWindow *regData, GtkWidget *statusbar)
|
||||
0, 0, NULL
|
||||
},
|
||||
GNOMEUIINFO_SEPARATOR,
|
||||
{
|
||||
GNOME_APP_UI_ITEM,
|
||||
DUPLICATE_MENU_STR, TOOLTIP_DUP_TRANS,
|
||||
duplicateCB, regData, NULL,
|
||||
GNOME_APP_PIXMAP_NONE, NULL,
|
||||
0, 0, NULL
|
||||
},
|
||||
GNOMEUIINFO_SEPARATOR,
|
||||
{
|
||||
GNOME_APP_UI_ITEM,
|
||||
BLANK_MENU_STR, TOOLTIP_BLANK_TRANS,
|
||||
@ -2088,6 +2097,27 @@ deleteCB(GtkWidget *widget, gpointer data)
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* duplicateCB *
|
||||
* *
|
||||
* Args: widget - the widget that called us *
|
||||
* data - the data struct for this register *
|
||||
* Return: none *
|
||||
\********************************************************************/
|
||||
static void duplicateCB(GtkWidget *w, gpointer data)
|
||||
{
|
||||
RegWindow *regData = (RegWindow *) data;
|
||||
Split *new_split;
|
||||
|
||||
new_split = xaccSRDuplicateCurrent(regData->ledger->ledger);
|
||||
|
||||
if (new_split == NULL)
|
||||
return;
|
||||
|
||||
gnc_register_jump_to_split(regData, new_split);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* cancelCB *
|
||||
* *
|
||||
|
@ -224,20 +224,17 @@ static char *
|
||||
gnc_run_report(ReportData *report_data)
|
||||
{
|
||||
SCM result, nil;
|
||||
gncUIWidget window;
|
||||
|
||||
if (!gh_procedure_p(report_data->rendering_thunk))
|
||||
return NULL;
|
||||
|
||||
window = gnc_html_window_get_window(reportwindow);
|
||||
|
||||
gnc_set_busy_cursor(window);
|
||||
gnc_set_busy_cursor(NULL);
|
||||
|
||||
nil = gh_eval_str("()");
|
||||
result = gfec_apply(report_data->rendering_thunk, nil,
|
||||
gnc_report_error_dialog);
|
||||
|
||||
gnc_unset_busy_cursor(window);
|
||||
gnc_unset_busy_cursor(NULL);
|
||||
|
||||
if (!gh_string_p(result))
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user