GTK3: gtkdialog-splash

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

User avatar
MochiMoppel
Posts: 1240
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 440 times

Re: GTK3: gtkdialog-splash

Post by MochiMoppel »

fredx181 wrote: Mon Feb 06, 2023 6:43 pm

Thanks. Tried that. Works "sort of" but I expected that the text could be highlighted (but cannot) and then copied, but seems to work different, (does bring up small menu at right-click).
Perhaps works different with gtkdialog built with gtk2.

No, it has nothing to do with the gtkdialog used. Tried with a previous build of F96 which has a gtk3 version. The examples work but selection does not. Wouldn't call it "sort of" :lol: The culprit must be your CSS styling because without it the text selection works as expected (using default styles).

I tried following code and the result is the small window of the screenshot. Text is perfectly selectable. Sidenote: With GTK2 the text wouldn't wrap after each word.

Code: Select all

#!/bin/sh
export GTKDIALOG_SPLASH='<window><vbox><text selectable="true" can-focus="false" label="this is text"></text></vbox></window>'
exec gtkdialog --class="gtkdialog-splash" -p GTKDIALOG_SPLASH

I then replaced the GTKDIALOG_SPLASH variable in the gtkdialog-splash script with the one of above code. The result is the bigger of the screenshot windows. Note the bold text and gray background. This text is not selectable despite the selectable="true" attribute. May be the result of the gtk.css created by gtkdialog-splash .

gtkdialog-splash_vs_plain_gtkdialog.png
gtkdialog-splash_vs_plain_gtkdialog.png (4.86 KiB) Viewed 628 times
User avatar
rockedge
Site Admin
Posts: 6553
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2757 times
Been thanked: 2629 times
Contact:

Re: GTK3: gtkdialog-splash

Post by rockedge »

which OS is this discussion talking about? In the most recent F-96-CE I have this:

Code: Select all

# gtkdialog --version
gtkdialog version 0.8.5 release (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with support for: GTK+ 2, Glade, VTE.
# gtk2dialog --version
gtkdialog version 0.8.5 release (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with support for: GTK+ 2, Glade, VTE.

So I grabbed 10gtkdialogGTK3_filemnt64.sfs from KLV-Airedale and loaded it using SFS-Load-on-the-fly in F96.

Now I have gtk2 and gtk3

Screenshot(5).jpg
Screenshot(5).jpg (43.4 KiB) Viewed 574 times

The results of gtk3 in this script:

Code: Select all

#!/bin/sh
export GTKDIALOG_SPLASH='<window><vbox><text selectable="true" can-focus="false" label="this is text"></text></vbox></window>'
exec /usr/local/bin/gtkdialog --class="gtkdialog-splash" -p GTKDIALOG_SPLASH
Screenshot(6).jpg
Screenshot(6).jpg (2.39 KiB) Viewed 570 times

then gtk2:

Screenshot(7).jpg
Screenshot(7).jpg (2.52 KiB) Viewed 570 times

I thought a GTK3 gtkdialog was installed in F96 and why there is the gtk2dialog.... :shock:

User avatar
MochiMoppel
Posts: 1240
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 440 times

Re: GTK3: gtkdialog-splash

Post by MochiMoppel »

rockedge wrote: Tue Feb 07, 2023 1:41 pm

I thought a GTK3 gtkdialog was installed in F96 and why there is the gtk2dialog.... :shock:

It was installed. I made my GTK3 test with puppy_fossapup64_9.6.sfs dated 28.4.2022.
The newer puppy_fossapup64_9.6.sfs dated 28.12.2022 has only GTK2 and gtk2dialog is a symlink to gtkdialog. Doesn't make much sense but it's fine with me. Here gtkdialog-splash is a wrapper script for sigbert's box-splash, and with a small fix box-splash supports animated icons and selectable text:

Screenshot.gif
Screenshot.gif (289.04 KiB) Viewed 565 times
User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1315 times
Contact:

Re: GTK3: gtkdialog-splash

Post by fredx181 »

rockedge wrote:

I thought a GTK3 gtkdialog was installed in F96 and why there is the gtk2dialog....

I *think* because many scripts written to use gtkdialog may not work well with the GTK3 gtkdialog (need some (small) changes, e.g. "combobox" needs to be replaced with "comboboxtext"), so, in other words, stay on the safe side by keeping the GTK2 gtkdialog included.

User avatar
rockedge
Site Admin
Posts: 6553
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2757 times
Been thanked: 2629 times
Contact:

Re: GTK3: gtkdialog-splash

Post by rockedge »

@fredx181 I had planned on F96-CE as having both gtk2 AND gtk3 installed. I should look at returning to that model.

User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1315 times
Contact:

Re: GTK3: gtkdialog-splash

Post by fredx181 »

rockedge wrote: Tue Feb 07, 2023 2:38 pm

@fredx181 I had planned on F96-CE as having both gtk2 AND gtk3 installed. I should look at returning to that model.

In KLV-Airedale you have also GTK2 gtkdialog included: /usr/local/bin/gtkdialog-8.5 , can be useful, but not a very intuitive name, perhaps better name it gtk2dialog too (or e.g. gtkdialog2) ?

User avatar
rockedge
Site Admin
Posts: 6553
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2757 times
Been thanked: 2629 times
Contact:

Re: GTK3: gtkdialog-splash

Post by rockedge »

@fredx181 There is supposed to be a symlink called gtk2dialog that targets gtkdialog-8.5.....but it's apparent my cats stole it.

I just added the sysmlink to test it again but I'll have to do a upgraded rc11 with that added or just a quick add it and repackage the ISO rc10.

User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1315 times
Contact:

Re: GTK3: gtkdialog-splash

Post by fredx181 »

rockedge wrote:

...but it's apparent my cats stole it.

Yeah, they must have been hungry at that time :lol:

User avatar
Sofiya
Posts: 2286
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1536 times

Re: GTK3: gtkdialog-splash

Post by Sofiya »

fredx181 wrote: Tue Feb 07, 2023 2:58 pm
rockedge wrote: Tue Feb 07, 2023 2:38 pm

@fredx181 I had planned on F96-CE as having both gtk2 AND gtk3 installed. I should look at returning to that model.

In KLV-Airedale you have also GTK2 gtkdialog included: /usr/local/bin/gtkdialog-8.5 , can be useful, but not a very intuitive name, perhaps better name it gtk2dialog too (or e.g. gtkdialog2) ?

i call it gtk2dialog :thumbup:
I think this is the most convenient option for the script

KL
PUPPY LINUX Simple fast free

User avatar
rockedge
Site Admin
Posts: 6553
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2757 times
Been thanked: 2629 times
Contact:

Re: GTK3: gtkdialog-splash

Post by rockedge »

@Sofiya There is now a symlink named gtk2dialog that targets gtkdialog-8.5 in KLV-Airedale-rc10.1

User avatar
Sofiya
Posts: 2286
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1477 times
Been thanked: 1536 times

Re: GTK3: gtkdialog-splash

Post by Sofiya »

rockedge wrote: Wed Feb 08, 2023 10:20 pm

@Sofiya There is now a symlink named gtk2dialog that targets gtkdialog-8.5 in KLV-Airedale-rc10.1

Thank you ! @rockedge It's good, I've done it this way for a long time :), since I sometimes use gtk2dialog ;)

KL
PUPPY LINUX Simple fast free

Post Reply

Return to “Programming”