Compare commits

...
Author SHA1 Message Date
deepend 1267655bbe fix tls unsupported issue on windows 2026-09-10 18:23:26 -06:00
deepend 5734b14e78 test first start experience 2026-09-10 07:06:25 -06:00
deepend bb3893d36c Fix channel ACTION routing after self-message handling 2026-09-03 09:27:07 -06:00
deepend-tildeclub fe57449f6c Merge pull request #374 from TehPeGaSuS/fix/weechat-relay-pm-split
Fix private messages splitting into two windows over WeeChat's IRC relay
2026-09-03 08:20:55 -07:00
ThePeGaSuS c725adaa09 Fix CTCP ACTION not rerouting self-sent /me to correct PM window
Mirrors the PRIVMSG fix: replayed /me messages sent by our own nick
via WeeChat relay backlog were always passed with fromme=FALSE,
so they never got rerouted to the actual PM query window.
2026-09-03 08:51:21 +02:00
deepend-tildeclub 7731bfa4e0 Merge pull request #377 from ZoiteChat/retain-searched-text-view
unblock navigation when in search
2026-09-02 09:46:13 -07:00
deepend e72546aaec fix accidental removal of mg_apply_emoji_fallback_widget (entry); 2026-09-02 10:43:09 -06:00
deepend d6d648f0f4 unblock navigation when in search 2026-09-02 10:41:21 -06:00
ThePeGaSuS 0ba523d071 Fix: private messages split into two windows over WeeChat's IRC relay
When you send a private message, ZoiteChat sometimes gets the same
message echoed back by the server so it can show it in the right
window. Whether it recognizes that echo depended on the server first
confirming a feature called "echo-message" during connection setup.

WeeChat's relay doesn't seem to confirm that feature the way other
servers (or ZNC) do, so ZoiteChat didn't recognize its own echoed
messages and treated them as brand new incoming messages from
yourself, opening a second, separate conversation window instead of
using the one you were already typing in.

This makes ZoiteChat recognize its own message by checking who sent
it, instead of only trusting that feature confirmation. That way,
sent and received messages always end up in the same conversation
window, regardless of how well the server/relay announces its
capabilities.
2026-08-28 20:48:12 +02:00
10 changed files with 2887 additions and 23 deletions
+3
View File
@@ -429,6 +429,8 @@ const struct prefs vars[] =
{"gui_lang", P_OFFINT (hex_gui_lang), TYPE_INT},
{"gui_mode_buttons", P_OFFINT (hex_gui_mode_buttons), TYPE_BOOL},
{"gui_mode_buttons_inline", P_OFFINT (hex_gui_mode_buttons_inline), TYPE_BOOL},
{"gui_onboarding_disable", P_OFFINT (hex_gui_onboarding_disable), TYPE_BOOL},
{"gui_onboarding_pending", P_OFFINT (hex_gui_onboarding_pending), TYPE_BOOL},
{"gui_pane_divider_position", P_OFFINT (hex_gui_pane_divider_position), TYPE_INT},
{"gui_pane_left_size", P_OFFINT (hex_gui_pane_left_size), TYPE_INT},
{"gui_pane_right_size", P_OFFINT (hex_gui_pane_right_size), TYPE_INT},
@@ -591,6 +593,7 @@ const struct prefs vars[] =
{"text_replay", P_OFFINT (hex_text_replay), TYPE_BOOL},
{"text_search_case_match", P_OFFINT (hex_text_search_case_match), TYPE_BOOL},
{"text_search_highlight_all", P_OFFINT (hex_text_search_highlight_all), TYPE_BOOL},
{"text_search_keep_position", P_OFFINT (hex_text_search_keep_position), TYPE_BOOL},
{"text_search_follow", P_OFFINT (hex_text_search_follow), TYPE_BOOL},
{"text_search_regexp", P_OFFINT (hex_text_search_regexp), TYPE_BOOL},
{"text_show_marker", P_OFFINT (hex_text_show_marker), TYPE_BOOL},
+15 -1
View File
@@ -126,7 +126,21 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
if (ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
goto generic;
inbound_action (sess, to, nick, ip, msg + 7, FALSE, tags_data->identified, tags_data);
{
gboolean private_fromme = !serv->p_cmp (nick, serv->nick) && !is_channel (serv, to);
if (private_fromme)
{
session *target = find_dialog (serv, to);
if (target)
sess = target;
else if (serv->front_session)
sess = serv->front_session;
}
inbound_action (sess, to, nick, ip, msg + 7, private_fromme, tags_data->identified, tags_data);
}
return;
}
+1 -1
View File
@@ -1368,7 +1368,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
{
if (ignore_check (word[1], IG_PRIV))
return;
if (serv->have_echo_message && !serv->p_cmp (nick, serv->nick))
if (!serv->p_cmp (nick, serv->nick))
{
session *target_sess = find_dialog (serv, to);
+16 -1
View File
@@ -191,6 +191,8 @@ struct defaultserver
gboolean ssl;
};
static gboolean servlist_needs_onboarding_flag;
static const struct defaultserver def[] =
{
{"2600net", 0},
@@ -1181,7 +1183,10 @@ servlist_load (void)
fp = zoitechat_fopen_file ("servlist.conf", "r", 0);
if (!fp)
{
servlist_needs_onboarding_flag = TRUE;
return FALSE;
}
while (fgets (buf, sizeof (buf) - 2, fp))
{
@@ -1245,6 +1250,7 @@ servlist_load (void)
net = servlist_net_add (buf + 2, NULL, FALSE);
}
fclose (fp);
servlist_needs_onboarding_flag = (network_list == NULL);
return TRUE;
}
@@ -1253,8 +1259,16 @@ void
servlist_init (void)
{
if (!network_list)
if (!servlist_load ())
{
if (!servlist_load () || !network_list)
servlist_load_defaults ();
}
}
gboolean
servlist_needs_onboarding (void)
{
return servlist_needs_onboarding_flag;
}
/* check if a charset is known by Iconv */
@@ -1395,6 +1409,7 @@ servlist_save (void)
}
fclose (fp);
servlist_needs_onboarding_flag = FALSE;
return TRUE;
}
+1
View File
@@ -93,6 +93,7 @@ extern GSList *network_list;
#define IRC_DEFAULT_CHARSET "UTF-8 (Unicode)"
void servlist_init (void);
gboolean servlist_needs_onboarding (void);
int servlist_save (void);
int servlist_cycle (server *serv);
void servlist_connect (session *sess, ircnet *net, gboolean join);
+3
View File
@@ -134,6 +134,8 @@ struct zoitechatprefs
unsigned int hex_gui_join_dialog;
unsigned int hex_gui_mode_buttons;
unsigned int hex_gui_mode_buttons_inline;
unsigned int hex_gui_onboarding_disable;
unsigned int hex_gui_onboarding_pending;
unsigned int hex_gui_quit_dialog;
/* unsigned int hex_gui_single; */
unsigned int hex_gui_slist_fav;
@@ -217,6 +219,7 @@ struct zoitechatprefs
unsigned int hex_text_replay;
unsigned int hex_text_search_case_match;
unsigned int hex_text_search_highlight_all;
unsigned int hex_text_search_keep_position;
unsigned int hex_text_search_follow;
unsigned int hex_text_search_regexp;
unsigned int hex_text_show_marker;
+15 -2
View File
@@ -4688,7 +4688,11 @@ mg_search_toggle(session *sess)
{
gtk_widget_hide(sess->gui->shbox);
gtk_widget_grab_focus(sess->gui->input_box);
if (prefs.hex_text_search_keep_position)
g_signal_handler_block (sess->gui->shentry, sess->gui->search_changed_signal);
gtk_entry_set_text(GTK_ENTRY(sess->gui->shentry), "");
if (prefs.hex_text_search_keep_position)
g_signal_handler_unblock (sess->gui->shentry, sess->gui->search_changed_signal);
}
else
{
@@ -4702,10 +4706,19 @@ mg_search_toggle(session *sess)
}
static gboolean
search_handle_esc (GtkWidget *win, GdkEventKey *key, session *sess)
search_handle_keypress (GtkWidget *win, GdkEventKey *key, session *sess)
{
if (key->keyval == GDK_KEY_Escape)
{
mg_search_toggle(sess);
return TRUE;
}
if (((key->keyval == GDK_KEY_Page_Up || key->keyval == GDK_KEY_Page_Down) &&
!(key->state & gtk_accelerator_get_default_mod_mask ())) ||
((key->keyval == GDK_KEY_Up || key->keyval == GDK_KEY_Down) &&
(key->state & gtk_accelerator_get_default_mod_mask ()) == GDK_SHIFT_MASK))
return key_handle_key_press (sess->gui->input_box, key, sess);
return FALSE;
}
@@ -4735,7 +4748,7 @@ mg_create_search(session *sess, GtkWidget *box)
mg_apply_emoji_fallback_widget (entry);
mg_apply_entry_scroll_artifact_fix (entry);
gui->search_changed_signal = g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(search_handle_change), sess);
g_signal_connect (G_OBJECT (entry), "key-press-event", G_CALLBACK (search_handle_esc), sess);
g_signal_connect (G_OBJECT (entry), "key-press-event", G_CALLBACK (search_handle_keypress), sess);
g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(mg_search_handle_next), sess);
gtk_entry_set_icon_activatable (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, FALSE);
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _("Search hit end or not found."));
+1
View File
@@ -91,6 +91,7 @@ zoitechat_gtk_ldflags = []
if host_machine.system() == 'windows'
zoitechat_gtk_sources += 'notifications/notification-windows.c'
zoitechat_gtk_deps += cc.find_library('dwmapi', required: true)
zoitechat_gtk_deps += cc.find_library('winhttp', required: true)
zoitechat_theme_deps += cc.find_library('dwmapi', required: true)
else
+2828 -18
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -171,6 +171,7 @@ static const setting appearance_settings[] =
{ST_TOGGLE, N_("Colored nick names"), P_OFFINTNL(hex_text_color_nicks), N_("Give each person on IRC a different color"),0,0},
{ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(hex_text_indent), N_("Make nick names right-justified"),0,0},
{ST_TOGGLE, N_ ("Show marker line"), P_OFFINTNL (hex_text_show_marker), N_ ("Insert a red line after the last read text."), 0, 0},
{ST_TOGGLE, N_("Keep search position when closing"), P_OFFINTNL(hex_text_search_keep_position), 0, 0, 0},
{ST_HEADER, N_("Timestamps"),0,0,0},
{ST_TOGGLE, N_("Enable timestamps"), P_OFFINTNL(hex_stamp_text),0,0,1},
@@ -644,6 +645,9 @@ static const char *const proxyuse[] =
static const setting network_settings[] =
{
{ST_HEADER, N_("Startup"), 0, 0, 0, 0},
{ST_TOGGLE, N_("Disable first-run assistant"), P_OFFINTNL(hex_gui_onboarding_disable), 0, 0, 0},
{ST_HEADER, N_("Your Address"), 0, 0, 0, 0},
{ST_ENTRY, N_("Bind to:"), P_OFFSETNL(hex_net_bind_host), 0, 0, sizeof prefs.hex_net_bind_host},
{ST_LABEL, N_("Only useful for computers with multiple addresses.")},