talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 4220a91f1b97f14a36955f170865e504ac3d643e
parent f0d97838047ebee73858fe1cf053781ee1fa1725
Author: Paul <paul@claws-mail.org>
Date:   Wed,  8 Jan 2025 15:34:08 +0000

limit pointless debug_print()s

Diffstat:
Msrc/folderview.c | 17++++++++---------
Msrc/msgcache.c | 5+++--
2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/folderview.c b/src/folderview.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK based, lightweight, and fast e-mail client - * Copyright (C) 1999-2023 the Claws Mail team and Hiroyuki Yamamoto + * Copyright (C) 1999-2025 the Claws Mail team and Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2273,7 +2273,6 @@ static void folderview_selected(GtkCMCTree *ctree, GtkCMCTreeNode *row, static gboolean can_select = TRUE; /* exclusive lock */ gboolean opened; FolderItem *item; - gchar *buf; int res = 0; GtkCMCTreeNode *old_opened = folderview->opened; START_TIMING(""); @@ -2341,13 +2340,13 @@ static void folderview_selected(GtkCMCTree *ctree, GtkCMCTreeNode *row, gdk_seat_ungrab(seat); } - /* Open Folder */ - /* TODO: wwp: avoid displaying (null) in the status bar */ - buf = g_strdup_printf(_("Opening folder %s..."), item->path ? - item->path : "(null)"); - debug_print("%s\n", buf); - STATUSBAR_PUSH(folderview->mainwin, buf); - g_free(buf); + if (item->path) { + gchar *buf; + buf = g_strdup_printf(_("Opening folder %s..."), item->path); + debug_print("%s\n", buf); + STATUSBAR_PUSH(folderview->mainwin, buf); + g_free(buf); + } main_window_cursor_wait(folderview->mainwin); diff --git a/src/msgcache.c b/src/msgcache.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK based, lightweight, and fast e-mail client - * Copyright (C) 1999-2012 Hiroyuki Yamamoto & The Claws Mail Team + * Copyright (C) 1999-2025 the Claws Mail team & Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1185,7 +1185,8 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, const gchar write_fps.tags_fp = NULL; } - debug_print("\tWriting message cache to %s and %s...\n", new_cache, new_mark); + if (write_fps.cache_fp || write_fps.mark_fp) + debug_print("\tWriting message cache to %s and %s...\n", new_cache, new_mark); if (write_fps.cache_fp && change_file_mode_rw(write_fps.cache_fp, new_cache) < 0) FILE_OP_ERROR(new_cache, "chmod");