예제 #1
0
파일: ui_utildlg.c 프로젝트: ode79/geeqie
static gboolean generic_dialog_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
{
	GenericDialog *gd = data;
	gboolean auto_close;

	auto_close = gd->auto_close;

	if (gd->cancel_cb) gd->cancel_cb(gd, gd->data);
	if (auto_close) generic_dialog_close(gd);

	return TRUE;
}
예제 #2
0
파일: ui_utildlg.c 프로젝트: jkufner/geeqie
static gboolean generic_dialog_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
	GenericDialog *gd = data;

	if (event->keyval == GDK_KEY_Escape)
		{
		if (gd->cancel_cb) gd->cancel_cb(gd, gd->data);
		else if (gd->auto_close) generic_dialog_click_cb(widget, data);
		return TRUE;
		}
	return FALSE;
}