@ -123,7 +123,8 @@ gnc_hbci_gettrans (GtkWidget *parent, Account *gnc_acc)
gnc_hbci_cleanup_job ( api , job ) ;
gnc_AB_BANKING_fini ( api ) ;
GNCInteractor_hide ( interactor ) ;
GWEN_Time_free ( from_date ) ;
if ( from_date )
GWEN_Time_free ( from_date ) ;
GWEN_Time_free ( to_date ) ;
}
}
@ -148,35 +149,36 @@ gettrans_dates(GtkWidget *parent, Account *gnc_acc,
last_timespec = gnc_hbci_get_account_trans_retrieval ( gnc_acc ) ;
if ( last_timespec . tv_sec = = 0 ) {
use_last_date = FALSE ;
timespecFromTime_t ( & last_timespec , now ) ;
}
timespecFromTime_t ( & until_timespec , now ) ;
timespecFromTime_t ( & last_timespec , now ) ;
}
timespecFromTime_t ( & until_timespec , now ) ;
/* Let the user choose the date range of retrieval */
if ( ! gnc_hbci_enter_daterange ( parent , NULL ,
& last_timespec ,
& use_last_date , & use_earliest_date ,
& until_timespec , & use_until_now ) )
return FALSE ;
/* Let the user choose the date range of retrieval */
if ( ! gnc_hbci_enter_daterange ( parent , NULL ,
& last_timespec ,
& use_last_date , & use_earliest_date ,
& until_timespec , & use_until_now ) )
return FALSE ;
/*printf("Retrieving transactions from date %s to date %s. \n",
ctime ( & ( ) ) ) */
/*printf("Retrieving transactions from date %s to date %s. \n",
ctime ( & ( ) ) ) */
/* Now calculate from date */
if ( use_earliest_date )
* from_date = GWEN_Time_fromSeconds ( 0 ) ;
else {
if ( use_last_date )
last_timespec = gnc_hbci_get_account_trans_retrieval ( gnc_acc ) ;
* from_date = GWEN_Time_fromSeconds ( timespecToTime_t ( last_timespec ) ) ;
}
/* Now calculate from date */
if ( use_earliest_date )
* from_date = NULL ;
/* for an old version this was: from_date = GWEN_Time_fromSeconds(0); */
else {
if ( use_last_date )
last_timespec = gnc_hbci_get_account_trans_retrieval ( gnc_acc ) ;
* from_date = GWEN_Time_fromSeconds ( timespecToTime_t ( last_timespec ) ) ;
}
/* Now calculate to date */
if ( use_until_now )
timespecFromTime_t ( & until_timespec , now ) ;
* to_date = GWEN_Time_fromSeconds ( timespecToTime_t ( until_timespec ) ) ;
/* Now calculate to date */
if ( use_until_now )
timespecFromTime_t ( & until_timespec , now ) ;
* to_date = GWEN_Time_fromSeconds ( timespecToTime_t ( until_timespec ) ) ;
return TRUE ;
return TRUE ;
}
@ -193,7 +195,7 @@ gnc_hbci_gettrans_final(GtkWidget *parent,
trans_list = AB_JobGetTransactions_GetTransactions ( trans_job ) ;
if ( ! trans_list ) {
printf ( " gnc_hbci_gettrans_final: No transactions section. Response was: \n " ) ;
/* printf(" gnc_hbci_gettrans_final: No transactions section. Response was:\n"); */
gnome_ok_dialog_parented
( _ ( " The HBCI import returned no transactions for the selected time period. " ) ,