static void file_dialog_entry_enter_cb(const gchar *path, gpointer data) { GenericDialog *gd = data; file_dialog_entry_cb(NULL, data); if (gd->default_cb) gd->default_cb(gd, gd->data); }
static gboolean generic_dialog_default_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { GenericDialog *gd = data; if (event->keyval == GDK_KEY_Return && gtk_widget_has_focus(widget) && gd->default_cb) { gboolean auto_close; auto_close = gd->auto_close; gd->default_cb(gd, gd->data); if (auto_close) generic_dialog_close(gd); return TRUE; } return FALSE; }