Linux version of my program, please test...

Linux specific forum
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Linux version of my program, please test...

Post by DoubleDutch »

I've made a linux version of my CutTheCosta program.

http://www.cutthecosta.com/en/fly/download

Its my first Linux program so it may or may not work properly, but it seems okay in Kubuntu (PB4 B2 is great!).

If anyone has any problems or any new ideas for it, then please get back to me...

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post by WishMaster »

There are no serious problems here on OpenSUSE 10.2 with KDE but buttons and string gadets are too smalll. They should have a height of at about 30px. Image]

BTW: I'm missing Lufthansa which is IMO quite an important airline :wink:
Image Image
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks for the feedback, it looked nicer on mine using default sizes. :)

I'll take a look at fixing the font size tonight. I'll also enter Lufthansa, they have about 900 routes. It may take a while! :)

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post by WishMaster »

If you use zero as gadget height or width, GTK2 automatically uses a reasonable width/height.

Code: Select all

OpenWindow(1, 0, 0, 300, 300, "Goedenavond")
CreateGadgetList(WindowID(1))
ButtonGadget(1, 20, 20, 200, 0, "Test")

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Image Image
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Runs well on Debian Etch under QEMU. Buttons are fine links are working with the Epiphany Browser set as Standard.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

WishMaster: I didn't know that, its a pity windows doesn't have such nice features.

The problem is that I want the source to be as similar as possible (one source with a few 'CompilerIf's)...

I've done the font changes now, just entering the route information for Lufthansa.

Nik: I've tried to set the fixed fonts to as close to the standard ones on both Windows and Linux. Can you try it again when I post the update later tonight, should be within the hour?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

I've updated the Linux version with the font changes and the Lufthansa routes (about 1,000 of them!).

Here's a screenshot:

Image

Please check it out... :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

WishMaster: Just noticed in your screenshot that you were looking for a flight from FRA to LON with Lufthansa. Lufthansa actually fly to London Heathrow (LHR) not LON (a different airport) - if you type 'London' it will give you all the airports in London, then click LHR. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Pinhead
User
User
Posts: 47
Joined: Fri Sep 09, 2005 11:24 pm

Post by Pinhead »

Looks nice, no Errors. Slackware 11
Perhaps build in a browser selection/config, normaly I don't use konqueror or KDE
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Pinhead: Thanks for checking it out. :)

Good idea about allowing you to set the default browser. I would put some options in, but I have no clue as to where to save the settings (or auto load settings from) in Linux. In Windows there is the registry or in Program Files or MyDocuments, is there somewhere like this in Linux? If so, how do I find the path?

Until then, you can set the default browser by setting the 'BROWSER' environment variable - it takes priority (unless you have 'xdg-open' installed).
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post by WishMaster »

@Pinhead:
You should install the xdg-utils.

@DoubleDutch:
Now the GUI looks fine.
Is it normal that - if I click on a button on the bottom - only the airline's homepage (e.g. http://www.lufthansa.com/online/portal/LH_COM) and not a page with further informations to the selected flight is opened?
> In Windows there is the registry or in Program Files or MyDocuments, is there somewhere like this in Linux?
In Linux, you store _every_ prefernece in the user's home directory. You can get it via

Code: Select all

GetEnvironmenVariable("HOME")
.
There you may create a file ".cutthecosta" (don't forget the dot! It makes the file invisible so it doesn't show up and disturb the user; usually you don't use capital letters on linux as files are threaten case-sensitive) where you can store your preferences.
Image Image
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Is it normal that - if I click on a button on the bottom - only the airline's homepage
At present, yes. We have contacted the various airlines about information regarding direct links - none have replied so far. :(

Maybe they will when we get more hits. In the meantime I plan to go through the various sites manually figuring out "how they work", the problem would have been that if they change how they work then the program would have to be updated.

The solution I came up with was for them to be selected via our website, when you click on a button it actually goes to cutthecosta.com with the airline, from and to info. CutTheCosta.com then point the browser in the right direction to the website. This way if there are any changes to the airline websites all I have to change is the way the CutTheCosta website works and the PC/Linux program will automatically work to the new location. Believe it or not this happened this week with one of the Airlines and the PC program did not have to be updated. :)

Also, thanks V. much for the save settings info. I'm pretty much a Linux beginner! Maybe Fred could build something into PureBasic that allows saving/loading settings to a known "safe" place on each OS?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Pinhead
User
User
Posts: 47
Joined: Fri Sep 09, 2005 11:24 pm

Post by Pinhead »

@WishMaster
I don't think that I need xdf-utils, because I don't use/like desktop environments.
I only use a very small and fast wm..
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post by WishMaster »

Well, then you can set $BROWSER :wink:
Image Image
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post by remi_meier »

On Windows and Linux, I think you can use the directory

Code: Select all

Debug GetHomeDirectory()
to store your configs. For MacOS, I think it's the same :P
Athlon64 3700+, 1024MB Ram, Radeon X1600
Post Reply