new diagram tree patch


i'm attaching yet another patch adding new functionality to the
diagram tree thing, namely:

- single click on a object tree node now selects the object in the
  diagram. double click, in addition, raises its window.

- new preference ("Remember last size" in the preferences tab) to
  remember the last tree window size as the default
  (poor-man's-session-management :-).

- new popup menu commands:
        * Hide this type: makes invisible (in the tree) all objects of
          this type (useful to avoid clutter by uninteresting objects
          such as connectors, and the like).
        * Show object type. hidden types are listed in this
          submenu. click on any of the to bring it back.

- preferences toggle ("Remember hidden types") to save the list of
  hidden types as a preference.

that's it. i think the functionality of the tree window is now quite
complete, but for the absence of multiple object selection (i'll work
on it in the next days). nevertheless i'm open to any suggestion on
your side :-)

IMPLEMENTATION NOTE: i've tweaked preferences.c to make PREF_STRING
work. the functionality was almost there, and i've simply put the code
related to PREF_STRING out of the '#ifdef PREF_CHOICE' guard, changed
expressions of the form *(char *) to *(char **) (since a string
preference is stored as a char *), and make it save the string value
in the diarc file using double quotes, to make the parser happy. it
works for me (i use it to store the list of hidden types), but maybe
the preferences.c author would like to have a look at it?



Attachment: dia.diff.gz
Description: application/gunzip

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