Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 15:23
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
BaCon - Bash-based Basic-to-C converter/compiler
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 19 of 36 Posts_count   Goto page: Previous 1, 2, 3, ..., 17, 18, 19, 20, 21, ..., 34, 35, 36 Next
Author Message
L18L

Joined: 19 Jun 2010
Posts: 2530
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Mon 07 Mar 2011, 16:20    Post_subject: bacon
Sub_title: proxy-setup internationalised
 

Mon 15 Nov 2010, 12:32 esmourguit wrote:
Quote:
As it seems we're at the beginning of the creation (and maybe later adaptation of old scripts) of programs, written with bacon, for new versions of Wary, Quirky, etc., would it be possible to localize them now with a .mo file?
If possible of course.

Yes, it is, .pot file is included.
de.png
 Description   German proxy-setup
 Filesize   33.25 KB
 Viewed   1758 Time(s)

de.png

proxy-setup.tar.gz
Description  proxy-setup
proxy-setup.bac
proxy-setup.pot
gz

 Download 
Filename  proxy-setup.tar.gz 
Filesize  39.68 KB 
Downloaded  332 Time(s) 
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 07 Mar 2011, 21:30    Post_subject:  

I have created a PET for the Vim text editor, with color highlighting for BaCon:

http://bkhome.org/blog/?viewDetailed=02174

One of the great features of Vim is that it can convert code to color-highlighted-HTML, as I have reported here:

http://bkhome.org/blog/?viewDetailed=02173

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 07 Mar 2011, 22:21    Post_subject:  

My favorite editor. It's important to stay on top of the patches, though (which can quickly be several hundred).
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 09 Mar 2011, 04:11    Post_subject:  

Thanks to help from Peter van Eerten and L18L, I was also able to get international language support working. It's real easy, and to show everyone else how easy it is I have written a HOWTO:

http://bkhome.org/bacon/international.htm

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 09 Mar 2011, 05:59    Post_subject:  

Ok, I have updated the proxy-setup tool, with two improvements:

1. Peter's solution so that the layout of the window remains correct regardless of the type of screen, default GTK fonts, or XFT DPI value.

2. Peter's upgrade to BaCon that supports international languages.

I have attached an image of what it looks like on my screen. I would appreciate if you guys could try it and confirm that the layout remains correct on your screens.
proxy-setup.png
 Description   Showing correct layout on my PC
 Filesize   6.42 KB
 Viewed   1726 Time(s)

proxy-setup.png


_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 09 Mar 2011, 06:05    Post_subject:  

And attached is a tarball of my latest proxy-setup, along with the 'bacon' compiler and 'hug.bac' that I used.

Apart from testing the layout, if anyone who is interested in supporting internationalization, I have included 'proxy-setup.pot' -- you can use this to create a proxy-setup.mo file for your language/country -- send it to me and I will include it in Puppy -- in fact, it will be in Woof, so in all Woof-built puppies.

I have created a web page that shows how easy it is to create a .mo file from a .pot file:

http://bkhome.org/bacon/international.htm
proxy-setup-20110309.tar.gz
Description  The latest proxy-setup
gz

 Download 
Filename  proxy-setup-20110309.tar.gz 
Filesize  149.28 KB 
Downloaded  415 Time(s) 

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Wed 09 Mar 2011, 08:13    Post_subject: proxy-setup  

Dear Barry,

The main screen looks perfect on my machine. The only little infelicity is in the closing message box, where the OK button abuts (pardon the pun) against the text above it. I changed the dimensions of the second message box to 400,120,0,1 and everything was fine.

With kind regards,
vovchik
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2530
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Wed 09 Mar 2011, 18:01    Post_subject: proxy-setup
Sub_title: layout
 

I had to increase the width of mainwin and label_hdrx by 40 to get my translation legible and had to change size of message box to:
yes_dlg1=MSGDIALOG(INTL("..."),500,150,0,1)
no_dlg1=MSGDIALOG(INTL("..."),500,120,0,1)
I have been varying 'global font size', too and here is how it is looking on my screen (1280x720) now. Confused
7 posts back looks better Rolling Eyes
German po-file attached. Smile
de-dpi_72.png
 Description   dpi 72
 Filesize   41.45 KB
 Viewed   1701 Time(s)

de-dpi_72.png

de-dpi_60.png
 Description   60 dpi
 Filesize   29.95 KB
 Viewed   1719 Time(s)

de-dpi_60.png

de.po.gz
Description  de.po for proxy-setup
gz

 Download 
Filename  de.po.gz 
Filesize  1.2 KB 
Downloaded  439 Time(s) 
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 09 Mar 2011, 21:05    Post_subject:  

Thanks for the feedback.

L18L,
Puppy has default xft dpi set at 78, which is a bit low. Most Linux distros use 96. So, it is very unlikely that anyone would want to change the setting to less than 78. Test with bigger values, such as 96.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
L18L

Joined: 19 Jun 2010
Posts: 2530
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Thu 10 Mar 2011, 04:36    Post_subject: proxy-setup
Sub_title: layout
 

is looking good so far with 96 dpi.
The input fields have to be moved to the right, of course.

And thanks for the statement
Quote:
all programs will have international language support
in your blog Very Happy Very Happy
de-dpi_96.png
 Description   german 96 dpi
 Filesize   59.45 KB
 Viewed   606 Time(s)

de-dpi_96.png

Back to top
View user's profile Send_private_message 
Volhout


Joined: 28 Dec 2008
Posts: 403

PostPosted: Thu 10 Mar 2011, 05:03    Post_subject: BaCon and USB IO
Sub_title: Can we support FTDI USB IO, and how is this done ?
 

Barry, Peter, Vovchik,

I have been following this thread with great interest, since I am a great puppy lover (since 2.17), but have never taken the step to do anything else than assembly language, a bit of bash, and (in the early days) basic.

Your joined effort to get BaCon working in Wary made me decide to drop Puppy 5 and install Wary 5.1.1 with success. Installed the devpack, and downloaded hug.bac. Using NicoEdit.
And I have been programming since, taking Barry's proxy program as a reference. I am impressed, and would like to use this configuration for my hobby (model railway automation). In this I need digital IO. One of the options for this is USB IO chips like the FTDI range (I own a few FT245BM modules).

But I have no clue on how to add the drivers for these USB chips to the BaCon environment. There is a Linux library (1.0.4) for Mandrake 9, but that would (probably) need re-compilation for Wary ????

http://www.ftdichip.com/Drivers/D2XX.htm

And even then, how can I access this library from BaCon ?? Do I use the EXEC command ?

Can someone help me ??

Volhout
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2530
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Thu 10 Mar 2011, 05:15    Post_subject: BaCon and USB IO
Sub_title: Can we support FTDI USB IO, and how is this done ?
 

Dear Volhout
Quote:
Can someone help me ??

I think bacon Troubleshouting area can and will help you Smile
Best regards
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 14 Mar 2011, 09:20    Post_subject:  

The proxy-setup BaCon program saga continues!

Attached is the very latest. It also needs the very latest BaCon. My PET has /usr/lib/hug.so, which makes GUI applications smaller -- 'proxy-setup' has dropped from 115KB to 50KB.

Recently there have been significant refinements in internationalization and also refinements that enable us to create windows that always layout correctly regardless of DPI/screen/default-fonts.

The attached proxy-setup.bac demonstrates these recent advances. Peter is the guy who has done all of this. I have reported problems and Peter has responded immediately and fixed things.

Note that the attached tarball has a readme that explains a few more things.

My latest BaCon PET:
http://distro.ibiblio.org/quirky/pet_packages-quirky/bacon-1.0.22pre-20110314.pet
proxy-setup-20110314.tar.gz
Description 
gz

 Download 
Filename  proxy-setup-20110314.tar.gz 
Filesize  19.36 KB 
Downloaded  382 Time(s) 

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 14 Mar 2011, 21:35    Post_subject:  

I have written a HOWTO that explains how to get good layout always in a window written with HUG:

http://bkhome.org/bacon/hug/layout.htm

It needs the latest BaCon, 1.0.22pre. I posted a PET here:

http://bkhome.org/blog/?viewDetailed=02182

If anyone has any thoughts how the layout HOWTO can be improved/extended, please let me know.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 17 Mar 2011, 01:02    Post_subject:  

This may come in handy for a quick font size check
or a quick message or to test different fonts
it can be run in the terminal " as is"

many possibilities with markup

Joe

Code:
pango-view \
 --font="DejaVu Sans 12" \
 --markup \
 --text 'This is a DejaVu Sans 12
 output on a X screen'
 
 
 pango-view \
 --font="DejaVu Sans 24" \
 --markup \
 --text 'DejaVu Sans 24
output on a X screen'
 
 
 
 pango-view \
 --font="DejaVu Sans 44" \
 --markup \
 --text 'This is a
 DejaVu Sans 44
 output
 on a X screen'

12.png
 Description   
 Filesize   5.68 KB
 Viewed   1496 Time(s)

12.png

24.png
 Description   
 Filesize   10.04 KB
 Viewed   1501 Time(s)

24.png

44.png
 Description   
 Filesize   15.36 KB
 Viewed   1494 Time(s)

44.png


_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 19 of 36 Posts_count   Goto page: Previous 1, 2, 3, ..., 17, 18, 19, 20, 21, ..., 34, 35, 36 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0957s ][ Queries: 13 (0.0147s) ][ GZIP on ]