[Gnucash-changes] Finish converting the "Tip of the Day" dialog and
the New File Hierarchy
David Hampton
hampton at cvs.gnucash.org
Tue Jul 26 23:01:56 EDT 2005
Log Message:
-----------
Finish converting the "Tip of the Day" dialog and the New File
Hierarchy druid over to storing data in gconf.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash:
ChangeLog
gnucash/src/app-utils:
prefs.scm
gnucash/src/gnome:
druid-hierarchy.c
druid-hierarchy.h
gw-gnc-spec.scm
top-level.c
gnucash/src/gnome/schemas:
apps_gnucash_dialog_common.schemas
gnucash/src/gnome-utils:
preferences.glade
gnucash/src/scm:
main.scm
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.254
retrieving revision 1.1487.2.255
diff -LChangeLog -LChangeLog -u -r1.1487.2.254 -r1.1487.2.255
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,17 @@
+2005-07-26 David Hampton <hampton at employees.org>
+
+ * src/app-utils/prefs.scm:
+ * src/gnome/druid-hierarchy.[ch]:
+ * src/gnome/gw-gnc-spec.scm:
+ * src/gnome/top-level.c:
+ * src/gnome/schemas/apps_gnucash_dialog_common.schemas:
+ * src/gnome-utils/preferences.glade:
+ * src/scm/main.scm: Finish converting the "Tip of the Day" dialog
+ and the New File Hierarchy druid over to storing data in gconf.
+
+ * doc/Makefile.am: Fix problem with "tip of the day" file and opt
+ style installs.
+
2005-07-25 Christian Stimming <stimming at tuhh.de>
* src/import-export/hbci/dialog-daterange.c: Enable HBCI statement
Index: druid-hierarchy.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-hierarchy.c,v
retrieving revision 1.21.4.13
retrieving revision 1.21.4.14
diff -Lsrc/gnome/druid-hierarchy.c -Lsrc/gnome/druid-hierarchy.c -u -r1.21.4.13 -r1.21.4.14
--- src/gnome/druid-hierarchy.c
+++ src/gnome/druid-hierarchy.c
@@ -37,6 +37,8 @@
#include "gnc-amount-edit.h"
#include "gnc-currency-edit.h"
#include "gnc-general-select.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-hooks.h"
#include "gnc-component-manager.h"
#include "gnc-event-p.h"
#include "../gnome-utils/gnc-dir.h"
@@ -53,6 +55,8 @@
#include "gnc-trace.h"
static short module = MOD_IMPORT;
+#define GCONF_SECTION "dialogs/new_hierarchy"
+
static GtkWidget *hierarchy_window = NULL;
GtkWidget *qof_book_merge_window = NULL;
static AccountGroup *our_final_group = NULL;
@@ -916,3 +920,19 @@
return;
}
+
+static void
+gnc_ui_hierarchy_druid_hook (void)
+{
+ if (gnc_gconf_get_bool(GCONF_SECTION, "show_on_new_file", NULL)) {
+ printf("start druid\n");
+ gnc_ui_hierarchy_druid();
+ }
+}
+
+void
+gnc_ui_hierarchy_druid_initialize (void)
+{
+ gnc_hook_add_dangler(HOOK_NEW_BOOK,
+ (GFunc)gnc_ui_hierarchy_druid_hook, NULL);
+}
Index: top-level.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/top-level.c,v
retrieving revision 1.140.4.25
retrieving revision 1.140.4.26
diff -Lsrc/gnome/top-level.c -Lsrc/gnome/top-level.c -u -r1.140.4.25 -r1.140.4.26
--- src/gnome/top-level.c
+++ src/gnome/top-level.c
@@ -37,7 +37,9 @@
#include "dialog-commodity.h"
#include "dialog-options.h"
#include "dialog-transfer.h"
+#include "dialog-totd.h"
#include "dialog-utils.h"
+#include "druid-hierarchy.h"
#include "file-utils.h"
#include "global-options.h"
#include "gnc-component-manager.h"
@@ -306,6 +308,8 @@
gnc_options_dialog_set_global_help_cb (gnc_global_options_help_cb, NULL);
+ gnc_totd_dialog(NULL, TRUE);
+
main_window = gnc_main_window_new ();
gtk_widget_show (GTK_WIDGET (main_window));
@@ -316,6 +320,7 @@
gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_menu_additions_new ());
gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_register_new ());
gnc_load_stock_icons ();
+ gnc_ui_hierarchy_druid_initialize();
/* Run the ui startup hooks. */
gnc_hook_run(HOOK_UI_STARTUP, NULL);
Index: druid-hierarchy.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-hierarchy.h,v
retrieving revision 1.1.6.1
retrieving revision 1.1.6.2
diff -Lsrc/gnome/druid-hierarchy.h -Lsrc/gnome/druid-hierarchy.h -u -r1.1.6.1 -r1.1.6.2
--- src/gnome/druid-hierarchy.h
+++ src/gnome/druid-hierarchy.h
@@ -25,4 +25,5 @@
void gnc_ui_hierarchy_druid (void);
GtkWidget* gnc_ui_hierarchy_running (void);
+void gnc_ui_hierarchy_druid_initialize (void);
#endif
Index: gw-gnc-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gw-gnc-spec.scm,v
retrieving revision 1.14.4.15
retrieving revision 1.14.4.16
diff -Lsrc/gnome/gw-gnc-spec.scm -Lsrc/gnome/gw-gnc-spec.scm -u -r1.14.4.15 -r1.14.4.16
--- src/gnome/gw-gnc-spec.scm
+++ src/gnome/gw-gnc-spec.scm
@@ -52,14 +52,6 @@
(gw:wrap-function
ws
- 'gnc:ui-hierarchy-druid
- '<gw:void>
- "gnc_ui_hierarchy_druid"
- '()
- "Open the hierarchy druid for importing an account hierarchy.")
-
- (gw:wrap-function
- ws
'gnc:ui-is-running?
'<gw:bool>
"gnucash_ui_is_running"
@@ -146,14 +138,6 @@
'((<gnc:MainWindow*> window))
"Create a new account tree window.")
- (gw:wrap-function
- ws
- 'gnc:totd_dialog
- '<gw:void>
- "gnc_totd_dialog"
- '((<gtk:Window*> parent) (<gw:bool> is_startup))
- "Show the \"Tip Of The Day\" dialog.")
-
(gw:wrap-as-wct ws
'<gnc:ProgressDialog*>
"GNCProgressDialog *" "const GNCProgressDialog *")
Index: apps_gnucash_dialog_common.schemas
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/apps_gnucash_dialog_common.schemas,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lsrc/gnome/schemas/apps_gnucash_dialog_common.schemas -Lsrc/gnome/schemas/apps_gnucash_dialog_common.schemas -u -r1.1.2.3 -r1.1.2.4
--- src/gnome/schemas/apps_gnucash_dialog_common.schemas
+++ src/gnome/schemas/apps_gnucash_dialog_common.schemas
@@ -13,6 +13,7 @@
<applyto>/apps/gnucash/dialogs/tax_info/window_position</applyto>
<applyto>/apps/gnucash/dialogs/preferences/window_position</applyto>
<applyto>/apps/gnucash/dialogs/reset_warnings/window_position</applyto>
+ <applyto>/apps/gnucash/dialogs/tip_of_the_day/window_position</applyto>
<owner>gnucash</owner>
<type>list</type>
<list_type>int</list_type>
@@ -36,6 +37,7 @@
<applyto>/apps/gnucash/dialogs/tax_info/window_geometry</applyto>
<applyto>/apps/gnucash/dialogs/preferences/window_geometry</applyto>
<applyto>/apps/gnucash/dialogs/reset_warnings/window_geometry</applyto>
+ <applyto>/apps/gnucash/dialogs/tip_of_the_day/window_geometry</applyto>
<owner>gnucash</owner>
<type>list</type>
<list_type>int</list_type>
Index: preferences.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/preferences.glade,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lsrc/gnome-utils/preferences.glade -Lsrc/gnome-utils/preferences.glade -u -r1.1.2.3 -r1.1.2.4
--- src/gnome-utils/preferences.glade
+++ src/gnome-utils/preferences.glade
@@ -847,9 +847,9 @@
</child>
<child>
- <widget class="GtkCheckButton" id="gconf/dialogs/new_hierarchy/open_for_new_file">
+ <widget class="GtkCheckButton" id="gconf/dialogs/new_hierarchy/show_on_new_file">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Don't popup the new account list dialog when you choose "New File" from the "File" menu</property>
+ <property name="tooltip" translatable="yes">Present the new account list dialog when you choose "New File" from the "File" menu</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Perform account list _setup on new file</property>
<property name="use_underline">True</property>
Index: prefs.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/prefs.scm,v
retrieving revision 1.28.4.10
retrieving revision 1.28.4.11
diff -Lsrc/app-utils/prefs.scm -Lsrc/app-utils/prefs.scm -u -r1.28.4.10 -r1.28.4.11
--- src/app-utils/prefs.scm
+++ src/app-utils/prefs.scm
@@ -247,16 +247,6 @@
(N_ "General") (N_ "Show Advanced Settings")
"a" (N_ "Allow modification of less commonly used settings.") #f))
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
- (N_ "General") (N_ "Display \"Tip of the Day\"")
- "f" (N_ "Display hints for using GnuCash at startup") #t))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
- (N_ "General") (N_ "No account list setup on new file")
- "j" (N_ "Don't popup the new account list dialog when you choose \"New File\" from the \"File\" menu") #f))
-
;; QIF Import options.
(gnc:register-configuration-option
Index: main.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main.scm,v
retrieving revision 1.109.2.22
retrieving revision 1.109.2.23
diff -Lsrc/scm/main.scm -Lsrc/scm/main.scm -u -r1.109.2.22 -r1.109.2.23
--- src/scm/main.scm
+++ src/scm/main.scm
@@ -457,9 +457,6 @@
(if (list? sources)
(gnc:quote-source-set-fq-installed sources)))
- (gnc:update-splash-screen (_ "Loading tip-of-the-day..."))
- (gnc:totd_dialog #f #t)
-
(set-current-module original-module))
(gnc:hook-add-dangler gnc:*book-opened-hook*
@@ -471,14 +468,6 @@
(gnc:sx-since-last-run-wrapper
(gnc:session-get-url session)))))
- (gnc:hook-add-dangler gnc:*new-book-hook*
- (lambda ()
- (let ((option (gnc:lookup-global-option
- "General"
- "No account list setup on new file")))
- (if (and option (not (gnc:option-value option)))
- (gnc:ui-hierarchy-druid)))))
-
;; Load the system configs
(gnc:update-splash-screen (_ "Loading configs..."))
(if (not (gnc:load-system-config-if-needed))
More information about the gnucash-changes
mailing list