Page 1 of 1

a pic for Barry

Posted: Thu 07 Dec 2006, 22:46
by plinej
Here's a pic of burniso2cd (xdialog-gtk2 & gtk1)

Posted: Fri 08 Dec 2006, 07:09
by BarryK
Hmmm, this is what I get (displays ok gtk1 version)...

Posted: Fri 08 Dec 2006, 07:12
by BarryK
I'm using the latest patched version supplied by Dougal.

Posted: Fri 08 Dec 2006, 13:41
by plinej
I used Dougal's latest patches too. Here's my binary:

Posted: Fri 08 Dec 2006, 14:04
by Dougal
Barry: do you specify a size for that dialog?
In Jason's case the names are long so he gets a scrollbar, so I guess that allows the tag to be fully displayed...

I've actually encountered truncated tags in the past -- I think in the gtk1 version.

Posted: Fri 08 Dec 2006, 15:38
by plinej
That's a good idea dougal,

try it after editing the following line:

Code: Select all

#BURNERDRIVE="`Xdialog --title "Burniso2cd: Choose burner drive" --stdout --menubox "Choose the CD/DVD drive to burn to\n(/dev/scd0 or 0,0,0 format are SCSI drives,\n/dev/hda format are IDE/ATAPI drives)" 0 0 5 $SELECTIONX 2> /dev/null`"

BURNERDRIVE="`Xdialog --title "Burniso2cd: Choose burner drive" --stdout --menubox "Choose the CD/DVD drive to burn to\n(/dev/scd0 or 0,0,0 format are SCSI drives,\n/dev/hda format are IDE/ATAPI drives)" 400x200 5 $SELECTIONX 2> /dev/null`"

Posted: Fri 08 Dec 2006, 16:04
by Dougal
I just remembered: it did happen to me with GTK1! When I was working on the xkb-config script.

I guess it's matter of a coincidence when the two fields are certain sizes... Probably nothing we can do about it.

Posted: Sat 09 Dec 2006, 05:40
by plinej
How about editing the following (along with the previous modification):

Code: Select all

#v2.0.0
#if [ "$MEDIATYPE" = "CD" ];then
# SCSIDRIVES="`cdrecord -scanbus 2>&1 | grep '[0-9],[0-9],[0-9]' | grep -v '*$' | tr '|' " " | tr '\t' '|' | cut -f 2,3 -d '|' | tr -s " " | tr "'" '_' | tr " " '_' | tr -s '_'`" #'
# ATAPIDRIVES="`probedisk | grep '|cdrom|' | grep '/dev/hd' | cut -f 1,3 -d '|' | tr " " '_' | tr -s '_'`"
#else
# ATAPIDRIVES="`probedisk | grep '|cdrom|' | grep '/dev/hd' | cut -f 1,3 -d '|' | tr " " '_' | tr -s '_'`"
# SCSIDRIVES="`probedisk | grep '/dev/scd' | cut -f 1,3 -d '|' | tr " " '_' | tr -s '_'`"
#fi
#SELECTIONS="$ATAPIDRIVES
#$SCSIDRIVES"
#SELECTIONX="`echo "$SELECTIONS" | tr '|' " " | tr "\n" " "`"

SELECTIONX="`probedisk | grep -i '|cd-*rom|' | cut -f 1,3 -d '|' | tr -s ' ' | sed -e 's/ /_/g' | sed -e 's/|/ /g' `"
One line to replace ten.

A modified line from pmount to get your cd/dvd drives. This will prevent burniso2cd adding all usb/scsi drives (like external hard drives) and just populate with cd/dvd drives. Maybe it will take care of your truncating problem too?

Of course some other modifications will need to be made throughout the script becasue there will be no need for the ATAPI parts and I don't have time to go through it right now since I'll be leaving for the weekend.

I don't believe you need to use ATAPI when using cdrecord anymore. I just use /dev/hdc or /dev/scd0 and it seems to work fine.

At least this part will need modified:

Code: Select all

 #if [ ! "`echo "$CDR" | grep '/dev/hd'`" = "" ];then
#DEVDEV="ATAPI:$CDR"
# else
  DEVDEV="$CDR"
# fi

Posted: Sat 09 Dec 2006, 06:37
by plinej
Nevermind that obviously won't change the size of the first tag. Maybe you could just remove the '/dev/' part in the display so it will just say hdc instead.

Posted: Thu 14 Dec 2006, 00:26
by BarryK
Guys,
we need a fix in the source code. I think this should be treated as fairly
high priority, as I have been testing other scripts that use Xdialog and they ALL have a truncated tags column.

The very first window in burniso2cd has such a narrow first column that even "DVD" is truncated! See pic.

Maybe it has something to do with the new DejaVu fonts?

Posted: Thu 14 Dec 2006, 17:26
by Dougal
This is really weird!

I think it is because of the fonts, since we didn't encounter it… have you tried using the gtk1 version with those fonts?

I'll try having a look at the code, but it's a bit of a problem trying to fix something if you don't encounter it…(and I don't know how or what might be the reason)

Posted: Thu 14 Dec 2006, 19:26
by BarryK
Dougal, maybe if you could find the code that sets the width of the first column, then just double the value. That should fix it.

Posted: Fri 15 Dec 2006, 13:45
by Dougal
BarryK wrote:Dougal, maybe if you could find the code that sets the width of the first column, then just double the value. That should fix it.
I could try, but it's probably worth checking first if it's only that one type of dialog that has the problem...

Posted: Sat 16 Dec 2006, 00:10
by BarryK
Okay, it's not the font.
I changed /etc/gtk-2.0/gtkrc to use different fonts. It is currently
'DejaVu sans 12" however I tried "Sans 12" (which uses a Type1 font) and "Arial 12" (same as earlier Puppies). No difference, bug is still there.

So, I tried the old GTK1 version of Xdialog -- works perfectly.

So, the bug is in the new GTK2 version of Xdialog.

Posted: Sat 16 Dec 2006, 13:19
by Dougal
Ok, Barry, I looked at the code and have answers to two problems you encountered:

1) Long items being concatenated: there are maximum display lengths defined… for example, the menulist tags have a maximum of 128 pixels (interface.h, line 29).
So if you want to allow longer display names, let me know where and I'll look into it.

2) The burniso2cd bug: I got this in 2.12 and as far as I can see it is a gtk bug!
After the clist is filled with the data, a gtk autoresize function is run -- which apparently doesn't work well…
I created a workaround, where I get the length of the longest tag and use it to resize the column.
This length is in characters, while the column width has to be in pixels, so I just multiplied by 10 and it seems to work ok…
Another option will be to just set the tag column to be fixed to the maximum (128).

Anyway, try this and let me know if you think it should be tweaked some more.
That goes for you too, plinej…

Posted: Sat 16 Dec 2006, 23:04
by BarryK
Works!
The first dlg in burniso2cd is perfect, the second one is a bit wider than necessary but still okay -- better too wide than too narrow!

Posted: Sun 17 Dec 2006, 01:38
by plinej
Everything seems to work fine for me. Thanks for the great work dougal.