mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #656752 - Migrate Budgets from GladeXML to Builder
Patch by Robert Fewell git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21195 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f212fcbc7e
commit
23a8ad4194
@ -207,7 +207,6 @@ src/gnome/dialog-sx-editor.c
|
||||
src/gnome/dialog-sx-from-trans.c
|
||||
src/gnome/dialog-sx-since-last-run.c
|
||||
src/gnome/dialog-tax-info.c
|
||||
src/gnome/glade/budget.glade
|
||||
src/gnome/glade/newuser.glade
|
||||
src/gnome/glade/progress.glade
|
||||
src/gnome/glade/reconcile.glade
|
||||
@ -229,12 +228,12 @@ src/gnome/gtkbuilder/assistant-acct-period.glade
|
||||
src/gnome/gtkbuilder/assistant-hierarchy.glade
|
||||
src/gnome/gtkbuilder/assistant-loan.glade
|
||||
src/gnome/gtkbuilder/assistant-stock-split.glade
|
||||
src/gnome/gtkbuilder/budget.glade
|
||||
src/gnome/gtkbuilder/dialog-commodities.glade
|
||||
src/gnome/gtkbuilder/dialog-fincalc.glade
|
||||
src/gnome/gtkbuilder/dialog-lot-viewer.glade
|
||||
src/gnome/gtkbuilder/dialog-price.glade
|
||||
src/gnome/gtkbuilder/dialog-print-check.glade
|
||||
src/gnome/gtkbuilder/gnc-plugin-page-budget.glade
|
||||
src/gnome/gtkbuilder/newuser.glade
|
||||
src/gnome/gtkbuilder/owner.glade
|
||||
src/gnome/gtkbuilder/progress.glade
|
||||
@ -359,6 +358,7 @@ src/gnome-utils/gnc-window.c
|
||||
src/gnome-utils/gtkbuilder/dialog-commodity.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-transfer.glade
|
||||
src/gnome-utils/gtkbuilder/gnc-date-format.glade
|
||||
src/gnome-utils/gtkbuilder/gnc-recurrence.glade
|
||||
src/gnome-utils/misc-gnome-utils.c
|
||||
src/gnome-utils/print-session.c
|
||||
src/gnome-utils/schemas/apps_gnucash_history.schemas.in
|
||||
|
@ -1,34 +1,34 @@
|
||||
/* gnc-recurrence.c:
|
||||
*
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2005, Chris Shoemaker <c.shoemaker@cox.net>
|
||||
*
|
||||
* 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, contact:
|
||||
*
|
||||
* Free Software Foundation Voice: +1-617-542-5942
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
*/
|
||||
/********************************************************************
|
||||
* gnc-recurrence.c -- GncRecurrence is a minimal GUI for *
|
||||
* specifying a Recurrence. *
|
||||
* *
|
||||
* You see, small is _nice_. :) *
|
||||
* Copyright (C) 2005, Chris Shoemaker <c.shoemaker@cox.net> *
|
||||
* Copyright (C) 2011, Robert Fewell *
|
||||
* *
|
||||
* 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, contact: *
|
||||
* *
|
||||
* Free Software Foundation Voice: +1-617-542-5942 *
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
||||
*******************************************************************/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <gnome.h>
|
||||
#include <glade/glade.h>
|
||||
|
||||
#include "dialog-utils.h"
|
||||
#include "gnc-recurrence.h"
|
||||
#include "gnc-date-edit.h"
|
||||
#include "Recurrence.h"
|
||||
#include "gnc-engine.h"
|
||||
#include "gnc-gdate-utils.h"
|
||||
@ -39,12 +39,11 @@ struct _GncRecurrence
|
||||
{
|
||||
GtkVBox widget;
|
||||
|
||||
GnomeDateEdit *gde_start;
|
||||
GtkWidget *gde_start;
|
||||
GtkComboBox *gcb_period;
|
||||
GtkCheckButton *gcb_eom;
|
||||
GtkSpinButton *gsb_mult;
|
||||
GtkCheckButton *nth_weekday;
|
||||
GladeXML *xml;
|
||||
|
||||
Recurrence recurrence;
|
||||
};
|
||||
@ -71,11 +70,13 @@ typedef enum
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
static UIPeriodType get_pt_ui(GncRecurrence *gr)
|
||||
{
|
||||
return (gtk_combo_box_get_active(gr->gcb_period));
|
||||
}
|
||||
|
||||
|
||||
static void set_pt_ui(GncRecurrence *gr, PeriodType pt)
|
||||
{
|
||||
UIPeriodType idx;
|
||||
@ -110,6 +111,7 @@ static void set_pt_ui(GncRecurrence *gr, PeriodType pt)
|
||||
(pt == PERIOD_END_OF_MONTH || pt == PERIOD_LAST_WEEKDAY));
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
is_ambiguous_relative(const GDate *date)
|
||||
{
|
||||
@ -122,6 +124,7 @@ is_ambiguous_relative(const GDate *date)
|
||||
return ((d - 1) / 7 == 3) && (dim - d < 7);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
is_ambiguous_absolute(const GDate *date)
|
||||
{
|
||||
@ -129,6 +132,7 @@ is_ambiguous_absolute(const GDate *date)
|
||||
(g_date_get_day(date) < 31));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
something_changed( GtkWidget *wid, gpointer d )
|
||||
{
|
||||
@ -140,7 +144,7 @@ something_changed( GtkWidget *wid, gpointer d )
|
||||
|
||||
|
||||
pt = get_pt_ui(gr);
|
||||
t = gnome_date_edit_get_time(gr->gde_start);
|
||||
t = gnc_date_edit_get_date(GNC_DATE_EDIT(gr->gde_start));
|
||||
g_date_set_time_t(&start, t);
|
||||
|
||||
if (pt == GNCR_MONTH)
|
||||
@ -174,35 +178,44 @@ something_changed( GtkWidget *wid, gpointer d )
|
||||
g_signal_emit_by_name(d, "changed");
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_recurrence_init( GncRecurrence *gr )
|
||||
{
|
||||
GtkVBox *vb;
|
||||
GtkHBox *hb;
|
||||
GtkWidget *w;
|
||||
GtkBuilder *builder;
|
||||
|
||||
recurrenceSet(&gr->recurrence, 1, PERIOD_MONTH, NULL, WEEKEND_ADJ_NONE);
|
||||
|
||||
gr->xml = gnc_glade_xml_new("budget.glade", "RecurrenceEntryVBox");
|
||||
vb = GTK_VBOX(glade_xml_get_widget(gr->xml, "RecurrenceEntryVBox"));
|
||||
gr->gde_start = GNOME_DATE_EDIT(glade_xml_get_widget(gr->xml,
|
||||
"GDE_StartDate"));
|
||||
/* Open up the builder file */
|
||||
builder = gtk_builder_new();
|
||||
gnc_builder_add_from_file (builder,"gnc-recurrence.glade", "GCB_PeriodType_liststore");
|
||||
gnc_builder_add_from_file (builder,"gnc-recurrence.glade", "GSB_Mult_Adj");
|
||||
gnc_builder_add_from_file (builder,"gnc-recurrence.glade", "RecurrenceEntryVBox");
|
||||
|
||||
vb = GTK_VBOX(gtk_builder_get_object (builder, "RecurrenceEntryVBox"));
|
||||
hb = GTK_HBOX(gtk_builder_get_object (builder, "Startdate_hbox"));
|
||||
w = gnc_date_edit_new (time (NULL), FALSE, FALSE);
|
||||
gr->gde_start = w;
|
||||
gtk_box_pack_start (GTK_BOX (hb), w, TRUE, TRUE, 0);
|
||||
gtk_widget_show (w);
|
||||
|
||||
gtk_widget_set_no_show_all(GTK_WIDGET(gr->gde_start), TRUE);
|
||||
gr->gcb_period = GTK_COMBO_BOX(glade_xml_get_widget(gr->xml,
|
||||
"GCB_PeriodType"));
|
||||
gr->gsb_mult = GTK_SPIN_BUTTON(glade_xml_get_widget(gr->xml, "GSB_Mult"));
|
||||
gr->gcb_eom = GTK_CHECK_BUTTON(glade_xml_get_widget(gr->xml,
|
||||
"GCB_EndOfMonth"));
|
||||
gr->nth_weekday = GTK_CHECK_BUTTON(glade_xml_get_widget(gr->xml,
|
||||
"GCB_NthWeekday"));
|
||||
gr->gcb_period = GTK_COMBO_BOX(gtk_builder_get_object (builder, "GCB_PeriodType"));
|
||||
gr->gsb_mult = GTK_SPIN_BUTTON(gtk_builder_get_object (builder, "GSB_Mult"));
|
||||
gr->gcb_eom = GTK_CHECK_BUTTON(gtk_builder_get_object (builder, "GCB_EndOfMonth"));
|
||||
gr->nth_weekday = GTK_CHECK_BUTTON(gtk_builder_get_object (builder, "GCB_NthWeekday"));
|
||||
gtk_widget_set_no_show_all(GTK_WIDGET(gr->gcb_eom), TRUE);
|
||||
gtk_widget_set_no_show_all(GTK_WIDGET(gr->nth_weekday), TRUE);
|
||||
|
||||
|
||||
gtk_container_add( GTK_CONTAINER(&gr->widget), GTK_WIDGET(vb) );
|
||||
|
||||
gnc_recurrence_set(gr, &gr->recurrence);
|
||||
something_changed( GTK_WIDGET(gr), gr);
|
||||
|
||||
/* respond to changes */
|
||||
/* Setup the signals */
|
||||
g_signal_connect( G_OBJECT(gr->gde_start), "date_changed",
|
||||
G_CALLBACK(something_changed), gr );
|
||||
g_signal_connect( G_OBJECT(gr->gcb_period), "changed",
|
||||
@ -215,8 +228,12 @@ gnc_recurrence_init( GncRecurrence *gr )
|
||||
G_CALLBACK(something_changed), gr );
|
||||
|
||||
gtk_widget_show_all( GTK_WIDGET(&gr->widget) );
|
||||
|
||||
gtk_builder_connect_signals(builder, gr);
|
||||
g_object_unref(G_OBJECT(builder));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_recurrence_set(GncRecurrence *gr, const Recurrence *r)
|
||||
{
|
||||
@ -235,12 +252,13 @@ gnc_recurrence_set(GncRecurrence *gr, const Recurrence *r)
|
||||
{
|
||||
time_t t;
|
||||
t = gnc_timet_get_day_start_gdate (&start);
|
||||
gnome_date_edit_set_time(gr->gde_start, t);
|
||||
gnc_date_edit_set_time(GNC_DATE_EDIT(gr->gde_start), t);
|
||||
}
|
||||
|
||||
set_pt_ui(gr, pt);
|
||||
}
|
||||
|
||||
|
||||
const Recurrence *
|
||||
gnc_recurrence_get(GncRecurrence *gr)
|
||||
{
|
||||
@ -252,7 +270,7 @@ gnc_recurrence_get(GncRecurrence *gr)
|
||||
gboolean use_eom = FALSE, rel;
|
||||
|
||||
mult = (guint) gtk_spin_button_get_value_as_int(gr->gsb_mult);
|
||||
t = gnome_date_edit_get_time(gr->gde_start);
|
||||
t = gnc_date_edit_get_date(GNC_DATE_EDIT(gr->gde_start));
|
||||
g_date_set_time_t(&start, t);
|
||||
period = get_pt_ui(gr);
|
||||
|
||||
@ -311,11 +329,11 @@ gnc_recurrence_get(GncRecurrence *gr)
|
||||
pt = PERIOD_INVALID;
|
||||
}
|
||||
|
||||
|
||||
recurrenceSet(&gr->recurrence, mult, pt, &start, WEEKEND_ADJ_NONE);
|
||||
return &gr->recurrence;
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_recurrence_finalize(GObject *o)
|
||||
{
|
||||
@ -325,6 +343,7 @@ gnc_recurrence_finalize(GObject *o)
|
||||
G_OBJECT_CLASS (parent_class)->finalize (o);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_recurrence_class_init( GncRecurrenceClass *klass )
|
||||
{
|
||||
@ -347,6 +366,7 @@ gnc_recurrence_class_init( GncRecurrenceClass *klass )
|
||||
object_class->finalize = gnc_recurrence_finalize;
|
||||
}
|
||||
|
||||
|
||||
GType
|
||||
gnc_recurrence_get_type()
|
||||
{
|
||||
@ -370,6 +390,7 @@ gnc_recurrence_get_type()
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
gnc_recurrence_new()
|
||||
{
|
||||
@ -381,10 +402,10 @@ gnc_recurrence_new()
|
||||
return GTK_WIDGET(gr);
|
||||
}
|
||||
|
||||
|
||||
/* TODO: Maybe this stuff should go into another file.
|
||||
*
|
||||
*/
|
||||
|
||||
struct _GncRecurrenceComp
|
||||
{
|
||||
GtkScrolledWindow widget;
|
||||
@ -399,22 +420,27 @@ struct _GncRecurrenceComp
|
||||
GList *rlist;
|
||||
};
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkScrolledWindowClass parent_class;
|
||||
void (*changed) (GncRecurrenceComp *gr);
|
||||
} GncRecurrenceCompClass;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GNCRECURRENCECOMP_CHANGED,
|
||||
GNCRC_LAST_SIGNAL
|
||||
} GNCRC_Signals;
|
||||
|
||||
|
||||
static void grc_changed(GtkWidget *w, gpointer data)
|
||||
{
|
||||
g_signal_emit_by_name(data, "changed");
|
||||
}
|
||||
|
||||
|
||||
static void addRecurrence(GncRecurrenceComp *grc, GncRecurrence *gr)
|
||||
{
|
||||
|
||||
@ -429,6 +455,8 @@ static void addRecurrence(GncRecurrenceComp *grc, GncRecurrence *gr)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void removeRecurrence(GncRecurrenceComp *grc)
|
||||
{
|
||||
GList *children, *last;
|
||||
@ -446,6 +474,7 @@ static void removeRecurrence(GncRecurrenceComp *grc)
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void addClicked(GtkButton *b, gpointer data)
|
||||
{
|
||||
GncRecurrenceComp *grc = data;
|
||||
@ -455,6 +484,7 @@ static void addClicked(GtkButton *b, gpointer data)
|
||||
addRecurrence(grc, gr);
|
||||
}
|
||||
|
||||
|
||||
static void removeClicked(GtkButton *b, gpointer data)
|
||||
{
|
||||
GncRecurrenceComp *grc = data;
|
||||
@ -463,6 +493,7 @@ static void removeClicked(GtkButton *b, gpointer data)
|
||||
removeRecurrence(grc);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_recurrence_comp_set_list(GncRecurrenceComp *grc, const GList *rlist)
|
||||
{
|
||||
@ -482,6 +513,7 @@ gnc_recurrence_comp_set_list(GncRecurrenceComp *grc, const GList *rlist)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GList *
|
||||
gnc_recurrence_comp_get_list(GncRecurrenceComp *grc)
|
||||
{
|
||||
@ -540,6 +572,7 @@ gnc_recurrence_comp_init(GncRecurrenceComp *grc)
|
||||
addClicked(NULL, grc);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_recurrence_comp_class_init( GncRecurrenceCompClass *klass )
|
||||
{
|
||||
@ -562,6 +595,7 @@ gnc_recurrence_comp_class_init( GncRecurrenceCompClass *klass )
|
||||
//object_class->finalize = gnc_recurrence_finalize;
|
||||
}
|
||||
|
||||
|
||||
GType
|
||||
gnc_recurrence_comp_get_type()
|
||||
{
|
||||
@ -585,6 +619,7 @@ gnc_recurrence_comp_get_type()
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
gnc_recurrence_comp_new()
|
||||
{
|
||||
|
@ -2,6 +2,7 @@ gtkbuilderdir = $(GNC_GTKBUILDER_DIR)
|
||||
gtkbuilder_DATA = \
|
||||
dialog-commodity.glade \
|
||||
dialog-transfer.glade \
|
||||
gnc-date-format.glade
|
||||
gnc-date-format.glade \
|
||||
gnc-recurrence.glade
|
||||
|
||||
EXTRA_DIST = $(gtkbuilder_DATA)
|
||||
|
185
src/gnome-utils/gtkbuilder/gnc-recurrence.glade
Normal file
185
src/gnome-utils/gtkbuilder/gnc-recurrence.glade
Normal file
@ -0,0 +1,185 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="2.16"/>
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<object class="GtkListStore" id="GCB_PeriodType_liststore">
|
||||
<columns>
|
||||
<!-- column-name item -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">day(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">week(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">month(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">year(s)</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="GSB_Mult_Adj">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">250</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkWindow" id="GncRecurrenceEntry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="RecurrenceEntryVBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox218">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label90">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Every </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="GSB_Mult">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Number of calendar units in the recurrence: E.g. Biweekly = every 2 weeks; Quarterly = every 3 months</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">GSB_Mult_Adj</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="GCB_PeriodType">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="model">GCB_PeriodType_liststore</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox219">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label89">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">beginning on: </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="Startdate_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox220">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="GCB_EndOfMonth">
|
||||
<property name="label" translatable="yes">last of month</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Always use the last day (or day of week) in the month?</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="GCB_NthWeekday">
|
||||
<property name="label" translatable="yes">same week & day</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Match the "day of week" and "week of month"? (for example, the "second Tuesday" of every month)</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1,6 +1,5 @@
|
||||
gladedir = $(GNC_GLADE_DIR)
|
||||
glade_DATA = \
|
||||
budget.glade \
|
||||
newuser.glade \
|
||||
progress.glade \
|
||||
reconcile.glade \
|
||||
|
@ -1,628 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<!-- interface-requires gtk+ 2.10 -->
|
||||
<requires lib="gnome"/>
|
||||
<!-- interface-requires gnome 2102.37096 -->
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<widget class="GtkDialog" id="Budget List">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Budget List</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="Budget List View">
|
||||
<property name="width_request">250</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">10</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVButtonBox" id="vbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="layout_style">spread</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="new_button">
|
||||
<property name="label">gtk-new</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Create a New Budget</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="edit_button">
|
||||
<property name="label">gtk-open</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Open the Selected Budget</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button3">
|
||||
<property name="label">gtk-delete</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Delete the Selected Budget</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="close_button">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="response_id">-7</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Close the Budget List</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="GtkDialog" id="OptionsContainer">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Options</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="BudgetOptions">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<widget class="GtkTable" id="table5">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">5</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="column_spacing">3</property>
|
||||
<property name="row_spacing">3</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label85">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="label" translatable="yes">Budget Name:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="BudgetName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label86">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Notes:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow16">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<widget class="GtkTextView" id="BudgetDescription">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox23">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="Custom" id="BudgetRecurrenceEntry">
|
||||
<property name="visible">True</property>
|
||||
<property name="creation_function">gnc_recurrence_new</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label87">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Number of Periods:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="BudgetNumPeriods">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">1 1 60 1 12 0</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label94">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Budget Period:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHSeparator" id="hseparator1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHSeparator" id="hseparator2">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label83">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Budget Options</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
<property name="type">tab</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area5">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="GtkWindow" id="GncRecurrenceEntry">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="RecurrenceEntryVBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox218">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label90">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Every </property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="GSB_Mult">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip" translatable="yes">Number of calendar units in the recurrence: E.g. Biweekly = every 2 weeks; Quarterly = every 3 months</property>
|
||||
<property name="adjustment">1 1 250 1 10 0</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="GCB_PeriodType">
|
||||
<property name="visible">True</property>
|
||||
<property name="items" translatable="yes">day(s)
|
||||
week(s)
|
||||
month(s)
|
||||
year(s)</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox219">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label89">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">beginning on: </property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GnomeDateEdit" id="GDE_StartDate">
|
||||
<property name="visible">True</property>
|
||||
<property name="dateedit_flags">GNOME_DATE_EDIT_24_HR</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox220">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="GCB_EndOfMonth">
|
||||
<property name="label" translatable="yes">last of month</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Always use the last day (or day of week) in the month?</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="GCB_NthWeekday">
|
||||
<property name="label" translatable="yes">same week & day</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip" translatable="yes">Match the "day of week" and "week of month"? (for example, the "second Tuesday" of every month)</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="GtkDialog" id="BudgetEstimate">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Estimate Budget Values</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label95">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">GnuCash will estimate budget values for the selected accounts from past transactions.</property>
|
||||
<property name="wrap">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkTable" id="table6">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">3</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label96">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Start Date:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label97">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Significant Digits:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="DigitsToRound">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip" translatable="yes">The number of leading digits to keep when rounding</property>
|
||||
<property name="adjustment">1 1 12 1 1 0</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Custom" id="StartDate">
|
||||
<property name="visible">True</property>
|
||||
<property name="creation_function">gnc_date_edit_new_glade</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area6">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="cancelbutton1">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="response_id">-6</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="okbutton1">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="response_id">-5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
@ -42,7 +42,6 @@ G_BEGIN_DECLS
|
||||
#define GNC_PLUGIN_BUDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_BUDGET, GncPluginBudgetClass))
|
||||
|
||||
#define GNC_PLUGIN_BUDGET_NAME "gnc-plugin-budget"
|
||||
#define GNC_BUDGET_GUI_FILE "budget.glade"
|
||||
|
||||
/* typedefs & structures */
|
||||
typedef struct
|
||||
|
@ -1,27 +1,27 @@
|
||||
/*
|
||||
* gnc-plugin-page-budget.c --
|
||||
*
|
||||
* Copyright (C) 2005-2006 Chris Shoemaker <c.shoemaker@cox.net>
|
||||
* (based on gnc-plugin-page-account-tree.c)
|
||||
*
|
||||
* 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, contact:
|
||||
*
|
||||
* Free Software Foundation Voice: +1-617-542-5942
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
*/
|
||||
|
||||
/********************************************************************
|
||||
* gnc-plugin-page-budget.c -- Budget plugin based on *
|
||||
* gnc-plugin-page-account-tree.c *
|
||||
* *
|
||||
* Copyright (C) 2005, Chris Shoemaker <c.shoemaker@cox.net> *
|
||||
* Copyright (C) 2011, Robert Fewell *
|
||||
* *
|
||||
* 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, contact: *
|
||||
* *
|
||||
* Free Software Foundation Voice: +1-617-542-5942 *
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
||||
*******************************************************************/
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
@ -118,8 +118,6 @@ static void gnc_plugin_page_budget_cmd_view_options(
|
||||
static void gnc_plugin_page_budget_cmd_estimate_budget(
|
||||
GtkAction *action, GncPluginPageBudget *page);
|
||||
|
||||
|
||||
|
||||
static GtkActionEntry gnc_plugin_page_budget_actions [] =
|
||||
{
|
||||
/* Toplevel */
|
||||
@ -197,7 +195,7 @@ typedef struct GncPluginPageBudgetPrivate
|
||||
|
||||
GncBudget* budget;
|
||||
GncGUID key;
|
||||
GncDialog* d;
|
||||
GtkWidget *dialog;
|
||||
/* To distinguish between closing a tab and deleting a budget */
|
||||
gboolean delete_budget;
|
||||
|
||||
@ -214,6 +212,7 @@ typedef struct GncPluginPageBudgetPrivate
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gnc_plugin_page_budget_get_type (void)
|
||||
{
|
||||
@ -242,6 +241,7 @@ gnc_plugin_page_budget_get_type (void)
|
||||
return gnc_plugin_page_budget_type;
|
||||
}
|
||||
|
||||
|
||||
GncPluginPage *
|
||||
gnc_plugin_page_budget_new (GncBudget *budget)
|
||||
{
|
||||
@ -279,6 +279,7 @@ gnc_plugin_page_budget_new (GncBudget *budget)
|
||||
return GNC_PLUGIN_PAGE(plugin_page);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_class_init (GncPluginPageBudgetClass *klass)
|
||||
{
|
||||
@ -299,6 +300,7 @@ gnc_plugin_page_budget_class_init (GncPluginPageBudgetClass *klass)
|
||||
g_type_class_add_private(klass, sizeof(GncPluginPageBudgetPrivate));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_init (GncPluginPageBudget *plugin_page)
|
||||
{
|
||||
@ -342,6 +344,7 @@ gnc_plugin_page_budget_init (GncPluginPageBudget *plugin_page)
|
||||
plugin_page, priv, action_group);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_finalize (GObject *object)
|
||||
{
|
||||
@ -368,6 +371,7 @@ gnc_plugin_page_budget_close_cb (gpointer user_data)
|
||||
gnc_main_window_close_page (page);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_refresh_cb(GHashTable *changes, gpointer user_data)
|
||||
{
|
||||
@ -397,9 +401,9 @@ gnc_plugin_page_budget_refresh_cb(GHashTable *changes, gpointer user_data)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* GncPluginPage Functions
|
||||
*/
|
||||
/****************************
|
||||
* GncPluginPage Functions *
|
||||
***************************/
|
||||
static GtkWidget *
|
||||
gnc_plugin_page_budget_create_widget (GncPluginPage *plugin_page)
|
||||
{
|
||||
@ -483,6 +487,7 @@ gnc_plugin_page_budget_create_widget (GncPluginPage *plugin_page)
|
||||
return priv->widget;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_destroy_widget (GncPluginPage *plugin_page)
|
||||
{
|
||||
@ -521,17 +526,20 @@ gnc_plugin_page_budget_destroy_widget (GncPluginPage *plugin_page)
|
||||
LEAVE("widget destroyed");
|
||||
}
|
||||
|
||||
|
||||
#define BUDGET_GUID "Budget GncGUID"
|
||||
|
||||
/** Save enough information about this plugin page that it can
|
||||
* be recreated next time the user starts gnucash.
|
||||
*
|
||||
* @param page The page to save.
|
||||
*
|
||||
* @param key_file A pointer to the GKeyFile data structure where the
|
||||
* page information should be written.
|
||||
*
|
||||
* @param group_name The group name to use when saving data. */
|
||||
/***********************************************************************
|
||||
* Save enough information about this plugin page that it can *
|
||||
* be recreated next time the user starts gnucash. *
|
||||
* *
|
||||
* @param page The page to save. *
|
||||
* *
|
||||
* @param key_file A pointer to the GKeyFile data structure where the *
|
||||
* page information should be written. *
|
||||
* *
|
||||
* @param group_name The group name to use when saving data. *
|
||||
**********************************************************************/
|
||||
static void
|
||||
gnc_plugin_page_budget_save_page (GncPluginPage *plugin_page,
|
||||
GKeyFile *key_file, const gchar *group_name)
|
||||
@ -560,8 +568,8 @@ gnc_plugin_page_budget_save_page (GncPluginPage *plugin_page,
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Create a new plugin page based on the information saved
|
||||
/***********************************************************************
|
||||
* Create a new plugin page based on the information saved
|
||||
* during a previous instantiation of gnucash.
|
||||
*
|
||||
* @param window The window where this page should be installed.
|
||||
@ -569,7 +577,8 @@ gnc_plugin_page_budget_save_page (GncPluginPage *plugin_page,
|
||||
* @param key_file A pointer to the GKeyFile data structure where the
|
||||
* page information should be read.
|
||||
*
|
||||
* @param group_name The group name to use when restoring data. */
|
||||
* @param group_name The group name to use when restoring data.
|
||||
**********************************************************************/
|
||||
static GncPluginPage *
|
||||
gnc_plugin_page_budget_recreate_page (GtkWidget *window, GKeyFile *key_file,
|
||||
const gchar *group_name)
|
||||
@ -620,13 +629,16 @@ gnc_plugin_page_budget_recreate_page (GtkWidget *window, GKeyFile *key_file,
|
||||
return page;
|
||||
}
|
||||
|
||||
/** This button press handler calls the common button press handler
|
||||
|
||||
/***********************************************************************
|
||||
* This button press handler calls the common button press handler
|
||||
* for all pages. The GtkTreeView eats all button presses and
|
||||
* doesn't pass them up the widget tree, even when it doesn't do
|
||||
* anything with them. The only way to get access to the button
|
||||
* presses in an account tree page is here on the tree view widget.
|
||||
* Button presses on all other pages are caught by the signal
|
||||
* registered in gnc-main-window.c. */
|
||||
* registered in gnc-main-window.c.
|
||||
**********************************************************************/
|
||||
static gboolean
|
||||
gppb_button_press_cb(GtkWidget *widget, GdkEventButton *event,
|
||||
GncPluginPage *page)
|
||||
@ -641,6 +653,7 @@ gppb_button_press_cb(GtkWidget *widget, GdkEventButton *event,
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
gppb_key_press_cb(GtkWidget *treeview, GdkEventKey *event, gpointer userdata)
|
||||
{
|
||||
@ -671,6 +684,7 @@ gppb_key_press_cb(GtkWidget *treeview, GdkEventKey *event, gpointer userdata)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gppb_double_click_cb(GtkTreeView *treeview, GtkTreePath *path,
|
||||
GtkTreeViewColumn *col, GncPluginPageBudget *page)
|
||||
@ -690,6 +704,7 @@ gppb_double_click_cb(GtkTreeView *treeview, GtkTreePath *path,
|
||||
gnc_main_window_open_page(GNC_MAIN_WINDOW(window), new_page);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gppb_selection_changed_cb(GtkTreeSelection *selection,
|
||||
GncPluginPageBudget *page)
|
||||
@ -722,8 +737,10 @@ gppb_selection_changed_cb(GtkTreeSelection *selection,
|
||||
"sensitive", sensitive);
|
||||
}
|
||||
|
||||
/* Command callbacks */
|
||||
|
||||
/*********************
|
||||
* Command callbacks *
|
||||
********************/
|
||||
static void
|
||||
gnc_plugin_page_budget_cmd_open_account (GtkAction *action,
|
||||
GncPluginPageBudget *page)
|
||||
@ -749,6 +766,7 @@ gnc_plugin_page_budget_cmd_open_account (GtkAction *action,
|
||||
g_list_free(acct_list);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_cmd_open_subaccounts (GtkAction *action,
|
||||
GncPluginPageBudget *page)
|
||||
@ -774,6 +792,7 @@ gnc_plugin_page_budget_cmd_open_subaccounts (GtkAction *action,
|
||||
g_list_free(acct_list);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_cmd_delete_budget (GtkAction *action,
|
||||
GncPluginPageBudget *page)
|
||||
@ -789,134 +808,96 @@ gnc_plugin_page_budget_cmd_delete_budget (GtkAction *action,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/******************************/
|
||||
/* Options Dialog */
|
||||
/******************************/
|
||||
|
||||
static gboolean
|
||||
gnc_plugin_page_budget_options_apply_cb (GncDialog * d,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncPluginPageBudget *page = user_data;
|
||||
GncPluginPageBudgetPrivate *priv;
|
||||
gchar *name;
|
||||
gchar *desc;
|
||||
gint num_periods;
|
||||
GncRecurrence *gr;
|
||||
const Recurrence *r;
|
||||
|
||||
if (!page)
|
||||
return TRUE;
|
||||
|
||||
ENTER(" ");
|
||||
priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(page);
|
||||
name = gnc_dialog_get_string(d, "BudgetName");
|
||||
if (name)
|
||||
{
|
||||
gchar* label;
|
||||
|
||||
gnc_budget_set_name(priv->budget, name);
|
||||
label = g_strdup_printf("%s: %s", _("Budget"), name);
|
||||
main_window_update_page_name(GNC_PLUGIN_PAGE(page), label);
|
||||
g_free(label);
|
||||
DEBUG("%s", name);
|
||||
g_free(name);
|
||||
}
|
||||
|
||||
desc = (gchar *) gnc_dialog_get_string(d, "BudgetDescription");
|
||||
gnc_budget_set_description(priv->budget, desc);
|
||||
g_free(desc);
|
||||
|
||||
num_periods = gnc_dialog_get_int(d, "BudgetNumPeriods");
|
||||
gnc_budget_set_num_periods(priv->budget, num_periods);
|
||||
|
||||
gr = GNC_RECURRENCE(gnc_dialog_get_widget(d, "BudgetRecurrenceEntry"));
|
||||
r = gnc_recurrence_get(gr);
|
||||
gnc_budget_set_recurrence(priv->budget, r);
|
||||
|
||||
LEAVE(" ");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_plugin_page_budget_options_help_cb (GncDialog *d,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"%s",
|
||||
_("Set the budget options using this dialog."));
|
||||
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_plugin_page_budget_options_close_cb (GncDialog *d,
|
||||
gpointer user_data)
|
||||
{
|
||||
GncPluginPageBudget *page = user_data;
|
||||
GncPluginPageBudgetPrivate *priv;
|
||||
|
||||
g_return_val_if_fail(page, TRUE);
|
||||
|
||||
priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(page);
|
||||
gtk_widget_destroy(GTK_WIDGET(d));
|
||||
priv->d = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_budget_gui_show_options(GncDialog *pw, GncBudget *budget,
|
||||
GncPluginPageBudget *page)
|
||||
{
|
||||
GncRecurrence *gr;
|
||||
GncPluginPageBudgetPrivate *priv;
|
||||
|
||||
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_BUDGET (page));
|
||||
priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(page);
|
||||
|
||||
gnc_dialog_set_string(pw, "BudgetName",
|
||||
gnc_budget_get_name(budget));
|
||||
gnc_dialog_set_string(pw, "BudgetDescription",
|
||||
gnc_budget_get_description(budget));
|
||||
gnc_dialog_set_int(pw, "BudgetNumPeriods",
|
||||
gnc_budget_get_num_periods(budget));
|
||||
gr = GNC_RECURRENCE(gnc_dialog_get_widget(
|
||||
pw, "BudgetRecurrenceEntry"));
|
||||
gnc_recurrence_set(gr, gnc_budget_get_recurrence(budget));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_cmd_view_options (GtkAction *action,
|
||||
GncPluginPageBudget *page)
|
||||
{
|
||||
GncPluginPageBudgetPrivate *priv;
|
||||
GncRecurrence *gr;
|
||||
GtkBuilder *builder;
|
||||
gint result;
|
||||
gchar *name;
|
||||
gchar *desc;
|
||||
gint num_periods;
|
||||
GtkWidget *gbname, *gbtreeview, *gbnumperiods, *gbhb;
|
||||
const Recurrence *r;
|
||||
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, end;
|
||||
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_BUDGET (page));
|
||||
priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(page);
|
||||
|
||||
if (!priv->d)
|
||||
if (!priv->dialog)
|
||||
{
|
||||
priv->d = gnc_dialog_new(GNC_BUDGET_GUI_FILE, "BudgetOptions");
|
||||
gtk_window_set_title(GTK_WINDOW(priv->d), _("Budget Options"));
|
||||
gnc_dialog_set_cb(priv->d,
|
||||
gnc_plugin_page_budget_options_apply_cb,
|
||||
gnc_plugin_page_budget_options_close_cb,
|
||||
gnc_plugin_page_budget_options_help_cb,
|
||||
page);
|
||||
}
|
||||
builder = gtk_builder_new();
|
||||
gnc_builder_add_from_file (builder, "gnc-plugin-page-budget.glade", "NumPeriods_Adj");
|
||||
gnc_builder_add_from_file (builder, "gnc-plugin-page-budget.glade", "OptionsContainer");
|
||||
|
||||
gnc_budget_gui_show_options(priv->d, priv->budget, page);
|
||||
gtk_widget_show_all(GTK_WIDGET(priv->d));
|
||||
priv->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "OptionsContainer"));
|
||||
|
||||
gtk_window_set_transient_for(
|
||||
GTK_WINDOW(priv->dialog),
|
||||
GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))));
|
||||
|
||||
gbname = GTK_WIDGET(gtk_builder_get_object (builder, "BudgetName"));
|
||||
gtk_entry_set_text(GTK_ENTRY(gbname), gnc_budget_get_name(priv->budget));
|
||||
|
||||
gbtreeview = GTK_WIDGET(gtk_builder_get_object (builder, "BudgetDescription"));
|
||||
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gbtreeview));
|
||||
gtk_text_buffer_set_text (buffer, gnc_budget_get_description(priv->budget), -1);
|
||||
|
||||
gbhb = GTK_WIDGET(gtk_builder_get_object (builder, "BudgetPeriod"));
|
||||
gr = GNC_RECURRENCE(gnc_recurrence_new());
|
||||
gnc_recurrence_set(gr, gnc_budget_get_recurrence(priv->budget));
|
||||
gtk_box_pack_start (GTK_BOX (gbhb), GTK_WIDGET(gr), TRUE, TRUE, 0);
|
||||
gtk_widget_show (GTK_WIDGET(gr));
|
||||
|
||||
gbnumperiods = GTK_WIDGET(gtk_builder_get_object (builder, "BudgetNumPeriods"));
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(gbnumperiods), gnc_budget_get_num_periods(priv->budget));
|
||||
|
||||
gtk_widget_show_all (priv->dialog);
|
||||
result = gtk_dialog_run(GTK_DIALOG(priv->dialog));
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case GTK_RESPONSE_OK:
|
||||
name = (gchar *) gtk_entry_get_text(GTK_ENTRY(gbname));
|
||||
DEBUG("%s", name);
|
||||
if (name)
|
||||
{
|
||||
gchar* label;
|
||||
gnc_budget_set_name(priv->budget, name);
|
||||
label = g_strdup_printf("%s: %s", _("Budget"), name);
|
||||
main_window_update_page_name(GNC_PLUGIN_PAGE(page), label);
|
||||
g_free(label);
|
||||
}
|
||||
|
||||
gtk_text_buffer_get_bounds (gtk_text_view_get_buffer(GTK_TEXT_VIEW (gbtreeview)), &start, &end);
|
||||
desc = gtk_text_buffer_get_text (gtk_text_view_get_buffer(GTK_TEXT_VIEW (gbtreeview)), &start, &end, TRUE);
|
||||
|
||||
gnc_budget_set_description(priv->budget, desc);
|
||||
g_free(desc);
|
||||
|
||||
num_periods = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(gbnumperiods));
|
||||
gnc_budget_set_num_periods(priv->budget, num_periods);
|
||||
|
||||
r = gnc_recurrence_get(gr);
|
||||
gnc_budget_set_recurrence(priv->budget, r);
|
||||
break;
|
||||
case GTK_RESPONSE_CANCEL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
g_object_unref(G_OBJECT(builder));
|
||||
gtk_widget_destroy(priv->dialog);
|
||||
}
|
||||
priv->dialog = NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -930,7 +911,6 @@ gnc_budget_gui_delete_budget(GncBudget *budget)
|
||||
if (!name)
|
||||
name = _("Unnamed Budget");
|
||||
|
||||
|
||||
if (gnc_verify_dialog (NULL, FALSE, _("Delete %s?"), name))
|
||||
{
|
||||
gnc_suspend_gui_refresh ();
|
||||
@ -938,9 +918,9 @@ gnc_budget_gui_delete_budget(GncBudget *budget)
|
||||
// Views should close themselves because the CM will notify them.
|
||||
gnc_resume_gui_refresh ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
estimate_budget_helper(GtkTreeModel *model, GtkTreePath *path,
|
||||
GtkTreeIter *iter, gpointer data)
|
||||
@ -976,17 +956,21 @@ estimate_budget_helper(GtkTreeModel *model, GtkTreePath *path,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************/
|
||||
/* Estimate Dialog */
|
||||
/*******************************/
|
||||
static void
|
||||
gnc_plugin_page_budget_cmd_estimate_budget(GtkAction *action,
|
||||
GncPluginPageBudget *page)
|
||||
{
|
||||
GncPluginPageBudgetPrivate *priv;
|
||||
GtkTreeSelection *sel;
|
||||
GtkWidget *dialog, *gde, *dtr;
|
||||
GtkWidget *dialog, *gde, *dtr, *hb;
|
||||
gint result;
|
||||
GDate date;
|
||||
const Recurrence *r;
|
||||
GladeXML *xml;
|
||||
GtkBuilder *builder;
|
||||
|
||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_BUDGET(page));
|
||||
priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(page);
|
||||
@ -1005,15 +989,25 @@ gnc_plugin_page_budget_cmd_estimate_budget(GtkAction *action,
|
||||
return;
|
||||
}
|
||||
|
||||
xml = gnc_glade_xml_new ("budget.glade", "BudgetEstimate");
|
||||
dialog = glade_xml_get_widget (xml, "BudgetEstimate");
|
||||
builder = gtk_builder_new();
|
||||
gnc_builder_add_from_file (builder, "gnc-plugin-page-budget.glade", "DigitsToRound_Adj");
|
||||
gnc_builder_add_from_file (builder, "gnc-plugin-page-budget.glade", "BudgetEstimate");
|
||||
|
||||
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "BudgetEstimate"));
|
||||
|
||||
gtk_window_set_transient_for(
|
||||
GTK_WINDOW(dialog),
|
||||
GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))));
|
||||
gde = glade_xml_get_widget(xml, "StartDate");
|
||||
|
||||
hb = GTK_WIDGET(gtk_builder_get_object (builder, "StartDate_hbox"));
|
||||
gde = gnc_date_edit_new (time (NULL), FALSE, FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (hb), gde, TRUE, TRUE, 0);
|
||||
gtk_widget_show (gde);
|
||||
|
||||
date = recurrenceGetDate(&priv->r);
|
||||
gnc_date_edit_set_gdate(GNC_DATE_EDIT(gde), &date);
|
||||
dtr = glade_xml_get_widget(xml, "DigitsToRound");
|
||||
|
||||
dtr = GTK_WIDGET(gtk_builder_get_object (builder, "DigitsToRound"));
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(dtr),
|
||||
(gdouble)priv->sigFigs);
|
||||
|
||||
@ -1037,8 +1031,10 @@ gnc_plugin_page_budget_cmd_estimate_budget(GtkAction *action,
|
||||
break;
|
||||
}
|
||||
gtk_widget_destroy(dialog);
|
||||
g_object_unref(G_OBJECT(builder));
|
||||
}
|
||||
|
||||
|
||||
static gchar *
|
||||
budget_col_source(Account *account, GtkTreeViewColumn *col,
|
||||
GtkCellRenderer *cell)
|
||||
@ -1070,10 +1066,10 @@ budget_col_source(Account *account, GtkTreeViewColumn *col,
|
||||
gnc_account_print_info(account, FALSE));
|
||||
}
|
||||
}
|
||||
|
||||
return g_strdup(amtbuff);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
budget_col_edited(Account *account, GtkTreeViewColumn *col,
|
||||
const gchar *new_text)
|
||||
@ -1098,6 +1094,7 @@ budget_col_edited(Account *account, GtkTreeViewColumn *col,
|
||||
numeric);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_refresh_col_titles(GncPluginPageBudget *page)
|
||||
{
|
||||
@ -1132,6 +1129,7 @@ gnc_plugin_page_budget_refresh_col_titles(GncPluginPageBudget *page)
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_view_refresh (GncPluginPageBudget *page)
|
||||
{
|
||||
@ -1175,6 +1173,7 @@ gnc_plugin_page_budget_view_refresh (GncPluginPageBudget *page)
|
||||
gnc_plugin_page_budget_refresh_col_titles(page);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_cmd_view_filter_by (GtkAction *action,
|
||||
GncPluginPageBudget *page)
|
||||
|
@ -5,12 +5,12 @@ gtkbuilder_DATA = \
|
||||
assistant-hierarchy.glade \
|
||||
assistant-loan.glade \
|
||||
assistant-stock-split.glade \
|
||||
budget.glade \
|
||||
dialog-commodities.glade \
|
||||
dialog-lot-viewer.glade \
|
||||
dialog-fincalc.glade \
|
||||
dialog-price.glade \
|
||||
dialog-print-check.glade \
|
||||
gnc-plugin-page-budget.glade \
|
||||
newuser.glade \
|
||||
owner.glade \
|
||||
progress.glade \
|
||||
|
@ -2,39 +2,51 @@
|
||||
<interface>
|
||||
<requires lib="gtk+" version="2.16"/>
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
<!-- column-name item text -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">day(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">week(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">month(s)</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">year(s)</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkDialog" id="Budget List">
|
||||
<object class="GtkDialog" id="Budget List - Not Used">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Budget List</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="close_button">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Close the Budget List</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
@ -52,14 +64,16 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVButtonBox" id="vbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="layout_style">spread</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="new_button">
|
||||
@ -69,6 +83,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Create a New Budget</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -85,6 +100,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Open the Selected Budget</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -101,6 +117,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Delete the Selected Budget</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -112,26 +129,47 @@
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="-7">close_button</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkDialog" id="BudgetEstimate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Estimate Budget Values</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<object class="GtkHButtonBox" id="dialog-action_area6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="close_button">
|
||||
<property name="label">gtk-close</property>
|
||||
<object class="GtkButton" id="cancelbutton1">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Close the Budget List</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -140,35 +178,171 @@
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="okbutton1">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label95">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">GnuCash will estimate budget values for the selected accounts from past transactions.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTable" id="table6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">3</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label96">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Start Date:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label97">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Significant Digits:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="DigitsToRound">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">The number of leading digits to keep when rounding</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">DigitsToRound_Adj</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="StartDate_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="-7">close_button</action-widget>
|
||||
<action-widget response="-6">cancelbutton1</action-widget>
|
||||
<action-widget response="-5">okbutton1</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="DigitsToRound_Adj">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">12</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="NumPeriods_Adj">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">60</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">12</property>
|
||||
</object>
|
||||
<object class="GtkDialog" id="OptionsContainer">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Options</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Budget Options</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="BudgetOptions">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">5</property>
|
||||
<child>
|
||||
<object class="GtkTable" id="table5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="n_rows">5</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="column_spacing">3</property>
|
||||
@ -176,6 +350,7 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label85">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="label" translatable="yes">Budget Name:</property>
|
||||
@ -183,12 +358,17 @@
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
<property name="x_padding">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="BudgetName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -199,6 +379,7 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label86">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Notes:</property>
|
||||
</object>
|
||||
@ -207,6 +388,7 @@
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
<property name="x_padding">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -230,8 +412,9 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox23">
|
||||
<object class="GtkHBox" id="BudgetPeriod">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
@ -248,6 +431,7 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label87">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Number of Periods:</property>
|
||||
</object>
|
||||
@ -256,13 +440,18 @@
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
<property name="x_padding">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="BudgetNumPeriods">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">adjustment3</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">NumPeriods_Adj</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</object>
|
||||
@ -277,6 +466,7 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="label94">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Budget Period:</property>
|
||||
</object>
|
||||
@ -285,11 +475,13 @@
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
<property name="x_padding">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHSeparator" id="hseparator1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -302,6 +494,7 @@
|
||||
<child>
|
||||
<object class="GtkHSeparator" id="hseparator2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
@ -330,6 +523,7 @@
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label83">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Budget Options</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -338,315 +532,71 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkHButtonBox" id="dialog-action_area5">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkWindow" id="GncRecurrenceEntry">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="RecurrenceEntryVBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox218">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label90">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Every </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="GSB_Mult">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Number of calendar units in the recurrence: E.g. Biweekly = every 2 weeks; Quarterly = every 3 months</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="GCB_PeriodType">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">liststore1</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox219">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label89">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">beginning on: </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox220">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="GCB_EndOfMonth">
|
||||
<property name="label" translatable="yes">last of month</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Always use the last day (or day of week) in the month?</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="GCB_NthWeekday">
|
||||
<property name="label" translatable="yes">same week & day</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Match the "day of week" and "week of month"? (for example, the "second Tuesday" of every month)</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkDialog" id="BudgetEstimate">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Estimate Budget Values</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label95">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">GnuCash will estimate budget values for the selected accounts from past transactions.</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTable" id="table6">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">3</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label96">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Start Date:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label97">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Significant Digits:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="DigitsToRound">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">The number of leading digits to keep when rounding</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkHButtonBox" id="dialog-action_area6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancelbutton1">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancelbutton2">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="okbutton1">
|
||||
<object class="GtkButton" id="okbutton2">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="-6">cancelbutton1</action-widget>
|
||||
<action-widget response="-5">okbutton1</action-widget>
|
||||
<action-widget response="-6">cancelbutton2</action-widget>
|
||||
<action-widget response="-5">okbutton2</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="value">1</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">12</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment2">
|
||||
<property name="value">1</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">250</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment3">
|
||||
<property name="value">1</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">60</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">12</property>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user