mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/gnome/file-history.c: fix bug
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3986 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a6f80c3f39
commit
65c99a6608
@ -1,3 +1,7 @@
|
||||
2001-04-17 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnome/file-history.c: fix bug
|
||||
|
||||
2001-04-17 Bill Gribble <grib@billgribble.com>
|
||||
|
||||
* fixes to MDI bugs: only one param editor for accounts and
|
||||
|
@ -160,6 +160,7 @@ gnc_history_update_menu(GnomeApp * app)
|
||||
GnomeUIInfo *menu;
|
||||
GnomeDockItem *di;
|
||||
GtkWidget *menushell;
|
||||
gpointer data;
|
||||
char *path;
|
||||
char *file;
|
||||
char *name;
|
||||
@ -168,6 +169,9 @@ gnc_history_update_menu(GnomeApp * app)
|
||||
int i, n;
|
||||
int pos;
|
||||
|
||||
if (!app)
|
||||
return;
|
||||
|
||||
di = gnome_app_get_dock_item_by_name(app, GNOME_APP_MENUBAR_NAME);
|
||||
if (di == NULL)
|
||||
return;
|
||||
@ -184,8 +188,17 @@ gnc_history_update_menu(GnomeApp * app)
|
||||
if (!gnome_app_find_menu_pos (menushell, path, &pos))
|
||||
return;
|
||||
|
||||
gnome_app_remove_menu_range(app, GNOME_MENU_FILE_PATH,
|
||||
pos, 1 + num_menu_entries);
|
||||
data = gtk_object_get_data (GTK_OBJECT (app), "gnc_set_history");
|
||||
if (data)
|
||||
{
|
||||
int num_entries;
|
||||
|
||||
data = gtk_object_get_data (GTK_OBJECT (app), "gnc_num_history");
|
||||
num_entries = GPOINTER_TO_INT (data);
|
||||
|
||||
gnome_app_remove_menu_range(app, GNOME_MENU_FILE_PATH,
|
||||
pos, 1 + num_entries);
|
||||
}
|
||||
|
||||
if(history_list == NULL)
|
||||
__gnc_history_get_list();
|
||||
@ -241,6 +254,10 @@ gnc_history_update_menu(GnomeApp * app)
|
||||
gnome_app_insert_menus(GNOME_APP(app), path, menu);
|
||||
num_menu_entries = n;
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (app), "gnc_set_history", app);
|
||||
gtk_object_set_data (GTK_OBJECT (app), "gnc_num_history",
|
||||
GINT_TO_POINTER (num_menu_entries));
|
||||
|
||||
for (i = 1; i <= n; i++)
|
||||
g_free((menu+i)->label);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user