Gtkdialog filechooser dialog

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Gtkdialog filechooser dialog

#1 Post by MochiMoppel »

This one really puzzles me. The Gtk filechooser dialog let's the user pick a file from a list of files. Very little code involved, very cool - it seems to be widely used in Puppy. My problem: In Wary 5.2 and Lucid 5.x it picks the wrong file.

I've posted this already to the Bugs forum (http://www.murga-linux.com/puppy/viewto ... 747#497747) , along with a small test script, but I received no response. Since then I tested further and found that the problem occurs ONLY when I pick a file from /tmp. I copied /tmp to /root/tmp and tested again...no problem. Also no problem with any other directory or with Puppy 4.x. What makes /tmp so different? For me this bug (??) was a problem since /tmp was my default directory for downloads, browser cache and other stuff and I frequently had to access files in there. Normally users have no business in /tmp, which might explain getting no responses. I'm not so much intersted in a fix ( I "fixed" it already by not using /tmp anymore for my stuff), but I'm interested to know if anyone can replicate this strange behaviour - or if I'm indeed the only one on the planet .
Thanks in advance!
Last edited by MochiMoppel on Tue 30 Jun 2015, 05:53, edited 1 time in total.

User avatar
pa_mcclamrock
Posts: 695
Joined: Fri 03 Jun 2005, 23:13
Location: Fort Wayne, Indiana, USA

#2 Post by pa_mcclamrock »

I just tried it with the gnocl::fileChooserDialog (i.e., GTK+ file-chooser dialog invoked by way of a Tcl/Gnocl command) in WISH Disc-Writer (http://www.pa-mcclamrock.com/papenguins ... l#wishdisc), and I couldn't replicate that bizarre behavior; I tried it a couple of times, and it gave me the correct filename from /tmp each time. Maybe the bug is specific to a particular program that uses the dialog?
It's stupid to use inferior software for ideological reasons.
--Linus Torvalds

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#3 Post by MochiMoppel »

pa_mcclamrock wrote:I just tried it with the gnocl::fileChooserDialog (i.e., GTK+ file-chooser dialog invoked by way of a Tcl/Gnocl command) in WISH Disc-Writer
WISH Disc-Writer installs but doesn't run in my Lucid 5.2. What Puppy did you use? But anyway I'm not so much interested in finding other applications where the dialog work. I'm sure there are plenty. Could you replicate the error with my test script?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

I could duplicate the bug in Lupu 5.2, but not in all applications. It looks like a focus problem - if I double-click on the file, I get the right one. But if I single-click, then hit the Open button, I get the first file on the list.

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

#5 Post by Moose On The Loose »

rcrsn51 wrote:I could duplicate the bug in Lupu 5.2, but not in all applications. It looks like a focus problem - if I double-click on the file, I get the right one. But if I single-click, then hit the Open button, I get the first file on the list.
I have seen this same thing in Puppy 4.31

I did it from gtkdialog3

When you click on the file in the list the first time, it appears that
the file name does not get copied leaving things in the default condition. If this is the first from the list then that is what you will have. If in gtkdialog3, you preset a default file name, that name remains.

I have just had to instruct those who use it to double click. I included a line in the dialog box that showed the current file name so that the user would get feedback.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#6 Post by MochiMoppel »

Moose On The Loose wrote:I included a line in the dialog box that showed the current file name so that the user would get feedback.
Would be a nice idea for Pburn. Pburn drove me nuts when I tried to burn a Puppy ISO which I had downloaded to /tmp: Pburn told me that the selected puppy ISO file is not a valid ISO file yet I had no clue why. Now I know...

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

#7 Post by Moose On The Loose »

MochiMoppel wrote:
Moose On The Loose wrote:I included a line in the dialog box that showed the current file name so that the user would get feedback.
Would be a nice idea for Pburn. Pburn drove me nuts when I tried to burn a Puppy ISO which I had downloaded to /tmp: Pburn told me that the selected puppy ISO file is not a valid ISO file yet I had no clue why. Now I know...
Here is basically what I did:

Code: Select all

<chooser>
<height>(some magic here)</height>
<width>600</width>
<variable>IN_FILE</variable>
<action>refresh:NOTE_STR</action>
</chooser>
<text>
<variable>NOTE_STR</variable>
<input>echo "File = $IN_FILE"</input>
</text>
The height and width needed to be set in my case.
The action on the chooser causes the NOTE_STR to be generated and displayed every time the chooser changes the variable.

User avatar
pa_mcclamrock
Posts: 695
Joined: Fri 03 Jun 2005, 23:13
Location: Fort Wayne, Indiana, USA

#8 Post by pa_mcclamrock »

MochiMoppel wrote:Could you replicate the error with my test script?
Yes, the dialog opened with your test script returns the wrong filename from /tmp and also from /dev, but the correct name from other directories.
WISH Disc-Writer installs but doesn't run in my Lucid 5.2. What Puppy did you use?
5.2. Would you mind trying to run wishdisc from the command line and telling me what error message you get? If so, thanks in advance!
It's stupid to use inferior software for ideological reasons.
--Linus Torvalds

Post Reply