From 67b592ff2f6dccb7959975ed6ea22c1ad674c4ce Mon Sep 17 00:00:00 2001 From: Vika Shleina Date: Sun, 2 Jan 2022 14:49:53 +0300 Subject: [PATCH] drun: switch to g_app_info_should_show() for filtering This function respects OnlyShowIn and NotShowIn to filter out apps that are not applicable to the current desktop environment. It also does additional sanity checks on .desktop files, providing the same effect as the boolean expression it replaced. --- modes/drun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modes/drun.c b/modes/drun.c index d599695..7b75a4f 100644 --- a/modes/drun.c +++ b/modes/drun.c @@ -75,7 +75,7 @@ static char* get_search_text(char* file) { static bool populate_widget(char* file, char* action, struct widget_builder* builder) { GDesktopAppInfo* info = g_desktop_app_info_new_from_filename(file); - if(info == NULL || g_desktop_app_info_get_is_hidden(info) || g_desktop_app_info_get_nodisplay(info)) { + if(info == NULL || !g_app_info_should_show(info)) { return false; } const char* name;