Re: GNOME CVS: bonobo dietmar
- From: Federico Mena Quintero <federico redhat com>
- To: gnome-components-list gnome org
- CC: Dietmar Maurer <dm vlsivie tuwien ac at>
- Subject: Re: GNOME CVS: bonobo dietmar
- Date: Wed, 1 Dec 1999 11:59:10 -0500
> Modified files:
> . : ChangeLog
> bonobo : gnome-bonobo-selector.c
>
> Log message:
> Wed Dec 1 15:45:55 1999 Dietmar Maurer <dm@vlsivie.tuwien.ac.at>
>
> * bonobo/gnome-bonobo-selector.c (select_row): bug fix: emit a clicked
> signal to simulate an OK button press.
The relevant code is
static void
select_row (GtkCList *clist, gint row, gint col,
GdkEvent *event, GnomeBonoboSelector *sel)
{
if (event && event->type == GDK_2BUTTON_PRESS)
gtk_signal_emit_by_name(GTK_OBJECT(sel), "clicked", 0);
...
This is a hack and is wrong for several reasons:
1. GnomeDialog::clicked is not a GTK_RUN_ACTION signal,
meaning that it is not kosher for code which is not part of
GnomeDialog itself to emit the signal.
2. If you really wanted to do that, GnomeDialog should provide
a function to request that a click be simulated, a la
gtk_button_clicked().
3. You are defining that "activating" the thing actually means
"clicking on a button". This is not very good practice.
You should not tie your internal semantics to the way they
are represented in the user interface.
If the user double clicks on an item, then the bonobo selector should
gnome_dialog_close() itself by hand and emit the proper notification
signal.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]