Giter VIP home page Giter VIP logo

Comments (6)

oz123 avatar oz123 commented on July 29, 2024

I ran the following script*:

#!/bin/bash

# the thumbnailing function
atrilthumb() {
    F1=$HOME/.thumbnails/normal
    F2=$HOME/.cache/thumbnails/normal
    SAVE_FOLDER=$F1
[ -e $F2 ] && SAVE_FOLDER=$F2
    outname=$(echo -n "$(readlink -f "$0")" | \
    perl -MURI::file -MDigest::MD5=md5_hex -ne 'print md5_hex(URI::file->new($_));')
    # no work if thumbnail already present
    [ ! -e $SAVE_FOLDER/${outname}.png ] && {
        echo "$0"
        #uncomment only one of both thumbnailers
        #convert -thumbnail 128x128 "$0"[0] $SAVE_FOLDER/${outname}.png 2>/dev/null
        atril-thumbnailer -s 128 "$0" $SAVE_FOLDER/${outname}.png 
    }
}

# make our function visible to the subshell in "find -exec" below
export -f atrilthumb

# loop through all given folders
for folder in "$@" ; do
    find "$folder" -type f -exec bash -c evincethumb {} \;
done

Now, it seems preview does work. But I don't want to do it on my own. In the past, the atril-thumbnailer used to run in the background, and slowly add icons to .thumbnaild.

Do you know if it changed? Is there a parameter in mate-session that controls this?

from atril.

oz123 avatar oz123 commented on July 29, 2024

I think I fount the problem:

[36] ozdeb@yenitiny:~ $  atril-thumbnailer -s 128 Poster_Preview.odp out.png
(atril-thumbnailer:28005): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed

(atril-thumbnailer:28005): Gdk-CRITICAL **: _gdk_pixmap_new: assertion `(drawable != NULL) || (depth != -1)' failed

(atril-thumbnailer:28005): Gdk-CRITICAL **: IA__gdk_gc_new: assertion `drawable != NULL' failed

(atril-thumbnailer:28005): Gdk-CRITICAL **: IA__gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed


^C
[37] ozdeb@yenitiny:~ $  atril-thumbnailer -s 128 3022.pdf out.png
[38] ozdeb@yenitiny:~ $ 

As you can see the thumbnailer crashes on odp files. This caused the process to hand, and so caja, did not preview new files. On PDF files, it was runing fine. I would be happy if someone could confirm it.

from atril.

stefano-k avatar stefano-k commented on July 29, 2024

I changed the title of the issue
evince solved this issue removing the backend:
https://git.gnome.org/browse/evince/commit/backend?h=gnome-3-0&id=d242e00f56fb5d0dbad00f9abe13903198104838
we'll try to fix it

from atril.

stefano-k avatar stefano-k commented on July 29, 2024

@oz123 I pushed this commit from evince:
360c465
at least, it allows to continue thumbnailing and dont break caja

from atril.

oz123 avatar oz123 commented on July 29, 2024

@stefano-k , do you know what does the gnome developer means "Broken API" ? GTK API or Impress API ?
IMHO, Impress and ODT are too important to drop this file format.

[open rant]
GNOME Dev's are really busy implementing features that no one wants, but they drop essential components of free software.
IMHO, this is just not nice towards the developers of LibreOffice (but maybe newer gnome version do have a preview ... who knows...)
[/rant]

from atril.

stefano-k avatar stefano-k commented on July 29, 2024

ODP backend is broken, and we have decided to remove it.

from atril.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.