Re: Odot::CellRendererText's edited signal ... same as previous post re: CellRendererCombo



On Wed, 2005-09-28 at 10:48 +1000, Daniel Kasak wrote:

As promised ( or threatened ), here is a slight modification of my 
previous script that demonstrates the same issue as before ( cell's 
edited signal not firing ), but this time with a custom CellRendererText 
that I grabbed from Odot.

What a vicious way to force me to look into it!

As before, run the script, edit the text in the first cell ( a 
stock-standard CellRendererText ), and then immediately after editing ( 
and before hitting 'Enter' ), click the 'dump values' button. Note the 
values are correct.

It looks like the reason for this is rather simple: GtkCellRendererText
connects a callback to its entry's focus-out-event.  In this callback,
GtkCellRendererText basically calls its editing-done method:

static gboolean
gtk_cell_renderer_text_focus_out_event (GtkWidget *entry,
                                        GdkEvent  *event,
                                        gpointer   data)
{
  /* ... */

  gtk_cell_renderer_text_editing_done (GTK_CELL_EDITABLE (entry), data);

  /* entry needs focus-out-event */
  return FALSE;
}

It should be easy to add this to Odot.  I'd happily accept patches. :-)

-- 
Bye,
-Torsten




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