[openbeos] Re: [Open-beos-cvs]CVS:current/src/prefs/datatranslationsDataTranslationsWindow.cpp,1.2,1.3

  • From: "François Revol" <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 01 Jul 2003 00:40:01 +0200 CEST

> >
> >
> >IMHO, one of them is the format for storing preferences. 
> >  
> >
> I vote for a human-editable format. (or additional command-line 
> preference tools?) Command-line clows can edit it easier then :) With 
> no 
> trouble for the gui users. (they wouldn't even notice)
> 

Without resorting to XML stuff, I'd suggest a format derived from the 
one 
Dano uses for BMessage::PrintToStream(), which would look like:

        // Desktop backgrounds; please respect count and ordering of 
all fields!
        be:bgndimginfo = BMessage(0x00000000) {
                // Workspaces each backdrop apply to
                be:bgndimginfoworkspaces = int32(1 or 0x1)
                // Actual backdrop image file
                be:bgndimginfopath = string("/boot/home/config/
Backgrounds/GonxBG.png", 40 bytes)
                // image mode: 0=use_origin, 1=centered, 2=scaled, 3=
tiled
                be:bgndimginfomode = int32(2 or 0x2)
                // Origin point for mode 0
                be:bgndimginfooffset = BPoint(0.0, 0.0)
                // If true, use desktop color as icon text background
                be:bgndimginfoerasetext = bool(true)
                // one per workspace, up to the last changing one
                be:desktop_color[0] = rgb_color(126,160,193,255)
        }

I have a quite working dumper/parser for this format already, 
I can contribute it.


François.
(sorry in case of double)



Other related posts: