Am 13.01.2015 um 22:34 schrieb Paul Chavent:
There is no dedicated debug mode defined in code, but you might want to use dia_log_message(), which is printing to console with command line parameter --verbose.On 01/11/2015 10:45 PM, Hans Breuer wrote:[...] There seem to be some more bugs: - g_warning("sozi-object : use builtin player"); When running Dia in a debugger and with --g-fatal-warnings that's triggering a breakpoint. If it is a message for the user use message_warning. I've turned this specific one into #pragma message() - the other occurences need to be checked.I would like to use two kind of message : debug (less invasive, a simple text on stdout in debug mode would be enough),
error (on stderr for instance)
Two kinds of errors need to be distinguished: - progammer's error: use g_warning() - "user's" error: if there is a DiaContext available use dia_context_add_message() otherwise message_warning() or message_error()
If the user can not do anything useful with the information, yes. Maybe it's not important enough to be shown at all?I've tried message_notice and message_error, but i think that the popup will be annoying.
Please reconsider the importance of the message first. IMHO dumping random stuff to the console is almost never a good idea.What do you suggest ?
Yes, no other object implementation restricts movement by the parameter 'reason'. I have added a corresponding comment to object.h.- Undo for "Sozi - Frame" handles does not work (at least with frre aspect). Need move_handle() needs to be reversible, i.e. moving to the previous postions needs to restore the object.I used to check the "reason" of move_handle to be HANDLE_MOVE_USER, but it seems to be HANDLE_MOVE_USER_FINAL when done with undo. So i removed the check of "reason" and it works better.
Now I see rotation to be also implemented by move_handle modifiers. I've experimented with more advanced move_handle functionality with "Standard - Path" and basically dropped all these to make it work properly. See:I still have a problem to undo rotations. The modifiers aren't passed when called from undo.
git log lib/standard-path.c
- handle directions are off (visible by the direction of the mouse cursor)I'm not sure to understand what you mean. I've the mouse cursor that change when overing handles (see attachment).
Trying to reproduce I've only seen it with rotated "Sozi - Frame".Other objects supporting rotation have similar issues, see e.g. "Standard - Outline". Currently I have no suggestion how to overcome this.
BTW Rotation:My newest sozi-test.dia is using different rotatable objects to undo that rotation via Sozi. Now I've noticed some inconsitency between the user visible angle between different object implementations. Sozi, Standard-Image and Standard-Text are using the same representation, but Group and Standard-Outline are using two different variants. Did you use one of the existing objects as example. Or is clockwise just the most expected option?
To be continued ;)Your help is welcome, thanks.
Here is some more ;-) - the create functions should return the second handle (see attached patch) - together with the fix for move_handle() this makes Sozi object creation much more natural Thanks, Hans -------- Hans "at" Breuer "dot" Org ----------- Tell me what you need, and I'll tell you how to get along without it. -- Dilbert
Attachment:
sozi-test.dia
Description: application/dia
Attachment:
sozi-2015-01-14-hb.diff
Description: Text document