Gtkwialog

Under development: PCMCIA, wireless, etc.
Message
Author
wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#21 Post by wiak »

fredx181 wrote:Just to be sure I ask, the new cast2chrome works also OK with the gtkwialog "B" package?
Hi Fred,

Yes B version works fine with the new cast2chrome on dash or bash setups. I will probably make that B version the default since as you said it is more convenient in practice. Symlinks you are using are fine.

Also already saw your post concerning dash how to, thanks.

Still busy putting together my frontend GUI for git work more generally (makegit). It's more of a GUI helpér for the most frequently used commands than a traditional git GUI, but I'm using git a lot now on local repositories so need it for convenience and to jog my memory... Will release that sometime this coming week in case anyone else finds it useful as an aid to using and learning git.

wiak

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#22 Post by wiak »

Following a forum member request, 32bits and 64bits dotpets suitable for many Pups now released. Find in first post of this thread.

Have also now released dotpet for my wiagit (GUI for git etc) program, which depends on gtkwialog functionality), here:

http://murga-linux.com/puppy/viewtopic. ... 15#1000715

cast2chrome dotpet coming soon.

wiak

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

gtkwialog version upgrade to 0.8.6

#23 Post by wiak »

gtkwialog upgraded to version 0.8.6.

Forum member step informed me that FatDog findnrun utility had a problem with previous gtkwialog since unitialised variables were resulting in gibberish in <input> entry box result and also overwriting entry <default> value. Also, it is a side-effect of the <input> method used in legacy gtkdialog that default value does not get overwritten when followed by an <input> where the input is an empty string - I wasn't convinced of the correctness of that exception so hadn't implemented it in gtkwialog (didn't even notice it...). However, since that caused a problem, I have now initialised the input as an empty string but made an exception such that input entry is ignored if string empty. Thanks for bringing that issue to my attention step.

Find downloads in first post of this thread. Currently only 64bit and 32bit deb packages. Later I'll upload similar dotpets.

Since DebianDog distributions currently (for ease of setup) prefer -B mode (forced bash on action and input commands without needing GTKWMODE=B in environment), the uploads are compiled for that mode (using github branch bash_default sources). The Github sources do however currently also provide a branch (sh_default) for forced legacy gtkdialog mode (/bin/sh) which will also be updated with the changes for whoever prefers that version.

wiak
Last edited by wiak on Sun 12 Aug 2018, 07:05, edited 1 time in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#24 Post by wiak »

deb packages and dotpets (32bit and 64bit) for latest 0.8.6 version of gtkwialog now uploaded to first post of this thread.

Refer to post immediately above and first post of thread for relatively minor change (alteration to default handling of empty input strings to match legacy gtkdialog "ignore them" behaviour). Only reported issue with previous gtkwialog version occurred with FatDog findnrun script, but good to fix that for legacy gtkdialog compatibility. More testing and such reports always useful and welcome.

Github repo also now updated with all source changes. I re-organised the Github repo to match the bash_default chosen by DebianDog distributions but hope to reorganise it better some other day (maybe next winter - spring is coming here).

wiak

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#25 Post by fredx181 »

Thanks wiak and step,
Added new package version gtkdialog 0.8.6-wiak-B (symlinked gtkdialog to gtkwialog) to Xenial and Bionic dog repos now.

Fred

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#26 Post by wiak »

gtkwialog version 0.8.7 uploaded to first post of this thread.

Changes

New attribute for <pixmap> implemented:

preserve-aspect-ratio [true|yes|1 or false|no|0]


If attribute not specified, default is: preserve-aspect-ratio="true" (to remain compatible with legacy gtkdialog).
The image will be scaled to fit in the requested size, optionally preserving the image's aspect ratio.

When preserving the aspect ratio, a width of -1 will cause the image to be scaled to the exact given height, and a height of -1 will cause the image to be scaled to the exact given width. When not preserving aspect ratio, a width or height of -1 means to not scale the image at all in that dimension.
Example test script (note that this depends on you putting a test.jpg image file in directory you start script from):

Code: Select all

#! /bin/sh
# Needs test.jpg image in script start directory

export MAIN_DIALOG='
<window>
  <vbox>
    <pixmap preserve-aspect-ratio="false">
      <variable>IMAGEN</variable>
      <width>600</width>
      <height>60</height>
      <input file>./test.jpg</input>
    </pixmap>
  </vbox>
</window>'
gtkwialog  -p MAIN_DIALOG
Deb and dotpet packages for 32bit (i386) and 64bit (amd64) systems provided in first post of thread. Source changes will be pushed to DD org gtkwialog repo soonish.
Attachments
preserve_aspect_ratio.jpg
Screenshot comparision for width=&quot;600&quot; and height=&quot;60&quot;
(29.72 KiB) Downloaded 474 times

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#27 Post by vovchik »

Dear wiak,

Great work - the pixmap scales very nicely. :) It is a useful feature. I haven't looked at your code but I assume you are using gdk_pixbuf_loader. It is showing SVGs properly, too.

With kind regards,
vovchik

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#28 Post by step »

Just to confirm that version 0.8.6 compiles and works on Fatdog721 with GTKWMODE=S findnrun. Thank you wiak for your support and hard work.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#29 Post by wiak »

wiak wrote: New attribute for <pixmap> implemented:

preserve-aspect-ratio [true|yes|1 or false|no|0][/b]

If attribute not specified, default is: preserve-aspect-ratio="true" (to remain compatible with legacy gtkdialog).
Just a note to myself and anyone who happens to use the above preserve-aspect-ratio=false attribute to <pixmap>:

In another column discussing problems with animated gifs not working when scaling being employed I realised I had not inserted code that would keep an attribute setting of preserve-aspect-ratio="false" when the pixmap received a 'refresh' signal. What will currently happen on refresh is that the pixmap will revert to preserve-aspect-ratio="true" (i.e. it will toggle to use original aspect ratio no matter the width/height value being used). Since I find that I rather like that false/true aspect ratio toggle effect (which could be used as an indicator of some kind) I've decided not to insert the extra code (for now at least) that would ensure preserve-aspect-ratio="false" (when set) on refresh mode too. I might change my mind later and insert the extra refresh-related code for logical (?) completeness or if it really seems like a valuable need, but for now it seems like an extra (albeit simple) coding effort for little gain and hence me leaving the current operation as it is for now.

I'm still pondering if there is anything useful extra I could add to gtkwialog (maybe that toggle password visible code I tried experimentally) but I really don't know what and again maybe not worth the effort since main dash/bash handling difference to legacy gtkdialog working well and stable and now proving 100% compatibile in all gtkdialog scripts tried. (Fact is, I created gtkwialog fork because I needed it for my XenialDog wishes and it does the job I wanted of it). I'm also not sure more generally if gtkdialog has a long future ahead - making much more dev work on it (as gtkwialog) worthwhile - since gtkdialog was dropped by the likes of Debian a long time ago - but remains useful in Puppy/Dog world anyway. Despite its limitations, many seem to prefer yad nowadays, and personally I thing IUP is a nicer, more powerful alternative (albeit via Lua rather than sh/bash). And perhaps personally more relevant, I'm tending to enjoy doing less computing/programming in favour of playing online chess! (something I used to play when I was much much younger... and what I find to be an alternative way of keeping the brain cells active though that activity is much more selfish since nothing is produced that others can use unfortunately... but has advantage of no trolling, nothing to argue about, just a case of win, lose, or draw - one same disadvantage though: encourages insomnia).

wiak

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#30 Post by scsijon »

Just saw this so had to ask,

What happens if bash is not the system default? I know at last one that the default is locked to dash (on purpose and not changeable) for the features it includes.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#31 Post by wiak »

scsijon wrote:Just saw this so had to ask,

What happens if bash is not the system default? I know at last one that the default is locked to dash (on purpose and not changeable) for the features it includes.
Very sorry, I'm not online much these days and just noticed your post. Gtkwialog is happy no matter what the system default shell is. By default, if system shell is dash, or ash, or whatever, gtkwialog will still use bash for its actions (so bash function-driven programs will work with Gtkwialog that would not work with traditional Gtkdialog if dash, say, was the underlying system shell). However, if you want Gtkwialog to use actual system shell rather than bash you can instruct it to do that; all you need to do is set environment variable GTKWMODE=S (where S means system shell) before using gtkwialog or gtkdialog-based scripts. If that env variable is not set (or is set to GTKWMODE=B) gtkwialog purposively always uses bash no matter the actual underlying system shell.

You can find some more info by running command:

Code: Select all

gtkwialog --help
wiak

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#32 Post by wiak »

I must have been drinking too much coffee today. I had promised myself never to bother with Gtkwialog further development since its original development gave me more grief from so many quarters that I decided never again. Anyway, some say never say never so I found myself looking into adding gtk_file_chooser_set_file () function as an alternative 'current' default... Then I thought, "why am I doing this, do I never learn?". Fortunately there are a couple of things I want to add to WeeDog, which are far more important to me personally, and I haven't completely finished some website dev work that indirectly actually brings in some cash that can be used to pay for the coffees so thankfully I have stopped myself in my tracks and resisted getting back into this seriously less-than-encouraging old gtkwialog/gtkdialog nightmare!!! That was close to being a recurring nightmare, which I simply never want involved in again.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#33 Post by fredx181 »

Hi wiak, you did very nice work, I can imagine that you feel frustrated because of so little positive feedback, but I think it's great that gtkwialog supports bash as well as dash being the default shell, as you probably know it's included in the most recent 'Dog' systems.
I had the plan to make dash default shell in Dog systems (instead previously bash) but ended up by playing safe, many gtkdialog scripts include bashisms and have #!/bin/sh on top, so should be changed to #!/bin/bash and didn't want to risk making mistakes and break things.

I guess the same obstacle goes for Puppy developers, (if they are motivated to change default shell to "dash" (or "ash") anyway).
I wonder btw if gtkwialog works well if "sh" is symlink to "ash", since Puppy doesn't have "dash" included.

Question:
Zigbert wrote here: http://www.murga-linux.com/puppy/viewto ... 45#1041645
You are really close... Your gtkdialog 0.8.3 is basically working, but misses the latest features included in version 0.8.4.
Is gtkwialog as new as 0.8.4, or is it corresponding with 0.8.3 ?

Ok, take it easy (it's beginning summer at your end, isn't it ? :wink: )

Fred

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#34 Post by wiak »

fredx181 wrote: Question:
Zigbert wrote here: http://www.murga-linux.com/puppy/viewto ... 45#1041645
You are really close... Your gtkdialog 0.8.3 is basically working, but misses the latest features included in version 0.8.4.
Is gtkwialog as new as 0.8.4, or is it corresponding with 0.8.3 ?

Ok, take it easy (it's beginning summer at your end, isn't it ? :wink: )

Fred
It was forked from the latest gtkdialog on 01mickos site, and I don't think anything added there since (EDIT: yes, just checked configure.ac, was 0.8.4 version I started from). (I even included the aarch64 fix suggested by barryk, which hadn't been done in gtkdialog itself at the time at least). Yes works with ash too. Believe it or not I spent more than a couple of hours looking at the source code last night, but I am no longer fluent with it as I was, not by a long shot, so I elected to 'take it easy' though I do feel some things easy enough to add (well much easier for me back then when I was on top of it all).

wiak

Post Reply