2003-07-28 Christian Stimming <stimming@tuhh.de>

* src/import-export/hbci/druid-hbci-initial.c: Add button for
        manual adding of HBCI accounts. Fixes #117760. Requires latest
        OpenHBCI CVS -- next openhbci-0.9.13 will be out this weekend.

        * src/import-export/hbci/gnc-hbci-{getbalance,gettrans,transfer}.c:
        Add saving of the HBCI_API so that bank's status changes will now
        be remembered immediately. However this might save some
        unnecessary information to disk, but hopefully we will have fixed
        that in OpenHBCI soon.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8965 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/cashutil
Christian Stimming 23 years ago
parent 5bbe9c71cf
commit 616ae5d466

@ -1,3 +1,15 @@
2003-07-28 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/druid-hbci-initial.c: Add button for
manual adding of HBCI accounts. Fixes #117760. Requires latest
OpenHBCI CVS -- next openhbci-0.9.13 will be out this weekend.
* src/import-export/hbci/gnc-hbci-{getbalance,gettrans,transfer}.c:
Add saving of the HBCI_API so that bank's status changes will now
be remembered immediately. However this might save some
unnecessary information to disk, but hopefully we will have fixed
that in OpenHBCI soon.
2003-07-28 Derek Atkins <derek@ihtfp.com>
* src/gnome-utils/gnc-date-edit.c: hide the calendar popup

@ -568,7 +568,7 @@ AC_ARG_ENABLE( hbci,
fi)
if test x${HBCI_DIR} = xhbci ;
then
AM_PATH_OPENHBCI(0.9.11)
AM_PATH_OPENHBCI(0.9.12.11)
HBCI_LIBS="${OPENHBCI_LIBS}"
HBCI_CFLAGS="${OPENHBCI_CFLAGS}"

@ -199,9 +199,9 @@ update_accountlist_acc_cb (const HBCI_Account *hacc, gpointer user_data)
g_assert(info);
row_text[2] = "";
/* Account code, then Bank name, then Bank code in parentheses. */
row_text[0] =
g_strdup_printf("%s at %s (code %s)",
/* Translators: Strings are 1. Account code, 2. Bank name, 3. Bank code. */
g_strdup_printf(_("%s at %s (code %s)"),
HBCI_Account_accountId (hacc),
HBCI_Bank_name (HBCI_Account_bank (hacc)),
HBCI_Bank_bankCode (HBCI_Account_bank (hacc)));
@ -571,6 +571,79 @@ choose_hbciversion_dialog (GtkWindow *parent, HBCI_Bank *bank)
}
/* -------------------------------------- */
/* Copied from window-help.c */
static void
goto_string_cb(char * string, gpointer data)
{
if(!data) return;
if(!string) {
*(char **)data = NULL;
}
else {
*(char **)data = g_strdup(string);
}
}
static void gnc_hbci_addaccount(HBCIInitialInfo *info,
const HBCI_Customer *cust)
{
HBCI_Bank *bank;
const HBCI_User *user;
HBCI_Account *acc;
GtkWidget *dlg;
char *prompt;
char *accnr = NULL;
int retval = -1;
g_assert(info);
user = HBCI_Customer_user (cust);
bank = (HBCI_Bank *) HBCI_User_bank (user);
/* Ask for new account id by opening a request_dialog -- a druid
page would be better from GUI design, but I'm too lazy. */
prompt = g_strdup_printf(_("Enter account id for new account \nat bank %s (bank code %s):"),
HBCI_Bank_name (bank), HBCI_Bank_bankCode (bank));
dlg = gnome_request_dialog(FALSE, prompt, "", 20,
&goto_string_cb, &accnr, GTK_WINDOW(info->window));
retval = gnome_dialog_run_and_close(GNOME_DIALOG(dlg));
if ((retval == 0) && accnr && (strlen(accnr) > 0)) {
/* Check if such an account already exists */
if ( HBCI_Bank_findAccount (bank, accnr) )
{
/* Yes, then don't create it again */
gnc_error_dialog_parented
(GTK_WINDOW (info->window),
_("An account with this account id at this bank already exists."));
}
else
{
/* No, then create it now */
acc = HBCI_API_accountFactory(bank, accnr, "");
/* Add it to the bank, and the bank will also own the newly
created object. */
HBCI_Bank_addAccount(bank, acc, TRUE);
/* and add the given customer as first authorized
customer. This needs more work in case there are different
customers here. */
HBCI_Account_addAuthorizedCustomer(acc, cust);
/* Don't forget to update the account list, otherwise the new
accounts won't show up. */
update_accountlist(info);
}
}
g_free(prompt);
if (accnr)
g_free (accnr);
}
/* -------------------------------------- */
/*************************************************************
* GUI callbacks
*/
@ -1070,7 +1143,6 @@ on_accountinfo_next (GnomeDruidPage *gnomedruidpage,
HBCI_API_clearQueueByStatus (info->api, HBCI_JOB_STATUS_NONE);
}
/*update_accountlist(info->api);*/
return FALSE;
}
@ -1466,18 +1538,9 @@ on_button_clicked (GtkButton *button,
} else if (strcmp (name, "addaccount_button") == 0) {
/* manually adding HBCI account is not yet implemented (should be
rather easy, though) */
gnc_error_dialog_parented
(GTK_WINDOW (info->window),
_("Unfortunately the manual adding of HBCI accounts to your OpenHBCI\n"
"configuration has not yet been implemented in GnuCash. Please use\n"
"other programs such as 'aqmoney' to manually add the HBCI accounts to\n"
"your OpenHBCI configuration (see aqmoney manual page).\n"
"\n"
"Note: Most banks automatically send the list of available HBCI\n"
"accounts to you when you press the button 'Update Account List'. The\n"
"manual adding of HBCI accounts is needed if and only if your bank does\n"
"not support this automatic updating of the account list. If in doubt,\n"
"contact your bank and/or the GnuCash and OpenHBCI developers."));
info->newcustomer = choose_customer (info);
gnc_hbci_addaccount(info, info->newcustomer);
/* Nothing else to do. Stay at this druid page. */
} else if (strcmp (name, "serveryes_button") == 0) {
druid_enable_next_button (info);
} else if (strcmp (name, "serverno_button") == 0) {
@ -1503,6 +1566,9 @@ on_button_clicked (GtkButton *button,
void gnc_hbci_initial_druid (void)
{
HBCIInitialInfo *info;

@ -1079,12 +1079,10 @@ progress of the HBCI connection in the HBCI connection window.</label>
</child>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow25</name>
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<class>GtkVBox</class>
<name>vbox157</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
@ -1092,62 +1090,94 @@ progress of the HBCI connection in the HBCI connection window.</label>
</child>
<widget>
<class>GtkCList</class>
<name>account_page_list</name>
<can_focus>True</can_focus>
<columns>3</columns>
<column_widths>281,242,53</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<class>GtkScrolledWindow</class>
<name>scrolledwindow25</name>
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label834</name>
<label>HBCI account name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<class>GtkCList</class>
<name>account_page_list</name>
<can_focus>True</can_focus>
<columns>3</columns>
<column_widths>281,242,53</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label835</name>
<label>GnuCash account name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label834</name>
<label>HBCI account name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label836</name>
<label>New?</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label835</name>
<label>GnuCash account name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label836</name>
<label>New?</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>label828</name>
<label>Click on the line of a HBCI account name if you want to match it to a GnuCash account.
Click &quot;Next&quot; when all desired accounts are matching.</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkVBox</class>
<name>vbox144</name>
<border_width>5</border_width>
<homogeneous>False</homogeneous>
<spacing>5</spacing>
<class>GtkFrame</class>
<name>frame72</name>
<label>HBCI Setup</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>False</expand>
@ -1155,94 +1185,84 @@ progress of the HBCI connection in the HBCI connection window.</label>
</child>
<widget>
<class>GtkButton</class>
<name>hbciversion_button</name>
<can_focus>True</can_focus>
<label>HBCI
<class>GtkVBox</class>
<name>vbox144</name>
<border_width>5</border_width>
<homogeneous>False</homogeneous>
<spacing>5</spacing>
<widget>
<class>GtkButton</class>
<name>hbciversion_button</name>
<can_focus>True</can_focus>
<label>HBCI
Version</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>updatelist_button</name>
<can_focus>True</can_focus>
<label>Update
<widget>
<class>GtkButton</class>
<name>updatelist_button</name>
<can_focus>True</can_focus>
<label>Update
account list</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>addaccount_button</name>
<can_focus>True</can_focus>
<label>Manually add
<widget>
<class>GtkButton</class>
<name>addaccount_button</name>
<can_focus>True</can_focus>
<label>Manually add
Account</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>addbank_button</name>
<can_focus>True</can_focus>
<label>Add
<widget>
<class>GtkButton</class>
<name>addbank_button</name>
<can_focus>True</can_focus>
<label>Add
Bank</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>adduser_button</name>
<can_focus>True</can_focus>
<label>Add
<widget>
<class>GtkButton</class>
<name>adduser_button</name>
<can_focus>True</can_focus>
<label>Add
User</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>label828</name>
<label>Click on the line of a HBCI account name if you want to match it to a GnuCash account.
Click &quot;Next&quot; when all desired accounts are matching.</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>3</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>

@ -117,6 +117,7 @@ gnc_hbci_getbalance (GtkWidget *parent, Account *gnc_acc)
/* Clean up after ourselves. */
HBCI_API_clearQueueByStatus (api, HBCI_JOB_STATUS_NONE);
gnc_hbci_api_save (api);
GNCInteractor_hide (interactor);
}
}

@ -136,6 +136,7 @@ gnc_hbci_gettrans (GtkWidget *parent, Account *gnc_acc)
/* Clean up behind ourself. */
HBCI_API_clearQueueByStatus (api, HBCI_JOB_STATUS_NONE);
gnc_hbci_api_save (api);
GNCInteractor_hide (interactor);
}
}

@ -161,6 +161,7 @@ gnc_hbci_maketrans (GtkWidget *parent, Account *gnc_acc,
/* Just to be on the safe side, clear queue once again. */
HBCI_API_clearQueueByStatus (api, HBCI_JOB_STATUS_NONE);
gnc_hbci_api_save (api);
gnc_hbci_dialog_delete(td);
gnc_trans_templ_delete_glist (template_list);

Loading…
Cancel
Save