Ticket #5: feh-fmmode.patch

File feh-fmmode.patch, 9.1 kB (added by giblet, 3 years ago)

fmmode patch as originally submitted

  • feh/src/options.c

    old new  
    8080   /* if we're using xinerama, then enable it by default */ 
    8181   opt.xinerama = 1; 
    8282#endif /* HAVE_LIBXINERAMA */ 
     83 
     84   opt.fmmode = 0; 
    8385    
    8486   D(3, ("About to parse env options (if any)\n")); 
    8587   /* Check for and parse any options in FEH_OPTIONS */ 
     
    404406      {"action7", 1, 0, 216}, 
    405407      {"action8", 1, 0, 217}, 
    406408      {"action9", 1, 0, 218}, 
     409      {"fmmode", 0, 0, 219}, 
    407410      {0, 0, 0, 0} 
    408411   }; 
    409412   int optch = 0, cmdx = 0, i = 0; 
     
    719722        case 221: 
    720723           opt.hide_pointer = 1; 
    721724           break; 
     725        case 219: 
     726           opt.fmmode = 1;  
     727           opt.sort = SORT_FILENAME; 
     728           break; 
    722729        default: 
    723730           break; 
    724731      } 
  • feh/src/main.c

    old new  
    3030#include "options.h" 
    3131#include "events.h" 
    3232#include "support.h" 
     33#include "fmmode.h" 
    3334 
    3435char **cmdargv = NULL; 
    3536int cmdargc = 0; 
     
    6768      feh_wm_set_bg_file(opt.output_file, opt.bgmode); 
    6869      exit(0); 
    6970   } 
     71   else if (opt.fmmode) 
     72   { 
     73      fmmode(); 
     74      opt.slideshow = 1; 
     75      init_slideshow_mode(); 
     76   } 
    7077   else 
    7178   { 
    7279      /* Slideshow mode is the default. Because it's spiffy */ 
  • feh/src/fmmode.h

    old new  
     1/* fmmode.h 
     2 
     3Copyright (C) 2005 Falko Schmidt. 
     4 
     5Permission is hereby granted, free of charge, to any person obtaining a copy 
     6of this software and associated documentation files (the "Software"), to 
     7deal in the Software without restriction, including without limitation the 
     8rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
     9sell copies of the Software, and to permit persons to whom the Software is 
     10furnished to do so, subject to the following conditions: 
     11 
     12The above copyright notice and this permission notice shall be included in 
     13all copies of the Software and its documentation and acknowledgment shall be 
     14given in the documentation and software packages that this Software was 
     15used. 
     16 
     17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
     18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
     19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
     20THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
     21IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
     22CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     23 
     24*/ 
     25 
     26#ifndef FMMODE_H 
     27#define FMMODE_H 
     28 
     29void fmmode(void); 
     30 
     31#endif 
  • feh/src/Makefile.in

    old new  
    8383LIBOBJS = @LIBOBJS@ 
    8484 
    8585bin_PROGRAMS = feh 
    86 feh_SOURCES = main.c getopt.c getopt1.c getopt.h feh.h options.c options.h winwidget.c winwidget.h menu.c menu.h structs.h filelist.c filelist.h multiwindow.c imlib.c index.c slideshow.c utils.c utils.h keyevents.c timers.c timers.h list.c collage.c debug.h events.c events.h support.c support.h transupp.c transupp.h thumbnail.c thumbnail.h ipc.c ipc.h md5.c md5.h feh_png.c feh_png.h 
     86feh_SOURCES = main.c getopt.c getopt1.c getopt.h feh.h options.c options.h winwidget.c winwidget.h menu.c menu.h structs.h filelist.c filelist.h multiwindow.c imlib.c index.c slideshow.c utils.c utils.h keyevents.c timers.c timers.h list.c collage.c debug.h events.c events.h support.c support.h transupp.c transupp.h thumbnail.c thumbnail.h ipc.c ipc.h md5.c md5.h feh_png.c feh_png.h fmmode.c fmmode.h 
    8787 
    8888feh_LDADD = -lX11 -lz -lpng @IMLIB_LIBS@ @GIBLIB_LIBS@ 
    8989 
     
    106106feh_OBJECTS =  main.o getopt.o getopt1.o options.o winwidget.o menu.o \ 
    107107filelist.o multiwindow.o imlib.o index.o slideshow.o utils.o \ 
    108108keyevents.o timers.o list.o collage.o events.o support.o transupp.o \ 
    109 thumbnail.o ipc.o md5.o feh_png.o 
     109thumbnail.o ipc.o md5.o feh_png.o fmmode.o 
    110110feh_DEPENDENCIES =  
    111111feh_LDFLAGS =  
    112112CFLAGS = @CFLAGS@