r17094 - gnucash/branches/2.2 - [r16976, r17018] QIF import: Show the druid's documentation pages by default.

Andreas Köhler andi5 at cvs.gnucash.org
Sun Apr 20 15:22:04 EDT 2008


Author: andi5
Date: 2008-04-20 15:22:03 -0400 (Sun, 20 Apr 2008)
New Revision: 17094
Trac: http://svn.gnucash.org/trac/changeset/17094

Added:
   gnucash/branches/2.2/src/import-export/qif-import/schemas/
   gnucash/branches/2.2/src/import-export/qif-import/schemas/Makefile.am
   gnucash/branches/2.2/src/import-export/qif-import/schemas/apps_gnucash_import_qif.schemas.in
Modified:
   gnucash/branches/2.2/configure.in
   gnucash/branches/2.2/src/import-export/qif-import/Makefile.am
   gnucash/branches/2.2/src/import-export/qif-import/druid-qif-import.c
Log:
[r16976,r17018] QIF import: Show the druid's documentation pages by default.

Previously these pages were hidden by default.


Modified: gnucash/branches/2.2/configure.in
===================================================================
--- gnucash/branches/2.2/configure.in	2008-04-20 18:07:10 UTC (rev 17093)
+++ gnucash/branches/2.2/configure.in	2008-04-20 19:22:03 UTC (rev 17094)
@@ -1500,6 +1500,7 @@
           src/import-export/qif-import/Makefile
           src/import-export/qif/Makefile
           src/import-export/qif/test/Makefile
+          src/import-export/qif-import/schemas/Makefile
           src/import-export/qif-import/test/Makefile
           src/import-export/qif-io-core/Makefile
           src/import-export/qif-io-core/test/Makefile

Modified: gnucash/branches/2.2/src/import-export/qif-import/Makefile.am
===================================================================
--- gnucash/branches/2.2/src/import-export/qif-import/Makefile.am	2008-04-20 18:07:10 UTC (rev 17093)
+++ gnucash/branches/2.2/src/import-export/qif-import/Makefile.am	2008-04-20 19:22:03 UTC (rev 17094)
@@ -1,4 +1,4 @@
-SUBDIRS = . test
+SUBDIRS = . test schemas
 
 pkglib_LTLIBRARIES=libgncmod-qif-import.la
 

Modified: gnucash/branches/2.2/src/import-export/qif-import/druid-qif-import.c
===================================================================
--- gnucash/branches/2.2/src/import-export/qif-import/druid-qif-import.c	2008-04-20 18:07:10 UTC (rev 17093)
+++ gnucash/branches/2.2/src/import-export/qif-import/druid-qif-import.c	2008-04-20 19:22:03 UTC (rev 17094)
@@ -55,6 +55,7 @@
 
 #define DRUID_QIF_IMPORT_CM_CLASS "druid-qif-import"
 #define GCONF_SECTION "dialogs/import/qif"
+#define GCONF_NAME_SHOW_DOC "show_doc"
 
 #define PREV_ROW "prev_row"
 
@@ -2057,6 +2058,7 @@
   
   QIFImportWindow * retval;
   GladeXML        * xml;
+  GError * err = NULL;
   SCM  load_map_prefs;
   SCM  mapping_info;
   SCM  create_ticker_map;
@@ -2209,9 +2211,20 @@
   retval->doc_pages        = NULL;
   retval->commodity_pages = NULL;
 
+  /* Get the user's preference for showing documentation pages. */
   retval->show_doc_pages = 
-    gnc_gconf_get_bool("dialogs/import/qif", "show_doc", NULL);
+    gnc_gconf_get_bool(GCONF_SECTION, GCONF_NAME_SHOW_DOC, &err);
+  if (err != NULL) {
+    g_warning("QIF import: gnc_gconf_get_bool error: %s\n", err->message);
+    g_error_free(err);
 
+    /* Show documentation pages by default. */
+    g_warning("QIF import: Couldn't get %s setting from gconf.\n",
+              GCONF_NAME_SHOW_DOC);
+    g_warning("QIF import: Documentation pages will be shown by default.\n");
+    retval->show_doc_pages = TRUE;
+  }
+
   for(i=0; i < NUM_PRE_PAGES; i++) {
     retval->pre_comm_pages = 
       g_list_append(retval->pre_comm_pages, 

Added: gnucash/branches/2.2/src/import-export/qif-import/schemas/Makefile.am
===================================================================
--- gnucash/branches/2.2/src/import-export/qif-import/schemas/Makefile.am	                        (rev 0)
+++ gnucash/branches/2.2/src/import-export/qif-import/schemas/Makefile.am	2008-04-20 19:22:03 UTC (rev 17094)
@@ -0,0 +1,21 @@
+schemadir   = @GCONF_SCHEMA_FILE_DIR@
+schemas_in_files = \
+  apps_gnucash_import_qif.schemas.in
+schema_DATA = $(schemas_in_files:.schemas.in=.schemas)
+
+ at INTLTOOL_SCHEMAS_RULE@
+
+EXTRA_DIST = $(schemas_in_files)
+
+CLEANFILES = $(schema_DATA)
+
+install-data-local:
+if GCONF_SCHEMAS_INSTALL
+	-mkdir -p $(DESTDIR)$(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY)
+	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
+endif
+
+uninstall-local:
+if GCONF_SCHEMAS_INSTALL
+	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $(schema_DATA)
+endif

Added: gnucash/branches/2.2/src/import-export/qif-import/schemas/apps_gnucash_import_qif.schemas.in
===================================================================
--- gnucash/branches/2.2/src/import-export/qif-import/schemas/apps_gnucash_import_qif.schemas.in	                        (rev 0)
+++ gnucash/branches/2.2/src/import-export/qif-import/schemas/apps_gnucash_import_qif.schemas.in	2008-04-20 19:22:03 UTC (rev 17094)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+  <schemalist>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/import/qif/show_doc</key>
+      <applyto>/apps/gnucash/dialogs/import/qif/show_doc</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Show documentation</short>
+        <long>
+          Show some documentation-only pages in QIF Import druid.
+	</long>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>



More information about the gnucash-changes mailing list