nsxivb2f1b99
Disable support for external commands by default
+22 −24
2 files changed
| @@ -1,30 +1,28 @@ | |||
| 1 | − | /* default window dimensions: * | |
| 2 | − | * (also controllable via -g option) */ | |
| 3 | − | #define WIN_WIDTH 800 | |
| 4 | − | #define WIN_HEIGHT 600 | |
| 1 | + | /* default window dimensions (overwritten via -g option): */ | |
| 2 | + | #define WIN_WIDTH 800 | |
| 3 | + | #define WIN_HEIGHT 600 | |
| 5 | 4 | ||
| 6 | − | /* default color for window background: * | |
| 7 | − | * (see X(7) "COLOR NAMES" section for valid values) */ | |
| 8 | − | #define BG_COLOR "#999999" | |
| 9 | − | /* default color for thumbnail selection: */ | |
| 10 | − | #define SEL_COLOR "#0040FF" | |
| 5 | + | /* default color for window background: * | |
| 6 | + | * (see X(7) "COLOR NAMES" section for valid values) */ | |
| 7 | + | #define BG_COLOR "#999999" | |
| 8 | + | /* default color for thumbnail selection: */ | |
| 9 | + | #define SEL_COLOR "#0040FF" | |
| 11 | 10 | ||
| 12 | − | /* how should images be scaled when they are loaded?: * | |
| 13 | − | * (also controllable via -d/-s/-Z/-z options) * | |
| 14 | − | * SCALE_DOWN: 100%, but fit large images into window, * | |
| 15 | − | * SCALE_FIT: fit all images into window, * | |
| 16 | − | * SCALE_ZOOM: use current zoom level, 100% at startup */ | |
| 17 | − | #define SCALE_MODE SCALE_DOWN | |
| 11 | + | /* how should images be scaled when they are loaded?: * | |
| 12 | + | * (also controllable via -d/-s/-Z/-z options) * | |
| 13 | + | * SCALE_DOWN: 100%, but fit large images into window, * | |
| 14 | + | * SCALE_FIT: fit all images into window, * | |
| 15 | + | * SCALE_ZOOM: use current zoom level, 100% at startup */ | |
| 16 | + | #define SCALE_MODE SCALE_DOWN | |
| 18 | 17 | ||
| 19 | − | /* levels (percent) to use when zooming via '-' and '+': */ | |
| 18 | + | /* levels (percent) to use when zooming via '-' and '+': */ | |
| 20 | 19 | static const float zoom_levels[] = { | |
| 21 | 20 | 12.5, 25.0, 50.0, 75.0, | |
| 22 | 21 | 100.0, 150.0, 200.0, 400.0, 800.0 | |
| 23 | 22 | }; | |
| 24 | 23 | ||
| 25 | − | /* default dimension of thumbnails (width == height): */ | |
| 26 | − | #define THUMB_SIZE 60 | |
| 24 | + | /* default dimension of thumbnails (width == height): */ | |
| 25 | + | #define THUMB_SIZE 60 | |
| 27 | 26 | ||
| 28 | − | /* remove this line to disable external commands: * | |
| 29 | − | * (otherwise have a look at commands.h to define them) */ | |
| 30 | − | #define EXT_COMMANDS | |
| 27 | + | /* support for external commands (defined in commands.h): */ | |
| 28 | + | #define EXT_COMMANDS 0 | |
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | #include "util.h" | |
| 38 | 38 | #include "window.h" | |
| 39 | 39 | ||
| 40 | − | #ifdef EXT_COMMANDS | |
| 40 | + | #if EXT_COMMANDS | |
| 41 | 41 | #include "commands.h" | |
| 42 | 42 | #endif | |
| 43 | 43 | ||
| @@ -284,7 +284,7 @@ void read_dir_rec(const char *dirname) { | |||
| 284 | 284 | free(dirnames); | |
| 285 | 285 | } | |
| 286 | 286 | ||
| 287 | − | #ifdef EXT_COMMANDS | |
| 287 | + | #if EXT_COMMANDS | |
| 288 | 288 | int run_command(const char *cline, Bool reload) { | |
| 289 | 289 | int fncnt, fnlen; | |
| 290 | 290 | char *cn, *cmdline; | |
| @@ -382,7 +382,7 @@ void on_keypress(XKeyEvent *kev) { | |||
| 382 | 382 | XLookupString(kev, &key, 1, &ksym, NULL); | |
| 383 | 383 | changed = 0; | |
| 384 | 384 | ||
| 385 | − | #ifdef EXT_COMMANDS | |
| 385 | + | #if EXT_COMMANDS | |
| 386 | 386 | /* external commands from commands.h */ | |
| 387 | 387 | if (CLEANMASK(kev->state) & ControlMask) { | |
| 388 | 388 | for (i = 0; i < LEN(commands); ++i) { | |