Page 3 of 3
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 7:40 am
by MochiMoppel
fredx181 wrote: ↑Mon Feb 06, 2023 6:43 pmThanks. 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" 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 (4.86 KiB) Viewed 631 times
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 1:41 pm
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 (43.4 KiB) Viewed 577 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 (2.39 KiB) Viewed 573 times
then gtk2:
- Screenshot(7).jpg (2.52 KiB) Viewed 573 times
I thought a GTK3 gtkdialog was installed in F96 and why there is the gtk2dialog....
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 2:11 pm
by MochiMoppel
rockedge wrote: ↑Tue Feb 07, 2023 1:41 pmI thought a GTK3 gtkdialog was installed in F96 and why there is the gtk2dialog....
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 (289.04 KiB) Viewed 568 times
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 2:34 pm
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.
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 2:38 pm
by rockedge
@fredx181 I had planned on F96-CE as having both gtk2 AND gtk3 installed. I should look at returning to that model.
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 2:58 pm
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) ?
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 3:10 pm
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.
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 3:20 pm
by fredx181
rockedge wrote:...but it's apparent my cats stole it.
Yeah, they must have been hungry at that time
Re: GTK3: gtkdialog-splash
Posted: Tue Feb 07, 2023 5:25 pm
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
I think this is the most convenient option for the script
Re: GTK3: gtkdialog-splash
Posted: Wed Feb 08, 2023 10:20 pm
by rockedge
@Sofiya There is now a symlink named gtk2dialog
that targets gtkdialog-8.5
in KLV-Airedale-rc10.1
Re: GTK3: gtkdialog-splash
Posted: Wed Feb 08, 2023 10:39 pm
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