Skip to content

Commit

Permalink
support thumbnail generation in recursivebrowser mode
Browse files Browse the repository at this point in the history
  • Loading branch information
giomatfois62 committed Feb 13, 2024
1 parent 600563c commit 9d8e0f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/modes/recursivebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,12 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line,
FBFile *dr = &(pd->array[selected_line]);
if (dr->icon_fetch_uid > 0 && dr->icon_fetch_size == height) {
return rofi_icon_fetcher_get(dr->icon_fetch_uid);
}
if (rofi_icon_fetcher_file_is_image(dr->path)) {
dr->icon_fetch_uid = rofi_icon_fetcher_query(dr->path, height);
}else if (dr->type == RFILE) {
gchar* _path = g_strconcat("thumbnail://", dr->path, NULL);
dr->icon_fetch_uid = rofi_icon_fetcher_query(_path, height);
g_free(_path);
} else {
dr->icon_fetch_uid =
rofi_icon_fetcher_query(rb_icon_name[dr->type], height);
dr->icon_fetch_uid = rofi_icon_fetcher_query(rb_icon_name[dr->type], height);
}
dr->icon_fetch_size = height;
return rofi_icon_fetcher_get(dr->icon_fetch_uid);
Expand Down

0 comments on commit 9d8e0f3

Please sign in to comment.