Do not apply color scheme upon color scheme selection dialog display
commit2ed1d6d8bbc936a8a21d205d34cf9910114632c0
authorColomban Wendling <ban@herbesfolles.org>
Sun, 27 May 2012 18:12:31 +0000 (27 20:12 +0200)
committerColomban Wendling <ban@herbesfolles.org>
Sun, 27 May 2012 18:25:19 +0000 (27 20:25 +0200)
tree3b47ddb16c3e004e809dbcf4c5ca8b9ae6f0fcca
parentffd3d739db23c2da70faf960bc060e4a3e29c4ae
Do not apply color scheme upon color scheme selection dialog display

Current color scheme was applied upon color scheme selection dialog
display because the GtkTreeView::cursor-changed signal is emitted when
the tree view is initially shown (since it actually gets the focus for
the first time), uselessly re-applying the current color scheme.

This is a performance issue because when many documents are open
updating the color scheme can take a few seconds.

Now we watch for the GtkTreeSelection::changed signal on the tree
view's selection, which is only emitted when the selected item actually
changes.  We also connect to that signal after filling the tree so we
don't get notified on the initial selection setup.
src/highlighting.c