summaryrefslogtreecommitdiffstats
path: root/source/dialogs/drun.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/dialogs/drun.c')
-rw-r--r--source/dialogs/drun.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c
index 1eab9d19..062617c0 100644
--- a/source/dialogs/drun.c
+++ b/source/dialogs/drun.c
@@ -48,7 +48,8 @@
#include "dialogs/drun.h"
#define DRUN_CACHE_FILE "rofi2.druncache"
-#define LOG_DOMAIN "Dialogs.DRun"
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "Dialogs.DRun"
#define GET_CAT_PARSE_TIME
@@ -205,7 +206,7 @@ static gboolean read_desktop_file ( DRunModePrivateData *pd, const char *root, c
// Check if item is on disabled list.
if ( g_hash_table_contains ( pd->disabled_entries, id ) ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Skipping: %s, was previously seen.", id );
+ g_debug ( "Skipping: %s, was previously seen.", id );
return TRUE;
}
GKeyFile *kf = g_key_file_new ();
@@ -213,7 +214,7 @@ static gboolean read_desktop_file ( DRunModePrivateData *pd, const char *root, c
g_key_file_load_from_file ( kf, path, 0, &error );
// If error, skip to next entry
if ( error != NULL ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Failed to parse desktop file: %s because: %s", path, error->message );
+ g_debug ( "Failed to parse desktop file: %s because: %s", path, error->message );
g_error_free ( error );
g_key_file_free ( kf );
return FALSE;
@@ -222,12 +223,12 @@ static gboolean read_desktop_file ( DRunModePrivateData *pd, const char *root, c
gchar *key = g_key_file_get_string ( kf, "Desktop Entry", "Type", NULL );
if ( key == NULL ) {
// No type? ignore.
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Skipping desktop file: %s because: No type indicated", path );
+ g_debug ( "Skipping desktop file: %s because: No type indicated", path );
g_key_file_free ( kf );
return FALSE;
}
if ( g_strcmp0 ( key, "Application" ) ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Skipping desktop file: %s because: Not of type application (%s)", path, key );
+ g_debug ( "Skipping desktop file: %s because: Not of type application (%s)", path, key );
g_free ( key );
g_key_file_free ( kf );
return FALSE;
@@ -236,28 +237,28 @@ static gboolean read_desktop_file ( DRunModePrivateData *pd, const char *root, c
// Name key is required.
if ( !g_key_file_has_key ( kf, "Desktop Entry", "Name", NULL ) ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Invalid DesktopFile: '%s', no 'Name' key present.\n", path );
+ g_debug ( "Invalid DesktopFile: '%s', no 'Name' key present.\n", path );
g_key_file_free ( kf );
return FALSE;
}
// Skip hidden entries.
if ( g_key_file_get_boolean ( kf, "Desktop Entry", "Hidden", NULL ) ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Adding desktop file: %s to disabled list because: Hdden", path );
+ g_debug ( "Adding desktop file: %s to disabled list because: Hdden", path );
g_key_file_free ( kf );
g_hash_table_add ( pd->disabled_entries, g_strdup ( id ) );
return FALSE;
}
// Skip entries that have NoDisplay set.
if ( g_key_file_get_boolean ( kf, "Desktop Entry", "NoDisplay", NULL ) ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Adding desktop file: %s to disabled list because: NoDisplay", path );
+ g_debug ( "Adding desktop file: %s to disabled list because: NoDisplay", path );
g_key_file_free ( kf );
g_hash_table_add ( pd->disabled_entries, g_strdup ( id ) );
return FALSE;
}
// We need Exec, don't support DBusActivatable
if ( !g_key_file_has_key ( kf, "Desktop Entry", "Exec", NULL ) ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Unsupported DesktopFile: '%s', no 'Exec' key present.\n", path );
+ g_debug ( "Unsupported DesktopFile: '%s', no 'Exec' key present.\n", path );
g_key_file_free ( kf );
return FALSE;
}
@@ -292,7 +293,7 @@ static void walk_dir ( DRunModePrivateData *pd, const char *root, const char *di
{
DIR *dir;
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Checking directory %s for desktop files.", root );
+ g_debug ( "Checking directory %s for desktop files.", root );
dir = opendir ( dirname );
if ( dir == NULL ) {
return;