AUDIT: r16976 - gnucash/trunk - QIF import: Show the druid's documentation pages by default. Previously these pages were hidden by default.

Andreas Köhler andi5.py at gmx.net
Thu Feb 28 18:16:37 EST 2008


Hi Charles,

Am Donnerstag, den 28.02.2008, 17:50 -0500 schrieb Charles Day:
> Author: cedayiv
> Date: 2008-02-28 17:50:39 -0500 (Thu, 28 Feb 2008)
> New Revision: 16976
> Trac: http://svn.gnucash.org/trac/changeset/16976
> 
> Added:
>    gnucash/trunk/src/import-export/qif-import/schemas/
>    gnucash/trunk/src/import-export/qif-import/schemas/Makefile.am
>    gnucash/trunk/src/import-export/qif-import/schemas/apps_gnucash_import_qif.schemas.in
> Modified:
>    gnucash/trunk/configure.in
>    gnucash/trunk/src/import-export/qif-import/Makefile.am
>    gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
> Log:
> QIF import: Show the druid's documentation pages by default. Previously these pages were hidden by default.
> BP

I just wonder, whether it is really necessary to backport this one?  Did
anyone bother before, is there a bug about it?  I know that other
commits were chosen as well, but e.g. white-space fixes greatly ease
later merges.  But, hey :-D

> Modified: gnucash/trunk/configure.in
> ===================================================================
> --- gnucash/trunk/configure.in	2008-02-28 22:09:25 UTC (rev 16975)
> +++ gnucash/trunk/configure.in	2008-02-28 22:50:39 UTC (rev 16976)
> @@ -1499,6 +1499,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/trunk/src/import-export/qif-import/Makefile.am
> ===================================================================
> --- gnucash/trunk/src/import-export/qif-import/Makefile.am	2008-02-28 22:09:25 UTC (rev 16975)
> +++ gnucash/trunk/src/import-export/qif-import/Makefile.am	2008-02-28 22:50:39 UTC (rev 16976)
> @@ -1,4 +1,4 @@
> -SUBDIRS = . test
> +SUBDIRS = . test schemas
>  
>  pkglib_LTLIBRARIES=libgncmod-qif-import.la
>  
> 
> Modified: gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
> ===================================================================
> --- gnucash/trunk/src/import-export/qif-import/druid-qif-import.c	2008-02-28 22:09:25 UTC (rev 16975)
> +++ gnucash/trunk/src/import-export/qif-import/druid-qif-import.c	2008-02-28 22:50:39 UTC (rev 16976)
> @@ -2057,6 +2057,7 @@
>    
>    QIFImportWindow * retval;
>    GladeXML        * xml;
> +  GError * err = NULL;
>    SCM  load_map_prefs;
>    SCM  mapping_info;
>    SCM  create_ticker_map;
> @@ -2209,9 +2210,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("dialogs/import/qif", "show_doc", &err);
> +  if (err != NULL) {
> +    /* The setting can't be found. */

That is not how I understand gconf_client_get_bool(), the function
underlying gnc_gconf_get_bool().  To me it seems that err will not be
set if the key is simply unset, but rather if something else fails, like
if a non-boolean value is stored at the key.  This is also regardless of
the existence of a schema for the key.

> +    printf("QIF import: gnc_gconf_get_bool error: %s\n", err->message);

Please do not use printfs, but rather one of
g_{debug,message,warning,critical,error}(), as described in
lib/libqof/qof/qoflog.h.

> +    g_error_free(err);
>  
> +    /* Show documentation pages by default. */
> +    printf("QIF import: Couldn't get show_doc setting from gconf.\n");
> +    printf("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, 
--8<---

Ciao,
-- andi5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20080229/dda2e5c0/attachment.bin 


More information about the gnucash-devel mailing list