mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Do the right thing when going "back" from the "load a file" page. If
there are any files loaded should return to the "loaded files" page instead of the initial druid page. #101818 git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7766 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
5164ae147f
commit
f4a1432582
@ -381,6 +381,31 @@ gnc_ui_qif_import_select_file_cb(GtkButton * button,
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* gnc_ui_qif_import_load_file_back_cb
|
||||
*
|
||||
* Invoked when the "back" button is clicked on the load file page.
|
||||
********************************************************************/
|
||||
|
||||
static gboolean
|
||||
gnc_ui_qif_import_load_file_back_cb(GnomeDruidPage * page, gpointer arg1,
|
||||
gpointer user_data)
|
||||
{
|
||||
QIFImportWindow * wind = user_data;
|
||||
|
||||
if (gh_list_p(wind->imported_files) &&
|
||||
(gh_length(wind->imported_files) > 0)) {
|
||||
gnome_druid_set_page(GNOME_DRUID(wind->druid),
|
||||
get_named_page(wind, "loaded_files_page"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gnome_druid_set_page(GNOME_DRUID(wind->druid),
|
||||
get_named_page(wind, "start_page"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* gnc_ui_qif_import_load_file_next_cb
|
||||
*
|
||||
@ -1806,6 +1831,10 @@ gnc_ui_qif_import_druid_make(void) {
|
||||
(xml, "gnc_ui_qif_import_select_file_cb",
|
||||
GTK_SIGNAL_FUNC (gnc_ui_qif_import_select_file_cb), retval);
|
||||
|
||||
glade_xml_signal_connect_data
|
||||
(xml, "gnc_ui_qif_import_load_file_back_cb",
|
||||
GTK_SIGNAL_FUNC (gnc_ui_qif_import_load_file_back_cb), retval);
|
||||
|
||||
glade_xml_signal_connect_data
|
||||
(xml, "gnc_ui_qif_import_load_file_next_cb",
|
||||
GTK_SIGNAL_FUNC (gnc_ui_qif_import_load_file_next_cb), retval);
|
||||
@ -1994,6 +2023,7 @@ gnc_ui_qif_import_druid_make(void) {
|
||||
|
||||
gnc_register_gui_component(DRUID_QIF_IMPORT_CM_CLASS, NULL, NULL, retval);
|
||||
|
||||
gnome_window_icon_set_from_default(retval->window);
|
||||
gtk_widget_show_all(retval->window);
|
||||
gtk_window_present (GTK_WINDOW(retval->window));
|
||||
|
||||
|
@ -228,9 +228,9 @@ to abort the process. </text>
|
||||
</signal>
|
||||
<signal>
|
||||
<name>back</name>
|
||||
<handler>gnc_ui_qif_import_generic_back_cb</handler>
|
||||
<handler>gnc_ui_qif_import_load_file_back_cb</handler>
|
||||
<data>QIF_Import_Druid</data>
|
||||
<last_modification_time>Tue, 06 Feb 2001 17:05:58 GMT</last_modification_time>
|
||||
<last_modification_time>Sat, 04 Jan 2003 05:05:30 GMT</last_modification_time>
|
||||
</signal>
|
||||
<title>Select a QIF file to load</title>
|
||||
<title_color>255,255,255</title_color>
|
||||
|
Loading…
Reference in New Issue
Block a user