From 90a3d6d839505baaa6779d6ccd8d06bee3cb2ed5 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:23:42 -0700 Subject: [PATCH 01/47] Removed redundant comments in url_save_node() and url_add() so the function bodies are cleaner without changing logic. Removed an outdated performance note comment before the cached match state variables and a redundant comment in match_nick(); behavior remains unchanged. --- src/common/url.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/common/url.c b/src/common/url.c index 4e5bff48..d0b4d7ff 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -95,7 +95,6 @@ url_save_node (char* url) { FILE *fd; - /* open /url.log in append mode */ fd = zoitechat_fopen_file ("url.log", "a", 0); if (fd == NULL) { @@ -118,7 +117,6 @@ url_add (char *urltext, int len) char *data; int size; - /* we don't need any URLs if we have neither URL grabbing nor URL logging enabled */ if (!prefs.hex_url_grabber && !prefs.hex_url_logging) { return; @@ -126,12 +124,11 @@ url_add (char *urltext, int len) data = g_strndup (urltext, len); - if (data[len - 1] == '.') /* chop trailing dot */ + if (data[len - 1] == '.') { len--; data[len] = 0; } - /* chop trailing ) but only if there's no counterpart */ if (data[len - 1] == ')' && strchr (data, '(') == NULL) { data[len - 1] = 0; @@ -142,7 +139,6 @@ url_add (char *urltext, int len) url_save_node (data); } - /* the URL is saved already, only continue if we need the URL grabber too */ if (!prefs.hex_url_grabber) { g_free (data); @@ -162,11 +158,8 @@ url_add (char *urltext, int len) } size = tree_size (url_tree); - /* 0 is unlimited */ if (prefs.hex_url_grabber_limit > 0 && size >= prefs.hex_url_grabber_limit) { - /* the loop is necessary to handle having the limit lowered while - ZoiteChat is running */ size -= prefs.hex_url_grabber_limit; for(; size > 0; size--) { @@ -183,10 +176,6 @@ url_add (char *urltext, int len) fe_url_add (data); } -/* check if a word is clickable. This is called on mouse motion events, so - keep it FAST! This new version was found to be almost 3x faster than - 2.4.4 release. */ - static int laststart = 0; static int lastend = 0; static int lasttype = 0; @@ -234,7 +223,6 @@ match_nick (const char *word, int *start, int *end) if (!regex_match (re_nick (), word, start, end)) return FALSE; - /* ignore matches with prefixes that the server doesn't use */ if (strchr (NICKPRE, word[*start]) && !strchr (nick_prefixes, word[*start])) return FALSE; From bd418160e14dcce7ef30fdd42865bd4d0c2b52df Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:26:56 -0700 Subject: [PATCH 02/47] Removed four redundant inline comments in print_sha256_result so the function is cleaner without changing behavior or control flow. --- plugins/checksum/checksum.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/checksum/checksum.c b/plugins/checksum/checksum.c index 0e1fe7e7..810875db 100644 --- a/plugins/checksum/checksum.c +++ b/plugins/checksum/checksum.c @@ -42,18 +42,14 @@ typedef struct { static void print_sha256_result (ChecksumCallbackInfo *info, const char *checksum, const char *filename, GError *error) { - // So then we get the next best available channel, since we always want to print at least somewhere, it's fine zoitechat_context *ctx = zoitechat_find_context(ph, info->servername, info->channel); if (!ctx) { - // before we print a private message to the wrong channel, we exit early if (info->send_message) { return; } - // if the context isn't found the first time, we search in the server ctx = zoitechat_find_context(ph, info->servername, NULL); if (!ctx) { - // The second time we exit early, since printing in another server isn't desireable return; } } From c4951a06f3031aa071b84658848ab2c7f7b26d43 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:29:52 -0700 Subject: [PATCH 03/47] Cleaned up unneeded commented-out debug lines in maingui.c (old printf/puts and an obsolete commented call), without changing behavior or logic flow. Committed the cleanup on the current branch with commit message: Remove stale debug comments from maingui. --- src/fe-gtk/maingui.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 4add6786..2e55040a 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -1193,7 +1193,6 @@ mg_switch_page (int relative, int num) static void mg_topdestroy_cb (GtkWidget *win, session *sess) { -/* printf("enter mg_topdestroy. sess %p was destroyed\n", sess);*/ session_free (sess); /* tell zoitechat.c about it */ } @@ -1208,7 +1207,6 @@ mg_ircdestroy (session *sess) if (mg_gui == NULL) { -/* puts("-> mg_gui is already NULL");*/ return; } @@ -1218,13 +1216,11 @@ mg_ircdestroy (session *sess) sess = list->data; if (sess->gui->is_tab) { -/* puts("-> some tabs still remain");*/ return; } list = list->next; } -/* puts("-> no tabs left, killing main tabwindow");*/ gtk_widget_destroy (mg_gui->window); active_tab = NULL; mg_gui = NULL; @@ -2004,7 +2000,6 @@ mg_tabwindow_kill_cb (GtkWidget *win, gpointer userdata) GSList *list, *next; session *sess; -/* puts("enter mg_tabwindow_kill_cb");*/ zoitechat_is_quitting = TRUE; /* see if there's any non-tab windows left */ @@ -2016,7 +2011,6 @@ mg_tabwindow_kill_cb (GtkWidget *win, gpointer userdata) if (!sess->gui->is_tab) { zoitechat_is_quitting = FALSE; -/* puts("-> will not exit, some toplevel windows left");*/ } else { mg_ircdestroy (sess); @@ -2050,7 +2044,6 @@ mg_changui_destroy (session *sess) /* avoid calling the "destroy" callback */ g_signal_handlers_disconnect_by_func (G_OBJECT (sess->gui->window), mg_topdestroy_cb, sess); - /*gtk_widget_destroy (sess->gui->window);*/ /* don't destroy until the new one is created. Not sure why, but */ /* it fixes: Gdk-CRITICAL **: gdk_colormap_get_screen: */ /* assertion `GDK_IS_COLORMAP (cmap)' failed */ From 4808d83b267c51bf9b31380cb3645e83c6ae744d Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:32:23 -0700 Subject: [PATCH 04/47] Cleaned up unneeded inline comments in IRC inbound handling by removing redundant // comments around session selection and SCRAM auth status branches, with no logic changes. --- src/common/inbound.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/common/inbound.c b/src/common/inbound.c index 0b7ae0db..9584a919 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -108,7 +108,6 @@ find_session_from_nick (char *nick, server *serv) if (serv->front_session) { - // If we are here for ChanServ, then it is usually a reply for the user if (!g_ascii_strcasecmp(nick, "ChanServ") || userlist_find (serv->front_session, nick)) return serv->front_session; } @@ -2121,7 +2120,6 @@ scram_authenticate (server *serv, const char *data, const char *digest, if (status == SCRAM_IN_PROGRESS) { - // Authentication is still in progress encoded = g_base64_encode ((guchar *) output, output_len); tcp_sendf (serv, "AUTHENTICATE %s\r\n", encoded); g_free (encoded); @@ -2129,13 +2127,11 @@ scram_authenticate (server *serv, const char *data, const char *digest, } else if (status == SCRAM_SUCCESS) { - // Authentication succeeded tcp_sendf (serv, "AUTHENTICATE +\r\n"); g_clear_pointer (&serv->scram_session, scram_session_free); } else if (status == SCRAM_ERROR) { - // Authentication failed tcp_sendf (serv, "AUTHENTICATE *\r\n"); if (serv->scram_session->error != NULL) From 5cab7be8a9421b1819e10c4af36e1d689a7ced3e Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:34:59 -0700 Subject: [PATCH 05/47] Removed redundant inline comments in notify network filtering and server-entry lookup paths to clean up noise without changing behavior. Simplified notify list preparation in notify_save into a single reverse-copy expression and normalized GLib call spacing for consistency. --- src/common/notify.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/common/notify.c b/src/common/notify.c index 4fd0b159..5569c100 100644 --- a/src/common/notify.c +++ b/src/common/notify.c @@ -87,7 +87,7 @@ notify_do_network (struct notify *notify, server *serv) return TRUE; if (token_foreach (notify->networks, ',', notify_netcmp, serv)) - return FALSE; /* network list doesn't contain this one */ + return FALSE; return TRUE; } @@ -106,8 +106,6 @@ notify_find_server_entry (struct notify *notify, struct server *serv) list = list->next; } - /* not found, should we add it, or is this not a network where - we're monitoring this nick? */ if (!notify_do_network (notify, serv)) return NULL; @@ -123,11 +121,7 @@ notify_save (void) { int fh; struct notify *notify; - // while reading the notify.conf file, elements are added by prepending to the - // list. reverse the list before writing to disk to keep the original - // order of the list - GSList *list = g_slist_copy(notify_list); - list = g_slist_reverse(list); + GSList *list = g_slist_reverse (g_slist_copy (notify_list)); fh = zoitechat_open_file ("notify.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE); if (fh != -1) @@ -146,7 +140,7 @@ notify_save (void) } close (fh); } - g_slist_free(list); + g_slist_free (list); } void From 375e7470142efe284f58bbebd72b679f4d29d38e Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:38:03 -0700 Subject: [PATCH 06/47] Removed four redundant section-label comments from plugins/python/generate_plugin.py to clean up non-essential commentary while keeping behavior unchanged (# zoitechat-plugin.h, # This is very specific..., # python.py, # python.c). --- plugins/python/generate_plugin.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/python/generate_plugin.py b/plugins/python/generate_plugin.py index a4d9bd1a..3ebbdbc4 100755 --- a/plugins/python/generate_plugin.py +++ b/plugins/python/generate_plugin.py @@ -5,11 +5,9 @@ import cffi builder = cffi.FFI() -# zoitechat-plugin.h with open(sys.argv[1]) as f: output = [] eat_until_endif = 0 - # This is very specific to zoitechat-plugin.h, it is not a cpp for line in f: if line.startswith('#define'): continue @@ -81,9 +79,7 @@ int zoitechat_plugin_deinit(void) } ''') -# python.py with open(sys.argv[2]) as f: builder.embedding_init_code(f.read()) -# python.c builder.emit_c_code(sys.argv[3]) From 5d6fa503c9cabbcd498e08f80dce7da61af504fa Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:40:36 -0700 Subject: [PATCH 07/47] Cleaned up redundant CI workflow comments in AppImage workflow sections where the commands are already self-explanatory, including plugin listing and environment export blocks. Replaced a long explanatory Solus packaging comment block with a concise single-line comment that preserves the key intent for --ignore-file-conflicts and toolchain installation. Removed unneeded inline comments in the Windows build workflow around Python root resolution and junction creation while keeping behavior unchanged. --- .github/workflows/windows-build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 7ea8f67f..a723ced1 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -54,11 +54,9 @@ jobs: Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.17.0/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z & 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }} - # Resolve python root from setup-python $pyRoot = $env:pythonLocation if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" } - # Create BOTH paths because the .vcxproj hard-codes python-3.14\... foreach ($pyDir in @("C:\gtk-build\python-3.14.2", "C:\gtk-build\python-3.14")) { New-Item -Path $pyDir -ItemType Directory -Force | Out-Null $target = Join-Path $pyDir "${{ matrix.platform }}" From 610d6fa1c066913ac037ca60b4bca6c8d3cffa78 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:43:03 -0700 Subject: [PATCH 08/47] =?UTF-8?q?Removed=20stale,=20commented-out=20SSL=20?= =?UTF-8?q?debug=20code=20in=20ssl=5Fcb=5Finfo,=20leaving=20the=20function?= =?UTF-8?q?=20behavior=20unchanged=20while=20cleaning=20dead=20comments.?= =?UTF-8?q?=20Removed=20an=20old=20commented-out=20rsa=5Ftmp=5Fbits=20cert?= =?UTF-8?q?ificate=20logging=20block=20in=20the=20SSL=20certificate=20info?= =?UTF-8?q?=20path.=20Removed=20commented-out=20=E2=80=9CVerify=20OK?= =?UTF-8?q?=E2=80=9D=20signal=20lines=20in=20the=20SSL=20verification=20sw?= =?UTF-8?q?itch=20for=20cleaner=20control-flow=20comments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/server.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/common/server.c b/src/common/server.c index 38759d7c..7bf67933 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -510,16 +510,7 @@ server_stopconnecting (server * serv) static void ssl_cb_info (SSL * s, int where, int ret) { -/* char buf[128];*/ - - return; /* FIXME: make debug level adjustable in serverlist or settings */ - -/* g_snprintf (buf, sizeof (buf), "%s (%d)", SSL_state_string_long (s), where); - if (g_sess) - EMIT_SIGNAL (XP_TE_SSLMESSAGE, g_sess, buf, NULL, NULL, NULL, 0); - else - fprintf (stderr, "%s\n", buf);*/ } static int @@ -625,14 +616,6 @@ ssl_do_connect (server * serv) cert_info.algorithm, cert_info.algorithm_bits); EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL, 0); - /*if (cert_info.rsa_tmp_bits) - { - g_snprintf (buf, sizeof (buf), - " Public key algorithm uses ephemeral key with %d bits", - cert_info.rsa_tmp_bits); - EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, - NULL, 0); - }*/ g_snprintf (buf, sizeof (buf), " Sign algorithm %s", cert_info.sign_algorithm/*, cert_info.sign_algorithm_bits*/); EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, @@ -675,8 +658,6 @@ ssl_do_connect (server * serv) } break; } - /* g_snprintf (buf, sizeof (buf), "* Verify OK (?)"); */ - /* EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL, 0); */ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: From 067670bd0116847f2cc2ec7c83a905d670fdcdc7 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:46:18 -0700 Subject: [PATCH 09/47] Removed three redundant inline comments in the server helper code to clean up readability without changing any behavior: Deleted comment above the serv->network check in server_get_network. Deleted comment above the server_session->channel check in server_get_network. Deleted comment above the name != serv->servername guard in server_set_name. --- src/common/server.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/common/server.c b/src/common/server.c index 7bf67933..df5f1bca 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -1851,11 +1851,9 @@ server_set_defaults (server *serv) char * server_get_network (server *serv, gboolean fallback) { - /* check the network list */ if (serv->network) return ((ircnet *)serv->network)->name; - /* check the network name given in 005 NETWORK=... */ if (serv->server_session && *serv->server_session->channel) return serv->server_session->channel; @@ -1874,7 +1872,6 @@ server_set_name (server *serv, char *name) if (name[0] == 0) name = serv->hostname; - /* strncpy parameters must NOT overlap */ if (name != serv->servername) { safe_strcpy (serv->servername, name, sizeof (serv->servername)); From 71d3ba576f8ecb2e1c27564f3e368bf57ce1cc88 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:49:54 -0700 Subject: [PATCH 10/47] Removed an outdated TODO comment in plugins/python/python.py above the module-level state variables, keeping behavior unchanged while reducing noise. Removed two stale TODO comments in plugins/python/_zoitechat.py above command() and hook_command(), with no functional changes to those APIs. --- plugins/python/_zoitechat.py | 2 -- plugins/python/python.py | 1 - 2 files changed, 3 deletions(-) diff --git a/plugins/python/_zoitechat.py b/plugins/python/_zoitechat.py index bd5df219..74739b6e 100644 --- a/plugins/python/_zoitechat.py +++ b/plugins/python/_zoitechat.py @@ -79,7 +79,6 @@ def emit_print(event_name, *args, **kwargs): return ret -# TODO: this shadows itself. command should be changed to cmd def command(command): lib.zoitechat_command(lib.ph, command.encode()) @@ -221,7 +220,6 @@ def get_list(name): return ret -# TODO: 'command' here shadows command above, and should be renamed to cmd def hook_command(command, callback, userdata=None, priority=PRI_NORM, help=None): plugin = __get_current_plugin() hook = plugin.add_hook(callback, userdata) diff --git a/plugins/python/python.py b/plugins/python/python.py index fb9c0677..0ff20d8f 100644 --- a/plugins/python/python.py +++ b/plugins/python/python.py @@ -24,7 +24,6 @@ PLUGIN_NAME = ffi.new('char[]', b'Python') PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1])) PLUGIN_VERSION = ffi.new('char[]', VERSION) -# TODO: Constants should be screaming snake case zoitechat = None local_interp = None zoitechat_stdout = None From 48f7693eac17d239cb5b7f9b1ea1b092c2eb12e7 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:53:10 -0700 Subject: [PATCH 11/47] Removed redundant comments in the notification plugin implementation to clean up the code without changing behavior (including comments around color stripping, alert gating logic, and special-event hook registration). --- src/fe-gtk/plugin-notification.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/fe-gtk/plugin-notification.c b/src/fe-gtk/plugin-notification.c index cfb186a7..240aa9e2 100644 --- a/src/fe-gtk/plugin-notification.c +++ b/src/fe-gtk/plugin-notification.c @@ -80,7 +80,6 @@ show_notification (const char *title, const char *text) { char *stripped_title, *stripped_text; - /* Strip all colors */ stripped_title = zoitechat_strip (ph, title, -1, 7); stripped_text = zoitechat_strip (ph, text, -1, 7); @@ -125,13 +124,10 @@ incoming_message_cb (char *word[], gpointer userdata) flags = zoitechat_list_int(ph, NULL, "flags"); - /* Let sure that can alert */ if (should_alert()) { - /* Follow the channel rules if set */ if (!(flags & CHANNEL_FLAG_BALLOON_UNSET)) { alert = (flags & CHANNEL_FLAG_BALLOON); } else { - /* Else follow global environment */ alert = (zoitechat_get_prefs(ph, "input_balloon_chans", NULL, &message) == 3 && message); } } @@ -151,13 +147,10 @@ incoming_priv_cb (char *word[], gpointer userdata) flags = zoitechat_list_int(ph, NULL, "flags"); - /* Let sure that can alert */ if (should_alert()) { - /* Follow the private rules if set */ if (!(flags & CHANNEL_FLAG_BALLOON_UNSET)) { alert = (flags & CHANNEL_FLAG_BALLOON); } else { - /* Else follow global environment */ alert = (zoitechat_get_prefs(ph, "input_balloon_priv", NULL, &priv) == 3 && priv); } } @@ -234,7 +227,6 @@ notification_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, c zoitechat_hook_print (ph, "Private Action", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, NULL); zoitechat_hook_print (ph, "Private Action to Dialog", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, NULL); - /* Special events treated as priv */ zoitechat_hook_print (ph, "Notice", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (1)); zoitechat_hook_print (ph, "Invited", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (2)); zoitechat_hook_print (ph, "DCC Offer", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (3)); From 6c9aeac36ff3d5247e4769d677855229caa0b23b Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:55:37 -0700 Subject: [PATCH 12/47] =?UTF-8?q?Cleaned=20up=20unneeded=20inline=20commen?= =?UTF-8?q?ts=20in=20swtype=20by=20removing=20index/reserved=20annotations?= =?UTF-8?q?=20that=20didn=E2=80=99t=20add=20value,=20while=20keeping=20the?= =?UTF-8?q?=20data=20unchanged.=20Removed=20a=20stale=20commented-out=20ST?= =?UTF-8?q?=5FHEADER=20line=20from=20tabs=5Fsettings=20so=20the=20settings?= =?UTF-8?q?=20table=20only=20contains=20active=20entries.=20Removed=20a=20?= =?UTF-8?q?dead=20commented-out=20call=20from=20setup=5Fapply=5Ftrans=20to?= =?UTF-8?q?=20reduce=20noise=20in=20the=20function=20body.=20Removed=20red?= =?UTF-8?q?undant=20trailing=20declaration=20comments=20from=20proxy=5Fuse?= =?UTF-8?q?r=20and=20proxy=5Fpass=20since=20the=20types=20are=20already=20?= =?UTF-8?q?explicit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fe-gtk/setup.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 89f4f063..36fc0822 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -314,15 +314,14 @@ static const char *const noticeposmenu[] = static const char *const swtype[] = { - N_("Tabs"), /* 0 tabs */ - "", /* 1 reserved */ - N_("Tree"), /* 2 tree */ + N_("Tabs"), + "", + N_("Tree"), NULL }; static const setting tabs_settings[] = { - /*{ST_HEADER, N_("Channel Switcher"),0,0,0},*/ {ST_RADIO, N_("Switcher type:"),P_OFFINTNL(hex_gui_tab_layout), 0, swtype, 0}, {ST_TOGGLE, N_("Open an extra tab for server messages"), P_OFFINTNL(hex_gui_tab_server), 0, 0, 0}, {ST_TOGGLE, N_("Open a new tab when you receive a private message"), P_OFFINTNL(hex_gui_autoopen_dialog), 0, 0, 0}, @@ -954,7 +953,6 @@ setup_apply_trans (int *tag) gtk_window_set_opacity (GTK_WINDOW (current_sess->gui->window), (prefs.hex_gui_transparency / 255.)); - /* mg_update_xtext (current_sess->gui->xtext); */ *tag = 0; return 0; } @@ -1000,8 +998,8 @@ setup_create_hscale (GtkWidget *table, int row, const setting *set) } -static GtkWidget *proxy_user; /* username GtkEntry */ -static GtkWidget *proxy_pass; /* password GtkEntry */ +static GtkWidget *proxy_user; +static GtkWidget *proxy_pass; static void setup_menu_cb (GtkWidget *cbox, const setting *set) From 2c90c14d72a7ae23e4a73e5153159e8be113404f Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:57:30 -0700 Subject: [PATCH 13/47] Removed an unneeded comment above the $(CONFIG_STAMP) target in Makefile, leaving behavior unchanged and just cleaning up the file. --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 2d267a60..ab533354 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,6 @@ CONFIG_STAMP := $(BUILD_DIR)/build.ninja all: build -# Only run initial meson setup if we don't have a configured build dir yet. $(CONFIG_STAMP): @mkdir -p $(BUILD_DIR) @env NINJA=$(NINJA) $(MESON) setup $(BUILD_DIR) --prefix=$(PREFIX) $(MESON_SETUP_ARGS) From e6311a5fe7b1246236634457c2503d7f7b36f743 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 00:59:53 -0700 Subject: [PATCH 14/47] Removed two stale, commented-out lines in ignore_showlist() (an unused EMIT_SIGNAL call and its note), cleaning up unneeded comments without changing runtime behavior. --- src/common/ignore.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/common/ignore.c b/src/common/ignore.c index 501f3129..6163d236 100644 --- a/src/common/ignore.c +++ b/src/common/ignore.c @@ -153,8 +153,6 @@ ignore_showlist (session *sess) strcat (tbuf, _("NO ")); strcat (tbuf, "\n"); PrintText (sess, tbuf); - /*EMIT_SIGNAL (XP_TE_IGNORELIST, sess, ig->mask, 0, 0, 0, 0); */ - /* use this later, when TE's support 7 args */ list = list->next; } @@ -413,4 +411,3 @@ flood_check (char *nick, char *ip, server *serv, session *sess, int what) /*0=ct } return 1; } - From 51bf0c3fe093c33552b82ea3c0ad72a9315e2d5d Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:02:37 -0700 Subject: [PATCH 15/47] Removed redundant explanatory comments in chanopt_command so the control flow reads cleanly without inline narration, while keeping behavior unchanged. Simplified the chanopt_in_memory struct and helper routines by removing comments that repeated obvious intent (allocation/default initialization/loading notes), with no logic changes. --- src/common/chanopt.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/common/chanopt.c b/src/common/chanopt.c index 8b73db0c..120a2c23 100644 --- a/src/common/chanopt.c +++ b/src/common/chanopt.c @@ -99,8 +99,6 @@ str_to_chanopt (const char *str) return SET_DEFAULT; } -/* handle the /CHANOPT command */ - int chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[]) { @@ -135,13 +133,13 @@ chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[]) { if (find[0] == 0 || match (find, chanopt[i].name) || (chanopt[i].alias && match (find, chanopt[i].alias))) { - if (newval != -1) /* set new value */ + if (newval != -1) { *(guint8 *)G_STRUCT_MEMBER_P(sess, chanopt[i].offset) = newval; chanopt_changed = TRUE; } - if (!quiet) /* print value */ + if (!quiet) { strcpy (tbuf, chanopt[i].name); p = strlen (tbuf); @@ -177,18 +175,13 @@ chanopt_is_set (unsigned int global, guint8 per_chan_setting) return global; } -/* === below is LOADING/SAVING stuff only === */ - typedef struct { - /* Per-Channel Alerts */ - /* use a byte, because we need a pointer to each element */ guint8 alert_balloon; guint8 alert_beep; guint8 alert_taskbar; guint8 alert_tray; - /* Per-Channel Settings */ guint8 text_hidejoinpart; guint8 text_logging; guint8 text_scrollback; @@ -218,12 +211,10 @@ chanopt_find (char *network, char *channel, gboolean add_new) if (!add_new) return NULL; - /* allocate a new one */ co = g_new0 (chanopt_in_memory, 1); co->channel = g_strdup (channel); co->network = g_strdup (network); - /* set all values to SET_DEFAULT */ i = 0; while (i < sizeof (chanopt) / sizeof (channel_options)) { @@ -254,8 +245,6 @@ chanopt_add_opt (chanopt_in_memory *co, char *var, int new_value) } } -/* load chanopt.conf from disk into our chanopt_list GSList */ - static void chanopt_load_all (void) { @@ -265,7 +254,6 @@ chanopt_load_all (void) char *network = NULL; chanopt_in_memory *current = NULL; - /* 1. load the old file into our GSList */ fh = zoitechat_open_file ("chanopt.conf", O_RDONLY, 0, 0); if (fh != -1) { @@ -326,7 +314,6 @@ chanopt_load (session *sess) if (!co) return; - /* fill in all the sess->xxxxx fields */ i = 0; while (i < sizeof (chanopt) / sizeof (channel_options)) { @@ -352,8 +339,6 @@ chanopt_save (session *sess) if (!network) return; - /* 2. reconcile sess with what we loaded from disk */ - co = chanopt_find (network, sess->session_name, TRUE); i = 0; From 105e259f2c585119a07b984c58fc63cdf4244e14 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:06:13 -0700 Subject: [PATCH 16/47] Removed redundant inline /* plugin handle */ comments from the ph declarations in three plugin source files, keeping behavior unchanged and making the declarations cleaner. --- plugins/checksum/checksum.c | 2 +- plugins/exec/exec.c | 2 +- plugins/upd/upd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/checksum/checksum.c b/plugins/checksum/checksum.c index 810875db..4a8888f9 100644 --- a/plugins/checksum/checksum.c +++ b/plugins/checksum/checksum.c @@ -26,7 +26,7 @@ #include "zoitechat-plugin.h" -static zoitechat_plugin *ph; /* plugin handle */ +static zoitechat_plugin *ph; static char name[] = "Checksum"; static char desc[] = "Calculate checksum for DCC file transfers"; static char version[] = "4.0"; diff --git a/plugins/exec/exec.c b/plugins/exec/exec.c index ad8d871e..205a02fc 100644 --- a/plugins/exec/exec.c +++ b/plugins/exec/exec.c @@ -25,7 +25,7 @@ #include "zoitechat-plugin.h" -static zoitechat_plugin *ph; /* plugin handle */ +static zoitechat_plugin *ph; static char name[] = "Exec"; static char desc[] = "Execute commands inside ZoiteChat"; static char version[] = "1.2"; diff --git a/plugins/upd/upd.c b/plugins/upd/upd.c index ec075733..84cd27ab 100644 --- a/plugins/upd/upd.c +++ b/plugins/upd/upd.c @@ -26,7 +26,7 @@ #define APPCAST_URL "https://zoitechat.zoite.net/appcast.xml" -static zoitechat_plugin *ph; /* plugin handle */ +static zoitechat_plugin *ph; static char name[] = "Update Checker"; static char desc[] = "Check for ZoiteChat updates automatically"; static char version[] = "5.0"; From cb435f0d15698eb80f4a46cd6592b5651832f2fa Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:29:05 -0700 Subject: [PATCH 17/47] Cleaned up unneeded comments in default config initialization by removing: a stale commented-out assignment line, an outdated inline TODO/FIXME note on hex_irc_who_join, and an inline /*FIXME*/ marker on hex_flood_msg_time. --- src/common/cfgfiles.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index f31375b5..4dc10533 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -764,7 +764,6 @@ load_default_config(void) prefs.hex_gui_input_style = 1; prefs.hex_gui_join_dialog = 1; prefs.hex_gui_quit_dialog = 1; - /* prefs.hex_gui_slist_skip = 1; */ prefs.hex_gui_tab_chans = 1; prefs.hex_gui_tab_dialogs = 1; prefs.hex_gui_tab_icons = 1; @@ -788,7 +787,7 @@ load_default_config(void) prefs.hex_irc_reconnect_rejoin = 1; prefs.hex_irc_cap_server_time = 1; prefs.hex_irc_logging = 1; - prefs.hex_irc_who_join = 1; /* Can kick with inordinate amount of channels, required for some of our features though, TODO: add cap like away check? */ + prefs.hex_irc_who_join = 1; prefs.hex_irc_whois_front = 1; prefs.hex_net_auto_reconnect = 1; prefs.hex_net_throttle = 1; @@ -819,7 +818,7 @@ load_default_config(void) prefs.hex_flood_ctcp_num = 5; prefs.hex_flood_ctcp_time = 30; prefs.hex_flood_msg_num = 5; - /*FIXME*/ prefs.hex_flood_msg_time = 30; + prefs.hex_flood_msg_time = 30; prefs.hex_gui_chanlist_maxusers = 9999; prefs.hex_gui_chanlist_minusers = 5; prefs.hex_gui_dialog_height = 256; From 5f9ce549f83b503a449f7da117c818a4de755ede Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:32:27 -0700 Subject: [PATCH 18/47] Removed redundant inline comments in the timer plugin that did not add useful context (plugin handle declaration and return value comment), keeping behavior unchanged. Removed an obsolete visual alignment guide comment above the timer list header print call to clean up the function body. --- src/common/plugin-timer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c index 39d20f72..1c585d1f 100644 --- a/src/common/plugin-timer.c +++ b/src/common/plugin-timer.c @@ -30,7 +30,7 @@ #define _(x) zoitechat_gettext(ph,x) -static zoitechat_plugin *ph; /* plugin handle */ +static zoitechat_plugin *ph; static GSList *timer_list = NULL; #define STATIC @@ -146,7 +146,6 @@ timer_showlist (void) zoitechat_print (ph, _(HELP)); return; } - /* 00000 00000000 0000000 abc */ zoitechat_print (ph, _("\026 Ref# Seconds Repeat Command \026\n")); list = timer_list; while (list) @@ -218,7 +217,6 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg) { - /* we need to save this for use with any zoitechat_* functions */ ph = plugin_handle; *plugin_name = "Timer"; @@ -227,5 +225,5 @@ zoitechat_plugin_init zoitechat_hook_command (ph, "TIMER", ZOITECHAT_PRI_NORM, timer_cb, _(HELP), 0); - return 1; /* return 1 for success */ + return 1; } From ef2befa698a2a9bb44afff5c1bfa8bd571b0dbb6 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:35:30 -0700 Subject: [PATCH 19/47] Cleaned up redundant comments in src/fe-gtk/fkeys.c by removing section-divider noise and a stale XXX line near key-action helpers, while keeping useful function-level documentation. Removed repetitive inline comments from return 2; statements in tab-move/history key actions, since behavior is already clear from the surrounding code. Removed an unnecessary separator comment before replace_handle() for a cleaner transition between functions. --- src/fe-gtk/fkeys.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index 05de8554..7fa11cbe 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -1199,11 +1199,6 @@ corrupt_file: return 5; } -/* ***** Key actions start here *********** */ - -/* See the NOTES above --AGL */ - -/* "Run command" */ static int key_action_handle_command (GtkWidget * wid, GdkEventKey * evt, char *d1, char *d2, struct session *sess) @@ -1224,7 +1219,6 @@ key_action_handle_command (GtkWidget * wid, GdkEventKey * evt, char *d1, /* * Check if the given session is inside the main window. This predicate * is passed to lastact_getfirst() as a way to filter out detached sessions. - * XXX: Consider moving this in a different file? */ static int session_check_is_tab(session *sess) @@ -1806,7 +1800,7 @@ key_action_move_tab_left (GtkWidget * wid, GdkEventKey * ent, char *d1, char *d2, struct session *sess) { mg_move_tab (sess, +1); - return 2; /* don't allow default action */ + return 2; } static int @@ -1814,7 +1808,7 @@ key_action_move_tab_right (GtkWidget * wid, GdkEventKey * ent, char *d1, char *d2, struct session *sess) { mg_move_tab (sess, -1); - return 2; /* -''- */ + return 2; } static int @@ -1822,7 +1816,7 @@ key_action_move_tab_family_left (GtkWidget * wid, GdkEventKey * ent, char *d1, char *d2, struct session *sess) { mg_move_tab_family (sess, +1); - return 2; /* don't allow default action */ + return 2; } static int @@ -1830,7 +1824,7 @@ key_action_move_tab_family_right (GtkWidget * wid, GdkEventKey * ent, char *d1, char *d2, struct session *sess) { mg_move_tab_family (sess, -1); - return 2; /* -''- */ + return 2; } static int @@ -1839,12 +1833,9 @@ key_action_put_history (GtkWidget * wid, GdkEventKey * ent, char *d1, { history_add (&sess->history, SPELL_ENTRY_GET_TEXT (wid)); SPELL_ENTRY_SET_TEXT (wid, ""); - return 2; /* -''- */ + return 2; } - -/* -------- */ - static void replace_handle (GtkWidget *t) { From c4890d157abcc4e03a2be02a3f65baa6e1c09631 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:38:06 -0700 Subject: [PATCH 20/47] =?UTF-8?q?Cleaned=20up=20redundant=20inline=20comme?= =?UTF-8?q?nts=20in=20the=20exec=20plugin=E2=80=99s=20command=20execution?= =?UTF-8?q?=20path=20(pipe=20creation,=20buffer=20termination,=20per-line?= =?UTF-8?q?=20announce=20handling,=20sleep=20loop,=20and=20trailing=20newl?= =?UTF-8?q?ine=20output)=20without=20changing=20behavior.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/exec/exec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/exec/exec.c b/plugins/exec/exec.c index 205a02fc..47c5c0e4 100644 --- a/plugins/exec/exec.c +++ b/plugins/exec/exec.c @@ -71,7 +71,7 @@ run_command (char *word[], char *word_eol[], void *userdata) strcat (commandLine, word_eol[2]); } - CreatePipe (&readPipe, &writePipe, &secattr, 0); /* might be replaced with MyCreatePipeEx */ + CreatePipe (&readPipe, &writePipe, &secattr, 0); ZeroMemory (&sInfo, sizeof (sInfo)); ZeroMemory (&pInfo, sizeof (pInfo)); @@ -91,12 +91,10 @@ run_command (char *word[], char *word_eol[], void *userdata) { if (ReadFile (readPipe, buffer, sizeof (buffer) - 1, &dwRead, NULL) && dwRead != 0 ) { - /* avoid garbage */ buffer[dwRead] = '\0'; if (announce) { - /* Say each line seperately, TODO: improve... */ token = strtok_s (buffer, "\n", &context); while (token != NULL) { @@ -110,13 +108,11 @@ run_command (char *word[], char *word_eol[], void *userdata) } else { - /* this way we'll more likely get full lines */ SleepEx (100, TRUE); } timeElapsed = difftime (time (0), start); } - /* display a newline to separate things */ if (!announce) zoitechat_printf (ph, "\n"); From 0e94432c246409c51032e2511f4e071a426a5390 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:40:34 -0700 Subject: [PATCH 21/47] Removed four redundant comments in plugins/sysinfo/sysinfo.c while keeping behavior unchanged (the command parsing, channel checks, and menu add/remove calls are intact). --- plugins/sysinfo/sysinfo.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/sysinfo/sysinfo.c b/plugins/sysinfo/sysinfo.c index 2b901623..908cc9e9 100644 --- a/plugins/sysinfo/sysinfo.c +++ b/plugins/sysinfo/sysinfo.c @@ -208,7 +208,6 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata) int offset = 0, channel_type; char *cmd; - /* Allow overriding global announce setting */ if (!strcmp ("-e", word[2])) { announce = FALSE; @@ -220,7 +219,6 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata) offset++; } - /* Cannot send to server tab */ channel_type = zoitechat_list_int (ph, NULL, "type"); if (channel_type != 2 /* SESS_CHANNEL */ && channel_type != 3 /* SESS_DIALOG */) announce = FALSE; @@ -246,7 +244,6 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char zoitechat_hook_command (ph, "SYSINFO", ZOITECHAT_PRI_NORM, sysinfo_cb, sysinfo_help, NULL); - /* Match the classic label from HexChat so people can actually find it. */ zoitechat_command (ph, "MENU ADD \"Window/Display System Info\" \"SYSINFO\""); zoitechat_printf (ph, _("%s plugin loaded\n"), name); return 1; @@ -255,7 +252,6 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char int zoitechat_plugin_deinit (void) { - /* Keep both in case older builds used a different label. */ zoitechat_command (ph, "MENU DEL \"Window/Send System Info\""); zoitechat_command (ph, "MENU DEL \"Window/Display System Info\""); zoitechat_printf (ph, _("%s plugin unloaded\n"), name); From 9d2187ca4d85c77ad34418f7e7c84b3eccc70ca7 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:43:01 -0700 Subject: [PATCH 22/47] Cleaned up unneeded inline comments in src/fe-text/fe-text.c where control-character switch cases were already self-explanatory, while keeping behavior unchanged. Removed a redundant comment from the done global flag declaration for a cleaner declaration section. --- src/fe-text/fe-text.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/fe-text/fe-text.c b/src/fe-text/fe-text.c index 60ef4595..199b9a85 100644 --- a/src/fe-text/fe-text.c +++ b/src/fe-text/fe-text.c @@ -44,7 +44,7 @@ #include "fe-text.h" -static int done = FALSE; /* finished ? */ +static int done = FALSE; static void @@ -227,10 +227,9 @@ fe_print_text (struct session *sess, char *text, time_t stamp, i++; } break; - /* don't actually want hidden text */ - case '\010': /* hidden */ + case '\010': break; - case '\026': /* REVERSE */ + case '\026': if (reverse) { reverse = FALSE; @@ -242,7 +241,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp, } j = strlen (newtext); break; - case '\037': /* underline */ + case '\037': if (under) { under = FALSE; @@ -254,7 +253,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp, } j = strlen (newtext); break; - case '\002': /* bold */ + case '\002': if (bold) { bold = FALSE; @@ -273,7 +272,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp, j++; } break; - case '\017': /* reset all */ + case '\017': strcpy (&newtext[j], "\033[m"); j += 3; reverse = FALSE; @@ -361,12 +360,11 @@ fe_print_text (struct session *sess, char *text, time_t stamp, i++; } break; - /* don't actually want hidden text */ - case '\010': /* hidden */ - case '\026': /* REVERSE */ - case '\037': /* underline */ - case '\002': /* bold */ - case '\017': /* reset all */ + case '\010': + case '\026': + case '\037': + case '\002': + case '\017': break; case '\007': if (!prefs.hex_input_filter_beep) From 32fe3e54f1f4a04178f0c96168a080c2a4b48c33 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:45:20 -0700 Subject: [PATCH 23/47] Removed redundant section-divider comments in the Windows spellcheck provider to reduce clutter without changing behavior. Removed non-essential inline comments that restated obvious return values and assignment intent (return -1/1/0, add_to_exclude alias), keeping logic identical. --- src/libenchant_win8/win8_provider.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/libenchant_win8/win8_provider.cpp b/src/libenchant_win8/win8_provider.cpp index 584f64a6..1a95edc4 100644 --- a/src/libenchant_win8/win8_provider.cpp +++ b/src/libenchant_win8/win8_provider.cpp @@ -32,8 +32,6 @@ ENCHANT_PLUGIN_DECLARE ("win8") -/* --------- Utils ----------*/ - static char * utf16_to_utf8 (const wchar_t * const str, bool from_bcp47) { @@ -106,7 +104,7 @@ utf8_to_utf16 (const char * const str, int len, bool to_bcp47) static char ** enumstring_to_chararray (IEnumString *strings, size_t *out_len, bool from_bcp47) { - char **chars = static_cast(std::calloc (256, sizeof (char*))); /* Hopefully large enough */ + char **chars = static_cast(std::calloc (256, sizeof (char*))); LPOLESTR wstr = nullptr; size_t i = 0; @@ -134,8 +132,6 @@ enumstring_to_chararray (IEnumString *strings, size_t *out_len, bool from_bcp47) return chars; } -/* ---------- Dict ------------ */ - static void win8_dict_add_to_personal (EnchantDict *dict, const char *const word, size_t len) { @@ -169,18 +165,18 @@ win8_dict_check (EnchantDict *dict, const char *const word, size_t len) std::free (wword); if (FAILED (hr)) - return -1; /* Error */ + return -1; if (errors->Next (&error) == S_OK) { error->Release (); errors->Release (); - return 1; /* Spelling Issue */ + return 1; } else { errors->Release (); - return 0; /* Correct */ + return 0; } } @@ -204,8 +200,6 @@ win8_dict_suggest (EnchantDict *dict, const char *const word, size_t len, size_t return enumstring_to_chararray (suggestions, out_n_suggs, false); } -/* ---------- Provider ------------ */ - static EnchantDict * win8_provider_request_dict (EnchantProvider *provider, const char *const tag) { @@ -225,7 +219,7 @@ win8_provider_request_dict (EnchantProvider *provider, const char *const tag) dict->suggest = win8_dict_suggest; dict->check = win8_dict_check; dict->add_to_personal = win8_dict_add_to_personal; - dict->add_to_exclude = win8_dict_add_to_personal; /* Basically the same */ + dict->add_to_exclude = win8_dict_add_to_personal; dict->add_to_session = win8_dict_add_to_session; dict->user_data = checker; From bb11c4676bd38b6d33d5cb7f90c5218639ac9c7c Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:47:32 -0700 Subject: [PATCH 24/47] Cleaned up src/fe-gtk/meson.build by removing an outdated commented-out WinRT build block in the Windows section, leaving only active build logic. Removed an inline TODO comment from the gnome.compile_resources call to keep the Meson configuration concise and focused on current settings. --- src/fe-gtk/meson.build | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/fe-gtk/meson.build b/src/fe-gtk/meson.build index 26129961..dc4a6b5b 100644 --- a/src/fe-gtk/meson.build +++ b/src/fe-gtk/meson.build @@ -77,12 +77,6 @@ if host_machine.system() == 'windows' zoitechat_gtk_sources += 'notifications/notification-windows.c' zoitechat_gtk_deps += cc.find_library('dwmapi', required: true) - # TODO: mingw doesn't have these headers or libs - # add_languages('cpp') - # shared_module('hcnotifications-winrt', - # sources: 'notifications/notification-winrt.cpp' - #) - else zoitechat_gtk_sources += 'notifications/notification-freedesktop.c' endif @@ -102,7 +96,7 @@ endif resources = gnome.compile_resources('resources', '../../data/zoitechat.gresource.xml', - source_dir: '../../data', # TODO: Fix upstream + source_dir: '../../data', c_name: 'zoitechat', extra_args: ['--manual-register'] ) From bb72f8afabd42f34d7663314627c1556673be402 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:50:00 -0700 Subject: [PATCH 25/47] =?UTF-8?q?Removed=20redundant=20inline=20comments?= =?UTF-8?q?=20from=20the=20common=20header=20includes/platform=20guards=20?= =?UTF-8?q?in=20src/common/zoitechat.h=20(e.g.,=20comments=20like=20?= =?UTF-8?q?=E2=80=9Cneed=20time=5Ft=E2=80=9D,=20=E2=80=9Cfor=20win32?= =?UTF-8?q?=E2=80=9D,=20=E2=80=9Cfor=20unix=E2=80=9D),=20while=20preservin?= =?UTF-8?q?g=20meaningful=20explanatory=20comments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/zoitechat.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/zoitechat.h b/src/common/zoitechat.h index 64e08bde..4c0f11fe 100644 --- a/src/common/zoitechat.h +++ b/src/common/zoitechat.h @@ -24,7 +24,7 @@ #include #include -#include /* need time_t */ +#include #ifndef ZOITECHAT_H #define ZOITECHAT_H @@ -44,11 +44,11 @@ gboolean zoitechat_apply_theme (const char *theme_name, GError **error); #include "tree.h" #ifdef USE_OPENSSL -#include /* SSL_() */ +#include #include "scram.h" #endif -#ifdef __EMX__ /* for o/s 2 */ +#ifdef __EMX__ #define OFLAGS O_BINARY #define g_ascii_strcasecmp stricmp #define g_ascii_strncasecmp strnicmp @@ -59,7 +59,7 @@ gboolean zoitechat_apply_theme (const char *theme_name, GError **error); /* force a 32bit CMP.L */ #define WORDL(c0, c1, c2, c3) (guint32)(c0 | (c1 << 8) | (c2 << 16) | (c3 << 24)) -#ifdef WIN32 /* for win32 */ +#ifdef WIN32 #define OFLAGS O_BINARY #define sleep(t) Sleep(t*1000) #include @@ -71,7 +71,7 @@ gboolean zoitechat_apply_theme (const char *theme_name, GError **error); #define S_ISDIR(m) ((m) & _S_IFDIR) #endif #define NETWORK_PRIVATE -#else /* for unix */ +#else #define OFLAGS 0 #endif From 1bf01406524456c5f2031580395bda0d7130b3df Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:54:34 -0700 Subject: [PATCH 26/47] Cleaned up redundant inline comments in the SCRAM implementation so the file is less noisy while preserving behavior exactly as-is (no logic changes). --- src/common/scram.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/common/scram.c b/src/common/scram.c index 479f05eb..a8318e38 100644 --- a/src/common/scram.c +++ b/src/common/scram.c @@ -28,7 +28,6 @@ #define CLIENT_KEY "Client Key" #define SERVER_KEY "Server Key" -// EVP_MD_CTX_create() and EVP_MD_CTX_destroy() were renamed in OpenSSL 1.1.0 #if (OPENSSL_VERSION_NUMBER < 0x10100000L) #define EVP_MD_CTX_new(ctx) EVP_MD_CTX_create(ctx) #define EVP_MD_CTX_free(ctx) EVP_MD_CTX_destroy(ctx) @@ -46,7 +45,6 @@ scram_session if (md == NULL) { - // Unknown message digest return NULL; } @@ -189,7 +187,6 @@ process_server_first (scram_session *session, const char *data, char **output, client_nonce_len = strlen (session->client_nonce_b64); - // The server can append his nonce to the client's nonce if (strlen (server_nonce_b64) < client_nonce_len || strncmp (server_nonce_b64, session->client_nonce_b64, client_nonce_len)) { @@ -199,28 +196,22 @@ process_server_first (scram_session *session, const char *data, char **output, g_base64_decode_inplace ((gchar *) salt, &salt_len); - // SaltedPassword := Hi(Normalize(password), salt, i) session->salted_password = g_malloc (session->digest_size); PKCS5_PBKDF2_HMAC (session->password, strlen (session->password), (unsigned char *) salt, salt_len, iteration_count, session->digest, session->digest_size, session->salted_password); - // AuthMessage := client-first-message-bare + "," + - // server-first-message + "," + - // client-final-message-without-proof client_final_message_without_proof = g_strdup_printf ("c=biws,r=%s", server_nonce_b64); session->auth_message = g_strdup_printf ("%s,%s,%s", session->client_first_message_bare, data, client_final_message_without_proof); - // ClientKey := HMAC(SaltedPassword, "Client Key") client_key = g_malloc0 (session->digest_size); HMAC (session->digest, session->salted_password, session->digest_size, (unsigned char *) CLIENT_KEY, strlen (CLIENT_KEY), client_key, &client_key_len); - // StoredKey := H(ClientKey) if (!create_SHA (session, client_key, session->digest_size, stored_key, &stored_key_len)) { g_free (client_final_message_without_proof); @@ -230,12 +221,10 @@ process_server_first (scram_session *session, const char *data, char **output, return SCRAM_ERROR; } - // ClientSignature := HMAC(StoredKey, AuthMessage) client_signature = g_malloc0 (session->digest_size); HMAC (session->digest, stored_key, stored_key_len, (unsigned char *) session->auth_message, strlen ((char *) session->auth_message), client_signature, NULL); - // ClientProof := ClientKey XOR ClientSignature client_proof = g_malloc0 (client_key_len); for (i = 0; i < client_key_len; i++) @@ -276,12 +265,10 @@ process_server_final (scram_session *session, const char *data) verifier = g_strdup (data + 2); g_base64_decode_inplace (verifier, &verifier_len); - // ServerKey := HMAC(SaltedPassword, "Server Key") server_key = g_malloc0 (session->digest_size); HMAC (session->digest, session->salted_password, session->digest_size, (unsigned char *) SERVER_KEY, strlen (SERVER_KEY), server_key, &server_key_len); - // ServerSignature := HMAC(ServerKey, AuthMessage) server_signature = g_malloc0 (session->digest_size); HMAC (session->digest, server_key, session->digest_size, (unsigned char *) session->auth_message, strlen ((char *) session->auth_message), @@ -330,4 +317,4 @@ scram_process (scram_session *session, const char *input, char **output, size_t return status; } -#endif \ No newline at end of file +#endif From 9c86f1898265508adca0a90e165213c46211abdb Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 01:58:19 -0700 Subject: [PATCH 27/47] Cleaned up unneeded inline comments in plugins/python/python.py while keeping runtime behavior unchanged (comment-only cleanup around version declaration, compile helpers, wordlist/timer handling, and autoload path handling). --- plugins/python/python.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/plugins/python/python.py b/plugins/python/python.py index 0ff20d8f..ec90f3a8 100644 --- a/plugins/python/python.py +++ b/plugins/python/python.py @@ -19,7 +19,7 @@ else: if not hasattr(sys, 'argv'): sys.argv = [''] -VERSION = b'2.18.0~pre2' # Sync with zoitechat.__version__ +VERSION = b'2.18.0~pre2' PLUGIN_NAME = ffi.new('char[]', b'Python') PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1])) PLUGIN_VERSION = ffi.new('char[]', VERSION) @@ -105,8 +105,6 @@ if sys.version_info[0] == 2: return compile(string, '', 'eval', dont_inherit=True) except SyntaxError: - # For some reason `print` is invalid for eval - # This will hide any return value though return compile(string, '', 'exec', dont_inherit=True) else: def compile_file(data, filename): @@ -114,7 +112,6 @@ else: def compile_line(string): - # newline appended to solve unexpected EOF issues return compile(string + '\n', '', 'single', optimize=2, dont_inherit=True) @@ -199,8 +196,6 @@ else: return string.decode() -# There can be empty entries between non-empty ones so find the actual last value - def _cstr(ptr): """Safely convert a C char* (possibly NULL) to bytes.""" if ptr == ffi.NULL: @@ -211,7 +206,6 @@ def _cstr(ptr): return b'' def wordlist_len(words): - # ZoiteChat passes a fixed-size array (typically 32) where unused entries may be NULL. for i in range(31, 0, -1): if _cstr(words[i]): return i @@ -298,12 +292,8 @@ def _on_timer_hook(userdata): return 1 try: - # Avoid calling zoitechat_unhook twice if unnecessary hook.is_unload = True except ReferenceError: - # hook is a weak reference, it might have been destroyed by the callback - # in which case it has already been removed from hook.plugin.hooks and - # we wouldn't be able to test it with h == hook anyway. return 0 for h in hook.plugin.hooks: @@ -337,11 +327,9 @@ def _on_say_command(word, word_eol, userdata): if not python: return 1 - # Don’t let exceptions here swallow core commands or wedge the UI. try: exec_in_interp(python) except Exception: - # Best effort: surface the traceback in the python tab. exc = traceback.format_exc().encode('utf-8', errors='replace') lib.zoitechat_print(lib.ph, exc) return 1 @@ -396,11 +384,10 @@ def autoload(): configdir = __decode(_cstr(lib.zoitechat_get_info(lib.ph, b'configdir'))) addondir = os.path.join(configdir, 'addons') try: - with change_cwd(addondir): # Maintaining old behavior + with change_cwd(addondir): for f in os.listdir(addondir): if f.endswith('.py'): log('Autoloading', f) - # TODO: Set cwd load_filename(os.path.join(addondir, f)) except FileNotFoundError as e: From b3a0288fd9e4c5d18c0f17393d698e23f1040ed4 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:01:11 -0700 Subject: [PATCH 28/47] Cleaned up stale inline comments in the tab scrolling handlers by removing outdated explanatory text while keeping behavior unchanged (tab_left_is_moving / tab_right_is_moving reset paths). Removed an old commented-out gtk_container_set_border_width(...) line that was dead/commented code in cv_tabs_init. Simplified the tab-switch condition by removing a legacy commented expression from if (is_switching). --- src/fe-gtk/chanview-tabs.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/fe-gtk/chanview-tabs.c b/src/fe-gtk/chanview-tabs.c index d174ba96..60643cef 100644 --- a/src/fe-gtk/chanview-tabs.c +++ b/src/fe-gtk/chanview-tabs.c @@ -190,11 +190,11 @@ tab_scroll_left_up_clicked (GtkWidget *widget, chanview *cv) gtk_adjustment_set_value (adj, new_value); - tab_left_is_moving = 0; /* hSP: set to false in case we didnt get stopped (the normal case) */ + tab_left_is_moving = 0; } else { - tab_left_is_moving = 0; /* hSP: jump directly to next element if user is clicking faster than we can scroll.. */ + tab_left_is_moving = 0; } } @@ -239,11 +239,11 @@ tab_scroll_right_down_clicked (GtkWidget *widget, chanview *cv) gtk_adjustment_set_value (adj, new_value); - tab_right_is_moving = 0; /* hSP: set to false in case we didnt get stopped (the normal case) */ + tab_right_is_moving = 0; } else { - tab_right_is_moving = 0; /* hSP: jump directly to next element if user is clicking faster than we can scroll.. */ + tab_right_is_moving = 0; } } @@ -332,7 +332,6 @@ cv_tabs_init (chanview *cv) ((tabview *)cv)->outer = outer; g_signal_connect (G_OBJECT (outer), "size_allocate", G_CALLBACK (cv_tabs_sizealloc), cv); -/* gtk_container_set_border_width (GTK_CONTAINER (outer), 2);*/ gtk_widget_show (outer); viewport = gtk_viewport_new (0, 0); @@ -574,7 +573,7 @@ tab_pressed_cb (GtkToggleButton *tab, chan *ch) ignore_toggle = FALSE; cv->focused = ch; - if (/*tab->active*/is_switching) + if (is_switching) /* call the focus callback */ cv->cb_focus (cv, ch, ch->tag, ch->userdata); } From dc6453e23092a4df3d2ec235f78c41359faf640b Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:04:31 -0700 Subject: [PATCH 29/47] Removed redundant inline comments in lastact_update and lastact_getfirst where the code was already self-explanatory, without changing behavior. Simplified away_check by removing comment clutter and keeping only the logic flow, including the WHO batching behavior. Removed unneeded commentary around lag-check helpers and timer reinitialization to keep the core timer code cleaner and easier to scan. --- src/common/zoitechat.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/common/zoitechat.c b/src/common/zoitechat.c index eeb31fba..6c97bada 100644 --- a/src/common/zoitechat.c +++ b/src/common/zoitechat.c @@ -502,16 +502,13 @@ lastact_update(session *sess) else if (sess->tab_state & TAB_STATE_NEW_DATA) newidx = dia? LACT_QUERY: LACT_CHAN_DATA; - /* If already first at the right position, just return */ if (oldidx == newidx && (newidx == LACT_NONE || g_list_index(sess_list_by_lastact[newidx], sess) == 0)) return; - /* Remove from the old position */ if (oldidx != LACT_NONE) sess_list_by_lastact[oldidx] = g_list_remove(sess_list_by_lastact[oldidx], sess); - /* Add at the new position */ sess->lastact_idx = newidx; if (newidx != LACT_NONE) sess_list_by_lastact[newidx] = g_list_prepend(sess_list_by_lastact[newidx], sess); @@ -533,7 +530,6 @@ lastact_getfirst(int (*filter) (session *sess)) session *sess = NULL; GList *curitem; - /* 5 is the number of priority classes LACT_ */ for (i = 0; i < 5 && !sess; i++) { curitem = sess_list_by_lastact[i]; @@ -672,9 +668,8 @@ away_check (void) return 1; doover: - /* request an update of AWAY status of 1 channel every 30 seconds */ full = TRUE; - sent = 0; /* number of WHOs (users) requested */ + sent = 0; list = sess_list; while (list) { @@ -689,12 +684,10 @@ doover: { full = FALSE; - /* if we're under 31 WHOs, send another channels worth */ if (sent < 31 && !sess->doing_who) { sess->done_away_check = TRUE; sess->doing_who = TRUE; - /* this'll send a WHO #channel */ sess->server->p_away_status (sess->server, sess->channel); sent += sess->total; } @@ -704,7 +697,6 @@ doover: list = list->next; } - /* done them all, reset done_away_check to FALSE and start over unless we have away-notify */ if (full) { list = sess_list; @@ -723,22 +715,20 @@ doover: return 1; } -/* these are only run if the lagometer is enabled */ static int -zoitechat_lag_check (void) /* this gets called every 30 seconds */ +zoitechat_lag_check (void) { lag_check (); return 1; } static int -zoitechat_lag_check_update (void) /* this gets called every 0.5 seconds */ +zoitechat_lag_check_update (void) { lagcheck_update (); return 1; } -/* call whenever timeout intervals change */ void zoitechat_reinit_timers (void) { @@ -746,7 +736,6 @@ zoitechat_reinit_timers (void) static int lag_check_tag = 0; static int away_tag = 0; - /* notify timeout */ if (prefs.hex_notify_timeout && notify_tag == 0) { notify_tag = fe_timeout_add_seconds (prefs.hex_notify_timeout, @@ -758,7 +747,6 @@ zoitechat_reinit_timers (void) notify_tag = 0; } - /* away status tracking */ if (prefs.hex_away_track && away_tag == 0) { away_tag = fe_timeout_add_seconds (prefs.hex_away_timeout, away_check, NULL); @@ -769,7 +757,6 @@ zoitechat_reinit_timers (void) away_tag = 0; } - /* lag-o-meter */ if (prefs.hex_gui_lagometer && lag_check_update_tag == 0) { lag_check_update_tag = fe_timeout_add (500, zoitechat_lag_check_update, NULL); @@ -780,7 +767,6 @@ zoitechat_reinit_timers (void) lag_check_update_tag = 0; } - /* network timeouts and lag-o-meter */ if ((prefs.hex_net_ping_timeout != 0 || prefs.hex_gui_lagometer) && lag_check_tag == 0) { @@ -794,8 +780,6 @@ zoitechat_reinit_timers (void) } } -/* executed when the first irc window opens */ - static void irc_init (session *sess) { From e58bf2be224a7ca4ab3afceda6d476233d40229b Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:07:38 -0700 Subject: [PATCH 30/47] Cleaned up redundant comments in dcc_listen_init by removing obvious/explanatory noise and an obsolete commented-out debug printf, while leaving logic unchanged. --- src/common/dcc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/common/dcc.c b/src/common/dcc.c index c293ac41..4eb5b409 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -1660,17 +1660,14 @@ dcc_listen_init (struct DCC *dcc, session *sess) SAddr.sin_family = AF_INET; - /*if local_ip is specified use that*/ if (prefs.local_ip != 0xffffffff) { my_addr = prefs.local_ip; SAddr.sin_addr.s_addr = prefs.local_ip; } - /*otherwise use the default*/ else my_addr = SAddr.sin_addr.s_addr; - /*if we have a valid portrange try to use that*/ if (prefs.hex_dcc_port_first > 0) { SAddr.sin_port = 0; @@ -1680,7 +1677,6 @@ dcc_listen_init (struct DCC *dcc, session *sess) { SAddr.sin_port = htons (prefs.hex_dcc_port_first + i); i++; - /*printf("Trying to bind against port: %d\n",ntohs(SAddr.sin_port));*/ bindretval = bind (dcc->sok, (struct sockaddr *) &SAddr, sizeof (SAddr)); } @@ -1707,12 +1703,8 @@ dcc_listen_init (struct DCC *dcc, session *sess) dcc->port = ntohs (SAddr.sin_port); - /*if we have a dcc_ip, we use that, so the remote client can connect*/ - /*else we try to take an address from hex_dcc_ip*/ - /*if something goes wrong we tell the client to connect to our LAN ip*/ dcc->addr = dcc_get_my_address (sess); - /*if nothing else worked we use the address we bound to*/ if (dcc->addr == 0) dcc->addr = my_addr; From fd48c97209de42769a2cb61b5901339cbd9f45ae Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:09:35 -0700 Subject: [PATCH 31/47] Removed four redundant inline comments in src/fe-gtk/urlgrab.c to clean up readability without changing behavior (treeview enum declaration area, right-click selection block, headers visibility call, and URL list overflow trimming block). --- src/fe-gtk/urlgrab.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/fe-gtk/urlgrab.c b/src/fe-gtk/urlgrab.c index 6abbf43d..7de40993 100644 --- a/src/fe-gtk/urlgrab.c +++ b/src/fe-gtk/urlgrab.c @@ -37,7 +37,6 @@ #define ICON_URLGRAB_COPY "zc-menu-copy" #define ICON_URLGRAB_SAVE_AS "zc-menu-save-as" -/* model for the URL treeview */ enum { URL_COLUMN, @@ -60,7 +59,6 @@ url_treeview_url_clicked_cb (GtkWidget *view, GdkEventButton *event, if (!event || !gtk_tree_view_get_path_at_pos (tree, event->x, event->y, &path, 0, 0, 0)) return FALSE; - /* select what they right-clicked on */ sel = gtk_tree_view_get_selection (tree); gtk_tree_selection_unselect_all (sel); gtk_tree_selection_select_path (sel, path); @@ -103,7 +101,6 @@ url_treeview_new (GtkWidget *box) gtk_widget_set_vexpand (scroll, TRUE); g_signal_connect (G_OBJECT (view), "button_press_event", G_CALLBACK (url_treeview_url_clicked_cb), NULL); - /* don't want column headers */ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE); gtk_widget_show (view); return view; @@ -172,7 +169,6 @@ fe_url_add (const char *urltext) URL_COLUMN, urltext, -1); - /* remove any overflow */ if (prefs.hex_url_grabber_limit > 0) { valid = gtk_tree_model_iter_nth_child ( From 7c9c615aed42d69e95f6fdf7fba4431f53f82205 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:12:10 -0700 Subject: [PATCH 32/47] Removed redundant inline comments from the fishlim IRC parsing helpers where the comments only repeated obvious code behavior, while preserving all function docblocks and logic. --- plugins/fishlim/irc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/fishlim/irc.c b/plugins/fishlim/irc.c index 19b810eb..e2f39118 100644 --- a/plugins/fishlim/irc.c +++ b/plugins/fishlim/irc.c @@ -39,13 +39,11 @@ gboolean irc_parse_message(const char *words[], if (prefix) *prefix = NULL; if (command) *command = NULL; - /* See if the message starts with a prefix (sender user) */ if (words[w][0] == ':') { if (prefix) *prefix = &words[w][1]; w++; } - - /* Check command */ + if (words[w][0] == '\0') return FALSE; if (command) *command = words[w]; w++; @@ -72,11 +70,9 @@ char *irc_prefix_get_nick(const char *prefix) { if (!prefix) return NULL; - /* Find end of nick */ end = prefix; while (*end != '\0' && *end != '!' && *end != '@') end++; - - /* Allocate string */ + length = end - prefix; return g_strndup (prefix, length); } From 10d5bb91abf976d54d1035cbb8152e2185e53648 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:14:38 -0700 Subject: [PATCH 33/47] Cleaned up unneeded, commented-out debug logging lines in Perl plugin callback handlers (server_cb, command_cb, and print_cb) without changing runtime behavior. --- plugins/perl/perl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index 05ecf2f3..3671353f 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -440,8 +440,6 @@ server_cb (char *word[], char *word_eol[], void *userdata) if (data->depth) return ZOITECHAT_EAT_NONE; - /* zoitechat_printf (ph, */ - /* "Received %d words in server callback", av_len (wd)); */ PUSHMARK (SP); XPUSHs (newRV_noinc ((SV *) array2av (word))); XPUSHs (newRV_noinc ((SV *) array2av (word_eol))); @@ -489,8 +487,6 @@ command_cb (char *word[], char *word_eol[], void *userdata) if (data->depth) return ZOITECHAT_EAT_NONE; - /* zoitechat_printf (ph, "Received %d words in command callback", */ - /* av_len (wd)); */ PUSHMARK (SP); XPUSHs (newRV_noinc ((SV *) array2av (word))); XPUSHs (newRV_noinc ((SV *) array2av (word_eol))); @@ -567,7 +563,6 @@ print_cb (char *word[], void *userdata) } } - /*zoitechat_printf (ph, "Received %d words in print callback", av_len (wd)+1); */ PUSHMARK (SP); XPUSHs (newRV_noinc ((SV *) wd)); XPUSHs (data->userdata); From 4beabb6bf58efb1f071a9eded034b1e6e43c8c97 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:24:11 -0700 Subject: [PATCH 34/47] Removed a stale commented-out debug function block from the fishlim plugin source to reduce dead/commented code. Removed the corresponding commented-out RAW LINE hook entry so only active handlers remain in plugin initialization. --- plugins/fishlim/plugin_zoitechat.c | 11 ----------- src/common/servlist.c | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/fishlim/plugin_zoitechat.c b/plugins/fishlim/plugin_zoitechat.c index 5482522d..c38dda2d 100644 --- a/plugins/fishlim/plugin_zoitechat.c +++ b/plugins/fishlim/plugin_zoitechat.c @@ -277,15 +277,6 @@ char *decrypt_raw_message(const char *message, const char *key) { return NULL; } -/*static int handle_debug(char *word[], char *word_eol[], void *userdata) { - zoitechat_printf(ph, "debug incoming: "); - for (size_t i = 1; word[i] != NULL && word[i][0] != '\0'; i++) { - zoitechat_printf(ph, ">%s< ", word[i]); - } - zoitechat_printf(ph, "\n"); - return ZOITECHAT_EAT_NONE; -}*/ - /** * Called when a message is to be sent. */ @@ -811,7 +802,6 @@ int zoitechat_plugin_init(zoitechat_plugin *plugin_handle, zoitechat_hook_server(ph, "NOTICE", ZOITECHAT_PRI_HIGHEST, handle_keyx_notice, NULL); zoitechat_hook_server_attrs(ph, "NOTICE", ZOITECHAT_PRI_NORM, handle_incoming, NULL); zoitechat_hook_server_attrs(ph, "PRIVMSG", ZOITECHAT_PRI_NORM, handle_incoming, NULL); - /* zoitechat_hook_server(ph, "RAW LINE", ZOITECHAT_PRI_NORM, handle_debug, NULL); */ zoitechat_hook_server_attrs(ph, "TOPIC", ZOITECHAT_PRI_NORM, handle_incoming, NULL); zoitechat_hook_server_attrs(ph, "332", ZOITECHAT_PRI_NORM, handle_incoming, NULL); @@ -836,4 +826,3 @@ int zoitechat_plugin_deinit(void) { zoitechat_printf(ph, "%s plugin unloaded\n", plugin_name); return 1; } - diff --git a/src/common/servlist.c b/src/common/servlist.c index c2eb3e77..b215e1e1 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -1065,7 +1065,7 @@ servlist_load (void) } } if (buf[0] == 'N') - net = servlist_net_add (buf + 2, /* comment */ NULL, FALSE); + net = servlist_net_add (buf + 2, NULL, FALSE); } fclose (fp); From 9df977623872c4212dc263ee3654ebcdf0a74914 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:28:10 -0700 Subject: [PATCH 35/47] Removed a stale multi-line # TODO note block from the common Meson build file to clean up unneeded comments without changing build logic. Removed an old commented-out /* FIXME ... */ prototype block from servlist.h, leaving only active declarations. --- src/common/meson.build | 5 ----- src/common/servlist.h | 4 ---- 2 files changed, 9 deletions(-) diff --git a/src/common/meson.build b/src/common/meson.build index 0d651787..0d097490 100644 --- a/src/common/meson.build +++ b/src/common/meson.build @@ -96,11 +96,6 @@ textevents = custom_target('textevents', command: [make_te, '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'] ) -# TODO: -# LOOKUPD -# SIGACTION -# HAVE_GTK_MAC - if libssl_dep.found() common_sources += 'ssl.c' common_deps += libssl_dep diff --git a/src/common/servlist.h b/src/common/servlist.h index b3170d97..f7ebdc15 100644 --- a/src/common/servlist.h +++ b/src/common/servlist.h @@ -125,8 +125,4 @@ GSList *servlist_favchan_listadd (GSList *chanlist, char *channel, char *key); gboolean joinlist_is_in_list (server *serv, char *channel); -/* FIXME -void joinlist_split (char *autojoin, GSList **channels, GSList **keys); -void joinlist_free (GSList *channels, GSList *keys); -*/ #endif From e62769b361c6c3f71e2d86b48dd12415ee0926b4 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:30:46 -0700 Subject: [PATCH 36/47] Cleaned up unneeded comments in DCC receive/connect code by removing: a stale commented-out ACK block in the DCC receive error path, an unnecessary speculative note before the quoted filename handling, and an editorial inline comment on a static variable declaration. --- src/common/dcc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/common/dcc.c b/src/common/dcc.c index 4eb5b409..a8fb68fa 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -743,9 +743,6 @@ dcc_read (GIOChannel *source, GIOCondition condition, struct DCC *dcc) EMIT_SIGNAL (XP_TE_DCCRECVERR, dcc->serv->front_session, dcc->file, dcc->destfile, dcc->nick, errorstring ((n < 0) ? sock_error () : 0), 0); - /* send ack here? but the socket is dead */ - /*if (need_ack) - dcc_send_ack (dcc);*/ dcc_close (dcc, STAT_FAILED, FALSE); return TRUE; } @@ -1383,7 +1380,6 @@ dcc_connect (struct DCC *dcc) dcc_close (dcc, STAT_FAILED, FALSE); return; } - /* possible problems with filenames containing spaces? */ if (dcc->type == TYPE_RECV) g_snprintf (tbuf, sizeof (tbuf), strchr (dcc->file, ' ') ? "DCC SEND \"%s\" %u %d %" G_GUINT64_FORMAT " %d" : @@ -1720,7 +1716,7 @@ dcc_listen_init (struct DCC *dcc, session *sess) } static struct session *dccsess; -static char *dccto; /* lame!! */ +static char *dccto; static gint64 dccmaxcps; static int recursive = FALSE; From 6a02f578b6118a2b7759e8605e149587e887eec7 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:34:50 -0700 Subject: [PATCH 37/47] Removed obsolete commented-out lines from fe_cleanup() so the function no longer contains dead commented code. Removed an unnecessary explanatory comment above the unconditional early return in log_handler(), leaving only the active behavior. Removed an unneeded section marker comment before fe_idle() to keep surrounding code cleaner. --- src/fe-gtk/fe-gtk.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index 42f18966..7bb5e37d 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -925,8 +925,6 @@ fe_main (void) void fe_cleanup (void) { - /* it's saved when pressing OK in setup.c */ - /*palette_save ();*/ } void @@ -963,8 +961,7 @@ log_handler (const gchar *log_domain, { session *sess; - /* if (getenv ("ZOITECHAT_WARNING_IGNORE")) this gets ignored sometimes, so simply just disable all warnings */ - return; + return; sess = find_dialog (serv_list->data, "(warnings)"); if (!sess) @@ -977,8 +974,6 @@ log_handler (const gchar *log_domain, #endif -/* install tray stuff */ - static int fe_idle (gpointer data) { From 3cff6742f517cc1528ab624d0d10feace21bd8ca Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 02:37:08 -0700 Subject: [PATCH 38/47] Removed unneeded inline comments around the Win32 error-formatting fallback in errorstring() and simplified matching block-closing lines, without changing behavior. --- src/common/util.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/util.c b/src/common/util.c index 4ad5dedd..f8a5f5bf 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -169,13 +169,12 @@ errorstring (int err) return tbuf; } } - } /* ! if (osvi.dwMajorVersion >= 5) */ + } - /* fallback to error number */ sprintf (tbuf, "%s %d", _("Error"), err); return tbuf; - } /* ! if (err >= WSABASEERR) */ -#endif /* ! WIN32 */ + } +#endif return strerror (err); } From 9548be0cec0eefe6d8fd5fae9653543c6b470dec Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 12:57:42 -0700 Subject: [PATCH 39/47] Removed redundant inline comments in the Winamp plugin by simplifying the plugin handle declaration and cleanup comments around initialization/return values, while keeping functional comments intact. Removed the redundant return 1 inline comment in the Exec plugin init function. --- plugins/exec/exec.c | 2 +- plugins/winamp/winamp.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/exec/exec.c b/plugins/exec/exec.c index 47c5c0e4..1d9d581b 100644 --- a/plugins/exec/exec.c +++ b/plugins/exec/exec.c @@ -145,7 +145,7 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char zoitechat_hook_command (ph, "EXEC", ZOITECHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside ZoiteChat", 0); zoitechat_printf (ph, "%s plugin loaded\n", name); - return 1; /* return 1 for success */ + return 1; } int diff --git a/plugins/winamp/winamp.c b/plugins/winamp/winamp.c index 1cc84851..4a064702 100644 --- a/plugins/winamp/winamp.c +++ b/plugins/winamp/winamp.c @@ -20,7 +20,7 @@ #define PLAYING 1 #define PAUSED 3 -static zoitechat_plugin *ph; /* plugin handle */ +static zoitechat_plugin *ph; static int winamp(char *word[], char *word_eol[], void *userdata) @@ -130,7 +130,6 @@ zoitechat_plugin_init(zoitechat_plugin *plugin_handle, char **plugin_version, char *arg) { - /* we need to save this for use with any zoitechat_* functions */ ph = plugin_handle; *plugin_name = "Winamp"; @@ -142,7 +141,7 @@ zoitechat_plugin_init(zoitechat_plugin *plugin_handle, zoitechat_print (ph, "Winamp plugin loaded\n"); - return 1; /* return 1 for success */ + return 1; } int From df37b44cc8ef101ce56f697e64ff0193e1eb64fc Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 13:01:21 -0700 Subject: [PATCH 40/47] Cleaned up unneeded comment noise in the Solus eopkg workflow by replacing an 11-line explanatory block with a concise 2-line comment while preserving the key rationale for --ignore-file-conflicts and required Meson tooling install. --- .github/workflows/solus-eopkg-build.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/solus-eopkg-build.yml b/.github/workflows/solus-eopkg-build.yml index 9166b3ea..873342e9 100644 --- a/.github/workflows/solus-eopkg-build.yml +++ b/.github/workflows/solus-eopkg-build.yml @@ -62,17 +62,8 @@ jobs: sh -lc ' set -euo pipefail eopkg update-repo -y - # Do not remove openssl-11 here: it can trigger a very large - # dependency cascade (including python3/eopkg itself), which - # breaks the build environment before package build starts. - # Some Solus base images still contain openssl-11 files that - # conflict with openssl 3.x when the package set is refreshed. - # Allowing file-conflict resolution keeps the CI image usable - # long enough to install ypkg and complete the package build. - # The base image does not guarantee Meson toolchain packages, - # while our package.yml setup phase calls meson directly. - # Install the essential build tools up front to avoid - # `/tmp/ypkg-setup*: meson: command not found` failures. + # Keep file-conflict handling on: some base images still carry + # openssl-11 leftovers, and Meson tooling is not always preinstalled. eopkg install -y --ignore-file-conflicts \ ypkg git meson ninja pkgconf gcc gettext ypkg build "$PACKAGE_YML" From 6e8b750c68be45d068e9f6d308a4ad468956c7ed Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 13:04:05 -0700 Subject: [PATCH 41/47] Removed an obsolete commented-out hdiutil line from the macOS bundling script, leaving only the active packaging path (zip) to keep the script cleaner and easier to scan. --- osx/makebundle.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/osx/makebundle.sh b/osx/makebundle.sh index dc750491..3a62f4f4 100755 --- a/osx/makebundle.sh +++ b/osx/makebundle.sh @@ -6,6 +6,4 @@ rm -f *.app.zip python $HOME/.local/bin/gtk-mac-bundler zoitechat.bundle echo "Compressing bundle" -#hdiutil create -format UDBZ -srcdir ZoiteChat.app -quiet ZoiteChat-2.9.6.1-$(git rev-parse --short master).dmg zip -9rXq ./ZoiteChat-$(git describe --tags).app.zip ./ZoiteChat.app - From 99b969067ed6ccd350a427163a078740a9a4a1f8 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 13:29:20 -0700 Subject: [PATCH 42/47] Removed one stale, commented-out debug/error line in the PCI device-name lookup path (pci_find_fullname), leaving behavior unchanged and making the function cleaner. --- plugins/sysinfo/unix/pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/sysinfo/unix/pci.c b/plugins/sysinfo/unix/pci.c index 528afd97..fac2f76e 100644 --- a/plugins/sysinfo/unix/pci.c +++ b/plugins/sysinfo/unix/pci.c @@ -132,7 +132,6 @@ void pci_find_fullname(char *fullname, char *vendor, char *device) if(fp == NULL) { g_snprintf(fullname, bsize, "%s:%s", vendor, device); - //sysinfo_print_error ("pci.ids file not found! You might want to adjust your pciids setting with /SYSINFO SET pciids (you can query its current value with /SYSINFO LIST).\n"); return; } From c361602b1a48a2c32b170015e4f09d34cdb599a8 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 13:51:22 -0700 Subject: [PATCH 43/47] Removed four unneeded section comments in src/common/notify.h (WATCH/MONITOR/general/old ISON labels), leaving only the function declarations for a cleaner header interface. --- src/common/notify.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/common/notify.h b/src/common/notify.h index 6eef651e..92974e7b 100644 --- a/src/common/notify.h +++ b/src/common/notify.h @@ -42,19 +42,16 @@ struct notify_per_server extern GSList *notify_list; extern int notify_tag; -/* the WATCH stuff */ void notify_set_online (server * serv, char *nick, const message_tags_data *tags_data); void notify_set_offline (server * serv, char *nick, int quiet, - const message_tags_data *tags_data); -/* the MONITOR stuff */ + const message_tags_data *tags_data); void notify_set_online_list (server * serv, char *users, const message_tags_data *tags_data); void notify_set_offline_list (server * serv, char *users, int quiet, - const message_tags_data *tags_data); + const message_tags_data *tags_data); void notify_send_watches (server * serv); -/* the general stuff */ void notify_adduser (char *name, char *networks); int notify_deluser (char *name); void notify_cleanup (void); @@ -65,7 +62,6 @@ gboolean notify_is_in_list (server *serv, char *name); int notify_isnotify (session *sess, char *name); struct notify_per_server *notify_find_server_entry (struct notify *notify, struct server *serv); -/* the old ISON stuff - remove me? */ void notify_markonline (server *serv, char *word[], const message_tags_data *tags_data); int notify_checklist (void); From 81c691491cff5de3312c6b110dd229c61b64d475 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 13:55:44 -0700 Subject: [PATCH 44/47] Removed three redundant inline comments in joind_ok_cb that duplicated obvious control flow, leaving behavior unchanged and improving readability. --- src/fe-gtk/joind.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c index fcc9909c..ae07d3d5 100644 --- a/src/fe-gtk/joind.c +++ b/src/fe-gtk/joind.c @@ -81,11 +81,9 @@ joind_ok_cb (GtkWidget *ok, server *serv) return; } - /* do nothing */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (serv->gui->joind_radio1))) goto xit; - /* join specific channel */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (serv->gui->joind_radio2))) { char *text = (char *)gtk_entry_get_text (GTK_ENTRY (serv->gui->joind_entry)); @@ -98,7 +96,6 @@ joind_ok_cb (GtkWidget *ok, server *serv) goto xit; } - /* channel list */ chanlist_opengui (serv, TRUE); xit: From 757892819990ca62087b7c1fad9af797b3a9b9a0 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 16:22:46 -0700 Subject: [PATCH 45/47] Cleaned up redundant/outdated inline comments in the text frontend argument/config and GUI control paths while leaving behavior unchanged (comment-only cleanup). --- src/fe-text/fe-text.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/fe-text/fe-text.c b/src/fe-text/fe-text.c index 199b9a85..53d85f30 100644 --- a/src/fe-text/fe-text.c +++ b/src/fe-text/fe-text.c @@ -533,7 +533,7 @@ fe_args (int argc, char *argv[]) return 0; } - if (arg_cfgdir) /* we want filesystem encoding */ + if (arg_cfgdir) { g_free (xdir); xdir = g_strdup(arg_cfgdir); @@ -548,10 +548,8 @@ fe_args (int argc, char *argv[]) void fe_init (void) { - /* the following should be default generated, not enfoced in binary */ prefs.hex_gui_tab_server = 0; prefs.hex_gui_autoopen_dialog = 0; - /* except for these, there is no lag meter, there is no server list */ prefs.hex_gui_lagometer = 0; prefs.hex_gui_slist_skip = 1; } @@ -563,7 +561,6 @@ fe_main (void) main_loop = g_main_loop_new(NULL, FALSE); - /* Keyboard Entry Setup */ #ifdef G_OS_WIN32 keyboard_input = g_io_channel_win32_new_fd(STDIN_FILENO); #else @@ -832,10 +829,8 @@ fe_idle_add (void *func, void *data) void fe_ctrl_gui (session *sess, fe_gui_action action, int arg) { - /* only one action type handled for now, but could add more */ switch (action) { - /* gui focus is really the only case zoitechat-text needs to worry about */ case FE_GUI_FOCUS: current_sess = sess; current_tab = sess; From 3445d946bc6b54717bbcac6fdc28028306fa5b00 Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 18:05:21 -0700 Subject: [PATCH 46/47] Removed a redundant inline comment in icon loading/scaling logic, leaving behavior unchanged. Removed a redundant inline comment in the Windows sysinfo volume-name guard path, with no functional impact. Removed a redundant inline comment in WinRT toast setup while keeping the same notification/audio attribute behavior. --- src/common/sysinfo/win32/backend.c | 1 - src/fe-gtk/notifications/notification-winrt.cpp | 1 - src/fe-gtk/pixmaps.c | 1 - 3 files changed, 3 deletions(-) diff --git a/src/common/sysinfo/win32/backend.c b/src/common/sysinfo/win32/backend.c index b2ed3ab8..37f003d2 100644 --- a/src/common/sysinfo/win32/backend.c +++ b/src/common/sysinfo/win32/backend.c @@ -465,7 +465,6 @@ static char *read_hdd_info (IWbemClassObject *object) if (name_len >= 4 && name_bstr[0] == L'\\' && name_bstr[1] == L'\\' && name_bstr[2] == L'?' && name_bstr[3] == L'\\') { - // This is not a named volume. Skip it. VariantClear (&name_variant); return NULL; diff --git a/src/fe-gtk/notifications/notification-winrt.cpp b/src/fe-gtk/notifications/notification-winrt.cpp index bb537c1f..1ed1c5f2 100644 --- a/src/fe-gtk/notifications/notification-winrt.cpp +++ b/src/fe-gtk/notifications/notification-winrt.cpp @@ -66,7 +66,6 @@ extern "C" node_list->GetAt (1)->AppendChild ( toastTemplate->CreateTextNode (Platform::StringReference (wtext.c_str (), wtext.size ()))); - // Mute sound, we already play our own auto node = toastTemplate->SelectSingleNode (L"/toast"); auto audio_elem = toastTemplate->CreateElement (L"audio"); audio_elem->SetAttribute (L"silent", L"true"); diff --git a/src/fe-gtk/pixmaps.c b/src/fe-gtk/pixmaps.c index 132fc325..7151e65f 100644 --- a/src/fe-gtk/pixmaps.c +++ b/src/fe-gtk/pixmaps.c @@ -168,7 +168,6 @@ load_pixmap (const char *filename) g_free (path); } - // Hack to avoid unbearably tiny icons on HiDPI screens. scale = g_getenv ("GDK_SCALE"); if (scale) { From 3e095c3c33292c8cabdf62d96936e19ecf3aeeda Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 18:07:26 -0700 Subject: [PATCH 47/47] Removed two redundant inline comments in the file dialog response/done handlers, leaving the behavior unchanged and the control flow cleaner. Removed an old commented-out helper function block (gtkutil_treeview_get_selected_iter) that was dead/commented code. --- src/fe-gtk/gtkutil.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c index ff96ecf8..97577aa1 100644 --- a/src/fe-gtk/gtkutil.c +++ b/src/fe-gtk/gtkutil.c @@ -668,8 +668,6 @@ static void gtkutil_file_req_done (GtkWidget * wid, struct file_req *freq) { gtkutil_file_req_done_chooser (GTK_FILE_CHOOSER (freq->dialog), freq); - - /* this should call the "destroy" cb, where we free(freq) */ gtk_widget_destroy (freq->dialog); } @@ -682,7 +680,6 @@ gtkutil_file_req_response (GtkWidget *dialog, gint res, struct file_req *freq) return; } - /* this should call the "destroy" cb, where we free(freq) */ gtk_widget_destroy (dialog); } @@ -1360,16 +1357,6 @@ gtkutil_treemodel_string_to_iter (GtkTreeModel *model, gchar *pathstr, GtkTreeIt return success; } -/*gboolean -gtkutil_treeview_get_selected_iter (GtkTreeView *view, GtkTreeIter *iter_ret) -{ - GtkTreeModel *store; - GtkTreeSelection *select; - - select = gtk_tree_view_get_selection (view); - return gtk_tree_selection_get_selected (select, &store, iter_ret); -}*/ - gboolean gtkutil_treeview_get_selected (GtkTreeView *view, GtkTreeIter *iter_ret, ...) {