Re: Toolbar editor



On Mon, Mar 31, 2003 at 09:59:55PM +0200, Marco Pesenti Gritti wrote:
> On Mon, 2003-03-31 at 19:06, Jody Goldberg wrote:
> > How do you persist the changes ?
> > 
> > I was underwhelmed by the kde approach that required the user to
> > specify which component to edit, then dumped the entire document
> > when it was edited.  Storing some form of context diff seems more
> > useful.
> 
> At the moment I'm saving the xml file to disk each time the toolbar
> changes. There are not noticable slow downs but maybe that's not a good
> idea ...

I'm not worried about it from a performance perspective, rather it
seems like an inviation for odd ui behavior.

1) myapp installs /usr/share/myapp.xml as its default toolbar layout
2) user changes it in someway and we save ~/.gnome/myapp.xml
   with the entire content of the original myapp.xml + changes

What happens when /usr/share/myapp.xml changes ? (eg app version
update or local admin makes a modification)

> I dont get your kde example (never used it). What do you mean with
> component and document ? 

I tried it out the other day to see how they approached this issue.
Their UI (at least for kspread) seems to be made up of several xml
documents merged together, a koffice chunk, and a pair of kspread
pieces.  The edit dialog requires you to choose which
piece/component to adjust.  They dump the entire xml file for that
component when its modified.

Ignoring the issue of merging multiple layouts for the moment to
simplify things.  I'd like to see just a diff stored, rather than
the entire xml
eg
    Add action FOO at index 3
or even better
    Add action FOO at index 3 to the left of BAR and right of BAZ

That leaves the main copy of the layout live.  It also gives us a
fair amount of flexibility when re-applying the change in the face
of adjustments in the main copy.

Handling multiple components gets trickier,  but may be handleable
by guessing which document to change based on the source of the
action.
eg a toolbar with something like
    A1 A2 B1 B2 A3
where A* are actions from component A and B* are in B

1) user insert an action A4 right of A1
- clearly in descroptor for A

2) user insert an action A4 right of B1
- clearly in descroptor for B

2) user insert an action A4 right of A2
- it could go either way, but I'm guessing that a heuristic of 'its
  an A action put it with A document' will cover us.  Failing that a
  fall back of 'just guess the first document' seems enough



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]