[Gnucash-changes] remove xaccGUIDType insanity in this dialog
Linas Vepstas
linas at cvs.gnucash.org
Mon May 31 14:55:34 EDT 2004
Log Message:
-----------
remove xaccGUIDType insanity in this dialog
Modified Files:
--------------
gnucash/src/gnome:
druid-stock-split.c
Revision Data
-------------
Index: druid-stock-split.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-stock-split.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/gnome/druid-stock-split.c -Lsrc/gnome/druid-stock-split.c -u -r1.39 -r1.40
--- src/gnome/druid-stock-split.c
+++ src/gnome/druid-stock-split.c
@@ -57,7 +57,7 @@
/* account page data */
GtkWidget * account_list;
- GUID account;
+ Account * acct;
/* info page data */
GtkWidget * date_edit;
@@ -171,8 +171,8 @@
Account *account;
account = gtk_clist_get_row_data (clist, row);
-
- info->account = *xaccAccountGetGUID (account);
+
+ info->acct = account;
}
static void
@@ -181,7 +181,7 @@
GNCPrintAmountInfo print_info;
Account *account;
- account = xaccAccountLookup (&info->account, gnc_get_current_book ());
+ account = info->acct;
g_return_if_fail (account != NULL);
@@ -203,11 +203,8 @@
gpointer user_data)
{
StockSplitInfo *info = user_data;
- Account *account;
-
- account = xaccAccountLookup (&info->account, gnc_get_current_book ());
- g_return_val_if_fail (account != NULL, TRUE);
+ g_return_val_if_fail (info->acct != NULL, TRUE);
refresh_details_page (info);
@@ -373,7 +370,7 @@
Split *split;
time_t date;
- account = xaccAccountLookup (&info->account, gnc_get_current_book ());
+ account = info->acct;
g_return_if_fail (account != NULL);
amount = gnc_amount_edit_get_amount
@@ -667,24 +664,18 @@
{
StockSplitInfo *info = user_data;
Account *old_account;
- Account *new_account;
- GNCIdType id_type;
GtkWidget *page;
GladeXML *xml;
- old_account = xaccAccountLookup (&info->account, gnc_get_current_book ());
- id_type = xaccGUIDType (old_account, gnc_get_current_book ());
+ old_account = info->acct;
- if (fill_account_list (info, old_account) == 0)
+ if (fill_account_list (info, info->acct) == 0)
{
gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
return;
}
- new_account = xaccAccountLookup (&info->account, gnc_get_current_book ());
-
- if (!safe_strcmp (id_type, GNC_ID_NULL) || old_account == new_account)
- return;
+ if (NULL == info->acct || old_account == info->acct) return;
xml = glade_get_widget_tree (info->window);
page = glade_xml_get_widget (xml, "account_page");
@@ -715,7 +706,7 @@
info = g_new0 (StockSplitInfo, 1);
- info->account = *xaccGUIDNULL ();
+ info->acct = NULL;
gnc_stock_split_druid_create (info);
More information about the gnucash-changes
mailing list