a pic for Barry

Puppy related raves and general interest that doesn't fit anywhere else
Post Reply
Message
Author
plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

a pic for Barry

#1 Post by plinej »

Here's a pic of burniso2cd (xdialog-gtk2 & gtk1)
Attachments
burniso2cd.jpg
(53.53 KiB) Downloaded 1812 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

Hmmm, this is what I get (displays ok gtk1 version)...
Attachments
xdialog-gtk2-nogood.gif
(9.46 KiB) Downloaded 1880 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#3 Post by BarryK »

I'm using the latest patched version supplied by Dougal.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#4 Post by plinej »

I used Dougal's latest patches too. Here's my binary:
Attachments
Xdialog.tar.gz
(27.28 KiB) Downloaded 1145 times

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#5 Post 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.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#6 Post 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`"

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#7 Post 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.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#8 Post 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

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#9 Post 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.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#10 Post 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?
Attachments
truncatedmore.gif
(11.76 KiB) Downloaded 1575 times

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#11 Post 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)
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#12 Post 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.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#13 Post 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...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#14 Post 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.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#15 Post 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…
Attachments
interface.c.gz
(13.13 KiB) Downloaded 1086 times
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#16 Post 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!

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#17 Post by plinej »

Everything seems to work fine for me. Thanks for the great work dougal.

Post Reply