Bug#281934: glade-2: cut and paste changes names

Rich Walker Rich Walker <rw@shadow.org.uk>, 281934@bugs.debian.org
Fri, 19 Nov 2004 13:13:22 +0000


Gustavo Noronha Silva <kov@debian.org> writes:

> Em Qui, 2004-11-18 =E0s 17:34 +0000, rich walker escreveu:
>> If you copy something in glade, all the names of the objects making it u=
p are
>> reset to default names, which means you have to go through resetting the=
m all
>> for your code to work. Whilst this makes sense for cut-and-paste within a
>> single window, if you cut-and-paste a whole window in the window list wi=
ndow,
>> it is a real pain.
>
> Hey,
>
> If I create a window, put some widgets in it, right-click it on the
> widgets tree and say 'cut' and then press 'Ctrl+v' the old names are
> kept.
>
> If, instead, I copy it, the names are reset, because you cannot have
> duplicate names in a same glade file.=20

If true, that would seem to be very broken behaviour of the Glade file
format. However, I have glade files with a lot of widgets of the same
name in different windows, so it may only be true for certain parsers,
or at the same branch depth in one tree.

> This seems to be a quite sane
> behavior. Would you mind describing what you would expect? What do you
> suggest glade-2 do?

I have a window X. I want to experiment with an alternate version of X
in the same program - so using all the same widgets, signals,
g_object_data and so on. The natural way to do this is to, in the Glade
Project view window, copy the whole window, to X1, and then open X1 and
re-arrange the widgets in X1.

If X1 has all different widget names to X, then I get to waste a long
time going click - click - delete - type  - click - click - delete -
type which doesn't help my RSI much :->

I would prefer copied *anything* to keep the same name *unless* it was
actually necessary to change them. (I understand that, because the code
generated from glade-2 puts all widgets at the same scope within the
generated file, it is necessary for all widgets in a single window to
have unique names)

cheers, Rich.

--=20
rich walker         |  Shadow Robot Company | rw@shadow.org.uk
technical director     251 Liverpool Road   |
need a Hand?           London  N1 1LX       | +UK 20 7700 2487
www.shadow.org.uk/products/newhand.shtml