[Gnucash-changes] Convert the "Tip of the Day" dialog from
Scheme/C/Glade to C/Glade.
David Hampton
hampton at cvs.gnucash.org
Thu Apr 28 00:05:55 EDT 2005
Log Message:
-----------
Convert the "Tip of the Day" dialog from Scheme/C/Glade to C/Glade.
The installed tip file can still be updated by users, but is now
essentially a free-form file where tips are separated by two
consecutive newline characters. The tip file in the sources still
contains gettext markup.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash:
ChangeLog
make-gnucash-potfiles.in
gnucash/doc:
.cvsignore
Makefile.am
gnucash/src/gnome:
Makefile.am
gnc-main-window.c
gw-gnc-spec.scm
gnucash/src/gnome/glade:
totd.glade
gnucash/src/gnome/schemas:
Makefile.am
gnucash/src/gnome-utils:
gnc-gnome-utils.c
gnc-gnome-utils.h
gnucash/src/scm:
Makefile.am
main.scm
Added Files:
-----------
gnucash/doc:
tip_of_the_day.list.in
gnucash/src/gnome:
dialog-totd.c
dialog-totd.h
gnucash/src/gnome/schemas:
apps_gnucash_dialog_totd.schemas
Removed Files:
-------------
gnucash/src/gnome:
gnc-totd-dialog.c
gnc-totd-dialog.h
tip-of-the-day.c
tip-of-the-day.h
gnucash/src/scm:
tip-list.scm
tip-of-the-day.scm
Revision Data
-------------
Index: make-gnucash-potfiles.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/make-gnucash-potfiles.in,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -Lmake-gnucash-potfiles.in -Lmake-gnucash-potfiles.in -u -r1.4 -r1.4.6.1
--- make-gnucash-potfiles.in
+++ make-gnucash-potfiles.in
@@ -52,3 +52,4 @@
}
print "intl-scm/guile-strings.c\n";
+print "doc/tip_of_the_day.list.in"
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.197
retrieving revision 1.1487.2.198
diff -LChangeLog -LChangeLog -u -r1.1487.2.197 -r1.1487.2.198
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,27 @@
+2005-04-28 David Hampton <hampton at employees.org>
+
+ * src/gnome/gnc-totd-dialog.[ch]:
+ * src/gnome/tip-of-the-day.[ch]:
+ * src/scm/tip-list.scm:
+ * src/scm/tip-of-the-day.scm: Remove old "tip of the day" code.
+
+ * make-gnucash-potfiles.in:
+ * doc/tip_of_the_day.list.in:
+ * src/gnome/dialog-totd.[ch]:
+ * src/gnome/glade/totd.glade:
+ * src/gnome/schemas/apps_gnucash_dialog_totd.schemas: New "tip of
+ the day" code entirely written in C. The installed tip file can
+ still be updated by users, but is now essentially a free-form file
+ where tips are separated by two consecutive newline characters.
+ The tip file in the sources still contains gettext markup. Store
+ the current tip number and whether or not to show tip in gconf.
+
+ * src/gnome/gnc-main-window.c:
+ * src/gnome/gw-gnc-spec.scm:
+ * src/gnome-utils/gnc-gnome-utils.[ch]:
+ * src/scm/main.scm: Other files affected by the "tip of the
+ day" changes.
+
2005-04-25 Neil Williams <linux at codehelp.co.uk>
* src/app-utils/option-util.c:
* src/app-utils/option-util.h: Removing deprecated QOF code
--- src/gnome/tip-of-the-day.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************\
- * dialog-totd.h : C wrappers around Scheme "tip of the day" fns *
- * Copyright (C) 2000 Robert Merkel <rgmerk at mira.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 *
- * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
- * Boston, MA 02111-1307, USA gnu at gnu.org *
-\********************************************************************/
-
-#ifndef SCM_TIP_OF_THE_DAY_H
-#define SCM_TIP_OF_THE_DAY_H
-
-char * gnc_get_current_tip(void);
-void gnc_increment_tip(void);
-void gnc_decrement_tip(void);
-
-#endif
Index: gnc-main-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-main-window.c,v
retrieving revision 1.1.2.39
retrieving revision 1.1.2.40
diff -Lsrc/gnome/gnc-main-window.c -Lsrc/gnome/gnc-main-window.c -u -r1.1.2.39 -r1.1.2.40
--- src/gnome/gnc-main-window.c
+++ src/gnome/gnc-main-window.c
@@ -49,7 +49,7 @@
#include "gnc-plugin.h"
#include "gnc-plugin-manager.h"
#include "gnc-session.h"
-#include "gnc-totd-dialog.h"
+#include "dialog-totd.h"
#include "gnc-ui.h"
#include "gnc-version.h"
#include "gnc-window.h"
@@ -1363,11 +1363,7 @@
static void
gnc_main_window_cmd_help_totd (GtkAction *action, GncMainWindow *window)
{
- GtkWidget *dialog;
-
- dialog = gnc_totd_dialog_new (GTK_WINDOW (window));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gnc_totd_dialog(GTK_WINDOW(window), FALSE);
}
static void
--- src/gnome/gnc-totd-dialog.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * gnc-totd-dialog.h : dialog to display a "tip of the day"
- *
- * Copyright (C) 2003 Jan Arne Petersen
- * Author: Jan Arne Petersen <jpetersen at uni-bonn.de>
- *
- * 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
- * 59 Temple Place - Suite 330 Fax: +1-617-542-2652
- * Boston, MA 02111-1307, USA gnu at gnu.org
- */
-
-#ifndef DIALOG_TOTD_H
-#define DIALOG_TOTD_H
-
-#include <gtk/gtkdialog.h>
-
-G_BEGIN_DECLS
-
-/* type macros */
-#define GNC_TYPE_TOTD_DIALOG (gnc_totd_dialog_get_type ())
-#define GNC_TOTD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_TOTD_DIALOG, GncTotdDialog))
-#define GNC_TOTD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_TOTD_DIALOG, GncTotdDialogClass))
-#define GNC_IS_TOTD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_TOTD_DIALOG))
-#define GNC_IS_TOTD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_TOTD_DIALOG))
-#define GNC_TOTD_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_TOTD_DIALOG, GncTotdDialogClass))
-
-/* typedefs & structures */
-typedef struct GncTotdDialogPrivate GncTotdDialogPrivate;
-
-typedef struct {
- GtkDialog parent;
-
- GncTotdDialogPrivate *priv;
-} GncTotdDialog;
-
-typedef struct {
- GtkDialogClass parent;
-
- /* Signals */
- void (* close) (GncTotdDialog *dialog);
-} GncTotdDialogClass;
-
-/* function prototypes */
-GType gnc_totd_dialog_get_type (void);
-
-GtkWidget *gnc_totd_dialog_new (GtkWindow *parent);
-
-void gnc_totd_dialog_create_and_run (void);
-
-G_END_DECLS
-
-#endif
--- src/gnome/gnc-totd-dialog.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * gnc-totd-dialog.c : dialog to display a "tip of the day"
- *
- * Copyright (C) 2003 Jan Arne Petersen
- * Author: Jan Arne Petersen <jpetersen at uni-bonn.de>
- *
- * 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
- * 59 Temple Place - Suite 330 Fax: +1-617-542-2652
- * Boston, MA 02111-1307, USA gnu at gnu.org
- */
-
-#include "config.h"
-
-#include <glade/glade.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkcheckbutton.h>
-
-#include "gnc-totd-dialog.h"
-#include "dialog-utils.h"
-#include "global-options.h"
-#include "tip-of-the-day.h"
-
-#include "messages.h"
-
-static void gnc_totd_dialog_class_init (GncTotdDialogClass *klass);
-static void gnc_totd_dialog_init (GncTotdDialog *dialog);
-static void gnc_totd_dialog_dispose (GObject *object);
-static void gnc_totd_dialog_finalize (GObject *object);
-
-static void gnc_totd_dialog_next_activated (GtkButton *button, GncTotdDialog *dialog);
-static void gnc_totd_dialog_previous_activated (GtkButton *button, GncTotdDialog *dialog);
-static void gnc_totd_dialog_button_toggled (GtkToggleButton *button, GncTotdDialog *dialog);
-
-#define GNC_RESPONSE_NEXT 0
-#define GNC_RESPONSE_PREVIOUS 1
-
-struct GncTotdDialogPrivate {
- GtkCheckButton *show_checkbutton;
- GtkTextView *tip_textview;
-};
-
-static GtkDialogClass *parent_class = NULL;
-
-GType
-gnc_totd_dialog_get_type (void)
-{
- static GType gnc_totd_dialog_type = 0;
-
- if (gnc_totd_dialog_type == 0) {
- static const GTypeInfo our_info = {
- sizeof (GncTotdDialogClass),
- NULL,
- NULL,
- (GClassInitFunc) gnc_totd_dialog_class_init,
- NULL,
- NULL,
- sizeof (GncTotdDialog),
- 0,
- (GInstanceInitFunc) gnc_totd_dialog_init
- };
-
- gnc_totd_dialog_type = g_type_register_static (GTK_TYPE_DIALOG,
- "GncTotdDialog",
- &our_info, 0);
- }
-
- return gnc_totd_dialog_type;
-}
-
-GtkWidget *
-gnc_totd_dialog_new (GtkWindow *parent)
-{
- GncTotdDialog *dialog;
-
- dialog = g_object_new (GNC_TYPE_TOTD_DIALOG, NULL);
-
- if (parent != NULL) {
- gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
- }
-
- return GTK_WIDGET (dialog);
-}
-
-void
-gnc_totd_dialog_create_and_run (void)
-{
- GtkWidget *dialog;
-
- dialog = gnc_totd_dialog_new (NULL);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-}
-
-static void
-gnc_totd_dialog_class_init (GncTotdDialogClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = gnc_totd_dialog_finalize;
- object_class->dispose = gnc_totd_dialog_dispose;
-}
-
-static GtkWidget *
-gnc_totd_dialog_create_button (const gchar *image_id, const gchar *text)
-{
- GtkWidget *image;
- GtkWidget *label;
- GtkWidget *hbox;
- GtkWidget *alignment;
- GtkWidget *button;
-
- image = gtk_image_new_from_stock (image_id, GTK_ICON_SIZE_BUTTON);
- gtk_widget_show (image);
- label = gtk_label_new_with_mnemonic (text);
- gtk_widget_show (label);
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_widget_show (hbox);
-
- alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (alignment), hbox);
- gtk_widget_show (alignment);
-
- button = gtk_button_new ();
- gtk_container_add (GTK_CONTAINER (button), alignment);
- gtk_widget_show (button);
-
- return button;
-}
-
-static void
-gnc_totd_dialog_init (GncTotdDialog *dialog)
-{
- GladeXML *xml;
- gchar *new_tip;
- GtkWidget *button;
-
- dialog->priv = g_new0 (GncTotdDialogPrivate, 1);
-
- button = gnc_totd_dialog_create_button (GTK_STOCK_GO_BACK, _("_Previous Tip"));
- g_signal_connect (G_OBJECT (button), "clicked",
- G_CALLBACK (gnc_totd_dialog_previous_activated), dialog);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), button);
-
- button = gnc_totd_dialog_create_button (GTK_STOCK_GO_FORWARD, _("_Next Tip"));
- g_signal_connect (G_OBJECT (button), "clicked",
- G_CALLBACK (gnc_totd_dialog_next_activated), dialog);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), button);
-
- gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE,
- GTK_RESPONSE_CLOSE);
-
- xml = gnc_glade_xml_new ("totd.glade", "totd_vbox");
-
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
- glade_xml_get_widget (xml, "totd_vbox"));
-
- dialog->priv->show_checkbutton = GTK_CHECK_BUTTON (glade_xml_get_widget (xml, "show_checkbutton"));
- g_signal_connect (G_OBJECT (dialog->priv->show_checkbutton), "toggled",
- G_CALLBACK (gnc_totd_dialog_button_toggled), dialog);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->show_checkbutton),
- gnc_lookup_boolean_option("General",
- "Display \"Tip of the Day\"",
- TRUE));
-
- dialog->priv->tip_textview = GTK_TEXT_VIEW (glade_xml_get_widget (xml, "tip_textview"));
- new_tip = gnc_get_current_tip();
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (dialog->priv->tip_textview),
- new_tip, -1);
- g_free (new_tip);
-
- g_object_unref (xml);
-
- gtk_widget_set_size_request (GTK_WIDGET (dialog), -1, -1);
-}
-
-static void
-gnc_totd_dialog_finalize (GObject *object)
-{
- g_free (GNC_TOTD_DIALOG (object)->priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-gnc_totd_dialog_dispose (GObject *object)
-{
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-gnc_totd_dialog_next_activated (GtkButton *button, GncTotdDialog *dialog)
-{
- gchar *new_tip;
-
- gnc_increment_tip ();
- new_tip = gnc_get_current_tip();
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (dialog->priv->tip_textview),
- new_tip, -1);
- g_free (new_tip);
-}
-
-static void
-gnc_totd_dialog_previous_activated (GtkButton *button, GncTotdDialog *dialog)
-{
- gchar *new_tip;
-
- gnc_decrement_tip ();
- new_tip = gnc_get_current_tip();
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (dialog->priv->tip_textview),
- new_tip, -1);
- g_free (new_tip);
-}
-
-static void
-gnc_totd_dialog_button_toggled (GtkToggleButton *button, GncTotdDialog *dialog)
-{
- gnc_set_boolean_option("General",
- "Display \"Tip of the Day\"",
- gtk_toggle_button_get_active (button));
- gnc_option_refresh_ui_by_name("General", "Display \"Tip of the Day\"");
-}
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Makefile.am,v
retrieving revision 1.107.4.19
retrieving revision 1.107.4.20
diff -Lsrc/gnome/Makefile.am -Lsrc/gnome/Makefile.am -u -r1.107.4.19 -r1.107.4.20
--- src/gnome/Makefile.am
+++ src/gnome/Makefile.am
@@ -39,7 +39,7 @@
dialog-sx-from-trans.c \
dialog-sxsincelast.c \
dialog-tax-info.c \
- gnc-totd-dialog.c \
+ dialog-totd.c \
dialog-userpass.c \
dialog-scheduledxaction.c \
druid-budget-create.c \
@@ -62,7 +62,6 @@
gnc-window.c \
lot-viewer.c \
reconcile-list.c \
- tip-of-the-day.c \
top-level.c \
window-main.c \
window-main-summarybar.c \
@@ -91,7 +90,7 @@
dialog-progress.h \
dialog-sx-from-trans.h \
dialog-sxsincelast.h \
- gnc-totd-dialog.h \
+ dialog-totd.h \
dialog-scheduledxaction.h \
druid-budget-create.h \
druid-acct-period.h \
@@ -115,7 +114,6 @@
gw-gnc.h \
lot-viewer.h \
reconcile-list.h \
- tip-of-the-day.h \
top-level.h \
window-main.h \
window-main-summarybar.h \
--- src/gnome/tip-of-the-day.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/********************************************************************\
- * tip-of-the-day.c -- C wrappers for scheme "tip of the day" fns *
- * Copyright (C) 2000 Robert Merkel <rgmerk at mira.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 *
- * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
- * Boston, MA 02111-1307, USA gnu at gnu.org *
-\********************************************************************/
-
-#include "config.h"
-
-#include <libguile.h>
-#include "guile-mappings.h"
-
-#include "tip-of-the-day.h"
-
-
-/** Implementations ***************************************************/
-
-/********************************************************************\
- * gnc_get_current_tip *
- * get the current tip *
- * *
- * Returns: A freshly malloc string containing the tip *
-\********************************************************************/
-
-char *
-gnc_get_current_tip(void)
-{
- SCM tip_scm;
- tip_scm = scm_c_eval_string("(gnc:get-current-tip)");
- return gh_scm2newstr(tip_scm, NULL);
-}
-
-/********************************************************************\
- * gnc_increment_tip *
- * set the current tip to be the next one in the sequence *
- * *
- * Returns: nothing *
-\********************************************************************/
-
-void
-gnc_increment_tip(void)
-{
- scm_c_eval_string("(gnc:increment-tip-number)");
- return;
-}
-
-/********************************************************************\
- * gnc_decrement_tip *
- * set the current tip to the previous one in the sequence *
- * *
- * Returns: Nothing *
-\********************************************************************/
-
-void
-gnc_decrement_tip(void)
-{
- scm_c_eval_string("(gnc:decrement-tip-number)");
- return;
-}
-
-/********************** END OF FILE *********************************\
-\********************************************************************/
Index: gw-gnc-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gw-gnc-spec.scm,v
retrieving revision 1.14.4.7
retrieving revision 1.14.4.8
diff -Lsrc/gnome/gw-gnc-spec.scm -Lsrc/gnome/gw-gnc-spec.scm -u -r1.14.4.7 -r1.14.4.8
--- src/gnome/gw-gnc-spec.scm
+++ src/gnome/gw-gnc-spec.scm
@@ -35,7 +35,7 @@
"#include <gnc-engine.h>\n"
"#include <gnc-commodity.h>\n"
"#include <gnc-numeric.h>\n"
- "#include <gnc-totd-dialog.h>\n"
+ "#include <dialog-totd.h>\n"
"#include <window-main.h>\n"
"#include <gnc-gui-query.h>\n"
"#include <dialog-new-user.h>\n"
@@ -182,11 +182,11 @@
(gw:wrap-function
ws
- 'gnc:totd-dialog-create-and-run
+ 'gnc:totd_dialog
'<gw:void>
- "gnc_totd_dialog_create_and_run"
- '()
- "Create and run the \"Tip Of The Day\" dialog")
+ "gnc_totd_dialog"
+ '((<gnc:UIWidget> parent) (<gw:bool> is_startup))
+ "Show the \"Tip Of The Day\" dialog.")
(gw:wrap-as-wct ws
'<gnc:ProgressDialog*>
Index: totd.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/Attic/totd.glade,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/gnome/glade/totd.glade -Lsrc/gnome/glade/totd.glade -u -r1.1.2.2 -r1.1.2.3
--- src/gnome/glade/totd.glade
+++ src/gnome/glade/totd.glade
@@ -4,65 +4,107 @@
<glade-interface>
<requires lib="gnome"/>
-<widget class="GtkWindow" id="placeholder_window">
+<widget class="GtkDialog" id="totd_dialog">
<property name="visible">True</property>
- <property name="title" translatable="yes">window1</property>
+ <property name="title" translatable="yes">Gnucash Top Of The Day</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
+ <property name="default_width">400</property>
+ <property name="default_height">300</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="has_separator">True</property>
- <child>
- <widget class="GtkVBox" id="totd_vbox">
- <property name="border_width">12</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">18</property>
+ <property name="spacing">0</property>
- <child>
- <widget class="GtkVBox" id="vbox2">
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
- <widget class="GtkLabel" id="label3">
+ <widget class="GtkButton" id="button1">
<property name="visible">True</property>
- <property name="label" translatable="yes"><span weight="bold">Tip of the Day:</span></property>
- <property name="use_underline">True</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-go-back</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">2</property>
+ <signal name="clicked" handler="gnc_totd_dialog_previous" last_modification_time="Tue, 26 Apr 2005 03:10:09 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-go-forward</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">1</property>
+ <signal name="clicked" handler="gnc_totd_dialog_next" last_modification_time="Tue, 26 Apr 2005 03:10:17 GMT"/>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox3">
+ <widget class="GtkButton" id="button3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-7</property>
+ <signal name="clicked" handler="gnc_totd_dialog_close" last_modification_time="Tue, 26 Apr 2005 05:36:09 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="totd_vbox">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">18</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label4">
+ <widget class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
+ <property name="label" translatable="yes"><span weight="bold">Tip of the Day:</span></property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
@@ -75,22 +117,58 @@
</child>
<child>
- <widget class="GtkTextView" id="tip_textview">
- <property name="border_width">6</property>
+ <widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">False</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes">Warning This is a DEVELOPMENT version of GnuCash. It probably has lots of bugs and unstable features!
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTextView" id="tip_textview">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_WORD</property>
+ <property name="cursor_visible">False</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes">Warning This is a DEVELOPMENT version of GnuCash. It probably has lots of bugs and unstable features!
If you are looking for a stable personal finance application, you should use the latest release of GnuCash 1.8</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -105,6 +183,26 @@
<property name="fill">True</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkCheckButton" id="show_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Show tips at startup</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="gnc_totd_dialog_startup_toggled" last_modification_time="Tue, 26 Apr 2005 03:21:57 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -112,24 +210,6 @@
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkCheckButton" id="show_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Show tips at startup</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
</widget>
</child>
</widget>
--- /dev/null
+++ src/gnome/schemas/apps_gnucash_dialog_totd.schemas
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+ <schemalist>
+
+ <schema>
+ <key>/schemas/apps/gnucash/dialogs/tip_of_the_day/show_at_startup</key>
+ <applyto>/apps/gnucash/dialogs/tip_of_the_day/show_at_startup</applyto>
+ <owner>gnucash</owner>
+ <type>bool</type>
+ <default>TRUE</default>
+ <locale name="C">
+ <short>Show "Tip Of The Day" at GnuCash start</short>
+ <long>
+ Whether or not to show "Tip Of The Day" when GnuCash starts
+ up. A value of TRUE says to show the dialog; FALSE says not
+ to show the dialog.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/gnucash/dialogs/tip_of_the_day/current_tip</key>
+ <applyto>/apps/gnucash/dialogs/tip_of_the_day/current_tip</applyto>
+ <owner>gnucash</owner>
+ <type>int</type>
+ <default>0</default>
+ <locale name="C">
+ <short>The next tip to show.</short>
+ <long>The next tip to show.</long>
+ </locale>
+ </schema>
+
+ </schemalist>
+</gconfschemafile>
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/Makefile.am,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lsrc/gnome/schemas/Makefile.am -Lsrc/gnome/schemas/Makefile.am -u -r1.1.2.3 -r1.1.2.4
--- src/gnome/schemas/Makefile.am
+++ src/gnome/schemas/Makefile.am
@@ -1,7 +1,8 @@
schemadir = @GCONF_SCHEMA_FILE_DIR@
schema_DATA = \
apps_gnucash_dialog_commodities.schemas \
- apps_gnucash_dialog_prices.schemas
+ apps_gnucash_dialog_prices.schemas \
+ apps_gnucash_dialog_totd.schemas
install-data-local:
if GCONF_SCHEMAS_INSTALL
Index: gnc-gnome-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gnome-utils.c,v
retrieving revision 1.2.4.9
retrieving revision 1.2.4.10
diff -Lsrc/gnome-utils/gnc-gnome-utils.c -Lsrc/gnome-utils/gnc-gnome-utils.c -u -r1.2.4.9 -r1.2.4.10
--- src/gnome-utils/gnc-gnome-utils.c
+++ src/gnome-utils/gnc-gnome-utils.c
@@ -83,18 +83,15 @@
}
char *
-gnc_gnome_locate_ui_file (const char *name)
+gnc_gnome_locate_data_file (const char *name)
{
- char *partial;
char *fullname;
g_return_val_if_fail (name != NULL, NULL);
- partial = g_strdup_printf("ui/%s", name);
fullname = gnome_program_locate_file (gnucash_program,
GNOME_FILE_DOMAIN_APP_DATADIR,
- partial, TRUE, NULL);
- g_free(partial);
+ name, TRUE, NULL);
if (fullname == NULL) {
PERR ("Could not locate file %s", name);
@@ -104,6 +101,21 @@
return fullname;
}
+char *
+gnc_gnome_locate_ui_file (const char *name)
+{
+ char *partial;
+ char *fullname;
+
+ g_return_val_if_fail (name != NULL, NULL);
+
+ partial = g_strdup_printf("ui/%s", name);
+ fullname = gnc_gnome_locate_data_file(partial);
+ g_free(partial);
+
+ return fullname;
+}
+
static void
gnc_gtk_add_rc_file (void)
{
Index: gnc-gnome-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gnome-utils.h,v
retrieving revision 1.1.4.5
retrieving revision 1.1.4.6
diff -Lsrc/gnome-utils/gnc-gnome-utils.h -Lsrc/gnome-utils/gnc-gnome-utils.h -u -r1.1.4.5 -r1.1.4.6
--- src/gnome-utils/gnc-gnome-utils.h
+++ src/gnome-utils/gnc-gnome-utils.h
@@ -83,6 +83,20 @@
*
* @note It is the caller's responsibility to free the returned string.
*/
+char *gnc_gnome_locate_data_file (const char *name);
+
+
+/** Given a file name, find the file in the directories associated
+ * with this application. This routine will display an error message
+ * if it can't find the file.
+ *
+ * @param name The name of the file to be found.
+ *
+ * @return the full path name of the file, or NULL of the file can't
+ * be found.
+ *
+ * @note It is the caller's responsibility to free the returned string.
+ */
char *gnc_gnome_locate_ui_file (const char *name);
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/doc/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -Ldoc/.cvsignore -Ldoc/.cvsignore -u -r1.3 -r1.3.4.1
--- doc/.cvsignore
+++ doc/.cvsignore
@@ -2,3 +2,5 @@
Makefile.in
gnucash.1
gnc-prices.1
+tip_of_the_day.list
+*.tmp
--- /dev/null
+++ doc/tip_of_the_day.list.in
@@ -0,0 +1,91 @@
+ N_( "Warning!! This is a DEVELOPMENT version of GnuCash. \
+It probably has lots of bugs and unstable features! \
+If you are looking for a stable personal finance application, \
+you should use the latest release of GnuCash 1.8.")
+
+ N_( "The GnuCash online manual has lots of helpful information. \
+If you are upgrading from earlier versions of GnuCash, the section \
+\"What's new in GnuCash 1.8\" is particularly interesting. You can \
+access the manual under the Help menu.")
+
+ N_( "You can easily import your existing financial data from Quicken, \
+MS Money or other programs that export QIF files or OFX files. In the \
+File menu, click on the sub-menu Import and click on QIF or OFX file, \
+respectively. Then, follow the instructions provided.")
+
+ N_( "If you are familiar with other financial programs such as Quicken, \
+note that GnuCash uses accounts instead of categories to track \
+income and expenses. For more information on income and expense \
+accounts, please see the GnuCash online manual.")
+
+ N_( "Create new accounts by clicking the New button in the main window \
+tool bar. This will bring up a dialog box where you can enter \
+account details. For more information on choosing an account type \
+or setting up a chart of accounts, please see the GnuCash online \
+manual.")
+
+ N_( "Click the right mouse button in the main window to bring up the \
+account menu options. Within each register, clicking the right \
+mouse button brings up the transaction menu options.")
+
+ N_( "To enter multiple-split transactions such as a paycheck with \
+multiple deductions, click the Split button in the tool bar. \
+Alternatively, in the View -> Style menu, you can choose the register \
+style Auto-Split Ledger or Transaction Journal.")
+
+ N_( "As you enter amounts in the register, you can use the GnuCash \
+calculator to add, subtract, multiply and divide . Simply type \
+the first value, then select '+', '-','*', or '/'. Type the \
+second value and press Enter to record the calculated amount.")
+
+ N_( "Quick-fill makes it easy to enter common transactions. When you \
+type the first letter(s) of a common transaction description, \
+GnuCash will automatically complete the remainder of the \
+transaction as it was last entered.")
+
+ N_( "Type the first letter(s) of an existing account name in the \
+Transfer register column, and GnuCash will complete the name from \
+your list of accounts. For subaccounts, type the first letter(s) \
+of the parent account, followed by ':' and the first letter(s) of \
+the subaccount (e.g. A:C for Assets:Cash.)")
+
+ N_( "Want to see all your subaccount transactions in one register? \
+From the main menu, highlight the parent account and select \
+Accounts -> Open Subaccounts from the menu.")
+
+ N_( "When entering dates, you can type '+' or '-' to increment or \
+decrement the selected date. You can use '+' and '-' to increment and \
+decrement check numbers as well.")
+
+ N_( "In the reconcile window, you can press the spacebar to mark \
+transactions as reconciled. You can also press Tab and Shift-Tab to \
+move between deposits and withdrawals.")
+
+ N_( "To transfer funds between accounts with different currencies, \
+click on the Transfer button in the register toolbar, select the \
+accounts, and the Currency Transfer options for entering the exchange \
+rate or the other currency's amount will be available.")
+
+ N_( "You can pack multiple reports into a single window, \
+providing all the financial information you want at a glance. \
+To do so, use the Sample & Custom -> \"Custom Multicolumn Report\" \
+report.")
+
+ N_( "GnuCash can act as a simple web browser! To display \
+a web page as a report, use the Sample & Custom -> \
+\"Custom Web Report\" report.")
+
+ N_( "Style Sheets affect how reports are displayed. Choose \
+a style sheet for your report as a report option, and use \
+the Edit -> Style Sheets menu to customize style sheets.")
+
+ N_( "The GnuCash developers are easy to contact. As well \
+as several mailing lists, you can chat to them live on IRC! \
+Join them on #gnucash at irc.gnome.org")
+
+ N_( "There is a theory that if ever anyone discovers what \
+the Universe is for and why it is here, it will instantly \
+disappear and be replaced with something even more bizarre and \
+inexplicable. \
+There is another theory that this has already happened. \
+Douglas Adams, \"The Restaurant at the End of the Universe\"")
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/doc/Makefile.am,v
retrieving revision 1.14.4.1
retrieving revision 1.14.4.2
diff -Ldoc/Makefile.am -Ldoc/Makefile.am -u -r1.14.4.1 -r1.14.4.2
--- doc/Makefile.am
+++ doc/Makefile.am
@@ -1,8 +1,6 @@
-
-docdir = ${GNC_DOC_INSTALL_DIR}
-
SUBDIRS = examples
+docdir = ${GNC_DOC_INSTALL_DIR}
doc_DATA = \
README.francais \
README.german \
@@ -13,6 +11,9 @@
gnc-prices.1 \
gnucash.1
+tipsdir = $(pkgdatadir)
+tips_DATA = tip_of_the_day.list
+
EXTRA_DIST = \
.cvsignore \
${doc_DATA} \
@@ -52,4 +53,9 @@
chmod +x $@.tmp
mv $@.tmp $@
-DISTCLEANFILES = gnc-prices.1 gnucash.1
+tip_of_the_day.list: tip_of_the_day.list.in
+ gcc -E -P -x c -D'N_(x)=x' -o $@.tmp $<
+ cat -s $@.tmp | sed -e 's/^ *\"\(.*\)\" *$$/\1/m' > $@
+ rm -f $@.tmp
+
+DISTCLEANFILES = gnc-prices.1 gnucash.1 tip_of_the_day.list
Index: main.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main.scm,v
retrieving revision 1.109.2.12
retrieving revision 1.109.2.13
diff -Lsrc/scm/main.scm -Lsrc/scm/main.scm -u -r1.109.2.12 -r1.109.2.13
--- src/scm/main.scm
+++ src/scm/main.scm
@@ -85,11 +85,6 @@
(export make-print-check-format)
(export gnc:print-check)
-;; from tip-of-the-day.scm
-(export gnc:get-current-tip)
-(export gnc:increment-tip-number)
-(export gnc:decrement-tip-number)
-
;; Get the Makefile.am/configure.in generated variables.
(load-from-path "build-config.scm")
@@ -109,7 +104,8 @@
;; to print out various 'development version' strings throughout the code.
;; #t == development version, #f == stable version
;;
-;; NOTE: You still need to comment out the message in tip-list.scm by hand!
+;; NOTE: You still need to comment out the message in
+;; tip_of_the_day.list.in by hand!
;;
(define gnc:*is-development-version?* #t)
@@ -446,7 +442,6 @@
;; they're "well behaved" (these should probably be in modules
;; eventually)
(load-from-path "main-window.scm") ;; depends on app-utils (N_, etc.)...
- (load-from-path "tip-of-the-day.scm") ;; depends on app-utils (config-var...)
(load-from-path "printing/print-check.scm") ;; depends on simple-obj...
;; +jsled - 2002.07.08
(load-from-path "fin.scm")
@@ -458,7 +453,7 @@
(gnc:quote-source-set-fq-installed sources)))
(gnc:update-splash-screen (_ "Loading tip-of-the-day..."))
- (gnc:initialize-tip-of-the-day)
+ (gnc:totd_dialog #f #t)
(set-current-module original-module))
--- src/scm/tip-list.scm
+++ /dev/null
@@ -1,99 +0,0 @@
-(
- (N_ "Warning!! This is a DEVELOPMENT version of GnuCash.
-It probably has lots of bugs and unstable features!
-If you are looking for a stable personal finance application,
-you should use the latest release of GnuCash 1.8.")
-
- (N_ "The GnuCash online manual has lots of helpful information.
-If you are upgrading from earlier versions of GnuCash, the section
-\"What's new in GnuCash 1.8\" is particularly interesting. You can
-access the manual under the Help menu.")
-
- (N_ "You can easily import your existing financial data from Quicken,
-MS Money or other programs that export QIF files or OFX files. In the
-File menu, click on the sub-menu Import and click on QIF or OFX file,
-respectively. Then, follow the instructions provided.")
-
- (N_ "If you are familiar with other financial programs such as Quicken,
-note that GnuCash uses accounts instead of categories to track
-income and expenses. For more information on income and expense
-accounts, please see the GnuCash online manual.")
-
- (N_ "Create new accounts by clicking the New button in the main window
-tool bar. This will bring up a dialog box where you can enter
-account details. For more information on choosing an account type
-or setting up a chart of accounts, please see the GnuCash online
-manual.")
-
- (N_ "Click the right mouse button in the main window to bring up the
-account menu options. Within each register, clicking the right
-mouse button brings up the transaction menu options.")
-
- (N_ "To enter multiple-split transactions such as a paycheck with
-multiple deductions, click the Split button in the tool bar.
-Alternatively, in the View -> Style menu, you can choose the register
-style Auto-Split Ledger or Transaction Journal.")
-
- (N_ "As you enter amounts in the register, you can use the GnuCash
-calculator to add, subtract, multiply and divide . Simply type
-the first value, then select '+', '-','*', or '/'. Type the
-second value and press Enter to record the calculated amount.")
-
- (N_ "Quick-fill makes it easy to enter common transactions. When you
-type the first letter(s) of a common transaction description,
-GnuCash will automatically complete the remainder of the
-transaction as it was last entered.")
-
- (N_ "Type the first letter(s) of an existing account name in the
-Transfer register column, and GnuCash will complete the name from
-your list of accounts. For subaccounts, type the first letter(s)
-of the parent account, followed by ':' and the first letter(s) of
-the subaccount (e.g. A:C for Assets:Cash.)")
-
- (N_ "Want to see all your subaccount transactions in one register?
-From the main menu, highlight the parent account and select
-Accounts -> Open Subaccounts from the menu.")
-
- (N_ "When entering dates, you can type '+' or '-' to increment or
-decrement the selected date. You can use '+' and '-' to increment and
-decrement check numbers as well.")
-
- (N_ "In the reconcile window, you can press the spacebar to mark
-transactions as reconciled. You can also press Tab and Shift-Tab to
-move between deposits and withdrawals.")
-
-;; FIXME:
-;; (N_ "You should back up your files regularly. Just copy
-;;your GnuCash data file to a floppy or other backup device.")
-
-;; FIXME: Mention the new multi-currency dialog here, when such a
-;; transaction is going to be edited.
- (N_ "To transfer funds between accounts with different currencies,
-click on the Transfer button in the register toolbar, select the
-accounts, and the Currency Transfer options for entering the exchange
-rate or the other currency's amount will be available.")
-
- (N_ "You can pack multiple reports into a single window,
-providing all the financial information you want at a glance.
-To do so, use the Sample & Custom -> \"Custom Multicolumn Report\"
-report.")
-
- (N_ "GnuCash can act as a simple web browser! To display
-a web page as a report, use the Sample & Custom ->
-\"Custom Web Report\" report.")
-
- (N_ "Style Sheets affect how reports are displayed. Choose
-a style sheet for your report as a report option, and use
-the Edit -> Style Sheets menu to customize style sheets.")
-
- (N_ "The GnuCash developers are easy to contact. As well
-as several mailing lists, you can chat to them live on IRC!
-Join them on #gnucash at irc.gnome.org")
-
- (N_ "There is a theory that if ever anyone discovers what
-the Universe is for and why it is here, it will instantly
-disappear and be replaced with something even more bizarre and
-inexplicable.
-There is another theory that this has already happened.
-Douglas Adams, \"The Restaurant at the End of the Universe\"")
-)
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/Makefile.am,v
retrieving revision 1.38.4.1
retrieving revision 1.38.4.2
diff -Lsrc/scm/Makefile.am -Lsrc/scm/Makefile.am -u -r1.38.4.1 -r1.38.4.2
--- src/scm/Makefile.am
+++ src/scm/Makefile.am
@@ -15,8 +15,6 @@
main-window.scm \
path.scm \
substring-search.scm \
- tip-list.scm \
- tip-of-the-day.scm \
xml-generator.scm
gncscm_DATA = ${gnc_regular_scm_files}
--- src/scm/tip-of-the-day.scm
+++ /dev/null
@@ -1,105 +0,0 @@
-;; tip-of-the-day.scm -*-scheme-*-
-;;
-;; 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
-;; 59 Temple Place - Suite 330 Fax: +1-617-542-2652
-;; Boston, MA 02111-1307, USA gnu at gnu.org
-
-;; Scheme functions for supporting tooltips
-;; Written by Robert Merkel <rgmerk at mira.net>
-
-;; Tips should be written as a list of lists of string. Each list of strings
-;; represents one tip
-
-(define (non-negative-integer? value)
- (and (integer? value) (>= value 0)))
-
-(define gnc:*number-of-tips*
- (gnc:make-config-var
- "Total number of tips"
- (lambda(var value) (if (non-negative-integer? value) (list value) #f))
- =
- 0))
-
-(define gnc:*tip-file* #f)
-
-(define gnc:*tip-list* '())
-
-(define (gnc:read-tips)
- (let ((in-port
- (open-input-file
- (%search-load-path (gnc:config-var-value-get gnc:*tip-file*)))))
- (set! gnc:*tip-list* (read in-port))
- (set! gnc:*tip-list*
- (map (lambda (pair) (cadr pair)) gnc:*tip-list*))
- (if (not (= (length gnc:*tip-list*) (gnc:current-tip-number)))
- (begin
- (gnc:config-var-value-set! gnc:*number-of-tips* #t
- (length gnc:*tip-list*))
- (if (<= (gnc:config-var-value-get gnc:*number-of-tips*)
- (gnc:current-tip-number))
- (gnc:reset-tip-number))))
- (close-port in-port)
- #f))
-
-(define (gnc:current-tip-number)
- (let ((num (gnc:option-value
- (gnc:lookup-global-option "__tips" "current_tip_number"))))
- (if (<= (gnc:config-var-value-get gnc:*number-of-tips*) num)
- (gnc:reset-tip-number))
- (gnc:option-value (gnc:lookup-global-option "__tips" "current_tip_number"))))
-
-(define (gnc:get-current-tip)
- (_ (list-ref gnc:*tip-list* (gnc:current-tip-number))))
-
-(define (gnc:reset-tip-number)
- (let ((opt (gnc:lookup-global-option "__tips" "current_tip_number")))
- (gnc:option-set-value opt 0)))
-
-(define (gnc:increment-tip-number)
- (let ((new-value (+ (gnc:current-tip-number) 1))
- (opt (gnc:lookup-global-option "__tips" "current_tip_number")))
- (if (< new-value (gnc:config-var-value-get gnc:*number-of-tips*))
- (gnc:option-set-value opt new-value)
- (gnc:option-set-value opt 0))))
-
-(define (gnc:decrement-tip-number)
- (let ((new-value (- (gnc:current-tip-number) 1))
- (opt (gnc:lookup-global-option "__tips" "current_tip_number")))
- (if (< new-value 0)
- (gnc:option-set-value opt (- (gnc:config-var-value-get
- gnc:*number-of-tips*) 1))
- (gnc:option-set-value opt new-value))))
-
-(define (gnc:tip-of-the-day-startup-func)
- (let ((tip-opt (gnc:lookup-global-option "General"
- "Display \"Tip of the Day\"")))
- (if (gnc:option-value tip-opt)
- (gnc:totd-dialog-create-and-run))))
-
-(define (gnc:initialize-tip-of-the-day)
- (set! gnc:*tip-file*
- (gnc:make-config-var
- "Tip file"
- (lambda (var value) (if (string? value) (list value) #f))
- string=?
- "tip-list.scm"))
-
- (gnc:register-configuration-option
- (gnc:make-internal-option "__tips" "current_tip_number" 0))
-
- (gnc:read-tips)
-
- (gnc:hook-add-dangler gnc:*ui-startup-hook* gnc:tip-of-the-day-startup-func))
More information about the gnucash-changes
mailing list