Page 3 of 4

Posted: Tue 21 Jun 2011, 14:11
by seaside
I think technosaurus made a pet for Gtk216 (which apparently works with fewer problems than 218 in Puppy).

However, the pet seems to have been lost when one of the housing sites went down.

Anyone seen this one somewhere?

Cheers,
s

Posted: Fri 24 Jun 2011, 10:11
by sc0ttman
stu90 wrote:
sc0ttman wrote:as far as I know, as mentioned before, all puppies seem to say GTK 2.10, but that is only the DEV part of it.. Correct me if I am wrong, but I have 2.10 listed from pkconfig, but am using 2.12.1

I tried to compile Yad on 4.2 and it did say GTK was too old.
Hi sc0ttman,

Does it still compile when you get this message?
I can't recall if i get this message or not as i just bash enter all the way through with out reading the display :lol:

Any idea of what the GTK package would be called? looking though the packages downloaded in woof for squeeze puppy there is a gtk2-engines-pixbuf_2.20.1-2_i386.deb
No it does not compile.

And the package would be the DEV package of GTK - something like gtk+-2.12.1-i486-w5.pet (i made that from memory, may be wrong)

Yad 0.9.1

Posted: Fri 24 Jun 2011, 10:41
by sc0ttman
Here is Yad 0.9.1

The 0.9.x series is the last to work in puppy 4, as far as I know.

it should work in puppy 4 and later, alhtough I am not sure..
Maybe only my mongrel install.. For testing only, I guess...

EDIT... NOPE, this one won't run pur-gui, but it runs the icon browser..

Posted: Fri 01 Jul 2011, 11:36
by stu90
update for yad-0.12.4
compiled on lucid puppy

Posted: Sat 02 Jul 2011, 03:46
by Geoffrey
stu90,

Here it is, my monster yad compiled on quirky 1.20, I don't know how it will work with other quirky's as it was compile on my hybrid, let me know if it is ok , if not I will kill the beast. :lol:

Posted: Mon 18 Jul 2011, 01:18
by 8-bit
If you think the zenity project is dead, check this out.
It shows the last update as April 5, 2011.

It is version 3.0.

But there is a catch. It actually requires gtk+-3.0 for compiling

It requirements as listed are:

scrollkeeper
· intltool
· gtk+-2.0
· libglade-2.0
· libgnomecanvas-2.0

yad international

Posted: Wed 24 Aug 2011, 11:51
by L18L
On my wary513 (German language pack) everything is fine. See
ymount
rodin.s has reported same (OK) for Russian and Ukrainian.

Is it just Dutch that does not localize or any other language except German and Russian :?:

We can reduce the problem to one simple test:

If you have a LANG other than English please report fault or success by simply testing:

Code: Select all

yad
Cancel button should show in your language if you have installed the language pack.

Thanks for your attention.
L

Posted: Thu 01 Sep 2011, 20:11
by technosaurus
added a newer version (0.13.0+) in initial post with some fixes from svn

package size is significantly smaller

yad-0.13.0+

Posted: Fri 02 Sep 2011, 19:35
by L18L
technosaurus wrote:added a newer version (0.13.0+) in initial post with some fixes from svn

package size is significantly smaller
Relative links no more possible.

I have used them in ymount

example
# ymount
/bin/ymount: line 40: ../usr/local/ymount/functions: No such file or directory

Changing from
. ../usr/local/ymount/functions # enables start from anywhere
to
. /usr/local/ymount/functions

Was that intended?
If so, no problem I will update ymount using the changes

L

Posted: Fri 02 Sep 2011, 21:44
by technosaurus
probably not intended, I will try a recompile at 0.13.0 when I return tuesday

recompile

Posted: Mon 05 Sep 2011, 13:23
by L18L
Localization again
De ru and uk had no problems

The text of the gtk buttons is in gtk20.mo.

I have made a new test on a fresh wary5141,
Dutch locale
Dutch language pack per sfs_load on the fly
yad 0.13.0
yad-NLS installed.

There must be something weird in the sources,
LINGUAS containing de ru uk and sk.
that seems to restrict translations to just these languages, just my thought.

The trick using LANGUAGE is showing that translation to another language, here nl, is possible.

But it really ought to work without tricks.
:)

Edited:
The problem is not new to version 0.13

Re: recompile

Posted: Mon 05 Sep 2011, 15:38
by L18L
L18L wrote: But it really ought to work without tricks.
Found another trick:

Copied
/usr/share/locale/ru/LC_MESSAGES/yad.mo
to
/usr/share/locale/nl/LC_MESSAGES

and

Code: Select all

yad
works Dutch :!: :!: :!:

This cannot be the solution but a pretty simple work around :)

------------------------

The above mentioned

. ../usr/local/ymount/functions # enables start from anywhere

works in wary5141 :roll:

yad

Posted: Fri 09 Sep 2011, 13:07
by L18L
Running yad-0.13.0 in wary5141 I have discovered something new for me (and maybe for you too): Buttons no more restricted to be placed at bottom line. See picture.

To get nearer to the solution of localization to languages other than de, sk, ru and uk I have set up this wary using Dutch locale again (without utf8), installed lang-pack-nl and copied just the German yad.mo to /usr/share/locale/nl/LC_MESSAGES and it works!

# locale -a
C
en_US
nl_NL
POSIX
# echo $LANG
nl_NL
# echo $LC_MESSAGES

# ls -l /usr/share/locale/nl/LC_MESSAGES/yad.mo
-rw-r--r-- 1 root root 8581 2011-07-04 23:47 /usr/share/locale/nl/LC_MESSAGES/yad.mo
# # is a copy of de/LC_MESSAGES/yad.mo !!!
#
# # it works: showing 'Cancel' translated to Dutch 'Annuleren'
# yad --version
0.13.0
#
technosaurus wrote:probably not intended, I will try a recompile at 0.13.0 when I return tuesday
yad 0.14.2 is out.
I don't know why yad-NLS should be needed.
Developers are able to understand English
And for international users there is needed just one dummy yad.mo in user's LC_MESSAGES which enables the translations of gtk button texts.

Posted: Fri 09 Sep 2011, 13:34
by stu90
Hi L181,
Looks like there has been some nice updates in Yad recently - another new feature is form columns. :)

Image

yad

Posted: Fri 09 Sep 2011, 14:04
by L18L
stu90 wrote:Hi L181,
Looks like there has been some nice updates in Yad recently - another new feature is form columns. :)
Hi stu90,
thanks, looks like we can make more complex apps now :)

Posted: Sat 07 Jan 2012, 12:02
by stu90
Not sure how long this has been supported but works on yad 0.16.3 on my Bodhi install.

Button launcher with out the gui automatically closing and needing to be restarted.

Code: Select all

yad --text=" Button launchers with gui still open " --button="Terminal:urxvt" --button="Text:geany" --button="gtk-quit"

Posted: Sat 07 Jan 2012, 17:18
by RSH
stu90 wrote:Not sure how long this has been supported but works on yad 0.16.3 on my Bodhi install.

Button launcher with out the gui automatically closing and needing to be restarted.

Code:
yad --text=" Button launchers with gui still open " --button="Terminal:urxvt" --button="Text:geany" --button="gtk-quit"
I have tested this script in my LazY Puppy. I have installed the yad 0.16.2, compiled in my LazY Puppy earlier. It works also!

JFYI: i have installed two versions of yad (0.12.4 and 0.16.2). I have renamed the files and set links to the yad files. Yad or yad1 calls yad-0.12.4 and yad2 calls yad-0.16.2. I just wanted to use the compiled 0.16.2 version without removing/overwriting the original lucid built in.

RSH

Yad new Features

Posted: Wed 11 Jan 2012, 23:36
by seaside
As L18L and stu90 have mentioned, the latest yad has some interesting possibilites. So I loaded yad version 16.2 and put together this adaptation of 01micko's tray cpu percentage meter. It uses yad's new notification functions to provide icons "on-the-fly", allowing dynamic information updating in the tray (inside the icon itself).

A pipe is set up in the /tmp directory to receive messages from an updating input source (in this case from CPU usage code by Paul Colby (http://colby.id.au).

The output percentage ($DIFF_USAGE), is then compared to a range and a background color selected ($BG).

Those variables are then picked up in a template as suggested by technosaurus' use of svg for icons, and dynamically echo'd to the file /tmp/cpuicon in a loop.

When the command "echo icon:/tmp/cpuicon.svg >$PIPE" is issued, the tray icon is then refreshed.

As a bonus, if that icon starts heating up, you can left click the "cpu %" icon, and bring up pprocess. Further, you can also dynamically build right-click menus as well.

Middle clicking the icon kills the program.

Technosaurus: Svg definitely more powerful than xpm...thanks.

Cheers,
s

Code: Select all

 #!/bin/bash
# seaside January 11, 2012
# yad version 16.2 required

PIPE=/tmp/cpupipe
mkfifo $PIPE
exec 3<> $PIPE
trap on_exit EXIT


function on_exit () {
    echo "quit" >&3
    rm -f $PIPE
}

yad --notification --kill-parent --listen \
    --image=gtk-stop --text="Average CPU Percent" \
    --command="pprocess" <&3 &
    
# following CPU usage code
# by Paul Colby (http://colby.id.au), no rights reserved ;)

PREV_TOTAL=0
PREV_IDLE=0

while true; do
  CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
  unset CPU[0]                          # Discard the "cpu" prefix.
  IDLE=${CPU[4]}                        # Get the idle CPU time.

  # Calculate the total CPU time.
  TOTAL=0
  for VALUE in "${CPU[@]}"; do
    let "TOTAL=$TOTAL+$VALUE"
  done

  # Calculate the CPU usage since we last checked.
  let "DIFF_IDLE=$IDLE-$PREV_IDLE"
  let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
  let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"

  # Remember the total and idle CPU times for the next check.
  PREV_TOTAL="$TOTAL"
  PREV_IDLE="$IDLE"
  
  # cpu tray meter and color coding from  01micko follows:

  BG=#FF69B4 #hotpink (default)

  [ "$DIFF_USAGE" -le "65" ] && BG=#ADD8E6  #lightblue
  [[ "$DIFF_USAGE" -gt "65" && "$DIFF_USAGE" -le "80" ]] && BG=#FFB6C1 #lightpink

  # technosaurus' use of svg for icons
	echo '<svg>
	   <rect width="48" height="48" x="0" y="0" id="rect1" 
	     style="fill:'"$BG"';fill-opacity:1"/>
	   <text x="6.7142859" y="27.428572" id="text1" 
	     style="font-size:36px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;font-family:Bitstream Vera Sans"
	     >'"$DIFF_USAGE"'</text>
	   <text x="3.1428573" y="43.57" id="text2"
	     style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;font-family:Bitstream Vera Sans"
	     >cpu %</text>
	 </svg> ' >/tmp/cpuicon.svg
	 
	echo icon:/tmp/cpuicon.svg >$PIPE # send notice to change icon
		
  # Wait before checking again.
  sleep 1
done 

gtk+-2.0 support

Posted: Wed 29 Feb 2012, 21:35
by Burunduk
YAD author wrote:i prepare to remove support of gtk+-2.0 in a next releases. what do
you think about it?
Maybe someone here feels an interest in this question.

https://groups.google.com/d/topic/yad-c ... discussion

Posted: Wed 29 Feb 2012, 22:44
by vovchik
Dear guys and gals,

I don't know when most apps will be ported to gtk3 - and there are tons of scripts that make use of gtkdialog (gtk 2.0). The transition isn't instant or easy. Peter van Eerten (gtk-server and BaCon) is maintaining gtk 2.0 Bacon HUG along with a new gtk3 version. And Bacon runs under Linux, BSD, OSX, peculiarities of each OS must be borne in mind. It also runs under cygwin. Gtk-server still compiles under gtk1. I hope ananasik - Yad's creator - will continue to maintain a gtk2 version for some time still. I remember when KDE made the leap to KDE4. The result for me was that I didn't install it, unlike KDE3.

With kind regards,
vovchik