Re: Treeview column width changed signal
- From: Jeffrey Barish <jeff_barish earthlink net>
- To: gtk-app-devel-list gnome org
- Subject: Re: Treeview column width changed signal
- Date: Wed, 13 Feb 2008 10:09:55 -0700
With some trepidation about extending this wearisome thread, I thought that
I would post for the benefit of the record some information about a
solution that I found. It is based on a suggestion made by Kristian
Rietveld in the previous incarnation of this thread (which I quoted when I
resurrected the thread). He suggested connecting to the "notify::width"
signal on each column. He warned that I needed to keep the callback fast
and specifically directed that I not write a file in the callback. As
writing a file was the purpose for detecting that column width had changed,
it did not seem as if his suggestion would work. However, what does work
is to use notify::width to set a flag indicating that the file needs to be
written. Then catch the button-release event for the treeview that
contains the columns. If the flag is set when I get button release, then I
write the file (and clear the flag). This solution works almost perfectly,
but I do get a spurious write when I first select a row. I hope that
someone will be able to glean something useful from this thread so that it
can now rest in peace.
--
Jeffrey Barish
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]