Thunor
I have been working with great new stuff in 0.8.2, and most of it is working great. However, I have met some limitations....
I am struggling with signals in the <tree> widget.
The dream is to move items in list, and that didn't look too advanced at first, but now...
The attribute reorderable="true" works as expected, and with the support of <output file> in gtkdialog-0.8.2 everything should be fine. - But no go.
I have tried several attempts, and this is the closest I get.
In pMusic it is required to update the <input file> after moved a track in playlist (<tree>). Else, the new sort order won't be kept the next time the user adds a track to the list (refresh <input file>) . The first issue I met was that <output file> only kept data from the exported column - not the whole tree which I find more logical. I see input/output as one data-flow. Second, I couldn't get the <action>save: happen
before I grab the output file for further work. (ie. to update the <input file> depending on the new sort-order in the <output file>.) The code-example shows the problem.
The first issue has a possible workaround with an extra grep-loop, while I can't see an immediate solution to the second issue.
Code: Select all
#!/bin/sh
echo -e "1\n2\n3" > /tmp/input
echo > /tmp/output
echo '
<window>
<vbox>
<text><label>Move items in list and check output in terminal</label></text>
<tree reorderable="true" column-header-active="0">
<label>A</label>
<variable>TREE</variable>
<input file>/tmp/input</input>
<output file>/tmp/output</output>
<action signal="button-release-event">echo "button-release-event get the signal first. That is why I save:TREE"</action>
<action signal="enter-notify-event">echo "enter-notify-event gets the signal later. But output file is not updated"</action>
<action signal="button-release-event">save:TREE</action>
<action signal="enter-notify-event">cat /tmp/output</action>
</tree>
<hbox><button ok></button></hbox>
</vbox>
</window>
' | gtkdialog -s
When talking about the <tree> widget, I want to mention the other 'weakness' that makes me sometimes use the <table> instead. The <tree> auto-resize the column-width to show all content of input file. Maybe a nice feature
sometimes, but with large input data, mostly not (my opinion). But worse, - it does only auto-expand column-width, never shrink again.
Thank you for all the goodies
Sigmund