Skip to content

Commit

Permalink
actions: Fix build for non-debug builds, remove a stray debug line.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwebster committed Feb 10, 2024
1 parent 981c9ed commit 1e41f4b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions libnemo-private/nemo-action-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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,
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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++) {
Expand Down Expand Up @@ -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;
}
Expand Down
6 changes: 2 additions & 4 deletions libnemo-private/nemo-action.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -2010,14 +2008,14 @@ 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);

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);
}
2 changes: 1 addition & 1 deletion src/nemo-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1e41f4b

Please sign in to comment.