/usr/lib/gtkdialog/box_splash and animated gif icons?

Please post any bugs you have found
Message
Author
User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#21 Post by Argolance »

Bonsoir,
fredx181 wrote:Just experimented for fun Laughing :
:D 8)
When I saw your first gif image above, and now this one, I wondered how it is possible, from the video recording of a part of the screen, to build a gif file. Could you please give some indications, as this can be very useful, if not in this thread, in another one or by private message?
Thank you a lot.

Cordialement.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#22 Post by fredx181 »

Hi Argolance,

Tried to find documentation, not sure if it's the most accurate (may be a bit chaotic).

I use weX for the video screencast (created the video which is converted to .gif as shown in my above post).
http://www.murga-linux.com/puppy/viewtopic.php?t=107905
And:
http://www.murga-linux.com/puppy/viewtopic.php?t=113229

GifenC (convert video to .gif):
http://www.murga-linux.com/puppy/viewto ... 724#948724

Forum member Mike Walsh jumped in, added some more info and provided a more extended .pet package, including gifenc:
http://www.murga-linux.com/puppy/viewto ... 080#998080
And:
http://www.murga-linux.com/puppy/viewto ... 364#999364

Fred

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#23 Post by Argolance »

Great! Thank you a lot.

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

#24 Post by MochiMoppel »

Tired of bug hunting? :lol:

Come on, the game is not over. Here is another one:
The -deco option does not work in box_splash. Worked fine in all versions of gtkdialog-splash.

ITSMERSH

#25 Post by ITSMERSH »

fredx181 wrote:Just experimented for fun :lol: :

Image

To run, download:
https://dl.dropboxusercontent.com/s/xg2 ... ar.gz?dl=1

Extract launch.tar.gz and run "launch" (inside "launch" folder)
Has 15 seconds timeout, it's using the older gtkdialog-splash that Argolance shared earlier in this thread.

Fred
Uaaahhh, that's really great.

Exactly what I need for my QTR Suite (my Music Suite to run, control and connect all the programs from a project). I have added a option to the launch script, so it combines the sound of a rocket launch (using aplay) for about 18 seconds (faded out) while displaying the gif image when starting QTR Suite.

Great, thanks!

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#26 Post by wiak »

Argolance wrote:This is the Puppy Precise 5.7.3 gtkdialog-splash, to be renamed without the gz extension, the one that "does the job" and may be used as stand alone script, renamed otherwise so as not to conflict with the one with the same name in /usr/bin directory which refers to box_splash.
Isn't it, sometimes, in old pots that the best soup is made? :)
Maybe it's possible to have support for resizeable images and also make .gif images display correctly, but... will be difficult, I guess.
Why could it be so difficult?
With a little goodwill, anything is possible!
I'm not doing much computing these days, but checked by yesterday and noticed this interesting thread. I've since installed XenialDog32 along with that gtkdialog-splash version out of Puppy Precise into its own folder. From that folder I'm executing the command:

Code: Select all

./gtkdialog-splash -placement top -icon "/fredsSavingSession.gif" -text "Please wait..." -close never &
and the gif animation is displaying fine. But one thing I'm not understanding from earlier post is that I find that with that old gtkdialog-splash version the animated gif is displaying fine with either gtkdialog3 (gtkdialog version 0.7.20, which is included in XenialDog32) or with gtkdialog4 (gtkdialog 0.8.3 included in XenialDog32). I understand that that old gtkdialog-splash does not set icon-width at all, but earlier post still seemed to suggest it would only work with gtkdialog3, which is not the case in my test. i.e. the animated gif shows fine with either gtkdialog3 or gtkdialog4 when using that ancient gtkdialog-splash script.

Do others find something different?

I haven't looked into the icon-width setting issue in the C code as yet; wanted clarity on the above first before checking that.

wiak

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

#27 Post by MochiMoppel »

wiak wrote:earlier post still seemed to suggest it would only work with gtkdialog3
This was my assumption, and the assumption was wrong.

The problems solely result from the very different gtkdialog-splash versions

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#28 Post by wiak »

MochiMoppel wrote:
wiak wrote:earlier post still seemed to suggest it would only work with gtkdialog3
This was my assumption, and the assumption was wrong.

The problems solely result from the very different gtkdialog-splash versions
I was referring to Argolances earlier post, which did say gtkdialog3 only worked with that old Precise gtkdialog-splash (with animated gifs). But, as I said, I also found gtkdialog4 also worked fine in my test.

I'd rather not try to work out how any version of gtkdialog-splash or box_splash scripts work, since I'm not familiar with either code so would take me ages (or at least complicate the matter since so much more code involved). If someone could instead post a couple of simple gtkdialog programs that illustrate the effect of icon/pixmap width being used such that animated gif no longer shows (just a simple example - not a version of any splash per se - i.e. just a gif image loaded to show when it runs and when it won't), I could look at the C code to see if I could find a convenient workaround that could be applied inside gtkdialog code itself - rather than having to find external bash script/gtkdialog xml code workarounds - I believe I know the area of code to look at and it may be that if no icon width is specified then gtkdialog operation itself could be arranged to not upset animated gifs running (if that is the issue) - or is it all indeed nothing to do with gtkdialog4 (etc) and just a box-splash scripting problem?

wiak

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

#29 Post by MochiMoppel »

wiak wrote:or is it all indeed nothing to do with gtkdialog4 (etc) and just a box-splash scripting problem?
Yes.
If this time my assumption is correct then it is very easy to fix. Changing one value should do the trick.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#30 Post by wiak »

MochiMoppel wrote:
wiak wrote:or is it all indeed nothing to do with gtkdialog4 (etc) and just a box-splash scripting problem?
Yes.
If this time my assumption is correct then it is very easy to fix. Changing one value should do the trick.
If that proves to be the case I won't look into it further. My own assumption is that all will be fine if <width> is not used or set perhaps to -1 when animated gif the image (not really understanding the issue, I'm saying that based on the C code in gtkdialog4 where, by default, width and height default to -1). In gtkwialog (as addition not in gtkdialog), I some time ago added extra possiblity with the parameter 'preserve-aspect-ratio', which can be set to true or false, as described here. Not sure what difference using that would have in discussed animated gif scenario (possibly no difference - maybe someone or myself will get round to trying it sometime). That uses an alternative gtk call to load the pixmap (which allows the extra preserve-aspect-ratio parameter):

http://www.murga-linux.com/puppy/viewto ... 98#1001998

wiak

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#31 Post by Argolance »

Bonjour à vous,
wiak wrote:I was referring to Argolances earlier post, which did say gtkdialog3 only worked with that old Precise gtkdialog-splash (with animated gifs). But, as I said, I also found gtkdialog4 also worked fine in my test.
I'm sorry if I misled you, but that's not what I meant and tried to report:
Argolance wrote:I imported box_splash in my Puppy Precise 5.7.3 based system [...] I see that box_splash supports animated gifs too [...]. This works as long as the /tmp/yaf-splash is linked to /usr/sbin/gtkdialog3. If I delete this link, box_splash creates automatically a link to /usr/sbin/gtkdialog which is a link to gtkdialog4 and animated gifs are not supported anymore.
So, this was concerning box_splash and not the "old" puppy precise "gtkdialog-splash". To be more accurate, I imported both /usr/lib/gtkdialog/box_splash and /usr/bin/gtkdialog-splash from Tahr 6.0.5 to my Puppy Precise based system. This /usr/bin/gtkdialog-splash is not a script like the old one but just returns to box_splash via this command:
Contents:

Code: Select all

exec /usr/lib/gtkdialog/box_splash "$@"
As attached file, "gtk-splash" for those who might find it useful. It is the Puppy Precise gtkdialog-splash but renamed and modified to be totally stand-alone, avoiding any conflict with other programs of the same type and perhaps other unexpected problems.

[EDIT]: this may be added to /root/.jwmrc:

Code: Select all

<Group>
<Class>gtk-splash</Class>
<Option>nolist</Option>
<Option>layer:above</Option>
<Option>nofocus</Option>
</Group>
or gtk-splash modified to work using this class if already existing:

Code: Select all

<!-- created 130618, a class for all future popups -->
<Group>
<Class>splashwindow</Class>
<Option>nolist</Option>
<Option>layer:above</Option>
<Option>nofocus</Option>
</Group>
Cordialement.
Attachments
181012_123548_582x368_easyshot.jpg
(58.37 KiB) Downloaded 724 times
gtk-splash.gz
To be renamed as gtk-splash without .gz
(5.55 KiB) Downloaded 262 times
Last edited by Argolance on Fri 12 Oct 2018, 11:50, edited 1 time in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#32 Post by wiak »

Argolance wrote:Bonjour à vous,
wiak wrote:I was referring to Argolances earlier post, which did say gtkdialog3 only worked with that old Precise gtkdialog-splash (with animated gifs). But, as I said, I also found gtkdialog4 also worked fine in my test.
I'm sorry if I misled you, but that's not what I meant and tried to report:
Argolance wrote:I imported box_splash in my Puppy Precise 5.7.3 based system [...] I see that box_splash supports animated gifs too [...]. This works as long as the /tmp/yaf-splash is linked to /usr/sbin/gtkdialog3. If I delete this link, box_splash creates automatically a link to /usr/sbin/gtkdialog which is a link to gtkdialog4 and animated gifs are not supported anymore.
So, this was concerning box_splash and not the "old" puppy precise "gtkdialog-splash".
Ah, sorry, my mistake entirely; I misread your earlier post.

wiak

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#33 Post by fredx181 »

ITSMERSH wrote:
fredx181 wrote:Just experimented for fun :lol: :
......
Extract launch.tar.gz and run "launch" (inside "launch" folder)
Has 15 seconds timeout, it's using the older gtkdialog-splash that Argolance shared earlier in this thread.

Fred
Uaaahhh, that's really great.

Exactly what I need for my QTR Suite (my Music Suite to run, control and connect all the programs from a project). I have added a option to the launch script, so it combines the sound of a rocket launch (using aplay) for about 18 seconds (faded out) while displaying the gif image when starting QTR Suite.

Great, thanks!
Haha, you're welcome !

Can you share someway that rocket launch sound and the code of your setup ?
Sorry for the off-topic Argolance, but please understand, that rocket sound is a must have addition ! :) 8)

Fred

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#34 Post by Argolance »

Bonsoir,
Sorry for the off-topic Argolance, but please understand, that rocket sound is a must have addition !
Do not worry! On the contrary, I am delighted to see that this topic is attracting some interest...
Do as you feel like it!

Cordialement.

ITSMERSH

#35 Post by ITSMERSH »

fredx181 wrote:Haha, you're welcome !

Can you share someway that rocket launch sound and the code of your setup ?
Sorry for the off-topic Argolance, but please understand, that rocket sound is a must have addition ! :) 8)

Fred
Yes, this is a must have addition! :wink:

All in one package at datafilehost.com. Since they have changed the duration of keeping files it will stay at least for 90 days after last download.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#36 Post by fredx181 »

ITSMERSH wrote:
fredx181 wrote:Haha, you're welcome !

Can you share someway that rocket launch sound and the code of your setup ?
Sorry for the off-topic Argolance, but please understand, that rocket sound is a must have addition ! :) 8)

Fred
Yes, this is a must have addition! :wink:

All in one package at datafilehost.com. Since they have changed the duration of keeping files it will stay at least for 90 days after last download.
Ok, turned up the volume to the maximum, and went to Mars, stayed there for a while and after that traveled to Pluto, but...
My WIFI didn't work, could that be a bug in your program ?
Also I asked around there, nobody had ever heard of the Puppy Linux Discussion Forum, strange...

Hmmm.. very inconvenient, I had to travel back to Earth just to thank you, so...

Thank you !! :) Works nicely !

P.S. Decided to stay on Earth, the food on Pluto is terrible.

Fred

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

#37 Post by MochiMoppel »

Argolance wrote:I imported box_splash in my Puppy Precise 5.7.3 based system [...] I see that box_splash supports animated gifs too [...]. This works as long as the /tmp/yaf-splash is linked to /usr/sbin/gtkdialog3. If I delete this link, box_splash creates automatically a link to /usr/sbin/gtkdialog which is a link to gtkdialog4 and animated gifs are not supported anymore.
If box_splash really supports animated gifs when it calls gtkdialog3 but not when it calls gtkdialog4 then my earlier suspicion that gtkdialog is to blame would be true.

That's hard to believe and it's not what I have experienced. Could it be that somehow you finally symlinked to your old gtkdialog-splash?

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#38 Post by fredx181 »

Here's what I think that is the point:

- When using box_splash with yaf-splash linked to gtkdialog3 then -icon_width value doesn't really resize, it just makes "room". (second pic)
- When using box_splash with yaf-splash linked to gtkdialog4 then -icon_width does resize, e.g. when using a .png of size 128x128 and use "-icon_width 48", it does display as 48x48 (first pic)
So when using a .gif (with yaf-splash linked to gtkdialog4), it "tries" to resize, resulting in that it doesn't display as animated.
EDIT: And if using a .gif with yaf-splash linked to gtkdialog3, then .gif animation works, just need to give it enough room by adjusting -icon_width.
BTW, I found that some systems may have gtkdialog3 as a symlink to gtkdialog. (it's the case on d-pup-Stretch from radky)

Fred
Attachments
2018-10-14-103833_210x98_scrot.png
Using box_splash with yaf-splash linked to gtkdialog4, -icon_width 48
vlc.png = size 128x128 displays as 48x48
(4.23 KiB) Downloaded 521 times
2018-10-14-103536_210x178_scrot.png
Using box_splash with yaf-splash linked to gtkdialog3, -icon_width 48
vlc.png = size 128x128, the -icon_width 48 setting gives not enough &quot;room&quot;
(11.67 KiB) Downloaded 520 times

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

#39 Post by MochiMoppel »

Confirmed.
gtkdialog3 doesn't understand <width> but supports width-request attribute.
width-request results in cropping but not (proportional) scaling, Since gtkdialog3 ignores <width>, the tag that results in scaling, box_splash calling gtkdialog3 can display animated gifs. Depending on the width setting animated gifs may be cropped, but they are still animated.

Suddenly everything Argolance reported makes sense: The "old" gtkdialog-splash expects gtkdialog3, the newer ones and box_splash expect gtkdialog4. When he runs box_splash in Precise where an "old" gtkdialog-splash, the one that came with Precise, had already created the symlink /tmp/yaf-splash to gtkdialog3, box_splash would meticulously check if the required gtkdialog4 is installed (which in Precise it is) , but then would gladly use any /tmp/yaf-splash it finds, without checking if it links to the correct gtkdialog.

Still box_splash needs some changes. I'll post a fixed version.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#40 Post by wiak »

As mentioned above, my most recent code addition in my fork called gtkwialog was to allow preserving or not preserving aspect ratio of a pixbuf image related to the initial creation of a pixmap. The additional code I used satisfied my intention. That was a while ago, and since I've not been coding since then I had forgotten what was involved but looking at it again now I see that I did not implement similar functionality for the pixmap <input file> mechanism since that wasn't my concern at the time. However, I will try that in gtkwialog now (since the code change is very similar); I have no idea however what effect the different gtk function with additional capability to 'not-preserve-aspect-ratio' on scaling (i.e. supplying width parameter) will have on an animated gif file input loading since I can't determine that from the Gtk reference functiond description. So may well be irrelevant for this thread issue. Nevertheless, worth a try I feel, so I'll test that C code addition. It could (???) in any case be useful in other scenarios to also be able to not-preserve-aspect-ratio on input file images (EDIT: but not sure of difference in practice to what I already achieved in that regard... I believe, from re-examining gtkwialog sources, the input from file code will only come into play on refreshing the image - so doubt relevance in this thread issue - but for my earlier purposes, I probably should have that too - I forgot about refresh possibility). I'll attempt that in gtkwialog tomorrow, since late at night here just now, and report back accordingly.

There may be some other remedy regarding scaling and animated gif, of course.

wiak

Post Reply