diff --git a/src/gnome/AccWindow.c b/src/gnome/AccWindow.c index 33098229b5..f931f364c8 100644 --- a/src/gnome/AccWindow.c +++ b/src/gnome/AccWindow.c @@ -346,7 +346,7 @@ accWindow (AccountGroup *grp) { gnome_dialog_button_connect (GNOME_DIALOG (accData->dialog), 1, GTK_SIGNAL_FUNC (gnc_ui_accWindow_cancelled_callback), - accData->dialog); + accData); /*** End of Callbacks *********************************************/ diff --git a/src/gnome/MainWindow.c b/src/gnome/MainWindow.c index d43701128c..bfa09c25e7 100644 --- a/src/gnome/MainWindow.c +++ b/src/gnome/MainWindow.c @@ -162,20 +162,20 @@ gnc_ui_acct_tree_fill(GtkTree *item, AccountGroup *accts, int subtree) void gnc_ui_refresh_tree() { - /** This is ugly... how do we do this nicer? */ - GList *items; - - mwindow->maintree = GTK_TREE_ROOT_TREE ( mwindow->maintree ); - - items = GTK_TREE_SELECTION ( mwindow->maintree ); - - gtk_tree_clear_items ( mwindow->maintree, 0, g_list_length(items) ); + GList *list; + + /* Make sure we are at the top of the tree */ + + list = GTK_TREE( GTK_TREE_ROOT_TREE ( mwindow->maintree ) )->children; + + gtk_tree_remove_items ( GTK_TREE_ROOT_TREE( mwindow->maintree ), list); - mwindow->root_item = mwindow->maintree; - + /* Refill Tree with fresh data */ + gnc_ui_acct_tree_fill(mwindow->root_item, xaccSessionGetGroup(current_session), - -1); + -1); + } @@ -343,7 +343,7 @@ static GnomeUIInfo filemenu[] = { {GNOME_APP_UI_ITEM, N_("New"), N_("Create New File."), NULL, NULL, NULL, - GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ABOUT, + GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_NEW, 0, 0, NULL}, {GNOME_APP_UI_ITEM, N_("Open"), N_("Open File."), @@ -351,10 +351,21 @@ static GnomeUIInfo filemenu[] = { GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, 0,0, NULL}, {GNOME_APP_UI_ITEM, + N_("Save"), N_("Save File."), + file_cmd_save, NULL, NULL, + GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE, + 0, 0, NULL}, + {GNOME_APP_UI_ITEM, N_("Import"), N_("Import QIF File."), file_cmd_import, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL}, + GNOMEUIINFO_SEPARATOR, + {GNOME_APP_UI_ITEM, + N_("Quit"), N_("Quit Gnucash."), + gnc_shutdown, NULL, NULL, + GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_QUIT, + 0, 0, NULL}, GNOMEUIINFO_END }; diff --git a/src/gnome/MenuCommands.c b/src/gnome/MenuCommands.c index f2a712267d..d24c8b15a9 100644 --- a/src/gnome/MenuCommands.c +++ b/src/gnome/MenuCommands.c @@ -20,7 +20,7 @@ \********************************************************************/ #include "MenuCommands.h" -// #incldue "FileDialog.h" +#include "FileDialog.h" /* hack alert -- the right way to imoplement the missing function * below is to move the file src/motif/FileDialog.c to some @@ -32,24 +32,24 @@ void file_cmd_open (GtkWidget *widget, gpointer data) { - // gncFileOpen(); + gncFileOpen(); } void file_cmd_import (GtkWidget *widget, gpointer data) { - // gncFileQIFImport(); + gncFileQIFImport(); } void file_cmd_save(GtkWidget *widget, gpointer data) { - // gncFileSave(); + gncFileSave(); } void file_cmd_quit (GtkWidget *widget, gpointer data) { - // gncFileQuit(); + //gncFileQuit(); //gnucash_shutdown(NULL, NULL); gtk_main_quit(); }