WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: flPicSee version 0.9.1  (Read 8919 times)

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
flPicSee version 0.9.1
« on: May 25, 2009, 12: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.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: flPicSee version 0.9.1
« Reply #1 on: May 25, 2009, 01:00:05 PM »
Here is the source code and make file for flPicSee version 0.9.1.
--
Mike L.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: flPicSee version 0.9.1
« Reply #2 on: May 25, 2009, 01:10:29 PM »
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:
Quote
--- 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;
 
The only barriers that can stop you are the ones you create yourself.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: flPicSee version 0.9.1
« Reply #3 on: May 25, 2009, 06:11:06 PM »
Thanks, curaga.

Posting from TC 1.4.3, by the way.

Offline junan

  • Jr. Member
  • **
  • Posts: 88
Re: flPicSee version 0.9.1
« Reply #4 on: May 25, 2009, 07:33:07 PM »
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 :)
fun and fearless ...

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: flPicSee version 0.9.1
« Reply #5 on: May 25, 2009, 08:40:30 PM »
That is because I have been featuring Mike's work in the base system.
Mike keeps improving his program!
10+ Years Contributing to Linux Open Source Projects.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: flPicSee version 0.9.1
« Reply #6 on: June 02, 2009, 04:50:36 PM »
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.
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: flPicSee version 0.9.1
« Reply #7 on: June 03, 2009, 04:05:08 AM »
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.
The only barriers that can stop you are the ones you create yourself.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: flPicSee version 0.9.1
« Reply #8 on: June 03, 2009, 09:17:04 PM »
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.
« Last Edit: June 03, 2009, 09:18:35 PM by MikeLockmoore »

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: flPicSee version 0.9.1
« Reply #9 on: June 03, 2009, 09:32:24 PM »
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.
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: flPicSee version 0.9.1
« Reply #10 on: June 04, 2009, 01:45:33 AM »
Heh, I had an older version :P
The only barriers that can stop you are the ones you create yourself.

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: flPicSee version 0.9.1
« Reply #11 on: June 04, 2009, 01:53:42 AM »
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
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline JoXo009

  • Full Member
  • ***
  • Posts: 152
flPicSee with -title option?
« Reply #12 on: October 22, 2009, 03:05:14 AM »
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"?

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: flPicSee version 0.9.1
« Reply #13 on: October 22, 2009, 05:45:38 AM »
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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: flPicSee version 0.9.1
« Reply #14 on: October 30, 2009, 03:40:01 AM »
Does flpicsee take the standard fltk options? If so, then -title should already work.
The only barriers that can stop you are the ones you create yourself.