2002-09-23 Christian Stimming <stimming@tuhh.de>

* src/import-export/hbci/gnc-hbci-actions.c,
	src/import-export/hbci/dialog-hbcitrans.[hc] : Connect the HBCI
	transaction-invocation and gnucash xfer dialog.

	* src/gnome/dialog-transfer.[hc]: Add set_memo access function.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7237 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2002-09-22 23:31:36 +00:00
parent 69c7aa2733
commit 345c8d5e70
7 changed files with 520 additions and 362 deletions

View File

@ -1,3 +1,11 @@
2002-09-23 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-actions.c,
src/import-export/hbci/dialog-hbcitrans.[hc] : Connect the HBCI
transaction-invocation and gnucash xfer dialog.
* src/gnome/dialog-transfer.[hc]: Add set_memo access function.
2002-09-19 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-actions.[hc], gnc-hbci-cb.[hc],

View File

@ -997,6 +997,24 @@ gnc_xfer_dialog_set_description(XferDialog *xferData, const char *description)
gnc_quickfill_insert( xferData->qf, description, QUICKFILL_LIFO );
}
/********************************************************************\
* gnc_xfer_dialog_set_memo *
* set the memo in the given xfer dialog *
* *
* Args: xferData - xfer dialog structure *
* memo - the memo to set *
* Return: none *
\********************************************************************/
void
gnc_xfer_dialog_set_memo(XferDialog *xferData, const char *memo)
{
if (xferData == NULL)
return;
gtk_entry_set_text(GTK_ENTRY(xferData->memo_entry), memo);
/* gnc_quickfill_insert( xferData->qf, memo, QUICKFILL_LIFO ); */
}
/********************************************************************\
* gnc_xfer_dialog_set_date *
* set the date in the given xfer dialog *

View File

@ -73,6 +73,7 @@ void gnc_xfer_dialog_lock_to_account_tree(XferDialog *xferData );
void gnc_xfer_dialog_set_amount(XferDialog *xferData, gnc_numeric amount);
void gnc_xfer_dialog_set_description(XferDialog *xferData,
const char *description);
void gnc_xfer_dialog_set_memo(XferDialog *xferData, const char *memo);
void gnc_xfer_dialog_set_date(XferDialog *xferData, time_t set_time);
/* Indicate whether the dialog should quickfill based on the "To" account,

View File

@ -24,20 +24,24 @@
#include <gnome.h>
#include <openhbci/bank.h>
#include <openhbci/outboxaccjobs.h>
#include "dialog-utils.h"
#include "gnc-ui.h"
#include "gnc-hbci-utils.h"
#include "dialog-hbcitrans.h"
HBCI_Transaction *
gnc_hbci_trans (GtkWidget *parent,
HBCI_API *api,
GNCInteractor *interactor,
const HBCI_Account *h_acc,
const HBCI_Customer *customer)
{
GtkWidget *dialog;
GladeXML *xml;
HBCI_Transaction *res_trans = NULL;
HBCI_Transaction *trans = NULL;
gint result;
const HBCI_Bank *bank;
@ -65,7 +69,6 @@ gnc_hbci_trans (GtkWidget *parent,
GtkWidget *orig_account_label;
GtkWidget *orig_bankname_label;
GtkWidget *orig_bankcode_label;
HBCI_Transaction *trans;
g_assert
(recp_name_entry = glade_xml_get_widget (xml, "recp_name_entry"));
@ -111,9 +114,10 @@ gnc_hbci_trans (GtkWidget *parent,
gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
/* printf("hbci_trans: result button was %d.\n", result); */
/* Was cancel pressed? */
if (result != 0) {
/* Was cancel pressed or dialog closed? */
if ((result != 0) && (result != 1)) {
gtk_widget_destroy (GTK_WIDGET (dialog));
return NULL;
}
@ -151,9 +155,48 @@ gnc_hbci_trans (GtkWidget *parent,
HBCI_Transaction_setValue (trans, val);
}
res_trans = trans;
{
/* Create a Do-Transaction (Transfer) job. */
HBCI_OutboxJobTransfer *transfer_job;
HBCI_OutboxJob *job;
transfer_job =
HBCI_OutboxJobTransfer_new (customer, (HBCI_Account *)h_acc, trans);
job = HBCI_OutboxJobTransfer_OutboxJob (transfer_job);
g_assert (job);
HBCI_API_addJob (api, job);
/* If the user pressed "execute now", then execute this job now. */
if (result == 0) {
HBCI_Error *err;
if (interactor)
GNCInteractor_show (interactor);
/*HBCI_Hbci_setDebugLevel(1);*/
err = HBCI_API_executeQueue (api, TRUE);
g_assert (err);
if (!HBCI_Error_isOk(err)) {
char *errstr = g_strdup_printf("gnc_hbci_maketrans: Error at executeQueue: %s",
HBCI_Error_message (err));
printf("%s; status %d, result %d\n", errstr, HBCI_OutboxJob_status(job),
HBCI_OutboxJob_result(job));
HBCI_Interactor_msgStateResponse (HBCI_Hbci_interactor
(HBCI_API_Hbci (api)), errstr);
g_free (errstr);
HBCI_Error_delete (err);
gnc_hbci_debug_outboxjob (job);
gtk_widget_destroy (GTK_WIDGET (dialog));
return trans;
}
/*HBCI_API_clearQueueByStatus (api, HBCI_JOB_STATUS_DONE);*/
HBCI_Error_delete (err);
}
}
}
gtk_widget_destroy (GTK_WIDGET (dialog));
return res_trans;
return trans;
}

View File

@ -30,9 +30,12 @@
#include <openhbci/customer.h>
#include <openhbci/transaction.h>
#include "hbci-interaction.h"
HBCI_Transaction *
gnc_hbci_trans (GtkWidget *parent,
HBCI_API *api,
GNCInteractor *interactor,
const HBCI_Account *h_acc,
const HBCI_Customer *customer);

View File

@ -2234,10 +2234,10 @@ Press 'Finish' now.</text>
<child_name>GnomeDialog:action_area</child_name>
<name>dialog-action_area2</name>
<layout_style>GTK_BUTTONBOX_END</layout_style>
<spacing>8</spacing>
<spacing>0</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_x>0</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
@ -2251,7 +2251,8 @@ Press 'Finish' now.</text>
<name>button79</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
<label>Execute Now</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_EXEC</stock_pixmap>
</widget>
<widget>
@ -2259,6 +2260,15 @@ Press 'Finish' now.</text>
<name>button81</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Execute Later</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_TIMER</stock_pixmap>
</widget>
<widget>
<class>GtkButton</class>
<name>button82</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
</widget>
</widget>
@ -2301,44 +2311,12 @@ Press 'Finish' now.</text>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877427</name>
<label>Recipient Name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>recp_name_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkTable</class>
<name>table6</name>
<rows>2</rows>
<rows>19</rows>
<columns>3</columns>
<homogeneous>True</homogeneous>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
@ -2347,6 +2325,30 @@ Press 'Finish' now.</text>
<fill>True</fill>
</child>
<widget>
<class>GtkEntry</class>
<name>recp_account_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>3</top_attach>
<bottom_attach>4</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877429</name>
@ -2360,8 +2362,8 @@ Press 'Finish' now.</text>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
@ -2375,17 +2377,17 @@ Press 'Finish' now.</text>
<widget>
<class>GtkEntry</class>
<name>recp_account_entry</name>
<name>recp_bankcode_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>3</top_attach>
<bottom_attach>4</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
@ -2410,6 +2412,56 @@ Press 'Finish' now.</text>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>recp_name_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877427</name>
<label>Recipient Name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
@ -2423,19 +2475,116 @@ Press 'Finish' now.</text>
</child>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator5</name>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>6</top_attach>
<bottom_attach>7</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877431</name>
<label>at Bank</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>4</top_attach>
<bottom_attach>5</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>recp_bankname_label</name>
<label>(filled in automatically)</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>5</top_attach>
<bottom_attach>6</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877434</name>
<label>Amount</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>7</top_attach>
<bottom_attach>8</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>recp_bankcode_entry</name>
<name>amount_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>8</top_attach>
<bottom_attach>9</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
@ -2446,181 +2595,125 @@ Press 'Finish' now.</text>
<yfill>False</yfill>
</child>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877431</name>
<label>at Bank</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator6</name>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>9</top_attach>
<bottom_attach>10</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>recp_bankname_label</name>
<label>(filled in automatically)</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877433</name>
<label>Payment Purpose (only for recipient)</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>10</top_attach>
<bottom_attach>11</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator5</name>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>purpose_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>11</top_attach>
<bottom_attach>12</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877434</name>
<label>Amount</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877435</name>
<label>Payment Purpose continued</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>12</top_attach>
<bottom_attach>13</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>amount_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator6</name>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877433</name>
<label>Payment Purpose (only for recipient)</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>purpose_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877435</name>
<label>Payment Purpose continued</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>purpose_cont_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator4</name>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkTable</class>
<name>table7</name>
<rows>2</rows>
<columns>3</columns>
<homogeneous>True</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkEntry</class>
<name>purpose_cont_entry</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>13</top_attach>
<bottom_attach>14</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
@ -2635,34 +2728,8 @@ Press 'Finish' now.</text>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877437</name>
<label>Originator Account Number</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<top_attach>15</top_attach>
<bottom_attach>16</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
@ -2687,8 +2754,8 @@ Press 'Finish' now.</text>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<top_attach>16</top_attach>
<bottom_attach>17</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
@ -2700,47 +2767,6 @@ Press 'Finish' now.</text>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>orig_account_label</name>
<label>something</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
</widget>
<widget>
<class>GtkTable</class>
<name>table8</name>
<rows>2</rows>
<columns>3</columns>
<homogeneous>True</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label8877440</name>
@ -2754,34 +2780,8 @@ Press 'Finish' now.</text>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877441</name>
<label>Bank Code</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<top_attach>17</top_attach>
<bottom_attach>18</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
@ -2806,8 +2806,86 @@ Press 'Finish' now.</text>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<top_attach>18</top_attach>
<bottom_attach>19</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877437</name>
<label>Originator Account Number</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>15</top_attach>
<bottom_attach>16</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>orig_account_label</name>
<label>something</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>16</top_attach>
<bottom_attach>17</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8877441</name>
<label>Bank Code</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>17</top_attach>
<bottom_attach>18</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
@ -2832,8 +2910,8 @@ Press 'Finish' now.</text>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<top_attach>18</top_attach>
<bottom_attach>19</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
@ -2844,6 +2922,25 @@ Press 'Finish' now.</text>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator4</name>
<child>
<left_attach>0</left_attach>
<right_attach>3</right_attach>
<top_attach>14</top_attach>
<bottom_attach>15</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
</widget>
</widget>
</widget>
</widget>

View File

@ -22,10 +22,13 @@
#include "gnc-hbci-actions.h"
#include "gnc-ui.h"
#include <openhbci/api.h>
#include <openhbci/outboxaccjobs.h>
#include "gnc-ui.h"
#include "gnc-numeric.h"
#include "dialog-transfer.h"
#include "hbci-interaction.h"
#include "gnc-hbci-utils.h"
#include "dialog-hbcitrans.h"
@ -185,43 +188,28 @@ gnc_hbci_maketrans (GtkWidget *parent, Account *gnc_acc)
{
/* Now open the HBCI_trans_dialog. */
HBCI_Transaction *trans = gnc_hbci_trans (parent, api, h_acc, customer);
HBCI_Transaction *trans = gnc_hbci_trans (parent, api, interactor,
h_acc, customer);
if (!trans)
return;
{
/* Execute a Do-Transaction (Transfer) job. */
HBCI_OutboxJobTransfer *transfer_job;
HBCI_OutboxJob *job;
HBCI_Error *err;
transfer_job =
HBCI_OutboxJobTransfer_new (customer, (HBCI_Account *)h_acc, trans);
job = HBCI_OutboxJobTransfer_OutboxJob (transfer_job);
g_assert (job);
HBCI_API_addJob (api, job);
if (interactor)
GNCInteractor_show (interactor);
HBCI_Hbci_setDebugLevel(1);
err = HBCI_API_executeQueue (api, TRUE);
g_assert (err);
if (!HBCI_Error_isOk(err)) {
char *errstr = g_strdup_printf("gnc_hbci_maketrans: Error at executeQueue: %s",
HBCI_Error_message (err));
printf("%s; status %d, result %d\n", errstr, HBCI_OutboxJob_status(job),
HBCI_OutboxJob_result(job));
HBCI_Interactor_msgStateResponse (HBCI_Hbci_interactor
(HBCI_API_Hbci (api)), errstr);
g_free (errstr);
HBCI_Error_delete (err);
gnc_hbci_debug_outboxjob (job);
return;
}
/*HBCI_API_clearQueueByStatus (api, HBCI_JOB_STATUS_DONE);*/
HBCI_Error_delete (err);
gnc_numeric amount;
char *description;
XferDialog *transdialog;
amount = double_to_gnc_numeric
(HBCI_Value_getValue (HBCI_Transaction_value (trans)),
100, GNC_RND_FLOOR);
description = g_strdup_printf("HBCI to %s",
HBCI_Transaction_otherAccountId (trans));
transdialog = gnc_xfer_dialog (parent, gnc_acc);
gnc_xfer_dialog_set_title (transdialog, "HBCI initiated transaction");
/* gnc_xfer_dialog_toggle_currency_frame (transdialog, FALSE); */
gnc_xfer_dialog_set_amount (transdialog, amount);
gnc_xfer_dialog_set_description (transdialog, description);
g_free (description);
}
HBCI_Transaction_delete (trans);