Re: AUDIT: r16678 - gnucash/trunk/src/pixmaps - Bug#503889: Install icons according to spec. On Win32, however, don't run the non-existant (?) gtk-update-icon-cache.

2007-12-18 Thread Josh Sled
Josh Sled [EMAIL PROTECTED] writes:
 Author: jsled
 Date: 2007-12-18 09:57:12 -0500 (Tue, 18 Dec 2007)
 New Revision: 16678
 Trac: http://svn.gnucash.org/trac/changeset/16678

 Modified:
gnucash/trunk/src/pixmaps/
gnucash/trunk/src/pixmaps/Makefile.am
 Log:
 Bug#503889: Install icons according to spec.  On Win32, however, don't run 
 the non-existant (?) gtk-update-icon-cache.

Hey Win32 builders.  I understand there's no gtk-update-icon-cache, so I
just blocked that whole bit out, I hope correctly.  Also, I don't think the
funny gzip -cd ${top_srcdir}/art/icon.svgz  [...] should be a problem
looking at other Makefiles, but I'm not 100% sure.  So, generally, I'd love
some QA, here:

 Property changes on: gnucash/trunk/src/pixmaps
 ___
 Name: svn:ignore
- Makefile
 Makefile.in
 semantic.cache

+ Makefile
 Makefile.in
 semantic.cache
 16x16
 32x32
 48x48
 scalable


 Modified: gnucash/trunk/src/pixmaps/Makefile.am
 ===
 --- gnucash/trunk/src/pixmaps/Makefile.am 2007-12-18 05:44:44 UTC (rev 
 16677)
 +++ gnucash/trunk/src/pixmaps/Makefile.am 2007-12-18 14:57:12 UTC (rev 
 16678)
 @@ -36,10 +36,48 @@
stock_split_title.png \
stock_split_watermark.png
  
 -gncicondir = ${datadir}/pixmaps
 -gncicon_DATA = gnucash-icon-16x16.png \
 -  gnucash-icon-32x32.png \
 -  gnucash-icon-48x48.png
 +gncnormalicondir = ${datadir}/icons/hicolor/48x48/apps
 +gncnormalicon_DATA = 48x48/gnucash-icon.png
 +48x48/gnucash-icon.png: gnucash-icon-48x48.png
 + -mkdir 48x48
 + cp gnucash-icon-48x48.png 48x48/gnucash-icon.png
  
 +gncmediumicondir = ${datadir}/icons/hicolor/32x32/apps
 +gncmediumicon_DATA = 32x32/gnucash-icon.png
 +32x32/gnucash-icon.png: gnucash-icon-32x32.png
 + -mkdir 32x32
 + cp gnucash-icon-32x32.png 32x32/gnucash-icon.png
 +
 +gncsmallicondir = ${datadir}/icons/hicolor/16x16/apps
 +gncsmallicon_DATA = 16x16/gnucash-icon.png
 +16x16/gnucash-icon.png: gnucash-icon-16x16.png
 + -mkdir 16x16
 + cp gnucash-icon-16x16.png 16x16/gnucash-icon.png
 +
 +gncscalableicondir = ${datadir}/icons/hicolor/scalable/apps
 +gncscalableicon_DATA = scalable/gnucash-icon.svg
 +scalable/gnucash-icon.svg: ${top_srcdir}/art/icon.svgz
 + -mkdir scalable
 + gzip -cd ${top_srcdir}/art/icon.svgz  scalable/gnucash-icon.svg
 +
 +# As suggested by http://live.gnome.org/GnomeGoals/AppIcon
 +if !OS_WIN32
 +gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
 +install-data-hook: update-icon-cache
 +uninstall-hook: update-icon-cache
 +update-icon-cache:
 + @-if test -z $(DESTDIR); then \
 + echo Updating Gtk icon cache.; \
 + $(gtk_update_icon_cache); \
 + else \
 + echo *** Icon cache not updated.  After (un)install, run 
 this:; \
 + echo ***   $(gtk_update_icon_cache); \
 + fi
 +endif
 +
  EXTRA_DIST = \
 -  ${gncpixmap_DATA} ${gncicon_DATA}
 +  ${gncpixmap_DATA} \
 +  ${gncnormalicon_DATA} ${gncmediumicon_DATA} ${gncsmallicon_DATA} 
 ${gncscalableicon_DATA}
 +
 +clean-local:
 + -rm -rf 48x48 32x32 16x16 scalable


Thanks in advance...
-- 
...jsled
http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]


pgpyyrf9VFgPs.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Thoughts on architecture for the GDA backend

2007-12-18 Thread Derek Atkins
Phil Longstaff [EMAIL PROTECTED] writes:

 OK.  Let me try this again.  I'll send as a plain text e-mail instead of 
 HTML and see if that fixes the formatting problem.

YAY!  Thanks!  Looks MUCH better.

 Except for a number of bugs (and a lot of testing, and a load/save UI), 
 the GDA backend basically works for the objects outside of the business 
 objects.  I also want to add an audit trail for changes and version 
 support to detect when a db needs to be updated to a newer version.

 So we've reached feature-parity with the 1.6 Postgres backend?
 Excellent!  Definitely good progress.  What's the time frame to get
 the business objects done?
   
 Depends, of course, on how much time I can spend on the project. With 
 holidays coming up, I should be able to spend more time, and maybe get 
 the business objects done. I've never used them before, so there will be 
 a bit of a learning curve.

You can always use src/business/business-core/file as a basis for
the business GDA plugin.  And note that yes, it DOES need to be
a plug-in because it's perfectly reasonable to be running without
the business-core.

 - create a new GObject interface which has methods for 1) getting a 
 dictionary of persistent data for the object 2) getting/setting 
 persistent data.  The goal would be to have the engine object and its 
 class have a bigger role in defining the db table columns in order to 
 better encapsulate persistence information in the engine objects.  The 
 backend would then be required to transfer the persistence information 
 for an object to/from the db or file.

 Thoughts?
 

 Do we really need this?  Is the current plug-in framework not
 sufficient?  Or do you really believe that you can come up
 with an interface that is backend agnostic?  I'd like to see
 a design proposal before going along this route, because if it's
 not backend agnostic then it's no better than what we currently
 have.
   
 I'm thinking of something like a modified version of the memento design 
 pattern (http://en.wikipedia.org/wiki/Memento_pattern).  It may have 
 originally been designed to allow state modifications to be undone, but 
 it should also be usable here with the gnucash object being the object 
 whose state needs to be saved and the backend being the caretaker.  
 However, we wouldn't need an object to be the memento.  We *would* need 
 name/type information to allow the memento state info to be saved/restored.

Well, the BeginEdit()/CommitEdit() sequence is supposed to be very
similar to this.  But I'm not 100% sure this is what we want in
the data store per se.

 In one sense, if every object kept made all of its information available 
 via kvp, it would be easy to store since there is a flexible mechanism 
 there, and there is no maintenance problem keeping the backend 
 up-to-date with the schema.

This is true, but it also makes it hard to search through KVPs.
How would you search a KVP for Account.name = X?

 Take the account object as an example.

 The XML backend calls xaccAccountGetName(), xaccAccountGetCommodity(), 
 ... and then encodes each piece of information.  The GDA backend calls 
 the same functions, formats the SQL INSERT or UPDATE request and passes 
 it to the db to be executed and save the object.  If a new attribute is 
 added to the account engine object, each backend needs to be modified to 
 call a new function to get the attribute value, then each backend needs 
 to encode it properly in order to save it.

Yeah..  This is certainly an annoyance.   By the way, I hope that you
encode it all into a single SQL INSERT or UPDATE request for the whole
object instead of one per attribute?

 The Account engine object now has GObject properties defined for all of 
 its internal attributes.  This allows g_object_get() and g_object_set() 
 to be called to get/set attribute values respectively, but also allows 
 g_object_class_list_properties() to be called to get a list of the 
 attributes including type information.  A backend could call 
 g_object_class_list_properties() and then, for each attribute, call 
 g_object_get(), encode the value and save it.  It would need to to know 
 how to encode each type (for XML, strings are easy, numbers are easy, 
 commodities are a namespace/name pair, etc., while for GDA, strings are 
 easy, numbers are easy, commodities are a GUID, etc.).  One problem with 
 g_object_class_list_properties() is that the account has a number of 
 properties (such as ending balance) which don't need to be persistent.  

* nods *

 Therefore, an IGncEnginePersistenceInfo interface with a 
 gnc_engine_object_get_persistence_parameters() function to return the 
 same kind of info as g_object_class_list_properties() would be added (an 
 alternative is to define GncObject or GncEngineObject as a subclass of 
 QofObject and subclass all engine objects from it - the 
 gnc_engine_object_get_persistence_parameters() could then be defined as 
 a method for GncEngineObject). Actually, it