site  contact  subhomenews

gtkdialog-splash focus fixed

September 12, 2010 — BarryK
gtkdialog-splash is an-almost-drop-in replacement for yaf-splash. It is a great tool for popping up "Please wait..." and similar info boxes. It does have some different commandline options from yaf-splash, and you can find out by just typing this at the prompt:

# yaf-splash

I announced it here:

http://bkhome.org/archive/blog2/201006/gtkdialog-splash.html

It was created by forum member mave, and a few guys played with it. I also added to it. I liked it so much that I put it into Woof (not as a separate PET), so it replaces yaf-splash.

The most recent version of gtkdialog-splash modified by me is in Woof. So if you have the latest Wary 0.7 or most recent Lucid builds, you will have it. You must have my version for proper recognition of yaf-splash as being class gtkdialog-splash.

However, there has been one criticism. When it pops up, it steals focus from whatever window previously had focus. Some people have found this to be annoying. Yesterday I approached Joe, the developer of JWM, about this, asking if it would be possible to add a <Option>nofocus</Option> into the <Class> tag. Joe responded that it is easy to implement, and he immediately did so. The new version of JWM from SVN is 493.

I have upgraded the PET package. The config file /root/.jwmrc now has this in it:

<Group>
<Class>gtkdialog-splash</Class>
<Option>nolist</Option>
<Option>layer:9</Option>
<Option>nofocus</Option>
</Group>


You can put this in yourself to test it, and grab the PET from here:
http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-quirky/jwm2-493-patched.pet
...it is compiled in Wary, but should work anywhere.

Then a simple test, in a terminal window:
# yaf-splash -text "this is a demo yaf-splash info box" -close box &

It works beautifully!

I have uploaded the source to here:
http://bkhome.org/sources/alphabetical/j/

There is also a patch from Patriot, that I applied:
# patch -p1 < ../jwm-492-fullscreen-patriot.patch

Comments

JWM crash in Quirky
Username: BarryK
I have built Quirky to test the new simplified filenames, and it works. However, JWM segfaulted. The desktop appeared briefly, then back to the text terminal. Looking in /var/log/messages showed that jwm had crashed. I will be interested to know if the new jwm PET is stable in other puppies, or if not, is it stable if recompiled in those puppies. I'm running it right now in Wary and it is fine.

Works in 510
Username: Iguleder
"Barry, the new JWM works in Lupu 5.1. I took just the jwm binary and put it in /usr/bin.

DISTRO_PET_REPOS
Username: Iguleder
"Barry, something weird in latest Woof ... should be DISTRO_FILE_PREFIX or DISTRO_COMPAT_VERSION and lucid. case $DISTRO_COMPAT_VERSION in #100911 lupu) PACKAGELISTS_PET_ORDER="Packages-puppy-lucid-official ${PACKAGELISTS_PET_ORDER}" ;; esac

Re lucid)
Username: BarryK
"Oops, yes, it should have been "lucid)". Although, the error probably doesn't adversely affect a build of Lucid 5.1.2, as I think that playdayz intended for all the entries in Packages-puppy-lucid-official to not be chosen when building the live-CD, instead for the repo in PPM. He arranged for all required packages needed to build the live-CD to be in Packages-puppy-5-official.

On another puppies
Username: shinobar
"The jwm-493 binary Barry built on Wary works on LupQ-508. According my experience in compiling jwm-492, [b]it needed 3 different build[/b], for Quirky, for Lucid, and for Puppy-4.x. I did not test Wary at that time. http://www.murga-linux.com/puppy/viewtopic.php?t=51847 Anyway, i will try to apply the i18n-patch against the jwm-493.

Found why jwm crashes
Username: BarryK
"JWM 493 running in Quirky does not like this in /root/.jwmrc: <Option>layer:9</Option> ...comment that out, and all is well. Note, I recompiled JWM in Quirky, still get the crash.

JWM-493-i18n'ed
Username: shinobar
"I have not yet long run test, but posted 4 builds. * jwm-493-i18np4: for Puppy/Puplet-4.x * jwm-493-i18nq: for Quirky-1.2 * jwm-493-i18nl: for Lupu/LupQ-5.x * jwm-493-i18nw: for Wary-0.7 Visit the forum: http://murga-linux.com/puppy/viewtopic.php?t=51847

yaf-splash
Username: 01micko
"Hi Barry, I know yaf-splash is a pretty old package but I hope it doesn't become redundant. Myself and zigbert have apps that depend on the original yaf-splash timer function, which gtkdialog-splash cant do ... well it could with a bit of fiddling but why reinvent the wheel??? Did you know that you can use any ttf font in yaf-splash at any, yes even really huge (200 pix and more if you like, that's something gtkdialog-splash will never do), font size? See http://www.murga-linux.com/puppy/viewtopic.php?p=414379#414379 It looks great. The only problem with yaf-splash is that it doesn't handle utf-8 too well. I might even peer into the source to see if that can be fixed, but I am a real beginner when it comes to C, C++ (forget atm what yaf-splash is written in). So as long as we keep the old yaf-splash in /usr/X11R7/bin/ zigbert and myself can work around our issues with a full path call to yaf-splash. Oh, I think jemimah is a fan of the old yaf-splash too. Cheers


Tags: woof