From 1e41f4b5fc6eeb37472b8e52e5d5b3d2ed027da8 Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Sat, 10 Feb 2024 10:59:37 -0500 Subject: [PATCH] actions: Fix build for non-debug builds, remove a stray debug line. Fixes #3364 --- libnemo-private/nemo-action-manager.c | 12 ++++++------ libnemo-private/nemo-action.c | 6 ++---- src/nemo-view.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/libnemo-private/nemo-action-manager.c b/libnemo-private/nemo-action-manager.c index 86c62d81a..12a24c254 100644 --- a/libnemo-private/nemo-action-manager.c +++ b/libnemo-private/nemo-action-manager.c @@ -649,7 +649,7 @@ parse_item (ActionsIterData *idata, uuid = json_reader_get_string_value (reader); json_reader_end_member (reader); - nemo_debug (NEMO_DEBUG_ACTIONS, "Parsing action layout entry for '%s'.", uuid); + DEBUG ("Parsing action layout entry for '%s'.", uuid); if (!json_reader_read_member (reader, "type") || json_reader_get_null_value (reader)) { item_error (reader, &idata->error, uuid, "Action layout member is missing mandatory value"); @@ -659,7 +659,7 @@ parse_item (ActionsIterData *idata, json_reader_end_member (reader); if (g_strcmp0 (type, "separator") == 0) { - nemo_debug (NEMO_DEBUG_ACTIONS, "Adding separator to UI."); + DEBUG ("Adding separator to UI."); idata->func (idata->action_manager, NULL, @@ -703,7 +703,7 @@ parse_item (ActionsIterData *idata, nemo_action_override_icon (action, user_icon); } - nemo_debug (NEMO_DEBUG_ACTIONS, "Adding action '%s' to UI.", action->uuid); + DEBUG ("Adding action '%s' to UI.", action->uuid); idata->func (idata->action_manager, GTK_ACTION (action), @@ -733,7 +733,7 @@ parse_item (ActionsIterData *idata, } // A submenu gets added to the same level (path) as its sibling menuitems - nemo_debug (NEMO_DEBUG_ACTIONS, "Adding submenu '%s' to UI.", uuid); + DEBUG ("Adding submenu '%s' to UI.", uuid); idata->func (idata->action_manager, submenu, @@ -775,7 +775,7 @@ parse_level (ActionsIterData *idata, if (json_reader_is_array (reader)) { guint len = json_reader_count_elements (reader); - nemo_debug (NEMO_DEBUG_ACTIONS, "Processing %d children of '%s'.", len, path == NULL ? "root" : path); + DEBUG ("Processing %d children of '%s'.", len, path == NULL ? "root" : path); gint i; for (i = 0; i < len; i++) { @@ -894,7 +894,7 @@ nemo_action_manager_update_action_states (NemoActionManager *action_manager, for (l = actions; l != NULL; l = l->next) { if (!NEMO_IS_ACTION (l->data)) { - nemo_debug (NEMO_DEBUG_ACTIONS, "Skipping submenu '%s' (visibility managed by GtkUIManager)", gtk_action_get_name (GTK_ACTION (l->data))); + DEBUG ("Skipping submenu '%s' (visibility managed by GtkUIManager)", gtk_action_get_name (GTK_ACTION (l->data))); gtk_action_set_visible (GTK_ACTION (l->data), TRUE); continue; } diff --git a/libnemo-private/nemo-action.c b/libnemo-private/nemo-action.c index e84d82b16..c3fab7429 100644 --- a/libnemo-private/nemo-action.c +++ b/libnemo-private/nemo-action.c @@ -612,8 +612,6 @@ populate_patterns_and_filenames (NemoAction *action, g_string_replace (str, "~", g_get_home_dir (), 1); - g_printerr ("str: '%s'\n", str->str); - if (g_strstr_len (str->str, -1, "?") || g_strstr_len (str->str, -1, "*")) { if (g_str_has_prefix (str->str, "!")) { *forbidden_patterns = g_list_prepend (*forbidden_patterns, new_match_pattern (str->str + 1)); @@ -2010,7 +2008,7 @@ nemo_action_update_display_state (NemoAction *action, GtkWindow *window) { if (get_visibility (action, selection, parent, for_places, window)) { - nemo_debug (NEMO_DEBUG_ACTIONS, "Action '%s' determined VISIBLE", gtk_action_get_name (GTK_ACTION (action))); + DEBUG ("Action '%s' determined VISIBLE", gtk_action_get_name (GTK_ACTION (action))); finalize_strings (action, selection, parent, window); gtk_action_set_visible (GTK_ACTION (action), TRUE); @@ -2018,6 +2016,6 @@ nemo_action_update_display_state (NemoAction *action, return; } - nemo_debug (NEMO_DEBUG_ACTIONS, "Action '%s' determined HIDDEN", gtk_action_get_name (GTK_ACTION (action))); + DEBUG ("Action '%s' determined HIDDEN", gtk_action_get_name (GTK_ACTION (action))); gtk_action_set_visible (GTK_ACTION (action), FALSE); } diff --git a/src/nemo-view.c b/src/nemo-view.c index 2ea55b61f..51114629e 100644 --- a/src/nemo-view.c +++ b/src/nemo-view.c @@ -6413,7 +6413,7 @@ add_action_to_ui (NemoActionManager *manager, static void update_actions (NemoView *view) { - nemo_debug (NEMO_DEBUG_ACTIONS, "Refreshing menu actions"); + DEBUG ("Refreshing menu actions"); nemo_action_manager_iterate_actions (view->details->action_manager, (NemoActionManagerIterFunc) add_action_to_ui,