Page 1 of 1

gtksplash - desktop splash program

Posted: Thu 26 Nov 2015, 21:37
by 01micko
gtksplash 0.10

Updated November 28, 2015

This is a splash screen program very similar to gtkdialog-splash first created by mave inspired by my splash messages in the original Lucid quickpet.

It is written in C language and takes advantage of the glib wrappers to the standard glibc string functions. It depends on gtk+-2.0 and gdk which all puppies have. If you have an old puppy you will probably need to compile it. A Makefile is supplied in the source. With devx loaded just type 'make' in the directory containing the source.

The source is available here.

I will attach pets below built in slacko-5.7 (32 bit) and slacko64-6.3.0 (64 bit). They should run in most recent puppies, however if your pup doesn't support xz compressed pets you will have to extract manually. (32 is now gzipped)

It should support all UTF-8 characters, tested with Chinese Traditional. It should also support rtl, as long as your gtk/gdk/pango/glib supports this. It would be a rare case that they don't.

Development started here with thanks to L18L, step and Geoffrey for testing and input and 6502coder for seasonal comic relief :lol: .

It supports almost all the options of gtkdialog-splash but with different options (uses getopt short) so its not a drop in replacement. It will need a wrapper script so if anyone wants to take on that task, be my guest.

Have fun!

Code: Select all

# gtksplash 
gtksplash-0.9

	 gtksplash -s "Some string here"
Options :
	 -s 'string' : the string to be displayed
	 -c 'color' : either an X color or quoted hex notation
	 -k 'font color' : either an X color or quoted hex notation
	 -t 'timeout' : in seconds
	 -p 'position' : 'tl' (top left), 'tc' (top centre), 'tr' (top right),
		'bl' (bottom left), 'bc' (bottom centre), 'br' (bottom right),
		'm' (near mouse), 'c' (centre of display - default)
	 -f 'font' : a ttf font with size, default is "Sans 16"
	 -d 'yes' : have the window decorated
	 -w 'title' : a title for the window; useful with the '-d' option.
	  -i '/path/to/icon' : an svg|png|gif icon. No default.
		 OR a stock GTK icon - eg: "gtk-apply"

	The splash window can be dismissed by clicking on it.

Re: gtksplash - desktop splash program

Posted: Fri 27 Nov 2015, 01:44
by phat7
01micko wrote:however if your pup doesn't support xz compressed pets you will have to extract manually.
...
Have fun!
Very funny!!! :evil:

Re: gtksplash - desktop splash program

Posted: Fri 27 Nov 2015, 03:21
by 01micko
phat7 wrote:
01micko wrote:however if your pup doesn't support xz compressed pets you will have to extract manually.
...
Have fun!
Very funny!!! :evil:
:lol: your response is. It's not hard to unpack a pet, xz or otherwise. Plenty of articles on this forum.

Posted: Fri 27 Nov 2015, 04:34
by phat7
Thanks, great advise!

Posted: Fri 27 Nov 2015, 09:22
by phat7

Code: Select all

# gtksplash --help
gtksplash: invalid option -- '-'
gtksplash-0.9

	 gtksplash -s "Some string here"
Options :
	 -s 'string' : the string to be displayed
	 -c 'color' : either an X color or quoted hex notation
	 -k 'font color' : either an X color or quoted hex notation
	 -t 'timeout' : in seconds
	 -p 'position' : 'tl' (top left), 'tc' (top centre), 'tr' (top right),
		'bl' (bottom left), 'bc' (bottom centre), 'br' (bottom right),
		'm' (near mouse), 'c' (centre of display - default)
	 -f 'font' : a ttf font with size, default is "Sans 16"
	 -d 'yes' : have the window decorated
	 -i '/path/to/icon' : an svg|png|gif icon. No default.
		 OR a stock GTK icon - eg: "gtk-apply"

	The splash window can be dismissed by clicking on it.
gtksplash: invalid option -- 'h'
gtksplash-0.9

	 gtksplash -s "Some string here"
Options :
	 -s 'string' : the string to be displayed
	 -c 'color' : either an X color or quoted hex notation
	 -k 'font color' : either an X color or quoted hex notation
	 -t 'timeout' : in seconds
	 -p 'position' : 'tl' (top left), 'tc' (top centre), 'tr' (top right),
		'bl' (bottom left), 'bc' (bottom centre), 'br' (bottom right),
		'm' (near mouse), 'c' (centre of display - default)
	 -f 'font' : a ttf font with size, default is "Sans 16"
	 -d 'yes' : have the window decorated
	 -i '/path/to/icon' : an svg|png|gif icon. No default.
		 OR a stock GTK icon - eg: "gtk-apply"

	The splash window can be dismissed by clicking on it.
gtksplash: invalid option -- 'e'
gtksplash-0.9

	 gtksplash -s "Some string here"
Options :
	 -s 'string' : the string to be displayed
	 -c 'color' : either an X color or quoted hex notation
	 -k 'font color' : either an X color or quoted hex notation
	 -t 'timeout' : in seconds
	 -p 'position' : 'tl' (top left), 'tc' (top centre), 'tr' (top right),
		'bl' (bottom left), 'bc' (bottom centre), 'br' (bottom right),
		'm' (near mouse), 'c' (centre of display - default)
	 -f 'font' : a ttf font with size, default is "Sans 16"
	 -d 'yes' : have the window decorated
	 -i '/path/to/icon' : an svg|png|gif icon. No default.
		 OR a stock GTK icon - eg: "gtk-apply"

	The splash window can be dismissed by clicking on it.
gtksplash: invalid option -- 'l'
gtksplash-0.9

	 gtksplash -s "Some string here"
Options :
	 -s 'string' : the string to be displayed
	 -c 'color' : either an X color or quoted hex notation
	 -k 'font color' : either an X color or quoted hex notation
	 -t 'timeout' : in seconds
	 -p 'position' : 'tl' (top left), 'tc' (top centre), 'tr' (top right),
		'bl' (bottom left), 'bc' (bottom centre), 'br' (bottom right),
		'm' (near mouse), 'c' (centre of display - default)
	 -f 'font' : a ttf font with size, default is "Sans 16"
	 -d 'yes' : have the window decorated
	 -i '/path/to/icon' : an svg|png|gif icon. No default.
		 OR a stock GTK icon - eg: "gtk-apply"

	The splash window can be dismissed by clicking on it.
gtksplash: option requires an argument -- 'p'
gtksplash-0.9

	 gtksplash -s "Some string here"
Options :
	 -s 'string' : the string to be displayed
	 -c 'color' : either an X color or quoted hex notation
	 -k 'font color' : either an X color or quoted hex notation
	 -t 'timeout' : in seconds
	 -p 'position' : 'tl' (top left), 'tc' (top centre), 'tr' (top right),
		'bl' (bottom left), 'bc' (bottom centre), 'br' (bottom right),
		'm' (near mouse), 'c' (centre of display - default)
	 -f 'font' : a ttf font with size, default is "Sans 16"
	 -d 'yes' : have the window decorated
	 -i '/path/to/icon' : an svg|png|gif icon. No default.
		 OR a stock GTK icon - eg: "gtk-apply"

	The splash window can be dismissed by clicking on it.
Can't be so hard either to implement a standard help screen. Plenty of examples available.

Posted: Fri 27 Nov 2015, 09:49
by 01micko
phat7 wrote: Can't be so hard either to implement a standard help screen. Plenty of examples available.
So what? Am I an idiot for not providing a standard help screen? (you got the usage anyway) or you for not heeding advice in the first post (of which I supplied a gz version after your complaint).

If you want to troll do so - elsewhere. Or be constructive.

Have a nice day. :)

gtksplash - desktop splash program

Posted: Fri 27 Nov 2015, 10:06
by L18L
Very nice now.
Thank you.

Re: gtksplash - desktop splash program

Posted: Fri 27 Nov 2015, 10:08
by 01micko
L18L wrote:Very nice now.
Thank you.
I'm open to any suggestion for a different name. Yes, it was not too imaginative :lol:

EDIT.. oh you want to be able to have a title of choice. I understand now . :wink:

The program name will change anyway as there is already a program of that name (next version).

Re: gtksplash - desktop splash program

Posted: Fri 27 Nov 2015, 10:16
by L18L
01micko wrote:.. oh you want to be able to have a title of choice. I understand now . :wink:
Yes, choice.
..and title -t might be longer than string -s

Posted: Fri 27 Nov 2015, 10:18
by phat7
Lovely! I take the trouble to unpack and test this gem, I show you a bug and you call me a troll. Did you even bother to look at it? 1 or 0 help screens are normal but not 5 in a row!

Posted: Fri 27 Nov 2015, 10:24
by 01micko
phat7 wrote:Lovely! I take the trouble to unpack and test this gem, I show you a bug and you call me a troll. Did you even bother to look at it? 1 or 0 help screens are normal but not 5 in a row!
I don't mind that you report a bug. .. and yes I admit it is a bug and will be fixed. But your first post was not very friendly, when I advised that gz is unsupported.

Usually around here someone will repackage. I did that after your complaint. We do this for free (as you may know) and time is often limited as mine was this morning when I posted.

So either you can try and be smarter than me (maybe you are? I care not about smarts) or you can help out and report bugs (as you did) but in a civil manner.

I hope we understand each other.

I would like your feedback in other areas if you want to continue. If not, I understand.

Re: gtksplash - desktop splash program

Posted: Fri 27 Nov 2015, 10:33
by 01micko
L18L wrote:
01micko wrote:.. oh you want to be able to have a title of choice. I understand now . :wink:
Yes, choice.
..and title -t might be longer than string -s
Well it might, but I can restrict it. I'll think about that. Maybe a 1 word title is best, but I'm not sure how that would work with CJK and others.

Posted: Sat 28 Nov 2015, 10:51
by 01micko
Update to V0.10
- bugfix help screen on option '-h', '--help' - thanks phat7
- new feature "-w 'title'" - title for decorated window - thanks L18L

See Main Post