Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 24 Jul 2014, 13:52
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Gtk filechooser dialog
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 324
Location: Japan

PostPosted: Thu 10 Mar 2011, 05:41    Post_subject:  Gtk filechooser dialog  

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/viewtopic.php?p=497747#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!
Back to top
View user's profile Send_private_message 
pa_mcclamrock


Joined: 03 Jun 2005
Posts: 657
Location: Fort Wayne, Indiana, USA

PostPosted: Thu 10 Mar 2011, 08:06    Post_subject:  

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/papenguinspacks.html#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

Visit Pa Penguin's Icebox: http://www.pa-mcclamrock.com/icebox.html
Back to top
View user's profile Send_private_message Visit_website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 324
Location: Japan

PostPosted: Thu 10 Mar 2011, 08:46    Post_subject:  

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?
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 8906
Location: Stratford, Ontario

PostPosted: Thu 10 Mar 2011, 10:17    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 508

PostPosted: Thu 10 Mar 2011, 11:01    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 324
Location: Japan

PostPosted: Thu 10 Mar 2011, 12:01    Post_subject:  

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...
Back to top
View user's profile Send_private_message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 508

PostPosted: Thu 10 Mar 2011, 22:52    Post_subject:  

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:

<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.
Back to top
View user's profile Send_private_message 
pa_mcclamrock


Joined: 03 Jun 2005
Posts: 657
Location: Fort Wayne, Indiana, USA

PostPosted: Sun 13 Mar 2011, 17:53    Post_subject:  

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.

Quote:
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

Visit Pa Penguin's Icebox: http://www.pa-mcclamrock.com/icebox.html
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0748s ][ Queries: 12 (0.0157s) ][ GZIP on ]