squash 40 commits:
1. 6848: citationtreeview corrupts when search bar open and edit occurs
2. avoid critical gdk error by processing events only when window visible :
     Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed
3. In case of errors with fg_color, enormous amount of error messages. This patch
   grabs wrong fg_color, and skips action, avoiding the error messages. Error goes to debug.


git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22610 4ae1f11a-8b86-4847-b8af-ab372f36d1fd