Re: g_signal_emit_by_name



Hi

<snip a lot of code>

You're misunderstanding the _emit_ functions. They are supposed to be used
"inside" GObjects to run their attached signal handlers.

So a soluting would be:

gboolean your_old_code(...)
{
  return FALSE; // destroy
  return TRUE; // do not destroy
}

gboolean delete_event_callback(...)
{
  return your_old_code(..);
}

gboolean close_or_continue()
{
  gboolean result = your_old_code(..);
  if( FALSE == result )
    gtk_widget_destroy( window );
  return result;
}

HTH

Jan-Marek



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