GtkTreeView signal before row change
- From: Lance Zhang <zhangp8 hotmail com>
- To: gtk-app-devel-list gtk <gtk-app-devel-list gnome org>
- Subject: GtkTreeView signal before row change
- Date: Tue, 8 Mar 2011 10:38:11 -0500
Hi:
I have a situation where I need to verify data before allowing a row change in a GtkTreeView. Essentially:
1. User requests a row change through a keyboard or a mouse;
2. Check if data in the current row has been edited without be saved, or even is complete
and valid, and prompt the user appropriately;
3. Depending on user request, I may need to veto the row change request (aka cancel)
What's the best practice?
A possible way is use "cursor-changed" signal
1. always remember the current row (possibly by store a GtkTreeIter)
2. in the cursor-changed signal handler, check if on the same row and go back to original row by way of
stored GtkTreeIter if necessary.
Is there a better way? Tell me how you would approach this please.
Thanks,
Lance
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]