site  contact  subhomenews

Proxy-server setup GUI

November 16, 2010 — BarryK
As announced in the previous blog post, I have written a proxy-server setup GUI application:

After discussion on the forum and my blog about the need for such a tool:

The application is now in Woof, at /usr/local/simple_network_setup/proxy-setup, and is integrated into the Internet Connection Wizard.

I had some feedback about my proxy-setup GUI truncating text if the font size is too big, and vovchik (who is one of our BaCon gurus) kindly enhanced my code to compensate for this, plus other improvements.

However, I have taken a different approach, as an experiment. At the beginning of the program I have this:

REM try to set font size to fit window... ex: xdpy=107 xftdpi=78

xdpi=VAL(EXEC$("xdpyinfo | grep -o 'resolution: .*' | tr -s ' ' | cut -f 2 -d ' ' | cut -f 1 -d 'x'"))
xftdpi=VAL(EXEC$("grep '^Xft.dpi:.*' /root/.Xresources | tr -s ' ' | cut -f 2 -d ' '"))
REM my weird formula...
font_sans$=CONCAT$("DejaVu Sans ",fontsize$)
font_mono$=CONCAT$("Monospace ",fontsize_mono$)

Then in the code I use the FONT() function to set the text in widgets to that font and size. I did some basic experiments and it seems to work ok.

Tags: woof