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 Sat 16 Dec 2017, 03:21
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Strange differences in GtkFileChooserDialog
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1399
Location: Japan

PostPosted: Fri 27 Oct 2017, 22:35    Post subject:  Strange differences in GtkFileChooserDialog  

I need help. I noticed a strange difference in the behavior of GtkFileChooserDialog, depending on Puppy version.

GtkFileChooserDialog is the building block for the 'Open' or 'Save as' dialogs in many applications, e.g. Geany.

After booting Slacko 5.6 (or Precise 5.7.1) from USB stick and mounting the stick the left 'Places' pane shows
    Search
    Recently Used
    ----------------
    root
    File System
    sdb1
    ----------------

When mounting additional partitions they show immediately below sdb1. When unmouting a partition, the entry is immediately removed from the list.

Not so in Tahrpup 6.05 or Lucid 5.2.8. In these Puppies the mounted partitions seem to be missing, the monitoring doesn't seem to work.

But: This difference may be related to another difference, showing in gtkdialog's chooser widget, and here Tahrpup shines where Slacko fails. When hiding and then unhiding a chooser widget, in Slacko the selected file list will not "stick", i.e. after unhiding the dialog reverts to the "Recently Used" list. In MMview this would make temporary hiding of the chooser ( to extend the viewer paner to the complete window width) useless.

Surprisingly hiding/unhiding in Tahrpup/Lucid works without problems. The display reverts to the original state. Perfect.

I now need to know how to distinguish and detect these 2 different behaviors from the command line. Depending on the result my script would then offer different options. How can I detect a specific GTK built?

Below is a demo script. The button of top hides/unhides the chooser, which by default starts in /root. After unhiding it should revert to /root (or any other directory that has been selected). In which Puppy does this work correctly and which Puppy fails?
Code:
#!/bin/sh
echo '
<vbox>
<togglebutton label="Hide/Unhide chooser">
   <action> if true hide:vCHOOSER</action>
   <action> if false show:vCHOOSER</action>
</togglebutton>
<chooser width-request="600" height-request="400">
   <variable>vCHOOSER</variable>
   <default>"/root"</default>
   
</chooser>
</vbox>' | gtkdialog -s
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 821
Location: Oslo, Norway

PostPosted: Sun 29 Oct 2017, 22:43    Post subject:  

I applaud your initiative to make this work as intended, I have always just thought of it as a bug, it did not influence on the way I work anyway.
Example from Geany's Open command:
I have never had any use for Recently used, because until Lucid 5.2.8.7, it never worked in any puppy I have used! Now it makes a list of recently opened files of all kinds, that have to be filtered from a massive list of source files (58 to be exact) to be of any use, but only if you look for a specific source. There is no entry for simple 'text-files'. Oh, and I have set encoding and filetype to be detected from file extension in More Options. I miss some sort of dialog between the Open script and the program that use the Open feature, that will restrict the filtering to files that actually can be read/viewed by the program in question, Geany don't open .jpg-files anyway! Very Happy
I have had to make some entries of directories I often use, like my puppylinux dir by clicking the Add button, and those entries are permanently visible, whether the drive or partition is mounted or not. No mounts have ever been detected at all.

Mochi, clicking the Hide/Unhide chooser button from your script in Lucid 5.2.8.7, hides/unhides absolutely everything, except for the chooser button itself.

tallboy
mochis-magic-button-unclicked.jpg
 Description   
 Filesize   27.44 KB
 Viewed   179 Time(s)

mochis-magic-button-unclicked.jpg

mochis-magic-button.jpg
 Description   
 Filesize   8.95 KB
 Viewed   190 Time(s)

mochis-magic-button.jpg


_________________
True freedom is a live Puppy on a multisession CD/DVD.

Last edited by tallboy on Sun 29 Oct 2017, 23:15; edited 1 time in total
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 821
Location: Oslo, Norway

PostPosted: Sun 29 Oct 2017, 22:52    Post subject:  

BTW, may I draw your attention to the Save dialog, where the Name window never seem to be in focus when I try to enter a file name, after finding the directory where I want to save the file in question, even if the temporary filename untitled is marked as selected. Very annoying.
Could the reason be related to the problems in the Open dialog?

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 954

PostPosted: Mon 30 Oct 2017, 09:06    Post subject:  

Works as described in Fatdog-710.
_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4748
Location: Republic of Novo Zelande

PostPosted: Tue 31 Oct 2017, 05:03    Post subject:  

My result in Slacko 5.6 derivative:

EDIT : If the animated gif fails to display it may be that image animation is turned off in your browser.
Screenshot.gif
 Description   
 Filesize   106.53 KB
 Viewed   121 Time(s)

Screenshot.gif


Last edited by greengeek on Tue 31 Oct 2017, 11:42; edited 1 time in total
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1362

PostPosted: Tue 31 Oct 2017, 06:42    Post subject:  

greengeek wrote:
My result in Slacko 5.6 derivative:



Whoa, fancy-schmancy gif post, greengeek!! Me like Very Happy Any chance by all graciousness of whim that you could do a short tutorial (in "How-To' section on murga) on how you make/put a "gif-post-on-murga" together so us mere mortals stuck in 2D can bring alive our posts when sometimes needed? Wink

Would be greatly appreciated Wink
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3106
Location: The Blue Marble

PostPosted: Tue 31 Oct 2017, 09:50    Post subject:  

@belham:

http://smokey01.com/newsletters/2017/April/0004-PuppyLinuxNewsletter-April2017.html#19

One more reason to read and subscribe to Puppy News Letter Very Happy

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1399
Location: Japan

PostPosted: Tue 31 Oct 2017, 10:09    Post subject:  

I've checked now Slacko 6.3.2 and found that the script works as in Tahrpup.
Working: Tahrpup 6.05, Lucid 5.2.8, Slacko 6.3.2
Not working: Slacko 5.6, Precise 5.7.1

Maybe an indication of the cause: Command geany -v in Slacko 6.3.2 outputs
Geany-INFO: GTK 2.24.20, GLib 2.36.4
Same command in Slacko 5.6:
Geany-INFO: GTK 2.24.10, GLib 2.32.4
I can't think of any other reason than the GTK version.

@tallboy: I find nothing wrong with Recently Used or the Open/Save dialogs. The only thing that confuses me is that mounted partitions are not showing in Places.

@step: "Works as described" means what? I described 2 different behaviors. Only 1 can apply to Fatdog. Which one?

@greengeek: I couldn't make sense of your screenshot until belham2 posted. In my browser animated images are disabled by default. Question: The screenshot shows no mounted partitions, maybe there aren't any. Would they show if you mounted a device?

@ belham2: Check out SFR's Take a Shot!. I know that you know it since you posted in the TAS thread. In my version the feature is a bit hidden in extra options.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4748
Location: Republic of Novo Zelande

PostPosted: Tue 31 Oct 2017, 11:34    Post subject:  

belham2 wrote:
...tutorial (in "How-To' section on murga) on how you make/put a "gif-post-on-murga" together
Mochi is right about TAS - it makes it very easy to capture a series of frames in animated gif form. Takes a bit of practice to set the parameters so that the result is small enough to post. I suspect the extra bandwidth of such gifs could pose a problem for the forum but I think that is justified occasionally.

MochiMoppel wrote:
Question: The screenshot shows no mounted partitions, maybe there aren't any. Would they show if you mounted a device?
Yes they do show once mounted:
Chooser_with_partitions.jpg
 Description   
 Filesize   33.7 KB
 Viewed   78 Time(s)

Chooser_with_partitions.jpg

Chooser_hidden.jpg
 Description   
 Filesize   7.48 KB
 Viewed   78 Time(s)

Chooser_hidden.jpg

Chooser_unhidden.jpg
 Description   
 Filesize   21.08 KB
 Viewed   78 Time(s)

Chooser_unhidden.jpg

Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 954

PostPosted: Tue 31 Oct 2017, 13:56    Post subject: Re: Strange differences in GtkFileChooserDialog  

My intention for "as described" was your last paragraph:
MochiMoppel wrote:

...
Below is a demo script. The button of top hides/unhides the chooser, which by default starts in /root. After unhiding it should revert to /root (or any other directory that has been selected). ...

Indeed that is the way your demo script works for Fatdog64. The button hides/unhides the chooser. Unhiding reveals the folder that was selected before hiding.

_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6770
Location: Auckland, New Zealand

PostPosted: Tue 31 Oct 2017, 14:07    Post subject:  

Hi guys, have you compared which gvfs packages are included in each of these puppies?
_________________
If you have or know of a good gtkdialog application, please post a link here

Classic Puppy quotes

ROOT FOREVER
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6770
Location: Auckland, New Zealand

PostPosted: Tue 31 Oct 2017, 14:09    Post subject:  

And which gvfs processes are running?
_________________
If you have or know of a good gtkdialog application, please post a link here

Classic Puppy quotes

ROOT FOREVER
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0644s ][ Queries: 14 (0.0063s) ][ GZIP on ]