Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: MikeLockmoore on May 25, 2009, 03:55:45 PM
-
I'm posting a new version of flPicSee today. It has a right-click menu with some additional zoom levels, an about box, and a very simple help box. It also allows you to select another file with the standard file chooser.
This version has done away with the middle-click zoom-change behavior. Now if you click the left mouse button without dragging, the zoom changes (based on the window size and image size). If, instead, you click and drag the the mouse with the left button, and the image size is larger than the curren window size, the image will be dragged around with the mouse, allowing you to pan the image.
You may still use a mouse scroll wheel to change the zoom settings.
This version is a bit over 14 KB, but the make file has a new build config option that omits the right-click menu stuff and makes flPicSee about 11.5 KB. I hope in later versions to add additional features, so there will be one or more "delux" build configuration options as well.
DISCLAIMER: I've only tested with version 1.3 with JWM so far . Perhaps tonight or sometime soon I'll try with TC 1.4.3 and 2.0 rc2. But if you have any issues with flPicSee, please post a description of it here and your current TinyCore configuration (TC Base version and window manager, at least).
I'll post the source code and make file in reply below.
Hope people find it useful!
--
Mike L.
-
Here is the source code and make file for flPicSee version 0.9.1.
--
Mike L.
-
This probably won't matter with TC, but your code is not 64-bit clean: flpicsee.cpp:530: error: cast from 'void*' to 'int' loses precision
There's a very easy solution, that makes things work on 64 while still working on 32:
--- flpicsee.cpp 2009-05-25 23:08:28.000000000 +0300
+++ flpicsee.cpp.new 2009-05-25 23:06:19.000000000 +0300
@@ -527,7 +527,7 @@
#ifdef INCL_MENU
static void MenuCB(Fl_Widget* window_p, void *userdata)
{
- int choice = (int)userdata;
+ long choice = (long)userdata;
int spec_w, spec_h;
float speczoomfactor;
-
Thanks, curaga.
Posting from TC 1.4.3, by the way.
-
works with tce 2.x. but there is another flpicsee at /usr/bin/flpicsee.
if i call from aterm with flpicsee , it will call /usr/local/bin/flpicsee ,
your version. nice improvement , i can open another picture
without closing it first :)
-
That is because I have been featuring Mike's work in the base system.
Mike keeps improving his program!
-
On TCv2.0rc4 in both flwm and jwm, if a pic is 100% scale in initial window and I right click to zoom larger, thinking that I could then able to pan the image, instead I get a seg fault program abort.
-
The file check should be done before checking for the file extension, for example running "flpicsee garbage" prints the contents of random memory as the file type.
-
roberts: Did you use the .tce I provided in TC 2.0rc4? Or was it your own build? If it was your own build, which options were used? I tried to build it with and without the -DNO_MENU option and I don't see that kind of behaviour happen in TC 1.4.3 or TC 2.0rc2. I may yet get to testing on TC 2.0rc4, but perhaps not for a few days. As posted earlier, my main TC development machine is a laptop with a non-core ACX chipset WiFi adapter, and with a busted CD-ROM drive, and it will take a bit of fiddling to get that laptop fully usable with TC 2.0 like it is for 1.x.
curaga: I can't reproduce that behaviour with flPicSee version 0.9.1. I see a message box saying "File 'garbage' is not a known image type. flPicSee will exit." At least when running on TC 1.4.3. Are you running that version? NOTE: flPicSee should be recompiled for TC 2.0, so don't try to run my .tce on TC 2.0, if that is what you are doing.
--
Mike L.
-
Mike,
I had tested my build and saw the abort, then download your posted build and saw the same abort on 2.0rc4.
After seeing your latest post. I tested my build on 1.4.3 and no abort. It works as I had expected.
-
Heh, I had an older version :P
-
Hi MikeLockmoore!
I downloaded your version and is using this extension with Microcore and everything seems to work just fine. Thanks for a good work.
Have fun,
meo
-
Hi MikeLockmoore!
your flpicsee is a nice program.
Think about using it as tool to present background help information within my virtual TC install.
For this purpose it would be of advantage to set the window title ("Help info" for example instead of "100% ..."), to switch off mouse zooming and maybe even to set window opening position.
Do you see a possibility to produce a future flpicsee with the option -title "XXXXXX"?
-
JoXo009: Hmmm, perhaps that could be added, but I may not get to that very quickly. If you are handy in C, you could try, of course. - ML
-
Does flpicsee take the standard fltk options? If so, then -title should already work.
-
curaga: I think the answer is 'no', since FL-PicSee is currently not using the built-in FLTK function to handle FLTK-specific startup arguments. But doing so may be a very good way to add this custom title capability in a standard way at very little cost in terms of code size. I'll have to see if using that built-in command-line processing function would break anything else I'm doing with the command line or title.
--
Mike L.
-
I experimented with the Fl::args() function, but found out that I would need to rework some of my command-line processing code to better co-exist with it. I have very limited hacking time over the next few weeks, so I may not get back to this very soon.
--
Mike L.