More work on the budget dialog.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2211 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas
2000-04-25 10:14:27 +00:00
parent 72e51a660e
commit c180c018c0
12 changed files with 831 additions and 177 deletions

View File

@@ -1,5 +1,9 @@
2000-04-24 Dave Peticolas <peticola@cs.ucdavis.edu> 2000-04-24 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/scm/report/average-balance.scm: the min and max columns
were swapped. Also, the last average balance entry wasn't being
calculated correctly.
* src/gnome/dialog-options.c: modified to use gnc-dateedit. * src/gnome/dialog-options.c: modified to use gnc-dateedit.
* src/gnome/window-adjust.c: modified to use gnc-dateedit. * src/gnome/window-adjust.c: modified to use gnc-dateedit.

View File

@@ -3,3 +3,5 @@ tmp
obj obj
*.diff *.diff
backup.glade backup.glade
glade-cb-gnc-dialogs.c
glade-support-gnc-dialogs.c

View File

@@ -64,7 +64,7 @@ OTHER_OBJS += $(wildcard @top_srcdir@/src/register/gnome/obj/gnome/*.o)
###################################################################### ######################################################################
# See Makefile.common for information about these variables. # See Makefile.common for information about these variables.
GNOME_SRCS := top-level.c window-main.c window-register.c window-adjust.c \ GNOME_SRCS := top-level.c window-main.c window-register.c window-adjust.c \
window-help.c cursors.c account-tree.c \ window-help.c cursors.c account-tree.c dialog-budget.c \
window-reconcile.c option-util.c window-html.c \ window-reconcile.c option-util.c window-html.c \
dialog-options.c dialog-filebox.c dialog-transfer.c \ dialog-options.c dialog-filebox.c dialog-transfer.c \
dialog-add.c dialog-edit.c dialog-utils.c \ dialog-add.c dialog-edit.c dialog-utils.c \

202
src/gnome/dialog-budget.c Normal file
View File

@@ -0,0 +1,202 @@
/********************************************************************\
* dialog-budget.c : dialog for entering a budget *
* Copyright (C) 2000 Dave Peticolas <peticola@cs.ucdavis.edu> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
\********************************************************************/
#include "config.h"
#include "dialog-budget.h"
#include "glade-gnc-dialogs.h"
#include "guile-util.h"
struct _BudgetDialog
{
GtkWidget *dialog;
GtkWidget *entry_tree;
GtkWidget *entry_description_entry;
GtkWidget *entry_type_menu;
GtkWidget *sub_description_entry;
GtkWidget *sub_amount_entry;
GtkWidget *sub_mechanism_menu;
SCM apply_func;
SCM apply_func_id;
};
typedef struct _BudgetEntry
{
SCM entry;
SCM entry_id;
} BudgetEntry;
static struct
{
SCM entry_description;
} getters;
static gboolean getters_initialized = FALSE;
static void
initialize_getters()
{
if (getters_initialized)
return;
getters.entry_description = gh_eval_str("budget-entry-get-description");
getters_initialized = TRUE;
}
static void
destroy_entry(gpointer data)
{
BudgetEntry *be = data;
if (be == NULL) return;
gnc_unregister_c_side_scheme_ptr_id(be->entry_id);
g_free(be);
}
static void
fill_entry_tree(GtkWidget *entry_tree, SCM budget)
{
GtkCTreeNode *node;
GtkCTree *ctree;
gchar *text[2];
BudgetEntry *be;
SCM entry;
SCM value;
text[1] = NULL;
ctree = GTK_CTREE(entry_tree);
gtk_clist_freeze(GTK_CLIST(ctree));
while (gh_list_p(budget) && !gh_null_p(budget))
{
entry = gh_car(budget);
budget = gh_cdr(budget);
value = gh_call1(getters.entry_description, entry);
text[0] = gh_scm2newstr(value, NULL);
if (text[0] == NULL)
continue;
node = gtk_ctree_insert_node(ctree, NULL, NULL, text, 0,
NULL, NULL, NULL, NULL, FALSE, FALSE);
be = g_new0(BudgetEntry, 1);
be->entry = entry;
be->entry_id = gnc_register_c_side_scheme_ptr(entry);
gtk_ctree_node_set_row_data_full(ctree, node, be, destroy_entry);
}
gtk_clist_thaw(GTK_CLIST(ctree));
}
BudgetDialog *
gnc_ui_budget_dialog_create(SCM budget, SCM apply_func)
{
BudgetDialog *bd;
GtkObject *bdo;
GtkWidget *button;
GtkWidget *arrow;
initialize_getters();
bd = g_new0(BudgetDialog, 1);
bd->dialog = create_Budget_Dialog();
bdo = GTK_OBJECT(bd->dialog);
bd->apply_func = apply_func;
bd->apply_func_id = gnc_register_c_side_scheme_ptr(apply_func);
bd->entry_tree = gtk_object_get_data(bdo, "entry_tree");
fill_entry_tree(bd->entry_tree, budget);
bd->entry_description_entry =
gtk_object_get_data(bdo, "entry_description_entry");
bd->entry_type_menu =
gtk_object_get_data(bdo, "entry_type_menu");
bd->sub_description_entry =
gtk_object_get_data(bdo, "sub_description_entry");
bd->sub_amount_entry =
gtk_object_get_data(bdo, "sub_amount_entry");
bd->sub_mechanism_menu =
gtk_object_get_data(bdo, "sub_mechanism_menu");
button = gtk_object_get_data(bdo, "up_button");
arrow = gtk_arrow_new(GTK_ARROW_UP, GTK_SHADOW_IN);
gtk_container_remove(GTK_CONTAINER(button), GTK_BIN(button)->child);
gtk_container_add(GTK_CONTAINER(button), arrow);
button = gtk_object_get_data(bdo, "down_button");
arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_IN);
gtk_container_remove(GTK_CONTAINER(button), GTK_BIN(button)->child);
gtk_container_add(GTK_CONTAINER(button), arrow);
gtk_object_set_data(bdo, "budget_dialog_structure", bd);
gtk_widget_show_all(bd->dialog);
return bd;
}
void
gnc_ui_budget_dialog_destroy(BudgetDialog *bd)
{
if (bd == NULL)
return;
if (bd->dialog != NULL)
gnome_dialog_close(GNOME_DIALOG(bd->dialog));
bd->dialog = NULL;
}
void
on_Budget_Dialog_destroy(GtkObject *object,
gpointer user_data)
{
BudgetDialog *bd;
if (object == NULL) return;
bd = gtk_object_get_data(object, "budget_dialog_structure");
if (bd == NULL)
return;
gnc_unregister_c_side_scheme_ptr_id(bd->apply_func_id);
g_free(bd);
gtk_object_set_data(object, "budget_dialog_structure", NULL);
}

35
src/gnome/dialog-budget.h Normal file
View File

@@ -0,0 +1,35 @@
/********************************************************************\
* dialog-budget.h : dialog for entering a budget *
* Copyright (C) 2000 Dave Peticolas <peticola@cs.ucdavis.edu> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
\********************************************************************/
#ifndef __DIALOG_BUDGET_H_
#define __DIALOG_BUDGET_H_
#include "config.h"
#include <gnome.h>
#include <guile/gh.h>
#include "glade-gnc-dialogs.h"
typedef struct _BudgetDialog BudgetDialog;
BudgetDialog * gnc_ui_budget_dialog_create(SCM budget, SCM apply_func);
void gnc_ui_budget_dialog_destroy(BudgetDialog *bd);
#endif

View File

@@ -111,5 +111,4 @@ void gnc_ui_select_date_dialog_destroy(SelectDateDialog * sdd);
void gnc_ui_select_date_cancel_cb(GtkWidget * w, gpointer user_data); void gnc_ui_select_date_cancel_cb(GtkWidget * w, gpointer user_data);
void gnc_ui_select_date_ok_cb(GtkWidget * w, gpointer user_data); void gnc_ui_select_date_ok_cb(GtkWidget * w, gpointer user_data);
Split ** gnc_make_split_array(int nsplits);
#endif #endif

View File

@@ -144,3 +144,7 @@ gnc_ui_select_date_dialog_ok_cb (GtkButton *button,
void void
gnc_ui_select_date_dialog_cancel_cb (GtkButton *button, gnc_ui_select_date_dialog_cancel_cb (GtkButton *button,
gpointer user_data); gpointer user_data);
void
on_Budget_Dialog_destroy (GtkObject *object,
gpointer user_data);

View File

@@ -2663,3 +2663,478 @@ create_Select_Date (void)
return Select_Date; return Select_Date;
} }
GtkWidget*
create_Budget_Dialog (void)
{
GtkWidget *Budget_Dialog;
GtkWidget *dialog_vbox9;
GtkWidget *hbox40;
GtkWidget *frame21;
GtkWidget *vbox58;
GtkWidget *scrolledwindow5;
GtkWidget *viewport2;
GtkWidget *scrolledwindow6;
GtkWidget *entry_tree;
GtkWidget *label773;
GtkWidget *hbox43;
GtkWidget *hbuttonbox2;
GtkWidget *insert_entry_button;
GtkWidget *delete_entry_button;
GtkWidget *hbox44;
GtkWidget *up_button;
GtkWidget *down_button;
GtkWidget *vbox52;
GtkWidget *frame22;
GtkWidget *hbox34;
GtkWidget *vbox54;
GtkWidget *label774;
GtkWidget *label775;
GtkWidget *label776;
GtkWidget *vbox55;
GtkWidget *entry_description_entry;
GtkWidget *entry_type_menu;
GtkWidget *entry_type_menu_menu;
GtkWidget *glade_menuitem;
GtkWidget *match_button;
GtkWidget *frame23;
GtkWidget *hbox35;
GtkWidget *vbox56;
GtkWidget *label777;
GtkWidget *label778;
GtkWidget *label779;
GtkWidget *label780;
GtkWidget *label781;
GtkWidget *label782;
GtkWidget *vbox57;
GtkWidget *sub_description_entry;
GtkWidget *sub_amount_entry;
GtkWidget *period_box;
GtkWidget *hbox37;
GtkWidget *sub_mechanism_menu;
GtkWidget *sub_mechanism_menu_menu;
GtkWidget *label784;
GtkWidget *bill_day_box;
GtkWidget *grace_box;
GtkWidget *dialog_action_area9;
GtkWidget *ok_button;
GtkWidget *apply_button;
GtkWidget *cancel_button;
GtkWidget *help_button;
Budget_Dialog = gnome_dialog_new (_("Budget"), NULL);
gtk_object_set_data (GTK_OBJECT (Budget_Dialog), "Budget_Dialog", Budget_Dialog);
gtk_window_set_policy (GTK_WINDOW (Budget_Dialog), TRUE, TRUE, FALSE);
dialog_vbox9 = GNOME_DIALOG (Budget_Dialog)->vbox;
gtk_object_set_data (GTK_OBJECT (Budget_Dialog), "dialog_vbox9", dialog_vbox9);
gtk_widget_show (dialog_vbox9);
hbox40 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox40);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "hbox40", hbox40,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox40);
gtk_box_pack_start (GTK_BOX (dialog_vbox9), hbox40, FALSE, FALSE, 0);
frame21 = gtk_frame_new (_("Budget"));
gtk_widget_ref (frame21);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "frame21", frame21,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame21);
gtk_box_pack_start (GTK_BOX (hbox40), frame21, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (frame21), 3);
vbox58 = gtk_vbox_new (FALSE, 0);
gtk_widget_ref (vbox58);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "vbox58", vbox58,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox58);
gtk_container_add (GTK_CONTAINER (frame21), vbox58);
scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_ref (scrolledwindow5);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "scrolledwindow5", scrolledwindow5,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow5);
gtk_box_pack_start (GTK_BOX (vbox58), scrolledwindow5, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
viewport2 = gtk_viewport_new (NULL, NULL);
gtk_widget_ref (viewport2);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "viewport2", viewport2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (viewport2);
gtk_container_add (GTK_CONTAINER (scrolledwindow5), viewport2);
scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_ref (scrolledwindow6);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "scrolledwindow6", scrolledwindow6,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow6);
gtk_container_add (GTK_CONTAINER (viewport2), scrolledwindow6);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
entry_tree = gtk_ctree_new (1, 0);
gtk_widget_ref (entry_tree);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "entry_tree", entry_tree,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (entry_tree);
gtk_container_add (GTK_CONTAINER (scrolledwindow6), entry_tree);
gtk_clist_set_column_width (GTK_CLIST (entry_tree), 0, 80);
gtk_clist_column_titles_hide (GTK_CLIST (entry_tree));
label773 = gtk_label_new (_("label773"));
gtk_widget_ref (label773);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label773", label773,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label773);
gtk_clist_set_column_widget (GTK_CLIST (entry_tree), 0, label773);
hbox43 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox43);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "hbox43", hbox43,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox43);
gtk_box_pack_start (GTK_BOX (vbox58), hbox43, FALSE, FALSE, 1);
hbuttonbox2 = gtk_hbutton_box_new ();
gtk_widget_ref (hbuttonbox2);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "hbuttonbox2", hbuttonbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox2);
gtk_box_pack_start (GTK_BOX (hbox43), hbuttonbox2, TRUE, TRUE, 0);
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_SPREAD);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox2), 6);
gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox2), 75, 0);
insert_entry_button = gtk_button_new_with_label (_("Insert"));
gtk_widget_ref (insert_entry_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "insert_entry_button", insert_entry_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (insert_entry_button);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), insert_entry_button);
GTK_WIDGET_SET_FLAGS (insert_entry_button, GTK_CAN_DEFAULT);
delete_entry_button = gtk_button_new_with_label (_("Delete"));
gtk_widget_ref (delete_entry_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "delete_entry_button", delete_entry_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (delete_entry_button);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), delete_entry_button);
GTK_WIDGET_SET_FLAGS (delete_entry_button, GTK_CAN_DEFAULT);
hbox44 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox44);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "hbox44", hbox44,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox44);
gtk_box_pack_start (GTK_BOX (hbox43), hbox44, FALSE, FALSE, 0);
up_button = gtk_button_new_with_label ("");
gtk_widget_ref (up_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "up_button", up_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (up_button);
gtk_box_pack_start (GTK_BOX (hbox44), up_button, FALSE, FALSE, 0);
down_button = gtk_button_new_with_label ("");
gtk_widget_ref (down_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "down_button", down_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (down_button);
gtk_box_pack_start (GTK_BOX (hbox44), down_button, FALSE, FALSE, 0);
vbox52 = gtk_vbox_new (FALSE, 2);
gtk_widget_ref (vbox52);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "vbox52", vbox52,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox52);
gtk_box_pack_start (GTK_BOX (hbox40), vbox52, FALSE, FALSE, 0);
frame22 = gtk_frame_new (_("Entry"));
gtk_widget_ref (frame22);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "frame22", frame22,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame22);
gtk_box_pack_start (GTK_BOX (vbox52), frame22, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (frame22), 3);
hbox34 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox34);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "hbox34", hbox34,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox34);
gtk_container_add (GTK_CONTAINER (frame22), hbox34);
gtk_container_set_border_width (GTK_CONTAINER (hbox34), 3);
vbox54 = gtk_vbox_new (TRUE, 0);
gtk_widget_ref (vbox54);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "vbox54", vbox54,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox54);
gtk_box_pack_start (GTK_BOX (hbox34), vbox54, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox54), 3);
label774 = gtk_label_new (_("Description:"));
gtk_widget_ref (label774);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label774", label774,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label774);
gtk_box_pack_start (GTK_BOX (vbox54), label774, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label774), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label774), 1, 0.5);
label775 = gtk_label_new (_("Type:"));
gtk_widget_ref (label775);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label775", label775,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label775);
gtk_box_pack_start (GTK_BOX (vbox54), label775, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label775), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label775), 1, 0.5);
label776 = gtk_label_new ("");
gtk_widget_ref (label776);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label776", label776,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label776);
gtk_box_pack_start (GTK_BOX (vbox54), label776, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label776), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label776), 1, 0.5);
vbox55 = gtk_vbox_new (TRUE, 0);
gtk_widget_ref (vbox55);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "vbox55", vbox55,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox55);
gtk_box_pack_start (GTK_BOX (hbox34), vbox55, TRUE, TRUE, 0);
entry_description_entry = gtk_entry_new ();
gtk_widget_ref (entry_description_entry);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "entry_description_entry", entry_description_entry,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (entry_description_entry);
gtk_box_pack_start (GTK_BOX (vbox55), entry_description_entry, TRUE, TRUE, 0);
entry_type_menu = gtk_option_menu_new ();
gtk_widget_ref (entry_type_menu);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "entry_type_menu", entry_type_menu,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (entry_type_menu);
gtk_box_pack_start (GTK_BOX (vbox55), entry_type_menu, TRUE, TRUE, 0);
entry_type_menu_menu = gtk_menu_new ();
glade_menuitem = gtk_menu_item_new_with_label (_("Normal"));
gtk_widget_show (glade_menuitem);
gtk_menu_append (GTK_MENU (entry_type_menu_menu), glade_menuitem);
glade_menuitem = gtk_menu_item_new_with_label (_("No Total"));
gtk_widget_show (glade_menuitem);
gtk_menu_append (GTK_MENU (entry_type_menu_menu), glade_menuitem);
gtk_option_menu_set_menu (GTK_OPTION_MENU (entry_type_menu), entry_type_menu_menu);
match_button = gtk_button_new_with_label (_("Matching Transactions..."));
gtk_widget_ref (match_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "match_button", match_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (match_button);
gtk_box_pack_start (GTK_BOX (vbox55), match_button, TRUE, TRUE, 0);
frame23 = gtk_frame_new (_("Sub-entry"));
gtk_widget_ref (frame23);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "frame23", frame23,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame23);
gtk_box_pack_start (GTK_BOX (vbox52), frame23, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (frame23), 3);
hbox35 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox35);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "hbox35", hbox35,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox35);
gtk_container_add (GTK_CONTAINER (frame23), hbox35);
gtk_container_set_border_width (GTK_CONTAINER (hbox35), 3);
vbox56 = gtk_vbox_new (TRUE, 0);
gtk_widget_ref (vbox56);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "vbox56", vbox56,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox56);
gtk_box_pack_start (GTK_BOX (hbox35), vbox56, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox56), 3);
label777 = gtk_label_new (_("Description:"));
gtk_widget_ref (label777);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label777", label777,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label777);
gtk_box_pack_start (GTK_BOX (vbox56), label777, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label777), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label777), 1, 0.5);
label778 = gtk_label_new (_("Amount:"));
gtk_widget_ref (label778);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label778", label778,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label778);
gtk_box_pack_start (GTK_BOX (vbox56), label778, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label778), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label778), 1, 0.5);
label779 = gtk_label_new (_("Period:"));
gtk_widget_ref (label779);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label779", label779,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label779);
gtk_box_pack_start (GTK_BOX (vbox56), label779, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label779), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label779), 1, 0.5);
label780 = gtk_label_new (_("Mechanism:"));
gtk_widget_ref (label780);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label780", label780,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label780);
gtk_box_pack_start (GTK_BOX (vbox56), label780, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label780), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label780), 1, 0.5);
label781 = gtk_label_new (_("Bill Day:"));
gtk_widget_ref (label781);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label781", label781,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label781);
gtk_box_pack_start (GTK_BOX (vbox56), label781, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label781), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label781), 1, 0.5);
label782 = gtk_label_new (_("Grace Period:"));
gtk_widget_ref (label782);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label782", label782,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label782);
gtk_box_pack_start (GTK_BOX (vbox56), label782, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label782), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label782), 1, 0.5);
vbox57 = gtk_vbox_new (TRUE, 0);
gtk_widget_ref (vbox57);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "vbox57", vbox57,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox57);
gtk_box_pack_start (GTK_BOX (hbox35), vbox57, TRUE, TRUE, 0);
sub_description_entry = gtk_entry_new ();
gtk_widget_ref (sub_description_entry);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "sub_description_entry", sub_description_entry,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sub_description_entry);
gtk_box_pack_start (GTK_BOX (vbox57), sub_description_entry, FALSE, FALSE, 0);
sub_amount_entry = gtk_entry_new ();
gtk_widget_ref (sub_amount_entry);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "sub_amount_entry", sub_amount_entry,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sub_amount_entry);
gtk_box_pack_start (GTK_BOX (vbox57), sub_amount_entry, TRUE, TRUE, 0);
period_box = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (period_box);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "period_box", period_box,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (period_box);
gtk_box_pack_start (GTK_BOX (vbox57), period_box, TRUE, TRUE, 0);
hbox37 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox37);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "hbox37", hbox37,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox37);
gtk_box_pack_start (GTK_BOX (vbox57), hbox37, FALSE, FALSE, 0);
sub_mechanism_menu = gtk_option_menu_new ();
gtk_widget_ref (sub_mechanism_menu);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "sub_mechanism_menu", sub_mechanism_menu,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sub_mechanism_menu);
gtk_box_pack_start (GTK_BOX (hbox37), sub_mechanism_menu, FALSE, FALSE, 0);
sub_mechanism_menu_menu = gtk_menu_new ();
glade_menuitem = gtk_menu_item_new_with_label (_("Nominal"));
gtk_widget_show (glade_menuitem);
gtk_menu_append (GTK_MENU (sub_mechanism_menu_menu), glade_menuitem);
glade_menuitem = gtk_menu_item_new_with_label (_("Bill"));
gtk_widget_show (glade_menuitem);
gtk_menu_append (GTK_MENU (sub_mechanism_menu_menu), glade_menuitem);
glade_menuitem = gtk_menu_item_new_with_label (_("Recurring"));
gtk_widget_show (glade_menuitem);
gtk_menu_append (GTK_MENU (sub_mechanism_menu_menu), glade_menuitem);
glade_menuitem = gtk_menu_item_new_with_label (_("Contingency"));
gtk_widget_show (glade_menuitem);
gtk_menu_append (GTK_MENU (sub_mechanism_menu_menu), glade_menuitem);
gtk_option_menu_set_menu (GTK_OPTION_MENU (sub_mechanism_menu), sub_mechanism_menu_menu);
label784 = gtk_label_new ("");
gtk_widget_ref (label784);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "label784", label784,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label784);
gtk_box_pack_start (GTK_BOX (hbox37), label784, TRUE, TRUE, 0);
bill_day_box = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (bill_day_box);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "bill_day_box", bill_day_box,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (bill_day_box);
gtk_box_pack_start (GTK_BOX (vbox57), bill_day_box, FALSE, FALSE, 0);
grace_box = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (grace_box);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "grace_box", grace_box,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (grace_box);
gtk_box_pack_start (GTK_BOX (vbox57), grace_box, FALSE, FALSE, 0);
dialog_action_area9 = GNOME_DIALOG (Budget_Dialog)->action_area;
gtk_object_set_data (GTK_OBJECT (Budget_Dialog), "dialog_action_area9", dialog_action_area9);
gtk_widget_show (dialog_action_area9);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area9), GTK_BUTTONBOX_END);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area9), 8);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_OK);
ok_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
gtk_widget_ref (ok_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "ok_button", ok_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (ok_button);
GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_APPLY);
apply_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
gtk_widget_ref (apply_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "apply_button", apply_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (apply_button);
GTK_WIDGET_SET_FLAGS (apply_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_CANCEL);
cancel_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
gtk_widget_ref (cancel_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "cancel_button", cancel_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (cancel_button);
GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (Budget_Dialog), GNOME_STOCK_BUTTON_HELP);
help_button = g_list_last (GNOME_DIALOG (Budget_Dialog)->buttons)->data;
gtk_widget_ref (help_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "help_button", help_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (help_button);
GTK_WIDGET_SET_FLAGS (help_button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (Budget_Dialog), "destroy",
GTK_SIGNAL_FUNC (on_Budget_Dialog_destroy),
Budget_Dialog);
return Budget_Dialog;
}

View File

@@ -10,3 +10,4 @@ GtkWidget* create_Paper_Size_Selector_Dialog (void);
GtkWidget* create_Print_Check_Dialog (void); GtkWidget* create_Print_Check_Dialog (void);
GtkWidget* create_Find_Transactions (void); GtkWidget* create_Find_Transactions (void);
GtkWidget* create_Select_Date (void); GtkWidget* create_Select_Date (void);
GtkWidget* create_Budget_Dialog (void);

View File

@@ -19,6 +19,7 @@
<handler_header_file>glade-cb-gnc-dialogs.h</handler_header_file> <handler_header_file>glade-cb-gnc-dialogs.h</handler_header_file>
<support_source_file>glade-support-gnc-dialogs.c</support_source_file> <support_source_file>glade-support-gnc-dialogs.c</support_source_file>
<support_header_file>glade-support-gnc-dialogs.h</support_header_file> <support_header_file>glade-support-gnc-dialogs.h</support_header_file>
<translatable_strings_file>glade_strings.txt</translatable_strings_file>
</project> </project>
<widget> <widget>
@@ -4004,6 +4005,12 @@ Exactly
<widget> <widget>
<class>GnomeDialog</class> <class>GnomeDialog</class>
<name>Budget Dialog</name> <name>Budget Dialog</name>
<signal>
<name>destroy</name>
<handler>on_Budget Dialog_destroy</handler>
<data>Budget_Dialog</data>
<last_modification_time>Tue, 25 Apr 2000 06:44:25 GMT</last_modification_time>
</signal>
<title>Budget</title> <title>Budget</title>
<type>GTK_WINDOW_TOPLEVEL</type> <type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position> <position>GTK_WIN_POS_NONE</position>
@@ -4053,7 +4060,7 @@ Exactly
<widget> <widget>
<class>GtkButton</class> <class>GtkButton</class>
<name>report_button</name> <name>apply_button</name>
<can_default>True</can_default> <can_default>True</can_default>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button> <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
@@ -4092,7 +4099,7 @@ Exactly
<child_name>GnomeDock:contents</child_name> <child_name>GnomeDock:contents</child_name>
<name>frame21</name> <name>frame21</name>
<border_width>3</border_width> <border_width>3</border_width>
<label>Budget Entries</label> <label>Budget</label>
<label_xalign>0</label_xalign> <label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child> <child>
@@ -4160,6 +4167,17 @@ Exactly
</widget> </widget>
</widget> </widget>
<widget>
<class>GtkHBox</class>
<name>hbox43</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>1</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget> <widget>
<class>GtkHButtonBox</class> <class>GtkHButtonBox</class>
<name>hbuttonbox2</name> <name>hbuttonbox2</name>
@@ -4170,9 +4188,9 @@ Exactly
<child_ipad_x>7</child_ipad_x> <child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y> <child_ipad_y>0</child_ipad_y>
<child> <child>
<padding>1</padding> <padding>0</padding>
<expand>False</expand> <expand>True</expand>
<fill>False</fill> <fill>True</fill>
</child> </child>
<widget> <widget>
@@ -4191,6 +4209,43 @@ Exactly
<label>Delete</label> <label>Delete</label>
</widget> </widget>
</widget> </widget>
<widget>
<class>GtkHBox</class>
<name>hbox44</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkButton</class>
<name>up_button</name>
<can_focus>True</can_focus>
<label></label>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>down_button</name>
<can_focus>True</can_focus>
<label></label>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget> </widget>
</widget> </widget>
@@ -4303,7 +4358,7 @@ Exactly
<widget> <widget>
<class>GtkEntry</class> <class>GtkEntry</class>
<name>entry5</name> <name>entry_description_entry</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<editable>True</editable> <editable>True</editable>
<text_visible>True</text_visible> <text_visible>True</text_visible>
@@ -4318,7 +4373,7 @@ Exactly
<widget> <widget>
<class>GtkOptionMenu</class> <class>GtkOptionMenu</class>
<name>optionmenu1</name> <name>entry_type_menu</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<items>Normal <items>Normal
No Total No Total
@@ -4333,7 +4388,7 @@ No Total
<widget> <widget>
<class>GtkButton</class> <class>GtkButton</class>
<name>button45</name> <name>match_button</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<label>Matching Transactions...</label> <label>Matching Transactions...</label>
<child> <child>
@@ -4494,7 +4549,7 @@ No Total
<widget> <widget>
<class>GtkEntry</class> <class>GtkEntry</class>
<name>entry6</name> <name>sub_description_entry</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<editable>True</editable> <editable>True</editable>
<text_visible>True</text_visible> <text_visible>True</text_visible>
@@ -4502,14 +4557,14 @@ No Total
<text></text> <text></text>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>True</expand> <expand>False</expand>
<fill>True</fill> <fill>False</fill>
</child> </child>
</widget> </widget>
<widget> <widget>
<class>GtkEntry</class> <class>GtkEntry</class>
<name>entry7</name> <name>sub_amount_entry</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<editable>True</editable> <editable>True</editable>
<text_visible>True</text_visible> <text_visible>True</text_visible>
@@ -4524,53 +4579,17 @@ No Total
<widget> <widget>
<class>GtkHBox</class> <class>GtkHBox</class>
<name>hbox36</name> <name>period_box</name>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<spacing>0</spacing> <spacing>0</spacing>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>False</expand> <expand>True</expand>
<fill>False</fill> <fill>True</fill>
</child> </child>
<widget> <widget>
<class>GtkSpinButton</class> <class>Placeholder</class>
<name>spinbutton1</name>
<can_focus>True</can_focus>
<climb_rate>1</climb_rate>
<digits>0</digits>
<numeric>True</numeric>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>1</value>
<lower>1</lower>
<upper>1000</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkOptionMenu</class>
<name>optionmenu4</name>
<can_focus>True</can_focus>
<items>Days
Weeks
Months
Years
</items>
<initial_choice>0</initial_choice>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget> </widget>
</widget> </widget>
@@ -4587,7 +4606,7 @@ Years
<widget> <widget>
<class>GtkOptionMenu</class> <class>GtkOptionMenu</class>
<name>optionmenu3</name> <name>sub_mechanism_menu</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<items>Nominal <items>Nominal
Bill Bill
@@ -4622,7 +4641,7 @@ Contingency
<widget> <widget>
<class>GtkHBox</class> <class>GtkHBox</class>
<name>hbox38</name> <name>bill_day_box</name>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<spacing>0</spacing> <spacing>0</spacing>
<child> <child>
@@ -4632,49 +4651,13 @@ Contingency
</child> </child>
<widget> <widget>
<class>GtkSpinButton</class> <class>Placeholder</class>
<name>spinbutton2</name>
<can_focus>True</can_focus>
<climb_rate>1</climb_rate>
<digits>0</digits>
<numeric>True</numeric>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>1</value>
<lower>-365</lower>
<upper>365</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label783</name>
<label></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>True</expand>
<fill>True</fill>
</child>
</widget> </widget>
</widget> </widget>
<widget> <widget>
<class>GtkHBox</class> <class>GtkHBox</class>
<name>hbox39</name> <name>grace_box</name>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<spacing>0</spacing> <spacing>0</spacing>
<child> <child>
@@ -4684,72 +4667,7 @@ Contingency
</child> </child>
<widget> <widget>
<class>GtkHBox</class> <class>Placeholder</class>
<name>hbox41</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkSpinButton</class>
<name>spinbutton3</name>
<can_focus>True</can_focus>
<climb_rate>1</climb_rate>
<digits>0</digits>
<numeric>True</numeric>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>1</value>
<lower>-365</lower>
<upper>365</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkOptionMenu</class>
<name>optionmenu2</name>
<can_focus>True</can_focus>
<items>Days
Weeks
Months
Years
</items>
<initial_choice>0</initial_choice>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>label785</name>
<label></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>True</expand>
<fill>True</fill>
</child>
</widget> </widget>
</widget> </widget>
</widget> </widget>

View File

@@ -1230,3 +1230,17 @@
'options-generator budget-report-options-generator 'options-generator budget-report-options-generator
'renderer gnc:budget-renderer) 'renderer gnc:budget-renderer)
(if (gnc:debugging?)
(let ()
(define budget-item
(gnc:make-menu-item
"Budget Dialog (Testing)"
"Test the budget dialog."
(list "Extensions" "")
(lambda ()
(gnc:budget-dialog-create
gnc:budget-entries
(lambda () (display "Applied the budget.\n"))))))
(gnc:hook-add-dangler gnc:*main-window-opened-hook*
(lambda (win) (gnc:add-extension budget-item)))))