diff --git a/src/gnome-utils/gnc-frequency.c b/src/gnome-utils/gnc-frequency.c index c08f2ef294..bdfb0e381e 100644 --- a/src/gnome-utils/gnc-frequency.c +++ b/src/gnome-utils/gnc-frequency.c @@ -1,6 +1,7 @@ /********************************************************************\ * gnc-frequency.c -- GnuCash widget for frequency editing. * * Copyright (C) 2001,2002 Joshua Sled * + * Copyright (C) 2003 Linas Vepstas * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License as * @@ -1124,3 +1125,26 @@ start_date_changed( GNCDateEdit *gde, gpointer d ) } gtk_signal_emit_by_name( GTK_OBJECT(gf), "changed", NULL ); } + +/* ================================================================= */ +/* Relabel some of the labels */ + +void +gnc_frequency_set_frequency_label_text (GNCFrequency *gf, const gchar *txt) +{ + GtkLabel *lbl; + if (!gf || !txt) return; + lbl = GTK_LABEL (glade_xml_get_widget (gf->gxml, "freq label")); + gtk_label_set_text (lbl, txt); +} + +void +gnc_frequency_set_startdate_label_text (GNCFrequency *gf, const gchar *txt) +{ + GtkLabel *lbl; + if (!gf || !txt) return; + lbl = GTK_LABEL (glade_xml_get_widget (gf->gxml, "startdate label")); + gtk_label_set_text (lbl, txt); +} + +/* ========================= END OF FILE =========================== */ diff --git a/src/gnome-utils/gnc-frequency.h b/src/gnome-utils/gnc-frequency.h index 6df3fe60a0..353a4c0d72 100644 --- a/src/gnome-utils/gnc-frequency.h +++ b/src/gnome-utils/gnc-frequency.h @@ -1,6 +1,7 @@ /********************************************************************\ * gnc-frequency.h -- GnuCash widget for frequency editing. * * Copyright (C) 2001,2002 Joshua Sled * + * Copyright (C) 2003 Linas Vepstas * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License as * @@ -41,22 +42,25 @@ BEGIN_GNOME_DECLS * transaction or budgeting category, for instance], manipulating a FreqSpec * object in the process. **/ -typedef struct _GNCFrequency { +typedef struct _GNCFrequency +{ GtkVBox widget; - GtkVBox *vb; + GtkVBox *vb; GtkNotebook *nb; GtkOptionMenu *freqOpt; GNCDateEdit *startDate; GladeXML *gxml; } GNCFrequency; -typedef struct _GNCFrequencyClass { +typedef struct _GNCFrequencyClass +{ GtkVBoxClass parent_class; void (*changed) (GNCFrequency *gf); } GNCFrequencyClass; -struct pageDataTuple { +struct pageDataTuple +{ int idx; UIFreqType uiFTVal; char *name; @@ -69,6 +73,7 @@ guint gnc_frequency_get_type( void ); **/ GtkWidget * gnc_frequency_new( FreqSpec *fs, GDate *startDate ); void gnc_frequency_init( GNCFrequency *gf ); + /** * Sets up the given GNCFrequency with the given FreqSpec and * UIFreqSpec. If the FreqSpec is NULL, then the default value is @@ -85,6 +90,17 @@ void gnc_frequency_setup( GNCFrequency *gf, FreqSpec *fs, GDate *startDate ); **/ void gnc_frequency_save_state( GNCFrequency *gf, FreqSpec *fs, GDate *outStartDate ); +/** + * Set the label text for the frequency option menu. In the current + * implementation, the default label text is "Frequency:" + */ +void gnc_frequency_set_frequency_label_text (GNCFrequency *gf, const gchar *txt); +/** + * Set the label text for the start-date entry widget. In the current + * impelmentation, the default label text is "Start Date:" + */ +void gnc_frequency_set_startdate_label_text (GNCFrequency *gf, const gchar *txt); + END_GNOME_DECLS #endif /* !defined( GNC_FREQUENCY_H ) */