r14502 - gnucash/trunk - Remove obsolete buttons for aqbanking/hbci setup that are
Christian Stimming
cstim at cvs.gnucash.org
Sat Jul 15 07:27:49 EDT 2006
Author: cstim
Date: 2006-07-15 07:27:48 -0400 (Sat, 15 Jul 2006)
New Revision: 14502
Trac: http://svn.gnucash.org/trac/changeset/14502
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
gnucash/trunk/src/import-export/hbci/glade/hbci.glade
Log:
Remove obsolete buttons for aqbanking/hbci setup that are
unneeded. Fix crash due to dangling points by deleting all pointers
after calling AB_Banking_Fini.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-07-15 04:02:02 UTC (rev 14501)
+++ gnucash/trunk/ChangeLog 2006-07-15 11:27:48 UTC (rev 14502)
@@ -1,3 +1,10 @@
+2006-07-15 Christian Stimming <stimming at tuhh.de>
+
+ * src/import-export/hbci/druid-hbci-initial.c: Remove obsolete
+ buttons for aqbanking/hbci setup that are unneeded. Fix crash due
+ to dangling points by deleting all pointers after calling
+ AB_Banking_Fini.
+
2006-07-14 Derek Atkins <derek at ihtfp.com>
* configure.in:
Modified: gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c 2006-07-15 04:02:02 UTC (rev 14501)
+++ gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c 2006-07-15 11:27:48 UTC (rev 14502)
@@ -51,13 +51,6 @@
/* #define DEFAULT_HBCI_VERSION 201 */
-typedef enum _infostate {
- INI_UPDATE_ACCOUNTS,
- INI_MATCH_ACCOUNTS,
- UPDATE_ACCOUNTS,
- MATCH_ACCOUNTS
-} Infostate;
-
struct _hbciinitialinfo
{
GtkWidget *window;
@@ -79,9 +72,6 @@
/* hbci_account (direct) -> gnucash_account -- DO NOT DELETE THE KEYS! */
GHashTable *gnc_hash;
- /* Status of user's movement through the wizard */
- Infostate state;
-
};
static gboolean
@@ -332,25 +322,6 @@
}
-static gboolean
-on_accountlist_back (GnomeDruidPage *gnomedruidpage,
- gpointer arg1,
- gpointer user_data)
-{
- HBCIInitialInfo *info = user_data;
- g_assert(info);
-
- switch (info->state) {
- case INI_MATCH_ACCOUNTS:
- case MATCH_ACCOUNTS:
- gnome_druid_set_page (GNOME_DRUID (info->druid),
- GNOME_DRUID_PAGE (info->filepage));
- return TRUE;
- default:
- return FALSE;
- }
-}
-
static void
on_accountlist_prepare (GnomeDruidPage *gnomedruidpage,
gpointer arg1,
@@ -422,28 +393,6 @@
-static void
-on_button_clicked (GtkButton *button,
- gpointer user_data)
-{
- HBCIInitialInfo *info = user_data;
- const char *name;
- g_assert(info->druid);
-
- name = gtk_widget_get_name (GTK_WIDGET (button));
- if (strcmp (name, "aqhbci_button") == 0) {
-/* info->state = ADD_BANK; */
- /* gnome_druid_set_page (GNOME_DRUID (info->druid),
- GNOME_DRUID_PAGE (info->bankpage)); */
- } else if (strcmp (name, "updatelist_button") == 0) {
- info->state = UPDATE_ACCOUNTS;
- /* Nothing else to do. */
- } else {
- printf("on_button_clicked: Oops, unknown button: %s\n",
- name);
- }
-}
-
#if (AQBANKING_VERSION_MAJOR > 1) || \
((AQBANKING_VERSION_MAJOR == 1) && \
(AQBANKING_VERSION_MINOR == 9) && \
@@ -593,8 +542,14 @@
/* Call the qt wizard. See the note above about why this approach
is chosen. */
- /* In gtk2, this would be g_spawn_async or similar. */
+ /* Reset existing mapping tables */
AB_Banking_Fini (info->api);
+ delete_hash (info->hbci_hash);
+ info->hbci_hash = NULL;
+ if (info->gnc_hash != NULL)
+ g_hash_table_destroy (info->gnc_hash);
+ info->gnc_hash = NULL;
+ /* In gtk2, this would be g_spawn_async or similar. */
{
pid_t pid;
pid = fork();
@@ -705,16 +660,8 @@
info->accountlist = glade_xml_get_widget(xml, "account_page_list");
g_signal_connect (info->accountlist, "select_row",
G_CALLBACK (on_accountlist_select_row), info);
- g_signal_connect (glade_xml_get_widget (xml, "aqhbci_again_button"),
- "clicked",
- G_CALLBACK (on_aqhbci_button), info);
- g_signal_connect (glade_xml_get_widget (xml, "updatelist_button"),
- "clicked",
- G_CALLBACK (on_button_clicked), info);
g_signal_connect (page, "prepare",
G_CALLBACK (on_accountlist_prepare), info);
- g_signal_connect (page, "back",
- G_CALLBACK (on_accountlist_back), info);
}
Modified: gnucash/trunk/src/import-export/hbci/glade/hbci.glade
===================================================================
--- gnucash/trunk/src/import-export/hbci/glade/hbci.glade 2006-07-15 04:02:02 UTC (rev 14501)
+++ gnucash/trunk/src/import-export/hbci/glade/hbci.glade 2006-07-15 11:27:48 UTC (rev 14502)
@@ -185,109 +185,75 @@
<property name="spacing">0</property>
<child>
- <widget class="GtkHBox" id="hbox112">
+ <widget class="GtkVBox" id="vbox157">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
- <widget class="GtkVBox" id="vbox157">
+ <widget class="GtkScrolledWindow" id="scrolledwindow25">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow25">
+ <widget class="GtkCList" id="account_page_list">
<property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="can_focus">True</property>
+ <property name="n_columns">3</property>
+ <property name="column_widths">281,242,53</property>
+ <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+ <property name="show_titles">True</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkCList" id="account_page_list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="n_columns">3</property>
- <property name="column_widths">281,242,53</property>
- <property name="selection_mode">GTK_SELECTION_SINGLE</property>
- <property name="show_titles">True</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
+ <widget class="GtkLabel" id="label834">
+ <property name="label" translatable="yes">HBCI account name</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
- <child>
- <widget class="GtkLabel" id="label834">
- <property name="label" translatable="yes">HBCI account name</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label835">
+ <property name="label" translatable="yes">GnuCash account name</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
- <child>
- <widget class="GtkLabel" id="label835">
- <property name="label" translatable="yes">GnuCash account name</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label836">
- <property name="label" translatable="yes">New?</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label836">
+ <property name="label" translatable="yes">New?</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
</widget>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
-
- <child>
- <widget class="GtkLabel" id="label828">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Click on the line of a HBCI account name if you want to match it to a GnuCash account. Click "Forward" when all desired accounts are matching.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -297,78 +263,23 @@
</child>
<child>
- <widget class="GtkFrame" id="frame72">
+ <widget class="GtkLabel" id="label828">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox144">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">5</property>
-
- <child>
- <widget class="GtkButton" id="updatelist_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Update
-account list</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="aqhbci_again_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">AqHBCI
-Setup</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label8877442">
- <property name="visible">True</property>
- <property name="label" translatable="yes">HBCI Setup</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">Click on the line of a HBCI account name if you want to match it to a GnuCash account. Click "Forward" when all desired accounts are matching.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
@@ -1519,6 +1430,7 @@
<property name="response_id">0</property>
</widget>
</child>
+
<child>
<widget class="GtkButton" id="close_button">
<property name="visible">True</property>
@@ -1531,7 +1443,6 @@
<property name="response_id">0</property>
</widget>
</child>
-
</widget>
<packing>
<property name="padding">0</property>
@@ -1888,6 +1799,7 @@
<property name="response_id">2</property>
</widget>
</child>
+
<child>
<widget class="GtkButton" id="ok_button">
<property name="visible">True</property>
@@ -1900,7 +1812,6 @@
<property name="response_id">1</property>
</widget>
</child>
-
</widget>
<packing>
<property name="padding">0</property>
@@ -2251,6 +2162,7 @@
<property name="response_id">0</property>
</widget>
</child>
+
<child>
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
@@ -2263,7 +2175,6 @@
<property name="response_id">0</property>
</widget>
</child>
-
</widget>
<packing>
<property name="padding">0</property>
More information about the gnucash-changes
mailing list