From 5640eeec3af37bd1551a71700e29d02ab7f4de69 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Mon, 26 Jun 2000 19:38:45 +0000 Subject: [PATCH] Robert Graham Merkel's tip-of-the-day patch. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2516 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 31 ++ README | 25 +- po/gnucash.pot | 767 +++++++++++++++++++------------------ src/gnome/Makefile.am | 2 + src/gnome/Makefile.in | 12 +- src/gnome/dialog-totd.c | 276 +++++++++++++ src/gnome/dialog-totd.h | 28 ++ src/gnome/window-main.c | 17 + src/messages_i18n.h | 10 + src/scm/Makefile.am | 2 + src/scm/Makefile.in | 2 +- src/scm/config-var.scm | 2 + src/scm/hooks.scm | 2 + src/scm/prefs.scm | 6 + src/scm/startup.scm | 1 + src/scm/tip-list.scm | 5 + src/scm/tip-of-the-day.scm | 110 ++++++ 17 files changed, 906 insertions(+), 392 deletions(-) create mode 100644 src/gnome/dialog-totd.c create mode 100644 src/gnome/dialog-totd.h create mode 100644 src/scm/tip-list.scm create mode 100644 src/scm/tip-of-the-day.scm diff --git a/ChangeLog b/ChangeLog index 503475e9d5..136c28e42d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2000-06-26 Robert Graham Merkel + + * src/guile/global-options.[ch] (gnc_option_refresh_ui_by_name): + New function to make refreshing the GUI options possible from C as + well as scheme. + (gnc_set_boolean_option): C function to set boolean options from + outside the options dialog. + + * src/gnome/dialog-totd.[ch]: New files containing the GUI + functions for doing tips of the day. + + * src/guile/tip-of-the-day.[ch]: New files with a C interface for + the scheme tip of the day engine. + + * src/guile/option-util.[ch] (gnc_option_db_set_boolean_option): + New function to set a boolean option. + + * src/scm/tip-of-the-day.scm: New file: an interface for reading + in and passing tips to the gui in text form. + + * src/scm/tip-list.scm: A list of tips as a Scheme list. File + should probably be shifted somewhere else. + + * src/scm/startup.scm: Loads tip-of-the-day.scm + + * src/scm/prefs.scm: Add an option for displaying tips of the day + at startup. Also added gnc:support line. + + * src/gnome/window-main.c (gnc_ui_totd_cb): Added menu entries and + callbacks to add "tips of the day" to help menu. + 2000-06-23 Dave Peticolas * src/gnome/dialog-utils.c (gnc_window_adjust_for_screen): new diff --git a/README b/README index 4de9ee0e72..e489b77daf 100644 --- a/README +++ b/README @@ -1,15 +1,18 @@ -########################################################################### - DEVELOPMENT RELEASE +============================================================ + Gnucash 1.5.x README file. -The version 1.3.x series of GnuCash are experimental development -releases. They may or may not work. Use at your own risk. +NOTE: THIS IS A DEVELOPMENT RELEASE!!! THIS VERSION HAS NOT +BEEN TESTED PROPERLY AND MAY DO ABSOLUTELY ANYTHING! -The last stable, production version was gnucash-1.2.5. -The next stable, production version will be gnucash-1.4.x +USE AT YOUR OWN RISK (AND KEEP *LOTS* OF BACKUPS) -########################################################################### +If you want something a bit more tested, please use the +1.4 stable series. +------------------------------------------------------------ +================== Table of Contents: +------------------ - Overview - Upgrading from 1.2.x @@ -342,14 +345,10 @@ Supported OS's GnuCash 1.3.x is known to work with the following operating systems: -GNU/Linux -- x86 & Alpha +GNU/Linux -- x86, Sparc, Alpha Solaris -- Sparc FreeBSD -- x86 - -It probably works with the following : - -OpenBSD -- x86 (needs to be confirmed one way or another) - +OpenBSD -- x86 Previous versions have been known to work on the following platforms, but their current status is unknown: diff --git a/po/gnucash.pot b/po/gnucash.pot index 365fcbd263..984bee1a57 100644 --- a/po/gnucash.pot +++ b/po/gnucash.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-06-20 01:58-0700\n" +"POT-Creation-Date: 2000-06-26 13:15-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -283,31 +283,38 @@ msgid "Warning! This is a reconciled transaction. Do you want do continue?" msgstr "" #: messages-i18n.c:54 +msgid "" +"You have disabled \"Tip of the Day\"\n" +"You can re-enable them from the General\n" +"section of the Preferences menu" +msgstr "" + +#: messages-i18n.c:55 #, c-format msgid "" "You cannot transfer funds from the %s account.\n" "It does not have a matching currency." msgstr "" -#: messages-i18n.c:55 +#: messages-i18n.c:56 msgid "Error executing scheme report." msgstr "" -#: messages-i18n.c:56 +#: messages-i18n.c:57 msgid "This report has no parameters." msgstr "" -#: messages-i18n.c:57 +#: messages-i18n.c:58 msgid "Show the income and expense accounts." msgstr "" -#: messages-i18n.c:58 +#: messages-i18n.c:59 msgid "" "The current transaction has been changed.\n" "Would you like to record it?" msgstr "" -#: messages-i18n.c:59 +#: messages-i18n.c:60 #, c-format msgid "" "Are you sure you want to delete\n" @@ -316,21 +323,21 @@ msgid "" " %s ?" msgstr "" -#: messages-i18n.c:60 +#: messages-i18n.c:61 msgid "Are you sure you want to delete the current transaction?" msgstr "" -#: messages-i18n.c:61 +#: messages-i18n.c:62 msgid "Recalculate Transaction" msgstr "" -#: messages-i18n.c:62 +#: messages-i18n.c:63 msgid "" "The values entered for this transaction are inconsistent.\n" "Which value would you like to have recalculated?\n" msgstr "" -#: messages-i18n.c:63 +#: messages-i18n.c:64 #, c-format msgid "" "The types of all the parent accounts and their subaccounts must be changed " @@ -338,1381 +345,1397 @@ msgid "" "Is that what you want to do?" msgstr "" -#: messages-i18n.c:64 +#: messages-i18n.c:65 #, c-format msgid "" "The types of all the subaccounts must be changed to %s.\n" "Is that what you want to do?" msgstr "" -#: messages-i18n.c:65 +#: messages-i18n.c:66 msgid "The following changes must be made. Continue?" msgstr "" -#: messages-i18n.c:66 +#: messages-i18n.c:67 msgid "" "There must be at least two accounts\n" "created before you can transfer funds." msgstr "" -#: messages-i18n.c:67 +#: messages-i18n.c:68 msgid "" "You cannot transfer between those accounts.\n" "They do not have a common currency." msgstr "" -#: messages-i18n.c:68 +#: messages-i18n.c:69 msgid "" "The \"From\" and \"To\" accounts\n" " must be different!" msgstr "" -#: messages-i18n.c:69 +#: messages-i18n.c:70 msgid "You can't transfer from and to the same account!" msgstr "" -#: messages-i18n.c:70 +#: messages-i18n.c:71 msgid "" "You must specify an account to transfer from,\n" "or to, or both, for this transaction.\n" "Otherwise, it will not be recorded." msgstr "" -#: messages-i18n.c:71 +#: messages-i18n.c:72 msgid "Adjust the balance of the selected account" msgstr "" -#: messages-i18n.c:72 +#: messages-i18n.c:73 msgid "Enter the new balance" msgstr "" -#: messages-i18n.c:73 +#: messages-i18n.c:74 msgid "Enter the date you want the balance adjusted" msgstr "" -#: messages-i18n.c:74 +#: messages-i18n.c:75 msgid "Adjust the ending balance" msgstr "" -#: messages-i18n.c:75 +#: messages-i18n.c:76 msgid "Adjust the balance of the main account for this register" msgstr "" -#: messages-i18n.c:76 po/guile_strings.txt:120 +#: messages-i18n.c:77 po/guile_strings.txt:120 msgid "Double line mode with a multi-line cursor" msgstr "" -#: messages-i18n.c:77 po/guile_strings.txt:121 +#: messages-i18n.c:78 po/guile_strings.txt:121 msgid "Single line mode with a multi-line cursor" msgstr "" -#: messages-i18n.c:78 +#: messages-i18n.c:79 msgid "Move to the blank transaction at the bottom of the register" msgstr "" -#: messages-i18n.c:79 +#: messages-i18n.c:80 msgid "Cancel the current transaction" msgstr "" -#: messages-i18n.c:80 +#: messages-i18n.c:81 msgid "Close this HTML window" msgstr "" -#: messages-i18n.c:81 +#: messages-i18n.c:82 msgid "Close this register window" msgstr "" -#: messages-i18n.c:82 +#: messages-i18n.c:83 msgid "Copy the selected transaction" msgstr "" -#: messages-i18n.c:83 +#: messages-i18n.c:84 msgid "Enter a 3-letter ISO currency code such as USD (US Dollars)" msgstr "" -#: messages-i18n.c:84 +#: messages-i18n.c:85 msgid "Cut the selected transaction" msgstr "" -#: messages-i18n.c:85 +#: messages-i18n.c:86 msgid "Set the date range of this register" msgstr "" -#: messages-i18n.c:86 +#: messages-i18n.c:87 msgid "Delete selected account" msgstr "" -#: messages-i18n.c:87 +#: messages-i18n.c:88 msgid "Delete the current transaction" msgstr "" -#: messages-i18n.c:88 po/guile_strings.txt:148 +#: messages-i18n.c:89 po/guile_strings.txt:148 msgid "Show transactions on two lines with more information" msgstr "" -#: messages-i18n.c:89 +#: messages-i18n.c:90 msgid "Make a copy of the current transaction" msgstr "" -#: messages-i18n.c:90 +#: messages-i18n.c:91 msgid "Edit the selected account" msgstr "" -#: messages-i18n.c:91 +#: messages-i18n.c:92 msgid "Edit the main account for this register" msgstr "" -#: messages-i18n.c:92 +#: messages-i18n.c:93 msgid "Edit the current transaction" msgstr "" -#: messages-i18n.c:93 +#: messages-i18n.c:94 msgid "Exit GnuCash" msgstr "" -#: messages-i18n.c:94 +#: messages-i18n.c:95 msgid "Export HTML-formatted report to file" msgstr "" -#: messages-i18n.c:95 +#: messages-i18n.c:96 msgid "Find transactions with a search." msgstr "" -#: messages-i18n.c:96 +#: messages-i18n.c:97 msgid "Open the GnuCash help window" msgstr "" -#: messages-i18n.c:97 +#: messages-i18n.c:98 msgid "Move back one step in the history" msgstr "" -#: messages-i18n.c:98 +#: messages-i18n.c:99 msgid "Move forward one step in the history" msgstr "" -#: messages-i18n.c:99 +#: messages-i18n.c:100 msgid "Import a Quicken QIF file" msgstr "" -#: messages-i18n.c:100 +#: messages-i18n.c:101 msgid "Jump to the corresponding transaction in the other account" msgstr "" -#: messages-i18n.c:101 +#: messages-i18n.c:102 msgid "Open the GnuCash Manual" msgstr "" -#: messages-i18n.c:102 +#: messages-i18n.c:103 msgid "Show transactions on multiple lines with one line for each split" msgstr "" -#: messages-i18n.c:103 +#: messages-i18n.c:104 msgid "" "This transaction has multiple splits; switch to multi-line mode to see them " "all" msgstr "" -#: messages-i18n.c:104 +#: messages-i18n.c:105 msgid "Create a new account" msgstr "" -#: messages-i18n.c:105 +#: messages-i18n.c:106 msgid "Create a new file" msgstr "" -#: messages-i18n.c:106 +#: messages-i18n.c:107 msgid "Add a new transaction to the account" msgstr "" -#: messages-i18n.c:107 +#: messages-i18n.c:108 msgid "Open the selected account" msgstr "" -#: messages-i18n.c:108 +#: messages-i18n.c:109 msgid "Open the account" msgstr "" -#: messages-i18n.c:109 +#: messages-i18n.c:110 msgid "Open the selected account and all its subaccounts" msgstr "" -#: messages-i18n.c:110 +#: messages-i18n.c:111 msgid "Open a file" msgstr "" -#: messages-i18n.c:111 +#: messages-i18n.c:112 msgid "Paste the transaction clipboard" msgstr "" -#: messages-i18n.c:112 +#: messages-i18n.c:113 msgid "Open the global preferences dialog" msgstr "" -#: messages-i18n.c:113 +#: messages-i18n.c:114 msgid "Print a check using a standard format" msgstr "" -#: messages-i18n.c:114 +#: messages-i18n.c:115 msgid "Reconcile the selected account" msgstr "" -#: messages-i18n.c:115 +#: messages-i18n.c:116 msgid "Cancel the reconciliation of this account" msgstr "" -#: messages-i18n.c:116 +#: messages-i18n.c:117 msgid "Finish the reconciliation of this account" msgstr "" -#: messages-i18n.c:117 +#: messages-i18n.c:118 msgid "" "Change the reconcile information including statement date and ending balance." msgstr "" -#: messages-i18n.c:118 +#: messages-i18n.c:119 msgid "Reconcile the main account for this register" msgstr "" -#: messages-i18n.c:119 +#: messages-i18n.c:120 msgid "Record the current transaction" msgstr "" -#: messages-i18n.c:120 +#: messages-i18n.c:121 msgid "Set the parameters for this report" msgstr "" -#: messages-i18n.c:121 +#: messages-i18n.c:122 msgid "Save the file to disk" msgstr "" -#: messages-i18n.c:122 +#: messages-i18n.c:123 msgid "Identify and fix problems in the account" msgstr "" -#: messages-i18n.c:123 +#: messages-i18n.c:124 msgid "Identify and fix problems in all the accounts" msgstr "" -#: messages-i18n.c:124 +#: messages-i18n.c:125 msgid "Identify and fix problems in the account and its subaccounts" msgstr "" -#: messages-i18n.c:125 +#: messages-i18n.c:126 msgid "Identify and fix problems in the accounts of this register" msgstr "" -#: messages-i18n.c:126 +#: messages-i18n.c:127 msgid "Set the option to its default value" msgstr "" -#: messages-i18n.c:127 +#: messages-i18n.c:128 msgid "Show all of the transactions in the account" msgstr "" -#: messages-i18n.c:128 po/guile_strings.txt:152 +#: messages-i18n.c:129 po/guile_strings.txt:152 msgid "Show transactions on single lines" msgstr "" -#: messages-i18n.c:129 messages-i18n.c:256 +#: messages-i18n.c:130 messages-i18n.c:260 msgid "Sort by Amount" msgstr "" -#: messages-i18n.c:130 messages-i18n.c:257 +#: messages-i18n.c:131 messages-i18n.c:261 msgid "Sort by Date" msgstr "" -#: messages-i18n.c:131 messages-i18n.c:258 +#: messages-i18n.c:132 messages-i18n.c:262 msgid "Sort by Description" msgstr "" -#: messages-i18n.c:132 +#: messages-i18n.c:133 msgid "Sort by the date of entry" msgstr "" -#: messages-i18n.c:133 messages-i18n.c:260 +#: messages-i18n.c:134 messages-i18n.c:264 msgid "Sort by Memo" msgstr "" -#: messages-i18n.c:134 messages-i18n.c:261 +#: messages-i18n.c:135 messages-i18n.c:265 msgid "Sort by Num" msgstr "" -#: messages-i18n.c:135 +#: messages-i18n.c:136 msgid "Sort by the statement date (unreconciled items last" msgstr "" -#: messages-i18n.c:136 +#: messages-i18n.c:137 msgid "Keep normal account order" msgstr "" -#: messages-i18n.c:137 -msgid "Transfer funds from one account to another" -msgstr "" - #: messages-i18n.c:138 -msgid "Enter the type of transaction, or choose one from the list" +msgid "Tips of the Day" msgstr "" #: messages-i18n.c:139 -msgid "Enter a description of the transaction" +msgid "Transfer funds from one account to another" msgstr "" #: messages-i18n.c:140 -msgid "Enter a description of the split" +msgid "Enter the type of transaction, or choose one from the list" msgstr "" #: messages-i18n.c:141 -msgid "Enter the transaction number, such as the check number" +msgid "Enter a description of the transaction" msgstr "" #: messages-i18n.c:142 -msgid "Enter the share price" +msgid "Enter a description of the split" msgstr "" #: messages-i18n.c:143 -msgid "Enter the number of shares sold" +msgid "Enter the transaction number, such as the check number" msgstr "" #: messages-i18n.c:144 -msgid "Enter the total value of the shares" +msgid "Enter the share price" msgstr "" #: messages-i18n.c:145 -msgid "Enter the account to transfer from, or choose one from the list" +msgid "Enter the number of shares sold" msgstr "" #: messages-i18n.c:146 -msgid "Enter the account to transfer to, or choose one from the list" +msgid "Enter the total value of the shares" msgstr "" #: messages-i18n.c:147 -msgid "_Account" +msgid "Enter the account to transfer from, or choose one from the list" msgstr "" #: messages-i18n.c:148 -msgid "_Accounts" +msgid "Enter the account to transfer to, or choose one from the list" msgstr "" #: messages-i18n.c:149 -msgid "_Adjust Balance" +msgid "_Account" msgstr "" #: messages-i18n.c:150 -msgid "_Adjust Balance..." +msgid "_Accounts" msgstr "" #: messages-i18n.c:151 -msgid "_Blank" +msgid "_Adjust Balance" msgstr "" #: messages-i18n.c:152 -msgid "_Cancel" +msgid "_Adjust Balance..." msgstr "" #: messages-i18n.c:153 -msgid "Copy Transaction" +msgid "_Blank" msgstr "" #: messages-i18n.c:154 -msgid "Cut Transaction" +msgid "_Cancel" msgstr "" #: messages-i18n.c:155 -msgid "_Date Range" +msgid "Copy Transaction" msgstr "" #: messages-i18n.c:156 -msgid "_Delete Account" +msgid "Cut Transaction" msgstr "" #: messages-i18n.c:157 -msgid "_Delete" +msgid "_Date Range" msgstr "" #: messages-i18n.c:158 -msgid "D_uplicate" +msgid "_Delete Account" msgstr "" #: messages-i18n.c:159 -msgid "_Edit" +msgid "_Delete" msgstr "" #: messages-i18n.c:160 -msgid "_Edit Account" +msgid "D_uplicate" msgstr "" #: messages-i18n.c:161 -msgid "_Ending Balance" +msgid "_Edit" msgstr "" #: messages-i18n.c:162 -msgid "_Ending Balance..." +msgid "_Edit Account" msgstr "" #: messages-i18n.c:163 -msgid "_Finish" +msgid "_Ending Balance" msgstr "" #: messages-i18n.c:164 -msgid "_Help" +msgid "_Ending Balance..." msgstr "" #: messages-i18n.c:165 -msgid "_Jump" +msgid "_Finish" msgstr "" #: messages-i18n.c:166 -msgid "_Manual" +msgid "_Help" msgstr "" #: messages-i18n.c:167 -msgid "_New" +msgid "_Jump" msgstr "" #: messages-i18n.c:168 -msgid "_New Account" +msgid "_Manual" msgstr "" #: messages-i18n.c:169 -msgid "_New Account..." +msgid "_New" msgstr "" #: messages-i18n.c:170 -msgid "_Open Account" +msgid "_New Account" msgstr "" #: messages-i18n.c:171 -msgid "Open S_ubaccounts" +msgid "_New Account..." msgstr "" #: messages-i18n.c:172 -msgid "Paste Transaction" +msgid "_Open Account" msgstr "" #: messages-i18n.c:173 -msgid "_Preferences" +msgid "Open S_ubaccounts" msgstr "" #: messages-i18n.c:174 -msgid "_Preferences..." +msgid "Paste Transaction" msgstr "" #: messages-i18n.c:175 -msgid "_Print Check... (unfinished!)" +msgid "_Preferences" msgstr "" #: messages-i18n.c:176 -msgid "_Reconcile Information..." +msgid "_Preferences..." msgstr "" #: messages-i18n.c:177 -msgid "_Reconcile..." +msgid "_Print Check... (unfinished!)" msgstr "" #: messages-i18n.c:178 -msgid "_Reconcile" +msgid "_Reconcile Information..." msgstr "" #: messages-i18n.c:179 -msgid "_Record" +msgid "_Reconcile..." msgstr "" #: messages-i18n.c:180 -msgid "_Register" +msgid "_Reconcile" msgstr "" #: messages-i18n.c:181 -msgid "_Scrub" +msgid "_Record" msgstr "" #: messages-i18n.c:182 -msgid "Scrub A_ccount" +msgid "_Register" msgstr "" #: messages-i18n.c:183 -msgid "Scrub A_ll" +msgid "_Scrub" msgstr "" #: messages-i18n.c:184 -msgid "Scrub Su_baccounts" +msgid "Scrub A_ccount" msgstr "" #: messages-i18n.c:185 -msgid "Set _Range..." +msgid "Scrub A_ll" msgstr "" #: messages-i18n.c:186 -msgid "Set _Range" +msgid "Scrub Su_baccounts" msgstr "" #: messages-i18n.c:187 -msgid "Show _All" +msgid "Set _Range..." msgstr "" #: messages-i18n.c:188 -msgid "Sort _Order" +msgid "Set _Range" msgstr "" #: messages-i18n.c:189 -msgid "_Style" +msgid "Show _All" msgstr "" #: messages-i18n.c:190 -msgid "_Transaction" +msgid "Sort _Order" msgstr "" #: messages-i18n.c:191 -msgid "_Transfer" +msgid "_Style" msgstr "" #: messages-i18n.c:192 -msgid "_Transfer..." +msgid "_Tips Of The Day" msgstr "" #: messages-i18n.c:193 -msgid "Account Code" +msgid "_Transaction" msgstr "" -#: messages-i18n.c:194 po/guile_strings.txt:7 -msgid "Account Name" +#: messages-i18n.c:194 +msgid "_Transfer" msgstr "" #: messages-i18n.c:195 -msgid "Account Type" +msgid "_Transfer..." msgstr "" #: messages-i18n.c:196 -msgid "Adjust Balance" +msgid "Account Code" msgstr "" -#: messages-i18n.c:197 po/guile_strings.txt:310 -msgid "Auto Double" +#: messages-i18n.c:197 po/guile_strings.txt:7 +msgid "Account Name" msgstr "" -#: messages-i18n.c:198 po/guile_strings.txt:71 -msgid "Auto Single" +#: messages-i18n.c:198 +msgid "Account Type" msgstr "" #: messages-i18n.c:199 -msgid "Clear All" +msgid "Adjust Balance" msgstr "" -#: messages-i18n.c:200 -msgid "Close Window" +#: messages-i18n.c:200 po/guile_strings.txt:310 +msgid "Auto Double" msgstr "" -#: messages-i18n.c:201 -msgid "Credit Card" +#: messages-i18n.c:201 po/guile_strings.txt:71 +msgid "Auto Single" msgstr "" #: messages-i18n.c:202 -msgid "Credit Line" +msgid "Clear All" msgstr "" #: messages-i18n.c:203 -msgid "Date Range" +msgid "Close Window" msgstr "" #: messages-i18n.c:204 -msgid "Delete Account" +msgid "Credit Card" msgstr "" #: messages-i18n.c:205 -msgid "Delete Transaction" +msgid "Credit Line" msgstr "" -#: messages-i18n.c:206 po/guile_strings.txt:22 -msgid "Double Line" +#: messages-i18n.c:206 +msgid "Date Range" msgstr "" #: messages-i18n.c:207 -msgid "Edit Account" +msgid "Delete Account" msgstr "" #: messages-i18n.c:208 -msgid "Ending Balance" +msgid "Delete Transaction" msgstr "" #: messages-i18n.c:209 -msgid "End date" +msgid "Display this dialog next time" msgstr "" -#: messages-i18n.c:210 -msgid "Export To" +#: messages-i18n.c:210 po/guile_strings.txt:22 +msgid "Double Line" msgstr "" #: messages-i18n.c:211 -msgid "Finish" +msgid "Edit Account" msgstr "" #: messages-i18n.c:212 -msgid "From Now" +msgid "Ending Balance" msgstr "" #: messages-i18n.c:213 -msgid "General Ledger" +msgid "End date" msgstr "" #: messages-i18n.c:214 -msgid "Hide Inc/Exp" +msgid "Export To" msgstr "" #: messages-i18n.c:215 -msgid "Import QIF..." +msgid "Finish" msgstr "" #: messages-i18n.c:216 -msgid "Import QIF" +msgid "From Now" msgstr "" #: messages-i18n.c:217 -msgid "Lost Accounts" +msgid "General Ledger" msgstr "" #: messages-i18n.c:218 -msgid "Money Market" +msgid "Hide Inc/Exp" msgstr "" -#: messages-i18n.c:219 po/guile_strings.txt:58 -msgid "Multi Line" +#: messages-i18n.c:219 +msgid "Import QIF..." msgstr "" -#: messages-i18n.c:220 po/guile_strings.txt:4 -msgid "Mutual Fund" +#: messages-i18n.c:220 +msgid "Import QIF" msgstr "" #: messages-i18n.c:221 -msgid "New Account" +msgid "Lost Accounts" msgstr "" #: messages-i18n.c:222 -msgid "New Balance" +msgid "Money Market" msgstr "" -#: messages-i18n.c:223 -msgid "New File" +#: messages-i18n.c:223 po/guile_strings.txt:58 +msgid "Multi Line" msgstr "" -#: messages-i18n.c:224 -msgid "New top level account" +#: messages-i18n.c:224 po/guile_strings.txt:4 +msgid "Mutual Fund" msgstr "" #: messages-i18n.c:225 -msgid "New Value" +msgid "New Account" msgstr "" #: messages-i18n.c:226 -msgid "No description" +msgid "New Balance" msgstr "" #: messages-i18n.c:227 -msgid "Old Value" +msgid "New File" msgstr "" #: messages-i18n.c:228 -msgid "Open Account" +msgid "New top level account" msgstr "" -#: messages-i18n.c:229 po/guile_strings.txt:113 -msgid "Opening Balance" +#: messages-i18n.c:229 +msgid "New Value" msgstr "" #: messages-i18n.c:230 -msgid "Open File" +msgid "No description" msgstr "" #: messages-i18n.c:231 -msgid "Open Subaccounts" +msgid "Old Value" msgstr "" #: messages-i18n.c:232 -msgid "Pick One" +msgid "Open Account" msgstr "" -#: messages-i18n.c:233 -msgid "Parent Account" +#: messages-i18n.c:233 po/guile_strings.txt:113 +msgid "Opening Balance" msgstr "" #: messages-i18n.c:234 -msgid "Previous Balance" +msgid "Open File" msgstr "" #: messages-i18n.c:235 -msgid "Purch Price" +msgid "Open Subaccounts" msgstr "" #: messages-i18n.c:236 -msgid "Price Quote Source" +msgid "Pick One" msgstr "" #: messages-i18n.c:237 -msgid "Reconciled Balance" +msgid "Parent Account" msgstr "" #: messages-i18n.c:238 -msgid "Reconcile Information" +msgid "Previous Balance" msgstr "" #: messages-i18n.c:239 -msgid "Register date ranges" +msgid "Purch Price" msgstr "" #: messages-i18n.c:240 -msgid "Sale Price" +msgid "Price Quote Source" msgstr "" #: messages-i18n.c:241 -msgid "Save As" +msgid "Reconciled Balance" msgstr "" #: messages-i18n.c:242 -msgid "Scrub Account" +msgid "Reconcile Information" msgstr "" #: messages-i18n.c:243 -msgid "Scrub All" +msgid "Register date ranges" msgstr "" #: messages-i18n.c:244 -msgid "Scrub Subaccounts" +msgid "Sale Price" msgstr "" #: messages-i18n.c:245 -msgid "Select All" +msgid "Save As" msgstr "" #: messages-i18n.c:246 -msgid "Select Default" +msgid "Scrub Account" msgstr "" #: messages-i18n.c:247 -msgid "Set Date Range" +msgid "Scrub All" msgstr "" #: messages-i18n.c:248 -msgid "Set Range" +msgid "Scrub Subaccounts" msgstr "" #: messages-i18n.c:249 -msgid "Set to default" +msgid "Select All" msgstr "" #: messages-i18n.c:250 -msgid "Set Up Account" +msgid "Select Default" msgstr "" #: messages-i18n.c:251 -msgid "Show All" +msgid "Set Date Range" msgstr "" #: messages-i18n.c:252 -msgid "Show Income/Expense" +msgid "Set Range" msgstr "" #: messages-i18n.c:253 -msgid "Show Earliest" +msgid "Set to default" msgstr "" #: messages-i18n.c:254 +msgid "Set Up Account" +msgstr "" + +#: messages-i18n.c:255 +msgid "Show All" +msgstr "" + +#: messages-i18n.c:256 +msgid "Show Income/Expense" +msgstr "" + +#: messages-i18n.c:257 +msgid "Show Earliest" +msgstr "" + +#: messages-i18n.c:258 msgid "Show Latest" msgstr "" -#: messages-i18n.c:255 po/guile_strings.txt:190 +#: messages-i18n.c:259 po/guile_strings.txt:190 msgid "Single Line" msgstr "" -#: messages-i18n.c:259 +#: messages-i18n.c:263 msgid "Sort by date of entry" msgstr "" -#: messages-i18n.c:262 +#: messages-i18n.c:266 msgid "Sort by statement date" msgstr "" -#: messages-i18n.c:263 +#: messages-i18n.c:267 msgid "Sort Order" msgstr "" -#: messages-i18n.c:264 +#: messages-i18n.c:268 msgid "Start date" msgstr "" -#: messages-i18n.c:265 +#: messages-i18n.c:269 msgid "Starting Balance" msgstr "" -#: messages-i18n.c:266 +#: messages-i18n.c:270 msgid "Standard order" msgstr "" -#: messages-i18n.c:267 +#: messages-i18n.c:271 msgid "Statement Date:" msgstr "" -#: messages-i18n.c:268 -msgid "Top level account" -msgstr "" - -#: messages-i18n.c:269 -msgid "Total Shares" -msgstr "" - -#: messages-i18n.c:270 -msgid "Verify Changes" -msgstr "" - -#: messages-i18n.c:271 -msgid "Transfer Information" -msgstr "" - #: messages-i18n.c:272 -msgid "Transfer Money" +msgid "Tip of the Day:" msgstr "" #: messages-i18n.c:273 -msgid "Transfer From" +msgid "Top level account" msgstr "" #: messages-i18n.c:274 -msgid "Transfer To" +msgid "Total Shares" msgstr "" #: messages-i18n.c:275 +msgid "Verify Changes" +msgstr "" + +#: messages-i18n.c:276 +msgid "Transfer Information" +msgstr "" + +#: messages-i18n.c:277 +msgid "Transfer Money" +msgstr "" + +#: messages-i18n.c:278 +msgid "Transfer From" +msgstr "" + +#: messages-i18n.c:279 +msgid "Transfer To" +msgstr "" + +#: messages-i18n.c:280 msgid "About" msgstr "" -#: messages-i18n.c:276 po/guile_strings.txt:65 +#: messages-i18n.c:281 po/guile_strings.txt:65 #: src/gnome/glade-gnc-dialogs.c:1784 msgid "Account" msgstr "" -#: messages-i18n.c:277 src/gnome/glade-gnc-dialogs.c:302 +#: messages-i18n.c:282 src/gnome/glade-gnc-dialogs.c:302 #: src/gnome/glade-gnc-dialogs.c:462 msgid "Accounts" msgstr "" -#: messages-i18n.c:278 +#: messages-i18n.c:283 msgid "Account Information" msgstr "" -#: messages-i18n.c:279 +#: messages-i18n.c:284 msgid "AutoDep" msgstr "" -#: messages-i18n.c:280 src/gnome/glade-gnc-dialogs.c:2398 +#: messages-i18n.c:285 src/gnome/glade-gnc-dialogs.c:2398 msgid "Action" msgstr "" -#: messages-i18n.c:281 +#: messages-i18n.c:286 msgid "Activities" msgstr "" -#: messages-i18n.c:282 +#: messages-i18n.c:287 msgid "Ago" msgstr "" -#: messages-i18n.c:283 po/guile_strings.txt:57 +#: messages-i18n.c:288 po/guile_strings.txt:57 #: src/gnome/glade-gnc-dialogs.c:2138 msgid "Amount" msgstr "" -#: messages-i18n.c:284 po/guile_strings.txt:239 +#: messages-i18n.c:289 po/guile_strings.txt:239 msgid "Appreciation" msgstr "" -#: messages-i18n.c:285 +#: messages-i18n.c:290 msgid "Phone" msgstr "" -#: messages-i18n.c:286 po/guile_strings.txt:174 +#: messages-i18n.c:291 po/guile_strings.txt:174 #: src/gnome/glade-gnc-dialogs.c:567 msgid "Asset" msgstr "" -#: messages-i18n.c:287 +#: messages-i18n.c:292 msgid "Assets" msgstr "" -#: messages-i18n.c:288 +#: messages-i18n.c:293 msgid "ATM" msgstr "" -#: messages-i18n.c:289 +#: messages-i18n.c:294 msgid "Back" msgstr "" -#: messages-i18n.c:290 messages-i18n.c:291 po/guile_strings.txt:13 +#: messages-i18n.c:295 messages-i18n.c:296 po/guile_strings.txt:13 msgid "Balance" msgstr "" -#: messages-i18n.c:292 po/guile_strings.txt:107 +#: messages-i18n.c:297 po/guile_strings.txt:107 #: src/gnome/glade-gnc-dialogs.c:561 msgid "Bank" msgstr "" -#: messages-i18n.c:293 +#: messages-i18n.c:298 msgid "Blank" msgstr "" -#: messages-i18n.c:294 po/guile_strings.txt:124 +#: messages-i18n.c:299 po/guile_strings.txt:124 msgid "Bought" msgstr "" -#: messages-i18n.c:295 +#: messages-i18n.c:300 msgid "Buy" msgstr "" -#: messages-i18n.c:296 +#: messages-i18n.c:301 msgid "Cancel" msgstr "" -#: messages-i18n.c:297 po/guile_strings.txt:137 +#: messages-i18n.c:302 po/guile_strings.txt:137 #: src/gnome/glade-gnc-dialogs.c:564 msgid "Cash" msgstr "" -#: messages-i18n.c:298 +#: messages-i18n.c:303 msgid "Changed" msgstr "" -#: messages-i18n.c:299 po/guile_strings.txt:205 +#: messages-i18n.c:304 po/guile_strings.txt:205 msgid "Charge" msgstr "" -#: messages-i18n.c:300 +#: messages-i18n.c:305 msgid "Check" msgstr "" -#: messages-i18n.c:301 +#: messages-i18n.c:306 msgid "Checking" msgstr "" -#: messages-i18n.c:302 src/gnome/glade-gnc-dialogs.c:2449 +#: messages-i18n.c:307 src/gnome/glade-gnc-dialogs.c:2449 msgid "Cleared" msgstr "" -#: messages-i18n.c:303 +#: messages-i18n.c:308 msgid "Close" msgstr "" -#: messages-i18n.c:304 +#: messages-i18n.c:309 msgid "Commit" msgstr "" -#: messages-i18n.c:305 +#: messages-i18n.c:310 msgid "Create" msgstr "" -#: messages-i18n.c:306 po/guile_strings.txt:254 +#: messages-i18n.c:311 po/guile_strings.txt:254 #: src/gnome/glade-gnc-dialogs.c:570 src/gnome/glade-gnc-dialogs.c:2082 msgid "Credit" msgstr "" -#: messages-i18n.c:307 +#: messages-i18n.c:312 msgid "Credits" msgstr "" -#: messages-i18n.c:308 po/guile_strings.txt:134 +#: messages-i18n.c:313 po/guile_strings.txt:134 #: src/gnome/glade-gnc-dialogs.c:582 msgid "Currency" msgstr "" -#: messages-i18n.c:309 po/guile_strings.txt:6 +#: messages-i18n.c:314 po/guile_strings.txt:6 #: src/gnome/glade-gnc-dialogs.c:1920 msgid "Date" msgstr "" -#: messages-i18n.c:310 +#: messages-i18n.c:315 msgid "Days" msgstr "" -#: messages-i18n.c:311 po/guile_strings.txt:38 +#: messages-i18n.c:316 po/guile_strings.txt:38 #: src/gnome/glade-gnc-dialogs.c:2085 msgid "Debit" msgstr "" -#: messages-i18n.c:312 +#: messages-i18n.c:317 msgid "Debits" msgstr "" -#: messages-i18n.c:313 +#: messages-i18n.c:318 msgid "Decrease" msgstr "" -#: messages-i18n.c:314 +#: messages-i18n.c:319 msgid "Deficit" msgstr "" -#: messages-i18n.c:315 src/gnome/glade-gnc-dialogs.c:2868 +#: messages-i18n.c:320 src/gnome/glade-gnc-dialogs.c:2868 msgid "Delete" msgstr "" -#: messages-i18n.c:316 po/guile_strings.txt:200 +#: messages-i18n.c:321 po/guile_strings.txt:200 msgid "Deposit" msgstr "" -#: messages-i18n.c:317 po/guile_strings.txt:160 +#: messages-i18n.c:322 po/guile_strings.txt:160 msgid "Depreciation" msgstr "" -#: messages-i18n.c:318 po/guile_strings.txt:153 +#: messages-i18n.c:323 po/guile_strings.txt:153 #: src/gnome/glade-gnc-dialogs.c:1978 msgid "Description" msgstr "" -#: messages-i18n.c:319 +#: messages-i18n.c:324 msgid "Difference" msgstr "" -#: messages-i18n.c:320 +#: messages-i18n.c:325 msgid "Direct Debit" msgstr "" -#: messages-i18n.c:321 +#: messages-i18n.c:326 msgid "Dist" msgstr "" -#: messages-i18n.c:322 +#: messages-i18n.c:327 msgid "Div" msgstr "" -#: messages-i18n.c:323 +#: messages-i18n.c:328 msgid "Duplicate" msgstr "" -#: messages-i18n.c:324 +#: messages-i18n.c:329 msgid "Edit" msgstr "" -#: messages-i18n.c:325 po/guile_strings.txt:8 +#: messages-i18n.c:330 po/guile_strings.txt:8 #: src/gnome/glade-gnc-dialogs.c:591 msgid "Equity" msgstr "" -#: messages-i18n.c:326 +#: messages-i18n.c:331 msgid "Exit" msgstr "" -#: messages-i18n.c:327 po/guile_strings.txt:327 +#: messages-i18n.c:332 po/guile_strings.txt:327 #: src/gnome/glade-gnc-dialogs.c:588 msgid "Expense" msgstr "" -#: messages-i18n.c:328 +#: messages-i18n.c:333 msgid "Export" msgstr "" -#: messages-i18n.c:329 po/guile_strings.txt:355 +#: messages-i18n.c:334 po/guile_strings.txt:355 msgid "Extensions" msgstr "" -#: messages-i18n.c:330 +#: messages-i18n.c:335 msgid "Fee" msgstr "" -#: messages-i18n.c:331 +#: messages-i18n.c:336 msgid "Field" msgstr "" -#: messages-i18n.c:332 +#: messages-i18n.c:337 msgid "File" msgstr "" -#: messages-i18n.c:333 src/gnome/glade-gnc-dialogs.c:2523 +#: messages-i18n.c:338 src/gnome/glade-gnc-dialogs.c:2523 msgid "Find" msgstr "" -#: messages-i18n.c:334 +#: messages-i18n.c:339 msgid "Forward" msgstr "" -#: messages-i18n.c:335 po/guile_strings.txt:126 +#: messages-i18n.c:340 po/guile_strings.txt:126 msgid "From" msgstr "" -#: messages-i18n.c:336 +#: messages-i18n.c:341 msgid "GnuCash Preferences" msgstr "" -#: messages-i18n.c:337 +#: messages-i18n.c:342 msgid "Help" msgstr "" -#: messages-i18n.c:338 +#: messages-i18n.c:343 msgid "Imbalance" msgstr "" -#: messages-i18n.c:339 +#: messages-i18n.c:344 msgid "Import" msgstr "" -#: messages-i18n.c:340 po/guile_strings.txt:244 +#: messages-i18n.c:345 po/guile_strings.txt:244 #: src/gnome/glade-gnc-dialogs.c:585 msgid "Income" msgstr "" -#: messages-i18n.c:341 +#: messages-i18n.c:346 msgid "Increase" msgstr "" -#: messages-i18n.c:342 +#: messages-i18n.c:347 msgid "Int" msgstr "" -#: messages-i18n.c:343 +#: messages-i18n.c:348 msgid "Jump" msgstr "" -#: messages-i18n.c:344 po/guile_strings.txt:194 +#: messages-i18n.c:349 po/guile_strings.txt:194 #: src/gnome/glade-gnc-dialogs.c:573 msgid "Liability" msgstr "" -#: messages-i18n.c:345 +#: messages-i18n.c:350 msgid "License" msgstr "" -#: messages-i18n.c:346 +#: messages-i18n.c:351 msgid "Loan" msgstr "" -#: messages-i18n.c:347 +#: messages-i18n.c:352 msgid "LTCG" msgstr "" -#: messages-i18n.c:348 po/guile_strings.txt:32 +#: messages-i18n.c:353 po/guile_strings.txt:32 #: src/gnome/glade-gnc-dialogs.c:2196 msgid "Memo" msgstr "" -#: messages-i18n.c:349 +#: messages-i18n.c:354 msgid "Months" msgstr "" -#: messages-i18n.c:350 +#: messages-i18n.c:355 msgid "New" msgstr "" -#: messages-i18n.c:351 +#: messages-i18n.c:356 msgid "No" msgstr "" -#: messages-i18n.c:352 src/gnome/print-session.c:111 +#: messages-i18n.c:357 src/gnome/print-session.c:111 #: src/gnome/print-session.c:200 msgid "(none)" msgstr "" -#: messages-i18n.c:353 po/guile_strings.txt:209 +#: messages-i18n.c:358 po/guile_strings.txt:209 msgid "Notes" msgstr "" -#: messages-i18n.c:354 po/guile_strings.txt:176 +#: messages-i18n.c:359 po/guile_strings.txt:176 msgid "Num" msgstr "" -#: messages-i18n.c:355 +#: messages-i18n.c:360 msgid "Ok" msgstr "" -#: messages-i18n.c:356 +#: messages-i18n.c:361 msgid "Online" msgstr "" -#: messages-i18n.c:357 +#: messages-i18n.c:362 msgid "Open" msgstr "" -#: messages-i18n.c:358 +#: messages-i18n.c:363 msgid "Orphan" msgstr "" -#: messages-i18n.c:359 +#: messages-i18n.c:364 msgid "Parameters" msgstr "" -#: messages-i18n.c:360 po/guile_strings.txt:114 +#: messages-i18n.c:365 po/guile_strings.txt:114 msgid "Payment" msgstr "" -#: messages-i18n.c:361 +#: messages-i18n.c:366 msgid "Portfolio" msgstr "" -#: messages-i18n.c:362 +#: messages-i18n.c:367 msgid "POS" msgstr "" -#: messages-i18n.c:363 +#: messages-i18n.c:368 msgid "Preferences" msgstr "" -#: messages-i18n.c:364 src/gnome/glade-gnc-dialogs.c:2340 +#: messages-i18n.c:369 src/gnome/glade-gnc-dialogs.c:2340 msgid "Price" msgstr "" -#: messages-i18n.c:365 src/gnome/glade-gnc-dialogs.c:937 +#: messages-i18n.c:370 src/gnome/glade-gnc-dialogs.c:937 msgid "Print" msgstr "" -#: messages-i18n.c:366 +#: messages-i18n.c:371 msgid "Profits" msgstr "" -#: messages-i18n.c:367 +#: messages-i18n.c:372 msgid "Quit" msgstr "" -#: messages-i18n.c:368 po/guile_strings.txt:18 +#: messages-i18n.c:373 po/guile_strings.txt:18 msgid "Rebate" msgstr "" -#: messages-i18n.c:369 po/guile_strings.txt:191 +#: messages-i18n.c:374 po/guile_strings.txt:191 msgid "Receive" msgstr "" -#: messages-i18n.c:370 +#: messages-i18n.c:375 msgid "Reconcile" msgstr "" -#: messages-i18n.c:371 +#: messages-i18n.c:376 msgid "Record" msgstr "" -#: messages-i18n.c:372 po/guile_strings.txt:215 +#: messages-i18n.c:377 po/guile_strings.txt:215 msgid "Register" msgstr "" -#: messages-i18n.c:373 po/guile_strings.txt:208 +#: messages-i18n.c:378 po/guile_strings.txt:208 msgid "Report" msgstr "" -#: messages-i18n.c:374 +#: messages-i18n.c:379 msgid "Reports" msgstr "" -#: messages-i18n.c:375 +#: messages-i18n.c:380 msgid "Save" msgstr "" -#: messages-i18n.c:376 +#: messages-i18n.c:381 msgid "Savings" msgstr "" -#: messages-i18n.c:377 +#: messages-i18n.c:382 msgid "Scrub" msgstr "" -#: messages-i18n.c:378 +#: messages-i18n.c:383 msgid "Search Results" msgstr "" -#: messages-i18n.c:379 po/guile_strings.txt:189 +#: messages-i18n.c:384 po/guile_strings.txt:189 msgid "Security" msgstr "" -#: messages-i18n.c:380 +#: messages-i18n.c:385 msgid "Sell" msgstr "" -#: messages-i18n.c:381 +#: messages-i18n.c:386 msgid "Settings" msgstr "" -#: messages-i18n.c:382 +#: messages-i18n.c:387 msgid "Simple" msgstr "" -#: messages-i18n.c:383 po/guile_strings.txt:313 +#: messages-i18n.c:388 po/guile_strings.txt:313 msgid "Sold" msgstr "" -#: messages-i18n.c:384 po/guile_strings.txt:51 +#: messages-i18n.c:389 po/guile_strings.txt:51 msgid "Spend" msgstr "" -#: messages-i18n.c:385 +#: messages-i18n.c:390 msgid "Split" msgstr "" -#: messages-i18n.c:386 +#: messages-i18n.c:391 msgid "STCG" msgstr "" -#: messages-i18n.c:387 po/guile_strings.txt:353 +#: messages-i18n.c:392 po/guile_strings.txt:353 #: src/gnome/glade-gnc-dialogs.c:576 msgid "Stock" msgstr "" -#: messages-i18n.c:388 po/guile_strings.txt:246 +#: messages-i18n.c:393 po/guile_strings.txt:246 msgid "Style" msgstr "" -#: messages-i18n.c:389 +#: messages-i18n.c:394 msgid "Surplus" msgstr "" -#: messages-i18n.c:390 +#: messages-i18n.c:395 msgid "Teller" msgstr "" -#: messages-i18n.c:391 po/guile_strings.txt:302 +#: messages-i18n.c:396 po/guile_strings.txt:302 msgid "To" msgstr "" -#: messages-i18n.c:392 src/gnome/glade-gnc-dialogs.c:2615 +#: messages-i18n.c:397 src/gnome/glade-gnc-dialogs.c:2615 msgid "Today" msgstr "" -#: messages-i18n.c:393 messages-i18n.c:394 po/guile_strings.txt:207 +#: messages-i18n.c:398 messages-i18n.c:399 po/guile_strings.txt:207 msgid "Total" msgstr "" -#: messages-i18n.c:395 po/guile_strings.txt:304 +#: messages-i18n.c:400 po/guile_strings.txt:304 #: src/gnome/glade-gnc-dialogs.c:295 src/gnome/glade-gnc-dialogs.c:349 msgid "Type" msgstr "" -#: messages-i18n.c:396 +#: messages-i18n.c:401 msgid "Transaction" msgstr "" -#: messages-i18n.c:397 +#: messages-i18n.c:402 msgid "Transfer" msgstr "" -#: messages-i18n.c:398 +#: messages-i18n.c:403 msgid "Untitled" msgstr "" -#: messages-i18n.c:399 po/guile_strings.txt:66 +#: messages-i18n.c:404 po/guile_strings.txt:66 msgid "Value" msgstr "" -#: messages-i18n.c:400 +#: messages-i18n.c:405 msgid "WARNING" msgstr "" -#: messages-i18n.c:401 +#: messages-i18n.c:406 msgid "Weeks" msgstr "" -#: messages-i18n.c:402 +#: messages-i18n.c:407 msgid "Wire" msgstr "" -#: messages-i18n.c:403 +#: messages-i18n.c:408 msgid "Withdraw" msgstr "" -#: messages-i18n.c:404 po/guile_strings.txt:60 +#: messages-i18n.c:409 po/guile_strings.txt:60 msgid "Withdrawal" msgstr "" -#: messages-i18n.c:405 +#: messages-i18n.c:410 msgid "Years" msgstr "" -#: messages-i18n.c:406 +#: messages-i18n.c:411 msgid "Yes" msgstr "" diff --git a/src/gnome/Makefile.am b/src/gnome/Makefile.am index a25cde0dfc..4a9ccc99a7 100644 --- a/src/gnome/Makefile.am +++ b/src/gnome/Makefile.am @@ -18,6 +18,7 @@ libgncgnome_a_SOURCES = \ dialog-add.c \ dialog-edit.c \ dialog-utils.c \ + dialog-totd.c \ extensions.c \ query-user.c \ reconcile-list.c \ @@ -48,6 +49,7 @@ noinst_HEADERS = \ dialog-options.h \ dialog-print-check.h \ dialog-qif-import.h \ + dialog-totd.h \ dialog-transfer.h \ dialog-utils.h \ extensions.h \ diff --git a/src/gnome/Makefile.in b/src/gnome/Makefile.in index 6916380a0d..682ffc4287 100644 --- a/src/gnome/Makefile.in +++ b/src/gnome/Makefile.in @@ -118,14 +118,14 @@ l = @l@ noinst_LIBRARIES = libgncgnome.a -libgncgnome_a_SOURCES = top-level.c window-main.c window-register.c window-adjust.c window-help.c cursors.c account-tree.c dialog-budget.c window-reconcile.c window-html.c dialog-options.c dialog-filebox.c dialog-transfer.c dialog-add.c dialog-edit.c dialog-utils.c extensions.c query-user.c reconcile-list.c window-report.c gnc-dateedit.c gnc-currency-edit.c dialog-qif-import.c glade-gnc-dialogs.c gnc-datedelta.c dialog-account-picker.c print-session.c file-history.c dialog-print-check.c dialog-find-transactions.c +libgncgnome_a_SOURCES = top-level.c window-main.c window-register.c window-adjust.c window-help.c cursors.c account-tree.c dialog-budget.c window-reconcile.c window-html.c dialog-options.c dialog-filebox.c dialog-transfer.c dialog-add.c dialog-edit.c dialog-utils.c dialog-totd.c extensions.c query-user.c reconcile-list.c window-report.c gnc-dateedit.c gnc-currency-edit.c dialog-qif-import.c glade-gnc-dialogs.c gnc-datedelta.c dialog-account-picker.c print-session.c file-history.c dialog-print-check.c dialog-find-transactions.c gnomeappdir = ${datadir}/gnome/apps/Applications gnomeapp_DATA = gnucash.desktop -noinst_HEADERS = account-tree.h account-treeP.h cursors.h dialog-account-picker.h dialog-add.h dialog-budget.h dialog-edit.h dialog-find-transactions.h dialog-options.h dialog-print-check.h dialog-qif-import.h dialog-transfer.h dialog-utils.h extensions.h glade-cb-gnc-dialogs.h glade-gnc-dialogs.h glade-support-gnc-dialogs.h gnc-currency-edit.h gnc-datedelta.h gnc-dateedit.h gnome-top-level.h print-session.h query-user.h reconcile-list.h reconcile-listP.h window-help.h window-html.h window-main.h window-mainP.h window-reconcile.h window-register.h window-report.h +noinst_HEADERS = account-tree.h account-treeP.h cursors.h dialog-account-picker.h dialog-add.h dialog-budget.h dialog-edit.h dialog-find-transactions.h dialog-options.h dialog-print-check.h dialog-qif-import.h dialog-totd.h dialog-transfer.h dialog-utils.h extensions.h glade-cb-gnc-dialogs.h glade-gnc-dialogs.h glade-support-gnc-dialogs.h gnc-currency-edit.h gnc-datedelta.h gnc-dateedit.h gnome-top-level.h print-session.h query-user.h reconcile-list.h reconcile-listP.h window-help.h window-html.h window-main.h window-mainP.h window-reconcile.h window-register.h window-report.h EXTRA_DIST = .cvsignore gnc-dialogs.glade gnucash.desktop @@ -154,8 +154,8 @@ libgncgnome_a_OBJECTS = top-level.o window-main.o window-register.o \ window-adjust.o window-help.o cursors.o account-tree.o dialog-budget.o \ window-reconcile.o window-html.o dialog-options.o dialog-filebox.o \ dialog-transfer.o dialog-add.o dialog-edit.o dialog-utils.o \ -extensions.o query-user.o reconcile-list.o window-report.o \ -gnc-dateedit.o gnc-currency-edit.o dialog-qif-import.o \ +dialog-totd.o extensions.o query-user.o reconcile-list.o \ +window-report.o gnc-dateedit.o gnc-currency-edit.o dialog-qif-import.o \ glade-gnc-dialogs.o gnc-datedelta.o dialog-account-picker.o \ print-session.o file-history.o dialog-print-check.o \ dialog-find-transactions.o @@ -180,8 +180,8 @@ DEP_FILES = .deps/account-tree.P .deps/cursors.P \ .deps/dialog-edit.P .deps/dialog-filebox.P \ .deps/dialog-find-transactions.P .deps/dialog-options.P \ .deps/dialog-print-check.P .deps/dialog-qif-import.P \ -.deps/dialog-transfer.P .deps/dialog-utils.P .deps/extensions.P \ -.deps/file-history.P .deps/glade-gnc-dialogs.P \ +.deps/dialog-totd.P .deps/dialog-transfer.P .deps/dialog-utils.P \ +.deps/extensions.P .deps/file-history.P .deps/glade-gnc-dialogs.P \ .deps/gnc-currency-edit.P .deps/gnc-datedelta.P .deps/gnc-dateedit.P \ .deps/print-session.P .deps/query-user.P .deps/reconcile-list.P \ .deps/top-level.P .deps/window-adjust.P .deps/window-help.P \ diff --git a/src/gnome/dialog-totd.c b/src/gnome/dialog-totd.c new file mode 100644 index 0000000000..469390860b --- /dev/null +++ b/src/gnome/dialog-totd.c @@ -0,0 +1,276 @@ +/********************************************************************\ + * dialog-totd.c -- Dialog to display a "tip of the day" * + * Copyright (C) 2000 Robert Merkel * + * Large fractions borrowed from gnome-hint (Copyright (C) 2000) * + * Free Software Foundation * + * * + * 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@gnu.org * +\********************************************************************/ + +#include "top-level.h" + +#include +#include + +#include "global-options.h" +#include "query-user.h" +#include "messages.h" +#include "util.h" +#include "tip-of-the-day.h" +#include "dialog-totd.h" + + +/* This static indicates the debugging module that this .o belongs to. */ +static short module = MOD_GUI; + +static GtkWidget *disable_cb = NULL; +static GtkWidget *canvas = NULL; +static GtkWidget *scrollwin = NULL; + +static GnomeCanvasItem *hint_item; +static GnomeCanvasItem *blue_background; +static GnomeCanvasItem *white_background; +static int width = 400, height = 200; + + +/** Prototypes *********************************************************/ +static void draw_on_canvas(GtkWidget *canvas, char *hint); +static void grow_text_if_necessary(void); + + +/** Implementations ***************************************************/ + +/************************************************************************\ + * gnc_ui_totd_dialog_create_and_run * + * display and run the "Tip of the Day" dialog * + * * + * Returns: nothing * +\************************************************************************/ + +void +gnc_ui_totd_dialog_create_and_run(void) +{ + GtkWidget *win; + gint status; + gboolean config_set_success; + char *new_hint; + gboolean old_enabled, new_enabled; + win = gnome_dialog_new(TOTD_STR, + GNOME_STOCK_BUTTON_PREV, + GNOME_STOCK_BUTTON_NEXT, + GNOME_STOCK_BUTTON_CLOSE, + NULL); + + gnome_dialog_set_parent(GNOME_DIALOG(win), GTK_WINDOW(gnc_get_ui_data())); + + scrollwin = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), + GTK_POLICY_NEVER, + GTK_POLICY_NEVER); + gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(win)->vbox), scrollwin, TRUE, TRUE, 0); + canvas = gnome_canvas_new(); + gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas), + 0.0,0.0,width,height); + gtk_widget_set_usize(canvas,width,height); + gtk_widget_ensure_style(canvas); + gtk_container_add(GTK_CONTAINER(scrollwin), canvas); + new_hint = gnc_get_current_tip(); + draw_on_canvas(canvas, new_hint); + free(new_hint); + gtk_widget_show_all(scrollwin); + + old_enabled = gnc_lookup_boolean_option("General", + "Display \"Tip of the Day\"", + TRUE); + disable_cb = gtk_check_button_new_with_label(DISPLAY_NEXT_TIME_STR); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (disable_cb), + old_enabled); + + gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(win)->vbox), disable_cb, TRUE, TRUE, 0); + gtk_widget_show(disable_cb); + + do + { + status = gnome_dialog_run(GNOME_DIALOG(win)); +// printf("status = %d\n", status); + switch(status) + { + case 0: /* previous hint */ + gnc_decrement_tip(); + new_hint = gnc_get_current_tip(); + gnome_canvas_item_set(hint_item, + "text",new_hint, + NULL); + grow_text_if_necessary(); + free(new_hint); + break; + case 1: /* next hint */ + gnc_increment_tip(); + new_hint = gnc_get_current_tip(); + gnome_canvas_item_set(hint_item, + "text",new_hint, + NULL); + grow_text_if_necessary(); + free(new_hint); + break; + default: + status = -1; + break; + } + } while(status >= 0); + + new_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(disable_cb)); + gtk_widget_destroy(win); + gnc_increment_tip(); + + if(new_enabled != old_enabled) + { + config_set_success = gnc_set_boolean_option("General", + "Display \"Tip of the Day\"", + new_enabled); + gnc_option_refresh_ui_by_name("General", "Display \"Tip of the Day\""); + + if(new_enabled == FALSE) + { + gnc_info_dialog(REENABLE_TIPS_MSG); + } + } +} + +/* increases the size of the canvas and enables scrolling if the text + gets big enough */ + +static void +grow_text_if_necessary(void) +{ + double w,h; + int ww,hh; + int changed = FALSE; + + gtk_object_get(GTK_OBJECT(hint_item), + "text_width",&w, + "text_height",&h, + NULL); + /*add border, and 10 pixels around*/ + w+=75+10; + h+=50+10; + /*some sanity limits*/ + /*if(w>800) w = 800; + if(h>600) h = 600;*/ + + if(w>width) { + width = w; + changed = TRUE; + } + if(h>height) { + height = h; + changed = TRUE; + } + + if(!changed) + return; + + /*limits on size*/ + ww = width; hh = height; + if(ww>720) ww = 720; + if(hh>450) hh = 450; + + if(ww != width || hh != height) + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + else + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), + GTK_POLICY_NEVER, + GTK_POLICY_NEVER); + + /*here we grow the canvas*/ + gtk_widget_set_usize(canvas,ww,hh); + gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas), + 0.0,0.0,width,height); + + gnome_canvas_item_set(blue_background, + "x2",(double)width, + "y2",(double)height, + NULL); + gnome_canvas_item_set(white_background, + "x2",(double)width, + "y2",(double)height, + NULL); + gnome_canvas_item_set(hint_item, + "x",(double)(((width-75)/2)+75), + "y",(double)(((height-50)/2)+50), + "clip_width",(double)(width-75), + "clip_height",(double)(height-50), + NULL); +} + +/* places items on the canvas to make up the tip of the day */ + +static void +draw_on_canvas(GtkWidget *canvas, char *hint) +{ + GnomeCanvasItem *item; + + blue_background = gnome_canvas_item_new( + gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_rect_get_type(), + "x1",(double)0.0, + "y1",(double)0.0, + "x2",(double)400.0, + "y2",(double)200.0, + "fill_color","sea green", + NULL); + + white_background = gnome_canvas_item_new( + gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_rect_get_type(), + "x1",(double)75.0, + "y1",(double)50.0, + "x2",(double)400.0, + "y2",(double)200.0, + "fill_color","white", + NULL); + + hint_item = gnome_canvas_item_new( + gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_text_get_type(), + "x",(double)237.5, + "y",(double)125.0, + "fill_color","black", + "font_gdk",canvas->style->font, + "clip_width",(double)325.0, + "clip_height",(double)150.0, + "clip",TRUE, + "text",hint, + NULL); + + item = gnome_canvas_item_new( + gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_text_get_type(), + "x",(double)200.0, + "y",(double)25.0, + "fill_color","white", + "font",_("-*-helvetica-bold-r-normal-*-*-180-*-*-p-*-*-*"), + "text",TOTD_STR, + NULL); + + grow_text_if_necessary(); +} +/********************** END OF FILE *********************************\ +\********************************************************************/ diff --git a/src/gnome/dialog-totd.h b/src/gnome/dialog-totd.h new file mode 100644 index 0000000000..db151a7c47 --- /dev/null +++ b/src/gnome/dialog-totd.h @@ -0,0 +1,28 @@ +/********************************************************************\ + * dialog-totd.h : dialog to display a "tip of the day" * + * Copyright (C) 2000 Robert Merkel * + * * + * 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@gnu.org * +\********************************************************************/ + +#ifndef __DIALOG_TOTD_H_ +#define __DIALOG_TOTD_H_ + +void gnc_ui_totd_dialog_create_and_run(void); + +#endif diff --git a/src/gnome/window-main.c b/src/gnome/window-main.c index 41606a36d2..ca57e39c0c 100644 --- a/src/gnome/window-main.c +++ b/src/gnome/window-main.c @@ -52,6 +52,7 @@ #include "dialog-edit.h" #include "dialog-qif-import.h" #include "dialog-find-transactions.h" +#include "dialog-totd.h" #include "file-history.h" #include "EuroUtils.h" #include "Scrub.h" @@ -260,6 +261,13 @@ gnc_ui_about_cb (GtkWidget *widget, gpointer data) gnome_dialog_run_and_close(GNOME_DIALOG(about)); } +static void +gnc_ui_totd_cb (GtkWidget *widget, gpointer data) +{ + gnc_ui_totd_dialog_create_and_run(); + return; +} + static void gnc_ui_help_cb ( GtkWidget *widget, gpointer data ) { @@ -952,7 +960,16 @@ gnc_main_create_menus(GnomeApp *app, GtkWidget *account_tree, GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL }, + { + GNOME_APP_UI_ITEM, + TOTD_MENU_STR_N, TOOLTIP_TOTD_N, + gnc_ui_totd_cb, NULL, NULL, + GNOME_APP_PIXMAP_NONE, NULL, + 0, 0, NULL + }, + GNOMEUIINFO_MENU_ABOUT_ITEM(gnc_ui_about_cb, NULL), + GNOMEUIINFO_END }; diff --git a/src/messages_i18n.h b/src/messages_i18n.h index 4cbd399ebc..d3d92953ab 100644 --- a/src/messages_i18n.h +++ b/src/messages_i18n.h @@ -139,6 +139,10 @@ "window.\nAre you sure you want to cancel?") #define RECN_TRANS_WARN _("Warning! This is a reconciled transaction. " \ "Do you want do continue?") + +#define REENABLE_TIPS_MSG _("You have disabled \"Tip of the Day\"\n" \ + "You can re-enable them from the General\n" \ + "section of the Preferences menu") #define REG_CURR_MSG _("You cannot transfer funds from the %s " \ "account.\nIt does not have a matching " \ "currency.") @@ -314,6 +318,8 @@ #define TOOLTIP_SORT_BY_STMT _(TOOLTIP_SORT_BY_STMT_N) #define TOOLTIP_STANDARD_ORD_N N_("Keep normal account order") #define TOOLTIP_STANDARD_ORD _(TOOLTIP_STANDARD_ORD_N) +#define TOOLTIP_TOTD_N N_("Tips of the Day") +#define TOOLTIP_TOTD _(TOOLTIP_TOTD_N) #define TOOLTIP_TRANSFER_N N_("Transfer funds from one account to "\ "another") #define TOOLTIP_TRANSFER _(TOOLTIP_TRANSFER_N) @@ -409,6 +415,8 @@ #define SORT_ORDER_MENU_STR _(SORT_ORDER_MENU_STR_N) #define STYLE_MENU_STR_N N_("_Style") #define STYLE_MENU_STR _(STYLE_MENU_STR_N) +#define TOTD_MENU_STR_N N_("_Tips Of The Day") +#define TOTD_MENU_STR _(TOTD_MENU_STR_N) #define TRANSACTION_MENU_STR_N N_("_Transaction") #define TRANSACTION_MENU_STR _(TRANSACTION_MENU_STR_N) #define TRANSFER_MENU_STR _("_Transfer") @@ -433,6 +441,7 @@ #define DATE_RANGE_STR _("Date Range") #define DEL_ACC_STR _("Delete Account") #define DEL_TRANS_STR _("Delete Transaction") +#define DISPLAY_NEXT_TIME_STR _("Display this dialog next time") #define DOUBLE_LINE_STR_N N_("Double Line") #define DOUBLE_LINE_STR _(DOUBLE_LINE_STR_N) #define EDIT_ACCT_STR _("Edit Account") @@ -507,6 +516,7 @@ #define STANDARD_ORDER_STR_N N_("Standard order") #define STANDARD_ORDER_STR _(STANDARD_ORDER_STR_N) #define STATEMENT_DATE_C_STR _("Statement Date:") +#define TOTD_STR _("Tip of the Day:") #define TOP_ACCT_STR _("Top level account") #define TOTAL_SHARES_STR _("Total Shares") #define VERIFY_CHANGES_STR _("Verify Changes") diff --git a/src/scm/Makefile.am b/src/scm/Makefile.am index 13160ed5fe..047037cbee 100644 --- a/src/scm/Makefile.am +++ b/src/scm/Makefile.am @@ -33,6 +33,8 @@ gnc_regular_scm_files = \ substring-search.scm \ testbed.scm \ text-export.scm \ + tip-of-the-day.scm \ + tip-list.scm \ utilities.scm \ xml-generator.scm diff --git a/src/scm/Makefile.in b/src/scm/Makefile.in index e529fe8b9d..d1c9152f82 100644 --- a/src/scm/Makefile.in +++ b/src/scm/Makefile.in @@ -123,7 +123,7 @@ gncscmdir = ${GNC_SCM_INSTALL_DIR} gnc_autogen_scm_files = bootstrap.scm -gnc_regular_scm_files = bs-interp.scm c-interface.scm command-line.scm config-var.scm currencies.scm date-utilities.scm depend.scm doc.scm engine-interface.scm engine-utilities.scm extensions.scm graph.scm hooks.scm html-generator.scm main.scm options.scm path.scm prefs.scm report-utilities.scm report.scm slib-backup.scm startup.scm structure.scm substring-search.scm testbed.scm text-export.scm utilities.scm xml-generator.scm +gnc_regular_scm_files = bs-interp.scm c-interface.scm command-line.scm config-var.scm currencies.scm date-utilities.scm depend.scm doc.scm engine-interface.scm engine-utilities.scm extensions.scm graph.scm hooks.scm html-generator.scm main.scm options.scm path.scm prefs.scm report-utilities.scm report.scm slib-backup.scm startup.scm structure.scm substring-search.scm testbed.scm text-export.scm tip-of-the-day.scm tip-list.scm utilities.scm xml-generator.scm gncscm_DATA = ${gnc_autogen_scm_files} ${gnc_regular_scm_files} diff --git a/src/scm/config-var.scm b/src/scm/config-var.scm index 93435753ef..72393ba4cf 100644 --- a/src/scm/config-var.scm +++ b/src/scm/config-var.scm @@ -33,6 +33,8 @@ ;;; permanent, and if they leave the variable value different from the ;;; default, should be saved to ~/.gnucash/config.auto. +(gnc:support "config-var.scm") + (define (gnc:make-config-var description set-action-func equality-func diff --git a/src/scm/hooks.scm b/src/scm/hooks.scm index ce2cb947ea..7419cefaa3 100644 --- a/src/scm/hooks.scm +++ b/src/scm/hooks.scm @@ -21,6 +21,8 @@ ;;;; This is not functional yet, but it should be close... +(gnc:support "hooks.scm") + ;;; Private ;; Central repository for all hooks -- so we can look them up later by name. diff --git a/src/scm/prefs.scm b/src/scm/prefs.scm index 56d107ebdc..14d54eeab6 100644 --- a/src/scm/prefs.scm +++ b/src/scm/prefs.scm @@ -56,6 +56,7 @@ ;; eq? ;; #f)) +(gnc:support "prefs.scm") (define gnc:*options-entries* (gnc:new-options)) @@ -382,6 +383,11 @@ the account instead of opening a register." #f)) "General" "Use accounting labels" "e" "Only use 'debit' and 'credit' instead of informal synonyms" #f)) +(gnc:register-configuration-option + (gnc:make-simple-boolean-option + "General" "Display \"Tip of the Day\"" + "f" "Display hints for using GnuCash at startup" #t)) + ;(gnc:register-configuration-option ; (gnc:make-number-range-option ; "General" "Default precision" diff --git a/src/scm/startup.scm b/src/scm/startup.scm index e21ae778fd..a5844bedbe 100644 --- a/src/scm/startup.scm +++ b/src/scm/startup.scm @@ -34,4 +34,5 @@ (gnc:load "prefs.scm") (gnc:load "command-line.scm") (gnc:load "hooks.scm") +(gnc:load "tip-of-the-day.scm") (gnc:load "main.scm") diff --git a/src/scm/tip-list.scm b/src/scm/tip-list.scm new file mode 100644 index 0000000000..291288ceb2 --- /dev/null +++ b/src/scm/tip-list.scm @@ -0,0 +1,5 @@ +( + ("Hello World" "I'm a teapot") + ("Hi there" "Yoo hoo!") + ("Misc Tips" "Yes, it's me!!") +) diff --git a/src/scm/tip-of-the-day.scm b/src/scm/tip-of-the-day.scm new file mode 100644 index 0000000000..4c538db793 --- /dev/null +++ b/src/scm/tip-of-the-day.scm @@ -0,0 +1,110 @@ +;; 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@gnu.org + +;; Scheme functions for supporting tooltips +;; Written by Robert Merkel + +;; Tips should be written as a list of lists of string. Each list of strings +;; represents one tip + +(gnc:depend "config-var.scm") +(gnc:depend "prefs.scm") +(gnc:depend "hooks.scm") + +(define (non-negative-integer? value) + (and (integer? value) (>= value 0))) + +(define gnc:*current-tip-number* + (gnc:make-config-var + "Which tip we're up to" +; (lambda (x) (if (and (integer? x) (>= x 0)) '(x) #f)) + (lambda (var value) (if (non-negative-integer? value) (list value) #f)) + = + 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* + (gnc:make-config-var + "Tip file" + (lambda (var value) (if (string? value) (list value) #f)) + string=? + "tip-list.scm")) + +(define gnc:*tip-list* '()) + +(define (string-fold list-strings concatenator) + (if (null? list-strings) + "" + (string-append (car list-strings) concatenator + (string-fold (cdr list-strings) concatenator)))) + + +(define (gnc:read-tips) + (let ((in-port (open-input-file + (gnc:find-in-directories + (gnc:config-var-value-get gnc:*tip-file*) + (gnc:config-var-value-get gnc:*load-path*))))) + (set! gnc:*tip-list* (read in-port)) + (if (not (= (length gnc:*tip-list*) + (gnc:config-var-value-get 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:config-var-value-get gnc:*current-tip-number*)) + (gnc:config-var-value-set! #t gnc:*current-tip-number 0)))) + (close-port in-port) + #f)) + +(define (gnc:get-current-tip) + (string-fold (list-ref gnc:*tip-list* + (gnc:config-var-value-get gnc:*current-tip-number*)) + "\n")) + +(define (gnc:increment-tip-number) + (let ((new-value (+ (gnc:config-var-value-get gnc:*current-tip-number*) 1))) + (if (< new-value (gnc:config-var-value-get gnc:*number-of-tips*)) + (gnc:config-var-value-set! gnc:*current-tip-number* #t new-value) + (gnc:config-var-value-set! gnc:*current-tip-number* #t 0)))) + +(define (gnc:decrement-tip-number) + (let ((new-value (- (gnc:config-var-value-get gnc:*current-tip-number*) 1))) + (if (< new-value 0) + (gnc:config-var-value-set! gnc:*current-tip-number* #t + (- (gnc:config-var-value-get + gnc:*number-of-tips*) 1)) + (gnc:config-var-value-set! gnc:*current-tip-number* #t new-value)))) + + +(gnc:read-tips) + +(let ((tip-opt (gnc:lookup-global-option "General" + "Display \"Tip of the Day\""))) + (if (gnc:option-value tip-opt) + (let ((mainopen-hook (gnc:hook-lookup 'main-window-opened-hook))) + (gnc:hook-add-dangler + mainopen-hook + (lambda (window) + (gnc:ui-totd-dialog-create-and-run))))))