|
|
View Full Version : Release of Calculator Calcoo
yokos 08-24-2007, 06:27 AM [04/25/2008] v.0.2.1 is out. It's v0.2 + pixbuf-loaders installation, which solves the app loading problems as discussed below.
Calcoo is a RPN (http://en.wikipedia.org/wiki/Reverse_Polish_notation) and algebraic scientific calculator.
http://projects.mobileread.com/iliad/users/yokos/calcoo.png
Features are as listed on official Calcoo homepage (http://calcoo.sourceforge.net/):
# both RPN and algebraic modes
# bitmapped button labels and display glyths
# undo/redo
# copy/paste interaction with the X clipboard
# two memory registers with displays
# displays for Y, Z, and T registers
Calcoo opens as a window on iLiad's screen. So you can scribble in pdf & calculate at the same time. You can move Calcoo's window with stylus on screen.
I tweaked the files b_main.c, b_settings.c & b_info.c to get Calcoo in it's own window. This is discussed below. "Settings" (!) & "Info" (?) dialog open a 2nd window. Have a look at the screenshot.
You can find the src (http://projects.mobileread.com/iliad/users/yokos/src/) on my projects page.
official Calcoo homepage (http://calcoo.sourceforge.net/): with versions for Linux, Windows & Mac.
[2007/10/12]: There is a problem. Calcoo doesn't start anymore. I will work on it.
[2007/11/03]: Sorry for the delay. A new version calcoo.iLiad.0.2 is out. Now with an installer. I tested it on CF/main memory.
Callcoo is my first port of a gtk+ 2.x app. It's a beta version because we can't exit the program the normal way.
The only working ways to close the Calcoo application are:
# reset iLiad,
# connect iLiad via USB to PC, this kills Calcoo.
Heh, it's a beta. It's just a "Hello world of MR's developer community".
Well, all buttons of Calcoo are working. If this no-exit-button is solved, it' will be a tiny calculator for iLiad.
Why there is no normal exiting of program?
Because I'm a newbie to porting. :p
More in detail:
# Calcoo hasn't got a menu, where we could choose "close app" like in other programs.
# Calcoo starts without window, therefore we can't see x-button in top bar.
Solution of known crux:
# Create a "exit-button".
# Get Calcoo started as a window.
1st screenshot: old beta version
2nd screenshot: recent version, showing Callcoo with Info-Dialog ["?"-Button]
Adam B. 08-24-2007, 10:31 AM Cool. :)
It might solve your problem if you made the window manager think it was a dialog box instead of a regular application. That should give you a close button and clean up all that white space.
Adam B. 08-24-2007, 10:52 AM gtk_window_set_type_hint (body->main_window, GDK_WINDOW_TYPE_HINT_DIALOG);
Adding the above in line 51 or so of src/b_main.c should do the trick. :) :thumbsup:
yokos 08-24-2007, 11:14 AM gtk_window_set_type_hint (body->main_window, GDK_WINDOW_TYPE_HINT_DIALOG);
Adding the above in line 51 or so of src/b_main.c should do the trick. :) :thumbsup:
Oh, I was searching the GTK Reference Manual.
Cool, that's so easy. :grin2: I will try it at home later. Working Day is over here in Germany.
Adam B. 08-24-2007, 11:17 AM Oh, I was searching the GTK Reference Manual.
Cool, that's so easy. :grin2: I will try it at home later. Working Day is over here in Germany.
That's where I found it myself.
Glad I could help. This porting stuff really isn't as hard as it looks...
HarryT 08-24-2007, 11:38 AM Interesting that the old "main window as a dialog box" also works on Linux. It's a standard "trick" that we use in Windows programming, too, that gives you a lot of functionality "for free".
Adam B. 08-24-2007, 12:35 PM Interesting that the old "main window as a dialog box" also works on Linux. It's a standard "trick" that we use in Windows programming, too, that gives you a lot of functionality "for free".
It's especially handy when our window manager (matchbox), removes window decorations in order to give it more of a "tablet" feel.
What do you gain by doing that in Windows?
HarryT 08-24-2007, 01:22 PM Two main things:
1. You can design your dialog box with the very nice "drag and drop" editors that development environments like Microsoft's Visual Studio provide. On a "main" window you have to position everything with code, which is a lot more work. (For the purists, that's not strictly true, but it'll do as a first approximation)
2. At runtime, you get "for free" a standard keyboard interface, with "Tab" moving you from control to control, and "hotkeys" to jump directly to specified controls. For non-dialog windows, you have to do all that yourself.
Those are the main benefits.
yokos 08-25-2007, 07:23 AM Ok, Calcoo is now working like it should do. :dtw:
I have attached the new binary in post #1.
yokos 08-25-2007, 07:36 AM I'm sorry, I wanted to edit post #1 but got a reply. :stupid:
The GreatGonzo 08-26-2007, 07:05 AM Will this need to be installed on a card or can it be run directly from the Iliad?
yokos 08-27-2007, 05:56 AM Will this need to be installed on a card or can it be run directly from the Iliad?
Just extract the included directory "Calcoo" to a place [CF, iLiad's memory, etc] you want to use. You need ~12 MB of free space, more than 90% of that are needed for the libraries. :( Maybe I should learn this ipk-think [-> Adam B.'s installation method] to get rid of these duplicates of libraries for every appl.
The GreatGonzo 08-27-2007, 07:33 AM Just extract the included directory "Calcoo" to a place [CF, iLiad's memory, etc] you want to use.
Hmmm ... in that case, I can't get it to work. The Calcoo window pops up briefly, then disappears again. Gnuchess runs fine from the same directory on the Iliad. Dang it ....
templario 10-11-2007, 05:33 PM Same here, i am not able to run it, it seems to pop up very fast, but then its gone.
yokos 10-12-2007, 08:18 AM Same here, i am not able to run it, it seems to pop up very fast, but then its gone.
I confirm this. My Calcoo doesn't seem to be compatible to 2.11 with submitted libraries.
I get a "GdkPixbuf-WARNING" & "segmentation fault". :smash: Odd. I will work on it.
yokos 11-03-2007, 09:01 AM Ok, I fixed the bug. A new version of Calcoo is out: calcoo.iLiad.0.2. It's attached in the first post.
Calcoo is running again. :crowngrin
Ok, I fixed the bug. A new version of Calcoo is out: calcoo.iLiad.0.2. It's attached in the first post.
Calcoo is running again. :crowngrin
cool
I just had a stupid easy to solve problem: I moved calcoo.install to my SD, installed it ok but then I found calcoo.install files in iliad's root directory :blink:
templario 11-04-2007, 01:54 PM Thanks yokos, this time works perfect, nice calculator. It is a good thing that the calculator remains on top of everything, in that way you can scribble and make calculations on a blank document at the same time.
Would it be posible to port a notes program that remains at the top as well, so in that way you can be reading a pdf document and make notes at the same time (make notes in a different document)?.
Thanks again for your programs,
Jose
templario 03-20-2008, 06:36 PM Is there anyone having problems to run Calc in 2.12?
It doesn´t work for me. It refreshes but it doesn´t load.
Thanks
yokos 03-28-2008, 06:41 AM Is there anyone having problems to run Calc in 2.12?
It doesn´t work for me. It refreshes but it doesn´t load.
Thanks
Yepp, this is true. It doesn't work here either.
error.log:
(calcoo:664): GdkPixbuf-WARNING **: Error loading XPM image loader: Image type 'xpm' is not supported
Segmentation fault
It's the same error message we got earlier, too [above in this thread].
yokos 04-25-2008, 08:28 AM Yepp, this is true. It doesn't work here either.
error.log:
(calcoo:664): GdkPixbuf-WARNING **: Error loading XPM image loader: Image type 'xpm' is not supported
Segmentation fault
I got this "GdkPixbuf-WARNING" thing all-the-time, even in not released apps.
A solution is found.
Some of Adam B.'s ports like Integrated FBReader 0.8.14 with ePub and Registry Support (http://www.mobileread.com/forums/showthread.php?t=20490) install pixbuf-loaders.
If these are not installed my port like calcoo will not run. :bulb2:
So I have to include this pixbuf-loaders.ipk in my installation packages.
[EDIT] v0.2.1 is out. pixbuf-loaders.ipk is included.
Dabon 04-25-2008, 11:00 AM Hi Yokos,
Thanks a million for upgrading this software package!! I finally got it to work on my iliad (2.12), after several unsuccessful trials, and having to be forced to installed the other calculator fx 48.
I am not really linux competent (I am still learning...) so please excuse my ignorance for my following question: I had the same problem trying to install minimo, it was acting exactly like my previous failed attempts to install calcoo (brief flashing but no installation), thus do you think that the doing the pixbuf-loaders.ipk was missing in the minimo package as well. If yes, would you be kind as t update the currently posted minimo installer package at your leasure time. Thanks a bunch in advance.
D.
yokos 04-26-2008, 11:46 AM [...]
I am not really linux competent (I am still learning...) so please excuse my ignorance for my following question: I had the same problem trying to install minimo, it was acting exactly like my previous failed attempts to install calcoo (brief flashing but no installation), thus do you think that the doing the pixbuf-loaders.ipk was missing in the minimo package as well. If yes, would you be kind as t update the currently posted minimo installer package at your leasure time. Thanks a bunch in advance.
D.
The minimo installer comes with pixbuf-loaders. So it is somthing different. :eek:
Nearly all ports come with a log-file [terminal output of program during execution of app].
If everything is fine this file is empty. If not you get code like these in the above posts.
The code snippet of app starting shell script run.sh [the black-box-thing-for-end-users, that you start, when you click an app icon in contentlister], which creates log file:
/usr/local/bin/calcoo > output.txt 2>&1
This log file lives in Programs/"name of app" on memory card.
Maybe you try Adam B.'s Webkit Browser (Safari's Engine) with Beta Release (http://www.mobileread.com/forums/showthread.php?t=20599).
|