add buttons to lot viewer gui; disable lot viwer when no acount selected

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9170 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2003-08-25 02:08:42 +00:00
parent a00e554b29
commit 1a8893206c
3 changed files with 391 additions and 203 deletions

View File

@ -30,12 +30,14 @@
<widget>
<class>GtkVBox</class>
<name>vbox1</name>
<border_width>3</border_width>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkToolbar</class>
<name>toolbar1</name>
<border_width>3</border_width>
<orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
<type>GTK_TOOLBAR_BOTH</type>
<space_size>5</space_size>
@ -51,22 +53,45 @@
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>button2</name>
<label>Placeholder</label>
<name>regview button</name>
<border_width>3</border_width>
<tooltip>Open a register showing the transactions in this lot</tooltip>
<label>View in Register</label>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>disolve button</name>
<tooltip>Delete this lot</tooltip>
<label>Disolve</label>
<name>delete button</name>
<border_width>3</border_width>
<tooltip>Delete the highlighted lot</tooltip>
<label>Delete</label>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>scrub lot button</name>
<border_width>3</border_width>
<tooltip>Scrub the highlighted lot</tooltip>
<label>Scrub
Lot</label>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>account scrub button</name>
<border_width>3</border_width>
<label>Scrub
Account</label>
</widget>
</widget>
<widget>
<class>GtkHPaned</class>
<name>lot hpaned</name>
<border_width>3</border_width>
<handle_size>10</handle_size>
<gutter_size>6</gutter_size>
<position>0</position>
@ -77,223 +102,307 @@
</child>
<widget>
<class>GtkVBox</class>
<name>vbox2</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<class>GtkFrame</class>
<name>frame2</name>
<border_width>3</border_width>
<label>Lot Title and Notes</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<shrink>True</shrink>
<resize>False</resize>
</child>
<widget>
<class>GtkVBox</class>
<name>vbox2</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkHBox</class>
<name>hbox1</name>
<border_width>3</border_width>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label8</name>
<label>Title:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>3</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>lot title entry</name>
<tooltip>Enter a name for the highlighted lot.</tooltip>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>3</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow2</name>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_NEVER</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkText</class>
<name>lot notes text</name>
<tooltip>Enter any notes you want to make about this lot.</tooltip>
<can_focus>True</can_focus>
<editable>True</editable>
<text></text>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkFrame</class>
<name>frame3</name>
<border_width>3</border_width>
<label>Listing of Lots in This Account</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<shrink>True</shrink>
<resize>True</resize>
</child>
<widget>
<class>GtkHBox</class>
<name>hbox1</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<class>GtkCList</class>
<name>lot clist</name>
<tooltip>A list of all of the lots in this account.</tooltip>
<can_focus>True</can_focus>
<columns>5</columns>
<column_widths>80,80,80,80,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<name>label8</name>
<label>Title:</label>
<child_name>CList:title</child_name>
<name>label3</name>
<label>Opened</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>lot title entry</name>
<tooltip>Enter a name for the highlighted lot.</tooltip>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label4</name>
<label>Closed</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow2</name>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_NEVER</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkText</class>
<name>lot notes text</name>
<tooltip>Enter any notes you want to make about this lot.</tooltip>
<can_focus>True</can_focus>
<editable>True</editable>
<text></text>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label5</name>
<label>Title</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
<widget>
<class>GtkVBox</class>
<name>vbox3</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<shrink>True</shrink>
<resize>True</resize>
</child>
<widget>
<class>GtkLabel</class>
<name>label2</name>
<label>Lots:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow3</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCList</class>
<name>lot clist</name>
<can_focus>True</can_focus>
<columns>5</columns>
<column_widths>80,80,80,80,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label6</name>
<label>Balance</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label3</name>
<label>Opened</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label4</name>
<label>Closed</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label5</name>
<label>Title</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label6</name>
<label>Balance</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label7</name>
<label>Gains</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label7</name>
<label>Gains</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>lot reg area scrolledwindow</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<class>GtkFrame</class>
<name>frame1</name>
<border_width>3</border_width>
<label>Lot Mini-View</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkViewport</class>
<name>viewport1</name>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<class>GtkScrolledWindow</class>
<name>scrolledwindow4</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>Placeholder</class>
<class>GtkCList</class>
<name>mini clist</name>
<sensitive>False</sensitive>
<tooltip>A summary of all of the transactions in the selected lot</tooltip>
<columns>7</columns>
<column_widths>80,80,80,80,80,80,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label9</name>
<label>Date</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label10</name>
<label>Num</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label11</name>
<label>Description</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label12</name>
<label>Amount</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label13</name>
<label>Value</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label14</name>
<label>Gain/Loss</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label15</name>
<label>Balance</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
</widget>

View File

@ -41,10 +41,12 @@
#include <gnome.h>
#include "Account.h"
#include "gnc-commodity.h"
#include "gnc-date.h"
#include "gnc-lot.h"
#include "kvp_frame.h"
#include "messages.h"
#include "Scrub2.h"
#include "Transaction.h"
#include "dialog-utils.h"
@ -61,18 +63,23 @@
struct _GNCLotViewer
{
GtkWidget * window;
GtkCList * lot_clist;
GtkText * lot_notes;
GtkWidget * reg_area;
GtkEntry * title_entry;
GtkPaned * lot_hpaned;
GtkWidget * window;
GtkButton * regview_button;
GtkButton * delete_button;
GtkButton * scrub_button;
GtkCList * lot_clist;
GtkText * lot_notes;
GtkEntry * title_entry;
GtkPaned * lot_hpaned;
GtkCList * mini_clist;
Account * account;
GNCLot * selected_lot;
int selected_row;
Account * account;
GNCLot * selected_lot;
int selected_row;
};
static void gnc_lot_viewer_fill (GNCLotViewer *lv);
/* ======================================================================== */
static void
@ -107,6 +114,24 @@ printf ("duuude row elect =%d %p the title=%s\n",row, lot, str);
/* ======================================================================== */
static void
lv_unset_lot (GNCLotViewer *lv)
{
/* Set immediately, to avoid recursion in gtkentry "changed" cb. */
lv->selected_lot = NULL;
lv->selected_row = -1;
/* Blank the title widget */
gtk_entry_set_text (lv->title_entry, "");
gtk_entry_set_editable (lv->title_entry, FALSE);
/* Blank the notes area */
xxxgtk_text_set_text (lv->lot_notes, "");
gtk_text_set_editable (lv->lot_notes, FALSE);
}
/* ======================================================================== */
static void
lv_unselect_row_cb (GtkCList *clist,
gint row,
@ -118,23 +143,17 @@ lv_unselect_row_cb (GtkCList *clist,
GNCLot *lot = lv->selected_lot;
const char * str;
/* Set immediately, to avoid recursion in gtkentry "changed" cb. */
lv->selected_lot = NULL;
lv->selected_row = -1;
/* Get the title, blank the title widget */
str = gtk_entry_get_text (lv->title_entry);
printf ("duuude row unselect =%d %p new tite=%s\n",row, lot, str);
gtk_clist_set_text (lv->lot_clist, row, column, str);
kvp_frame_set_str (gnc_lot_get_slots (lot), "/title", str);
gtk_entry_set_text (lv->title_entry, "");
gtk_entry_set_editable (lv->title_entry, FALSE);
/* Get the notes, blank the notes area */
str = xxxgtk_text_get_text (lv->lot_notes);
kvp_frame_set_str (gnc_lot_get_slots (lot), "/notes", str);
xxxgtk_text_set_text (lv->lot_notes, "");
gtk_text_set_editable (lv->lot_notes, FALSE);
lv_unset_lot (lv);
}
/* ======================================================================== */
@ -145,11 +164,48 @@ lv_title_entry_changed_cb (GtkEntry *ent, gpointer user_data)
GNCLotViewer *lv = user_data;
char * title;
title = gtk_entry_get_text (lv->title_entry);
printf ("duude entry changed=%s sel=%d\n", title, lv->selected_row);
if (0 > lv->selected_row) return;
gtk_clist_set_text (lv->lot_clist, lv->selected_row, TITLE_COL, title);
}
/* ======================================================================== */
static void
lv_delete_cb (GtkButton *but, gpointer user_data)
{
GNCLotViewer *lv = user_data;
GNCLot *lot = lv->selected_lot;
if (NULL == lot) return;
xaccAccountRemoveLot (gnc_lot_get_account(lot), lot);
gnc_lot_destroy (lot);
lv_unset_lot (lv);
gnc_lot_viewer_fill (lv);
printf ("duude deleted the lot\n");
}
/* ======================================================================== */
static void
lv_scrub_cb (GtkButton *but, gpointer user_data)
{
GNCLotViewer *lv = user_data;
if (NULL == lv->selected_lot) return;
xaccLotScrubDoubleBalance (lv->selected_lot);
gnc_lot_viewer_fill (lv);
printf ("duude done scrubbin lot\n");
}
/* ======================================================================== */
static void
lv_regview_cb (GtkButton *but, gpointer user_data)
{
GNCLotViewer *lv = user_data;
if (NULL == lv->selected_lot) return;
printf ("duude UNIMPLEMENTED: need to disply register showing only this one lot \n");
}
/* ======================================================================== */
/* Get the realized gains for this lot. This routine or a varient of it
* should probably be moved to gnc-lot.c.
@ -212,6 +268,7 @@ gnc_lot_viewer_fill (GNCLotViewer *lv)
printf ("duude got %d lots\n", nlots);
gtk_clist_freeze (lv->lot_clist);
gtk_clist_clear (lv->lot_clist);
for (node = lot_list; node; node=node->next)
{
char obuff[MAX_DATE_LENGTH];
@ -285,13 +342,17 @@ gnc_lot_viewer_dialog (Account *account)
xml = gnc_glade_xml_new ("lots.glade", "Lot Viewer Window");
lv->window = glade_xml_get_widget (xml, "Lot Viewer Window");
lv->regview_button = GTK_BUTTON(glade_xml_get_widget (xml, "regview button"));
lv->delete_button = GTK_BUTTON(glade_xml_get_widget (xml, "delete button"));
lv->scrub_button = GTK_BUTTON(glade_xml_get_widget (xml, "scrub button"));
lv->lot_clist = GTK_CLIST(glade_xml_get_widget (xml, "lot clist"));
lv->lot_notes = GTK_TEXT(glade_xml_get_widget (xml, "lot notes text"));
lv->title_entry = GTK_ENTRY (glade_xml_get_widget (xml, "lot title entry"));
lv->lot_hpaned = GTK_PANED (glade_xml_get_widget (xml, "lot hpaned"));
gtk_paned_set_position (lv->lot_hpaned, 100); /* XXX hack to make visible */
lv->reg_area = glade_xml_get_widget (xml, "lot reg area scrolledwindow");
lv->mini_clist = GTK_CLIST(glade_xml_get_widget (xml, "mini clist"));
lv->account = account;
lv->selected_lot = NULL;
@ -306,6 +367,15 @@ gnc_lot_viewer_dialog (Account *account)
gtk_signal_connect (GTK_OBJECT (lv->title_entry), "changed",
GTK_SIGNAL_FUNC (lv_title_entry_changed_cb), lv);
gtk_signal_connect (GTK_OBJECT (lv->regview_button), "clicked",
GTK_SIGNAL_FUNC (lv_regview_cb), lv);
gtk_signal_connect (GTK_OBJECT (lv->delete_button), "clicked",
GTK_SIGNAL_FUNC (lv_delete_cb), lv);
gtk_signal_connect (GTK_OBJECT (lv->scrub_button), "clicked",
GTK_SIGNAL_FUNC (lv_scrub_cb), lv);
gnc_lot_viewer_fill (lv);
return lv;
}

View File

@ -283,6 +283,7 @@ gnc_acct_tree_view_new(GnomeMDIChild * child, gpointer user_data)
gnc_acct_tree_window_find_popup_item(win, popup, "Edit Account");
gnc_acct_tree_window_find_popup_item(win, popup, "Delete Account");
gnc_acct_tree_window_find_popup_item(win, popup, "Reconcile...");
gnc_acct_tree_window_find_popup_item(win, popup, "View Lots...");
}
/*
@ -1293,6 +1294,9 @@ gnc_acct_tree_tweak_menu (GNCMDIChildInfo * mc)
GNCMDIInfo * info = mc->gnc_mdi;
GNCAcctTreeWin * win;
GtkWidget * widget;
#if FILEITEMS_DEPRECATED
/* XXX I think fileitems1 and 2 do not belong in the file menu. */
GnomeUIInfo fileitems1[] =
{
{
@ -1325,6 +1329,7 @@ gnc_acct_tree_tweak_menu (GNCMDIChildInfo * mc)
},
GNOMEUIINFO_END
};
#endif
GnomeUIInfo edititems[] =
{
@ -1409,15 +1414,19 @@ gnc_acct_tree_tweak_menu (GNCMDIChildInfo * mc)
dup_scrub[0].user_data = info;
dup_scrub[1].user_data = info;
dup_scrub[2].user_data = info;
#if FILEITEMS_DEPRECATED
gnc_gnome_app_insert_menus (mc->app, "_File/_New File", fileitems1);
gnc_gnome_app_insert_menus (mc->app, "_File/_Open...", fileitems2);
#endif
gnc_gnome_app_insert_menus (mc->app, "_Edit/_Paste", edititems);
gnome_app_insert_menus (mc->app, "_Actions/_Scheduled Transactions",
actionitems);
win = (GNCAcctTreeWin *)mc->user_data;
#if FILEITEMS_DEPRECATED
gnc_acct_tree_window_add_sensitive(win, fileitems2[0].widget);
gnc_acct_tree_window_add_sensitive(win, fileitems2[1].widget);
#endif
gnc_acct_tree_window_add_sensitive(win, edititems[1].widget);
gnc_acct_tree_window_add_sensitive(win, edititems[2].widget);
gnc_acct_tree_window_add_sensitive(win, actionitems[2].widget);