Closed dimkr closed 2 years ago
I think a yad
wrapper wouldn't be too hard.
Xdialog is the last GTK+ 2 (and therefore, X) dependency in woof-code.
I'm not 100% sure what's the best way to do this - port it to GTK+ 3
You have two choices, both from familiar authors. (1) http://chiselapp.com/user/jamesbond/repository/xdialog/home (2) https://github.com/wdlkmpx/Xdialog
Both compiles with GTK+ 3. (1) strives to keep all existing features. As far as I'm aware, in (1) the only dropped features is the "unavailable" settings for treeview/radiolist/checkbox (only on/off status is supported), while (2) drops that, and a few other less-often used features too.
Feedback/patches welcome, whichever one you want to choose.
PS: Login as anonymous to chiselapp in order to download the tarball.
@jamesbond3142 This is amazing! I failed to find these forks. 1 sounds like a very good option, especially if Fatdog already uses a GTK+ 2 build (so the risk of breaking legacy Puppies is small).
@jamesbond3142 This is amazing!
You're welcome :smile:
especially if Fatdog already uses a GTK+ 2 build (so the risk of breaking legacy Puppies is small).
We are not currently using the pure GTK+ 2 build yet, as I just did the port a couple of days ago (in fact, one of the reason why I started the port, was because I happened to see this very issue here). We are currently testing it, live, in the systems we use everyday (both gtk2 and gtk3 versions), and in the next release of Fatdog we will bite the bullet and replace the older Xdialog with the GTK+ 2 version so that we're ready to move to GTK+ 3 when it's needed.
I forgot to say - one of the major difference between the older Xdialog and the GTK+2/3 version is the font metrics. Xdialog allows to specify the dialog size in characters, which gets converted to pixel size by multiplying with average character width/height. The way to measure "average character width/height" is different because the original Xdialog uses GdkFont, which is deprecated and no longer supported in GTK+ 3. I have to use Pango metrics, and the result is not identical to GdkFont way of measuring. In most of my script this doesn't matter as I set most of dialogs to auto-size, but on scripts with fixed width/height, this may be a problem. (This comment applies for both my port and wdlkmpx's port - we measure it differently but neither of us will match the original).
GTK+2 and GTK+3 however will have identical font metrics.
Any problems beyond that should be considered as bugs to the port, and I'm willing to fix it to make it work the way it worked in the older Xdialog (where possible).
@jamesbond3142 What do you think about moving this Xdialog fork to puppylinux-woof-CE?
@jamesbond3142 What do you think about moving this Xdialog fork to puppylinux-woof-CE?
Sorry @dimkr, what do you mean by "move"? I see you already created a git mirror of the chiselapp repo under puppylinux-woof-CE; if that's what you mean, I'm happy with that. Or is there something else you have in mind?
@jamesbond3142 I think it will be easier to report issues and open pull requests (at least, for me) if Xdialog becomes a repo under puppylinux-woof-CE, just like gtkdialog and other "Puppy things". But that's up to you - if you prefer Fossil I can find a way to download a tarball of a specific commit ("check-in") and use the Fossil repo directly.
I don't know if "mirror" I set up is any good. I converted the Fossil repo to Git, but I don't know if the commit hashes will be the same if I do the conversion again (to "pull" changes from the Fossil repo).
@jamesbond3142 I think it will be easier to report issues and open pull requests (at least, for me) if Xdialog becomes a repo under puppylinux-woof-CE, just like gtkdialog and other "Puppy things". But that's up to you - if you prefer Fossil I can find a way to download a tarball of a specific commit ("check-in") and use the Fossil repo directly.
I'm happy to maintain a parallel repo of Xdialog under Woof-CE if it helps everyone. You already have gtkdialog there, so may as well put Xdialog under the same umbrella.
I will still keep my Fossil repo (I love Fossil) but I'll make parallel commits to both if automatic export/import is not possible, so you don't have to care about the fossil repo; just use the one under Woof-CE.
Do I have enough rights to create a new repo under Woof-CE? (@dimkr I was thinking to use the one you had created, but it seems that you had already removed it, perhaps because it took me too long to reply back).
Do I have enough rights to create a new repo under Woof-CE? (@dimkr I was thinking to use the one you had created, but it seems that you had already removed it, perhaps because it took me too long to reply back).
You do now :)
Thanks @01micko. I'll get it up and running soon. Apparently there is a way to do a bi-directional sync, so let me do some tests before publishing the repo.
Thanks @01micko. I'll get it up and running soon. Apparently there is a way to do a bi-directional sync, so let me do some tests before publishing the repo.
If it's complicated or time-consuming, woof-CE uses the Fossil repo, and we can continue using it. It's the only case where woof-CE clones a Fossil repo, but it doesn't take much time to install Fossil.
If it's complicated or time-consuming, woof-CE uses the Fossil repo, and we can continue using it. It's the only case where woof-CE clones a Fossil repo, but it doesn't take much time to install Fossil.
Slackware has no fossil
in repos so this is the petbuild I concocted today:
download() {
[ -f fossil-src-2.17.tar.gz ] || wget -t 3 -T 60 https://fossil-scm.org/home/tarball/f48180f2ff3169651a725396d4f7d667c99a92873b9c3df7eee2f144be7a0721/fossil-src-2.17.tar.gz
if [ ! -f Xdialog-14c5747051bd196c.tar ]; then
mkdir tmp
cd tmp
fossil clone http://chiselapp.com/user/jamesbond/repository/xdialog xdialog.fossil
fossil open xdialog.fossil 14c5747051
fossil tarball -R xdialog.fossil 14c5747051bd196c ../Xdialog-14c5747051bd196c.tar
cd ..
rm -rf tmp
fi
}
build() {
tar -xzf fossil-src-2.17.tar.gz
cd fossil-src-2.17
./configure --prefix=/usr
make install
cd ..
tar -xf Xdialog-14c5747051bd196c.tar
cd Xdialog_2022-01-03_013714_14c5747051
if [ $PETBUILD_GTK -eq 3 ]; then
./configure --prefix=/usr --mandir=/usr/share/man --with-gtk3
else
./configure --prefix=/usr --mandir=/usr/share/man --with-gtk2
fi
make install
rm -rf /usr/share/doc
rm -f /usr/bin/fossil
}
EDIT: faced a chicken/egg problem and that's not what I originally had - Xdialog was probably cached in the petbuild-sources
dir when I rewrote. Still, it's possible to just add it as a petbuild and build fossil in download()
function.
I just re-created https://github.com/puppylinux-woof-CE/Xdialog (I only keep the "trunk" branch because that's what matters anyway). I haven't tested the sync-ing yet, but if I can't do it automatically, I will do it manually.
Xdialog is the last GTK+ 2 (and therefore, X) dependency in woof-code.
I'm not 100% sure what's the best way to do this - port it to GTK+ 3, replace it with some wrapper around yad/gtkdialog, or just rewrite everything. All 3 options are hard.