[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-dev: New autonumber text dialog
Hi Tomaz,
I hope it's ok if I move some parts of the patch to the list.
https://sourceforge.net/tracker/?func=detail&atid=818428&aid=1589430&group_id=161080
On Thursday 02 November 2006 19:30, Tomaz Solc wrote:
> > Can you put a patch to the sourceforge tracker or somewhere else?
>
> I've uploaded the patch to the sourceforge tracker.
>
> I believe it still needs some work though. I found at least one bug
> in the autonumbering code which I don't know how to fix (see my
> description of the patch).
I've applied the patch and played a little bit:
| * Changed the look of the dialog window. It is now
| closer to Gnome HIG.
I like it, lets hear what others think.
The history of the searchtext is great, but it should not contain dups:
refdes=R?
refdes=R? << previous
refdes=R? << previous
refdes=C?
refdes=C?
It would be nice if:
* the searchtext won't be added to the history, if it's the previous
element in the history
* or if the searchtext is already in the history (remove the old one
and add the new one at the top of the history)
Going on:
What do you think about exchanging the two scope dropdowns "skip numbers
found in" and "Autonumber text in". I've at least some "brain" problems
to use it in that order.
The check button for "overwrite existing numbers" ist much better than
my ration buttons.
When using the dialog I noticed that the sort order makes the dialog
really large. Is it possible to put them into a dropdown, together with
icons?
The sort order is still an option. There would be no need for an extra
headline then.
| * Separated GUI and backend code a bit and added some
| Doxygen comments. The code in x_autonumber.c is still
| hard to read and even harder to understand. In my
| opinion it should be separated into more smaller functions.
Yes, this way it makes sense to split the functionality.
I know the autonumber code is hard to read. There are lots of options
and combinations to take care of.
| * Added "remove numbers" functionality.
The numbers are only removed if you use a selection that would renumber
those elements.
Thus, it only deletes the numbers if you select the "Overwrite existing
Numbers" option.
I think this option should not walk through the whole autonumber code.
Just iterate over the {selection, page, hierarchy) and remove the
matching text elements.
(in the code before Step3 in function autonumber_text_autonumber())
| There is at least one bug in the autonumbering code
| which I am unable to fix:
|
| Put three elements on an empty page. Set "refdes=U1",
| "refdes=U2" and "refdes=U?". Now select all of them and
| use the autonumber dialog with the following settings:
|
| Search for: refdes=U?
| Skip: selected objects
^^^^^^^^^^^^^^^^^^^^^^
| Autonumber: selected objects
| Overwrite: no
|
| Other settings at default values.
|
| Result: the third element gets numbered U1 (so there
| are two elements named U1 on the page)
|
| Expected result: the third element should be numbered U3.
In my patch I've used:
namespace = {hierarchy, page, none}
while you've used:
skip found numbers = { hierarchy, page, selection }
without changing the autonumbering code. It behaves like my patch but
you're expecting that it should behave like your dialog. ;-)
The code does not build a list of used numbers if namespace=hierarchy or
namespace=page --> namespace=none.
see: http://archives.seul.org/geda/dev/Sep-2006/msg00106.html
Ok. I'll play a little bit more on saturday.
Regards
Werner
_______________________________________________
geda-dev mailing list
geda-dev@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev