Commit Graph

205 Commits (2434e83807360bfe43e3c404be12438f00a894ab)

Author SHA1 Message Date
Berke Kocaoğlu 7cce7ea857 Rename, Update Docs and Prepare for Release (#9)
Co-authored-by: Guilherme Rugai Freire <41879254+GRFreire@users.noreply.github.com>
Co-authored-by: N-R-K <79544946+N-R-K@users.noreply.github.com>
Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: Arthur Williams <taaparthur@gmail.com>
Co-authored-by: eylles <ed.ylles1997@gmail.com>
3 years ago
TAAPArthur 25a3114709 Rework the build system (#19)
* Added simple configure script

Added simple script to autodetect if optional dependencies are installed
and enable/disable them as needed. Note this solution uses the compiler
directly instead of an external program like pkgconfig so it doesn't
require any extra dependencies. It is intended to work with any
arbitrary compiler; it has been tested with tcc and gcc.

There are some "breaking" changes hidden here
- HAVE_GIFLIB was renamed to HAVE_LIBGIF to match HAVE_LIBEXIF
- Simply typing `make` will no longer try to build with optional
  dependencies

* use implicit RM variable

* General clean-up in configure

- Use printf instead of echo
- Format style

* honor env PREFIX, use LDLIBS

* Revert "General clean-up in configure"

This reverts commit 8683c179db.

* honor env LDFLAGS if set

* Don't set OPTIONAL_LIBS in configure

* make OBJ all caps

* follow suckless style build system

- remove configure script.
- HAVE_LIBGIF and HAVE_LIBEXIF defaults back to 1
- unload several varibales onto config.mk
- make version all-caps
- add -O2 optimization
- use CPPFLAGS for includes and defines

* Revert "follow suckless style build system"

This reverts commit 8bf75b1f68.

* Generate config.mk from make

* Inlined configure in Makefile

* update docs

* cleanups

- changes to config.mk should trigger a rebuild
- remove potentially confusing variables form Makefile

* Use install instead of mkdir/cp/chmod when sensible

* fixup! Inlined configure in Makefile

* Don't generate config.mk on rm -f *.o sxiv

* update docs and cleanups

- make config.mk silent
- mention editing config.mk in README

* fallback to 0 if user edits config.mk in unexpected way

* add comment on config.mk

* remove invalid comment

configure script is removed

* slight restructure

- make version all caps
- restructure variables that users may want to edit to top
- use CPPFLAGS for defines
- add some comments
- remove needless echos since we have verbose output now

* add echos back

Co-authored-by: NRK <nrk@disroot.org>
Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
3 years ago
whowillbellthecat cca7834e67 fix: out-of-bounds access when bg not in color map 3 years ago
NRK 91d9b3128e change gamma on -G
Closes: https://github.com/nsxiv/nsxiv/issues/30
3 years ago
Guilherme Freire f7557c55b5 Custom bar colors (#10)
* set bar and text colors independently

* change xresources to Program.class.resource

* rename color variables to win/bar_bg/fg

* change default bar colors to match window colors
3 years ago
Berke Kocaoğlu c7ca547b55 Fix in tabbed with alpha patch (#3)
* Fix in tabbed with alpha patch

Co-authored-by: Jared Forrest <jared_forrest@mailbox.org>
3 years ago
Berke Kocaoğlu 88f77bc59c Implement fill scale mode 3 years ago
Bert Münnich 28868767e6 Use normal win colors in fullscreen mode
Fixes issues #361 and #367
5 years ago
Bert Münnich 919ada1123 Align compile-time color options with X resource colors
Two colors are more than enough!
6 years ago
Bert Münnich 6d1e00627b Do not limit fit-to-win to smallest zoom level
Related to issue #303
7 years ago
Bert Münnich 727939b3e6 Make zoomdiff compare impact on image dimensions
Before that zoomdiff was a merely heuristic.

Related to issue #303
7 years ago
Bert Münnich 4c294011a9 Use float for ox/oy compare values
Fixes issue #302
7 years ago
Bert Münnich f02661879f Reject text files resembling TGA images
Fixes issue #295

The imlib2 TGA loader returns an imlib image handle without any actual data
when given a text file like this:

    T
    Content-Type: application/javascript
    Content-Length: 3836
    Last-Modified: Wed, 23 Sep 2015 12:25:47 GMT
    Etag: "56029a4b-efc"
    Expires: Sat, 20 Aug 2016 15:14:33 GMT
    Cache-Control: max-age=604800, public
    Accept-Ranges: bytes

Fortunately, `imlib_image_get_data()` returns NULL in this case, so that we can
use it as an additional check when opening files.
7 years ago
Bert Münnich 148026007c One header file for type definitions and function declarations 7 years ago
Bert Münnich a5403178e3 Zoom into mouse cursor position 7 years ago
Bert Münnich e310136e02 Mouse drag translates pointer position to image area
This makes mouse panning more direct and faster.
7 years ago
jcalve ec545a6b6c Make pan fraction configurable 7 years ago
Bert Münnich ff2ce99bf7 Merge djhejna/floatdelay 8 years ago
Don Hejna 27bbaab976 Support for DELAY as a floating point number including less than 1
second while maintaining backward compatibiitiy with integer
arguments.
8 years ago
dwminer 2c566c5320 Add -A option to force framerate on animated images 8 years ago
Bert Münnich 878d97068c Only open regular files; fixes issue #252 8 years ago
Bert Münnich c280129cef Use Xft for font loading and text drawing 8 years ago
Bert Münnich 4db3029bc6 Fix 32-bit unsigned integer shift 9 years ago
Bert Münnich d3a70a285d Revised error handling
- Functions warn() and die() replaced by GNU-like error(3) function
- Register cleanup() with atexit(3)
- Functions called by cleanup() are marked with CLEANUP and are not allowed to
  call exit(3)
9 years ago
Bert Münnich 851e4288c1 Prefix safe allocation functions with 'e' instead of 's_' 9 years ago
Bert Münnich e574a6d0dd Removed feature test macro definitions from source files 9 years ago
Bert Münnich e0e96977b3 Removed overcautious parameter checks 9 years ago
Bert Münnich 01ed483b50 Round integer cast of image offset during rendering; fixes issue #197 10 years ago
Bert Münnich 47e6cd0669 Apply gamma value on thumbnails too; fixes issue #193 10 years ago
Bert Münnich 9b9294bae6 Use bit-field for boolean flags in fileinfo struct 10 years ago
Bert Münnich 93e2a757d4 Do not print could-not-open-warnings for files found by directory traversal 10 years ago
Bert Münnich 2fbc21a205 Simplified img_frame_animate 10 years ago
Bert Münnich bb6721549b Overhauled window drawing, yet again; fixes issue #155
- Buffer for window content is bigger than the window, minimizes artifacts
  when window is resized
- Back to using XSetWindowBackgroundPixmap() instead of XCopyArea(),
  no need to handle exposure events; X server can show gray background directly
  after resize event before sxiv redraws the window contents
10 years ago
Bert Münnich 5e481912ec Revised handling of GIF animations
- New option `-a`: Play animations at startup
- Ctrl-Space toggles animation for all GIF files
- Infinite loop for all animations
10 years ago
Bert Münnich 9c92de8584 Added support for multiple commands per key/button mapping; elegant fix for issue #150 10 years ago
Bert Münnich d26f39914e Use thumbnails in EXIF tags; requirement for libexif is back 10 years ago
Bartłomiej Piotrowski b901236261 Fix build with giflib >= 5.1.0. 10 years ago
Bert Münnich e685859a30 Use a checkerboard background for alpha layer; fixes issue #138 11 years ago
Bert Münnich d049391916 Check for background image allocation failure 11 years ago
Bert Münnich 4fde8c8cbc Use separate background image for alpha layer; fixes issue #132 11 years ago
Bert Münnich 43a04c4757 Revised scale mode and zoom level handling
- Scale mode is not reset to default value upon image loading anymore
- New default key binding to change mode to scale-down
- Removed scale mode setting from config.h
- Removed -d command line option, as this is now the default at startup
11 years ago
Bert Münnich eb82519a80 Preserve panning when switching images; fixes issue #131 11 years ago
Bert Münnich 002c7e550b Second take at rotating & flipping multi-frame images; fixes issue #121 11 years ago
Bert Münnich 48700aa6c8 Revert "Apply flip & rotation on all frames of a multi-frame image; fixes issue #121"
This reverts commit f795273b65.
11 years ago
Bert Münnich f795273b65 Apply flip & rotation on all frames of a multi-frame image; fixes issue #121 11 years ago
Bert Münnich 6a0fa2507c Slideshow mode is back, in a simplified version 11 years ago
Bert Münnich ab28c9a8b9 Refactored remote changes 11 years ago
Aleksander Nitecki 078136d217 Read GIF's repeat information from file. 11 years ago
Bert Münnich 99dfd14919 Fixed Imlib file handle type, issue #117 11 years ago
Bert Münnich ac2a6ff040 Correct out-of-range gamma values given on command line 11 years ago
Bert Münnich 50f9ad14de Refactored remote changes 11 years ago
András Mohari 0353e6eea2 Add support for changing the gamma value 11 years ago
Bert Münnich 26a624a543 Added options for anti-alias & alpha layer coloring to config.def.h
Also removed now obsolete -p command line option; fixes issue #98
11 years ago
Bert Münnich 56142bd3ba Refactored merged rotation code 11 years ago
Bastien Dejean 7e51c35801 Handle 180 degrees image rotation 11 years ago
Bert Münnich b1a24cb018 Fixed build for giflib version >= 5.0; fixed issue #90 12 years ago
Bert Münnich 08ae25da22 Refactored function definitions to use dangling brace 12 years ago
Bert Münnich 6d3bbc6d5e Updated/corrected license header 12 years ago
Bert Münnich eea8b7a98d Fixed compilation with giflib version 4.2.1 12 years ago
Bert Münnich 97a2c05cc3 Fixed issue #74, conditional compilation of gif support 12 years ago
Bert Münnich 5dbf1b8eb9 Smaller minimum gif delay, fixed issue #71 12 years ago
Bert Münnich c78f55ebb4 Simplified zoomdiff function 12 years ago
Bert Münnich 8a652a786c Corrected zoom level handling 12 years ago
baskerville b56989f8fb New commands: fit to the window's height/width 12 years ago
Bert Münnich 4c40cc24bc Slightly refactored flipping 13 years ago
baskerville ba0a5b89fa Added horizontal and vertical flip commands 13 years ago
Bert Münnich d407dd65d5 Already in the year 2012 13 years ago
Bert Münnich 691c6d7e7e Added own exif tag handling in files exif.[ch] 13 years ago
Bert Münnich b8458271fb Added text bar on bottom of window 13 years ago
Bert Münnich ef0ed32264 Removed exif support; made gif support non-optional 13 years ago
Bert Münnich c3c95ab218 Removed slideshow support 13 years ago
Bert Münnich d2ec67e331 Fixed issue #32: wrong antialias setting after it_shell_cmd 13 years ago
Bert Münnich ac4eb53029 Fixed issue #28 (again) 13 years ago
Bert Münnich 92b2779b00 Fixed issue #28 13 years ago
Bert Münnich 3e2523818b Fixed handling of gif disposal method (issue #23) 13 years ago
Bert Münnich 8dcb54705a Fixed pixel-wise panning by chaning x, y vars to float 13 years ago
Bert Münnich 867940ea85 Pan by pixel count, if number prefix given 13 years ago
Bert Münnich 36177fb180 Updated contact information 13 years ago
Bert Münnich 4383a651c7 Strictly adhere to ANSI-C standard 13 years ago
Bert Münnich 4864f04455 Regard gif disposal method; fix bug #18 13 years ago
Bert Münnich 71e61b13b2 Made zoomdiff an inline function 13 years ago
Bert Münnich 8dcf682de9 Made all conditionals more precise 13 years ago
Bert Münnich 22d4e991d5 Transformed function macros in util.h to inline functions 13 years ago
Bert Münnich d369f10aa5 Fix layering of small gif frames 13 years ago
Bert Münnich d721d8453e Added STREQ macro 13 years ago
Bert Münnich 515e410451 Use win_t member in img_t & tns_t instead of parameters 13 years ago
Daniel 82df0b34e9 270/90 = 3 13 years ago
Bert dad06c7561 Much nicer handling of compile-time features
- *_SUPPORT enabled in config.h
- XLIBS helper app prints lib flags needed for current settings
13 years ago
Bert b2a2a62b7b Added own bool type 13 years ago
Bert e2d4b9c791 Added dirty flag to img struct 13 years ago
Bert 510512714d Added slideshow support 13 years ago
Bert 6e575b0f72 Strict conformance to IEEE Std 1003.1-2001 13 years ago
Bert fdbc5cf76b Added EXIF_SUPPORT macro for optional dependency on libexif 13 years ago
Bert bfab4dc328 Added EXIF auto-orientation 13 years ago
Bert b96c106337 Overhauled building
- config.h -> config.def.h
- Create config.h during make, if it does not exist
- Nice make output
- Use XFLAGS and XLIBS to include additional compile-time features,
  which depend on third-party libraries
13 years ago
Bert 8f34b7e95c Load as much of a corrupted gif file as possible 13 years ago
Bert 14d1daf280 Removed useless zl_cnt variable 13 years ago
Bert d585b86354 Reformated license header 13 years ago
Bert de6b58a315 Unified feature test macro requirements 13 years ago
Bert 391e6e7079 Mention origin of img_load_gif() in comment 13 years ago