XML editor: warn on editbox changes

Bug #170123 reported by Buliabyak-users
2
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Wishlist
Mental-users

Bug Description

1 draw a freehand path
2 ctrl-shift-x
3 click on the path's d= attribute in xml editor; it
is now displayed both in the list and in the editing
frame below
4 f1, drag the shape around

Result: the d= attribute in the list is updated, but
the editing frame is not.

Expected result: editing frame must update too,
overwriting any not-yet-committed changes made by the
user there (probably with a warning).

Tags: ui xmleditor
Revision history for this message
Mental-users (mental-users) wrote :

Hmm, what kind of warning would be appropriate? I think a pop-
up or similar would be kind of obnoxious.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Maybe a message in a statusbar? By the way, it would be nice
to add a statusbar of its own to the XML editor, it could be
used for all sorts of help and error messages when working
on XML.

Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :

Here's what I think should probably be done

* Two boolean states need to be tracked. Locally modified
("dirty") and remotely modified ("need-sync").

* Next to the "Set attribute" button (just to the left I
imagine) add an "undo"/"cancel" button. Hitting it will
discard whatever is in the edit field and replace it with
the attribute's current value is. Additionally it will clear
the edit's "dirty" and "need-sync" states.

* Once the user starts to change the value in the edit box,
it goes to a dirty state.

* The cancel button is only enabled when the edit is dirty.

* Whenever the value of an attribute is changed need-sync
becomes true

* Whenever need-sync becomes true and the edit's dirty is
false, it's contents are changed to the new value.

* Whenever need-sync becomes true and the edit's dirty is
true, changes to the attribute are not reflected to the
edit, but the cancel button goes to "re-sync" state.

* If the edit window is to be switched to a new attribute
(or to none) but the edit is "dirty", a warning dialog
should be shown asking to confirm losing user changes. This
dialog should also have a "Don't show me again" preference
checkbox. Canceling the loss would either stick the
selection back to the owner of the attribute.

* The dirty:true need-sync:false image for the cancel button
can be copied from the "Edit|Undo" icon, and the dirty:true
need-sync:true image ("re-sync" state) for the cancel button
can be copied from the "File|Revert" icon.

Revision history for this message
Mental-users (mental-users) wrote :

I think a better solution would be to switch to the Gtk 2.4
treeview widget for attributes; it supports in-place editing.

Revision history for this message
Kees Cook (kees) wrote :

The disconnect between row/edit box is now solved. The rest
of the stuff is really more an RFE, so I'm refiling this item.

Ryan Lerch (ryanlerch)
Changed in inkscape:
importance: Low → Wishlist
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.