[gdm-list] =?utf-8?q?Bug_522890_=E2=80=93_desire_a_new_button_to_?= =?utf-8?q?select_desktop_environment?=



some days ago, I had an interesting discussion with Brian Cameron
about gdm-buttons.

that's the link: http://bugzilla.gnome.org/show_bug.cgi?id=522890

In gdm-2.20.*, buttons associated with id="session-buttons" give a
list of available session in /usr/share/xsessions/. no mechanism is
provided to  allow a single button to choose one only of them with a
single clic.
I think this feature is very elementary and should be granted natively
by this application. without it, gdm behaves as a car which can only
turn on the right but not on the left :) .

Brian gave me a lot of instructions to make a patch to add this
feature to gdm-2.20 (I'm just a noob, not a programmer) and I studied
the problem to find a solution.

unluckily, the problem reveal itself bigger than expected because of
some limitation in actual gdm design.

first of all, gdm defines actions between the id key. ids have non
dinamic definition, so you can't add a new id, such as gnome-2.23. in
second step, buttons allow just one action for id. so if you add a
start-button id for gnome and one for kde, the second overwrites the
action carried by the first one.

to solve the problem you should:

1. modify gui/greeter/greeter_parser.c to add a new id (for example
id=start_button) and a new option to define the name of the session.

2. create a dynamic list to store this information in some location (I
think independent by greeter info, because they are not associate with
the single child).

3. send a pointer of this list to greeter_item_session_setup function,
inside  gui/greeter/greeter_session to  set  the action for the new
button.

the last step  has  a  bad problem: I discovered that, in actual gdm
system, greeter_item_session_setup runs before parsing. so, the step 3
needs some change in gdm flux-chart.

now, gdm-2.20.* will soon become obsolete, because a new xml format is
being implemented in gdm-2.22.* so Brian thinks it does make not sense
to work too much on actual design.
anyway, I've find a dirty hack which adds the feature in a simple way,
but violating parsing rules of greeter_parser.c .
that's the code: http://bugzilla.gnome.org/attachment.cgi?id=111956

Now, I ask for an opinion between this possible choices:

1. the feature is not important, and is good to leave the car not
turning on the left;
2. the hacks is simple enough and it works, so it may be implemented
as is, even if it is out of rules;
3. the feature is important and has to be added in a better way, so
more work is needed to do it.

thank for your opinion.


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