feh icon indicating copy to clipboard operation
feh copied to clipboard

[req] Some suggestions.

Open John-Doe-Smith opened this issue 8 years ago • 2 comments

Hello.

Below is a list of some suggestions:

  • at the moment lossless 90/180 deg rotations and horizontal/vertical flips seem to be only in-place, thus forcibly overwriting the original file; making this overwrite optional would be much appreciated, or better yet, both versions could be provided
  • mouse button 1 (left-click hold) can be assigned freely, but the default behavior of short 'left click' (move to next image) seems to be not configurable; letting both 'left click' and perhaps also 'left double click' be configurable would come handy
  • when image is rotated at native resolution (100% zoom), anti-aliasing seems to be not applied; this should probably be fixed
  • key bindings to the different sorting schemes; currently these seem to be available only through the menu and cmd-line options
  • bookmark support; simple session-bound list should be more than enough, perhaps with a possibility to save it if necessary

Thank you.

John-Doe-Smith avatar Aug 02 '17 14:08 John-Doe-Smith

Not exactly what could be called a proper fix for the first point, but the code below disables the forced in-place overwriting.

// In-place editing disabled.
void feh_edit_inplace(
    winwidget w,
    int op
) {
    if (
        !w->file
        || !w->file->data
        || !FEH_FILE( w->file->data )->filename
    )
        return;
        
    imlib_context_set_image( w->im );
    
    if ( op == INPLACE_EDIT_FLIP )
        imlib_image_flip_vertical();
    else if ( op == INPLACE_EDIT_MIRROR )
        imlib_image_flip_horizontal();
    else {
        imlib_image_orientate( op );
        
        int _tmp = w->im_w;
        w->im_w = w->im_h;
        w->im_h = _tmp;
    }
    
    im_weprintf(
        w,
        "Editing in place is disabled; changes have not been saved."
    );
    winwidget_render_image( w, 1, 0 );
    
    return;
}

Also, I found a slight bug resulting in SIGSEGV on lines 1072 and 1073 in imlib.c. Fixing was as simple as removing the prefixing FEH_FILE(w->file->data)->info->{width,height} = parts (this may have broken something elsewhere, though). I assume the feh_file->info element was not initialized, thus resulting in the segmentation fault, but I could be wrong.

John-Doe-Smith avatar Sep 19 '17 01:09 John-Doe-Smith

I was seeking for a way to make "double-click" force a full screen, but now I've noticed this is still not available, therefore I fully support that part of the feature request.

jazz-it avatar Jul 29 '20 00:07 jazz-it