"changed" signal operation for GtkTreeSelection
- From: Ron Lockwood-Childs <rchilds vctlabs com>
- To: gtk-app-devel-list gnome org
- Subject: "changed" signal operation for GtkTreeSelection
- Date: Mon, 02 Feb 2004 14:31:36 -0800
Hello,
I found in the FAQ information about capturing the occasion when a user
selects a row in a ListStore -- providing a callback for the "changed"
signal emitted by the GtkTreeSelection. However, this is causing me
grief in my current application, as I have witnessed the following behavior:
The ListStore in my application contains the contents of a directory.
The current working directory can be altered by selecting one of the
directories named in the list, which will replace the ListStore's
contents with the contents of the selected directory. Unfortunately,
when I select an item from the list (which has no items currently
selected), the application receives two "changed" events in a row: one
for the very first item in the list, followed by the item the user
selected -- that is, if it isn't the first item in the list. I haven't
any idea how to work around this behavior, since I can't know a priori
whether the user will select the first item, and therefore immediately
handle the signal and change the ListStore's contents; or the user will
select an item further down in the list and I should ignore the first
event (except in the simple case in which the list contains only a
single item!).
Assistance/advice will be appreciated.
--
Ron Lockwood-Childs
VCT Labs, Inc.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]