Bug 381648

Summary: query property OpenItems of Tree widget broken in Gtk
Product: [openSUSE] openSUSE 11.0 Reporter: Arvin Schnell <aschnell>
Component: YaST2Assignee: Forgotten User h13THG8RK1 <forgotten_h13THG8RK1>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: forgotten_h13THG8RK1
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: example script

Description Arvin Schnell 2008-04-19 14:55:41 UTC
Querying the OpenItems property of the Tree widget is broken in Gtk.
See ycp-ui-bindings/examples/Tree2.ycp.

YaST SVN revision 46821 on openSUSE 10.3.
Comment 1 Forgotten User h13THG8RK1 2008-05-05 17:51:37 UTC
Yeah, we weren't telling libyui when the user expanded/collapsed rows. Fixed.
Comment 2 Arvin Schnell 2008-05-06 08:41:11 UTC
There are still problems with the tree and open items: When creating
the tree the open information is not used. In the example Tree2.ycp
both `root and `opt are marked as open when creating the tree. In Qt
and ncurses both are open but in Gtk only `root is.
Comment 3 Forgotten User h13THG8RK1 2008-05-06 13:56:42 UTC
Are you using SVN? I don't have privilege to send things upstream; you have to wait a little for Meeks or JP to package it through. I will ping them about it, and will pong you back. ;)
Comment 4 Arvin Schnell 2008-05-06 14:13:51 UTC
Yes, I'm using svn trunk and that's where I have found the problem.
I don't need a package.
Comment 5 Forgotten User h13THG8RK1 2008-05-06 17:48:00 UTC
Alright: fixed it. GTK was collapsing them because we were only setting the text property afterwards.
Comment 6 Arvin Schnell 2008-05-06 20:00:31 UTC
Sorry to bother you but there are still two problems: See attached
example.ycp:

1) If the open-flag of b is false and of c is true,
   b is initially drawn open.

2) When b and c are open and the user closed b and then
   opens b, c is closed. Maybe that is Gtk behavior. Shouldn't
Comment 7 Arvin Schnell 2008-05-06 20:01:47 UTC
Created attachment 212864 [details]
example script
Comment 8 Forgotten User h13THG8RK1 2008-05-06 23:58:26 UTC
Yeah, GTK API isn't as fine tuned to this nodes thing as wanted. Anyway, there wouldn't be any fun on this yast-gtk bridge if it wasn't for some bumps. ;) I think the behavior should now be the same as that of yast-qt... *crosses fingers*
Comment 9 Arvin Schnell 2008-05-07 08:39:37 UTC
Thanks, seems fine now. In fact I wouldn't mind a slightly different
behavior between Qt, Gtk and ncurses (and there still is).

But what I need is query the open status of the tree and create
a new tree with the old open status (since I have to remove, add
and change entries). It's very annoying if some branches open or
close along the way.