I am not so sure about the mechanics of the undo stack and the meaning of verbs. I have coded an improvement to the user interface for embedding color profiles in a document and I have used the sp_document_done call. The patch is attached.
Could anybody review it?
It adds a "remove" context menu option in the "Embedded color profiles" box that appears in the "Color Management" tab in "document settings" dialog. Undoing and redoing works ok, but I am not sure aobut the verbs. I expected it to call the update() method onde the user press CTRL+Z or SHIFT+CTRL+Z so that my widgets would be properly updated.
Juca
On Fri, Nov 21, 2008 at 8:19 PM, Felipe Sanches <felipe.sanches@...400...> wrote:
I am not so sure about the mechanics of the undo stack and the meaning of verbs. I have coded an improvement to the user interface for embedding color profiles in a document and I have used the sp_document_done call. The patch is attached.
Could anybody review it?
I haven't tested it but it looks OK. The _done call is due after you have changed the XML representation of the document.
It adds a "remove" context menu option in the "Embedded color profiles" box that appears in the "Color Management" tab in "document settings" dialog. Undoing and redoing works ok, but I am not sure aobut the verbs. I expected it to call the update() method onde the user press CTRL+Z or SHIFT+CTRL+Z so that my widgets would be properly updated.
Widgets are not automatically updated once you update the document, you must do it yourself (e.g. with by listening to selection changed/modified signals). Only the screen display of the document itself is updated automatically.
ok, but I still dont understand what is the use of a verb. When will the Verb::perform method be called with data==SP_A_CERTAIN_VERB ?
Felipe
On Sat, Nov 22, 2008 at 9:39 PM, Felipe Sanches <felipe.sanches@...400...> wrote:
ok, but I still dont understand what is the use of a verb. When will the Verb::perform method be called with data==SP_A_CERTAIN_VERB ?
Verbs can be assigned to menu items (menus-skeleton.cpp) and/or to keys via share/keys/default.xml.
participants (2)
-
bulia byak
-
Felipe Sanches