Compare commits

..
1 Commits
Author SHA1 Message Date
deepend 02a6902cec Add formatting status bar to input box 2026-09-02 13:27:14 -06:00
3 changed files with 5 additions and 38 deletions
+1 -15
View File
@@ -126,21 +126,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
if (ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
goto generic;
{
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);
}
inbound_action (sess, to, nick, ip, msg + 7, FALSE, 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->p_cmp (nick, serv->nick))
if (serv->have_echo_message && !serv->p_cmp (nick, serv->nick))
{
session *target_sess = find_dialog (serv, to);
+3 -22
View File
@@ -1058,25 +1058,6 @@ mg_input_format_append (GString *summary, const char *text)
g_string_append (summary, text);
}
static void
mg_input_format_color_value (char *buffer, gsize buffer_len, const char *label, gint color_index)
{
guint16 red;
guint16 green;
guint16 blue;
if (theme_get_mirc_color_rgb16 ((unsigned int) color_index, &red, &green, &blue))
{
g_snprintf (buffer, buffer_len,
"%s <b>%02d</b> <span foreground=\"#%02x%02x%02x\">■</span>",
label, color_index, (guint) (red >> 8), (guint) (green >> 8),
(guint) (blue >> 8));
return;
}
g_snprintf (buffer, buffer_len, "%s <b>%02d</b>", label, color_index);
}
static void
mg_input_format_update (GtkEntry *entry)
{
@@ -1084,7 +1065,7 @@ mg_input_format_update (GtkEntry *entry)
GtkWidget *format_label;
MgInputFormatState state;
GString *summary;
char color[96];
char color[48];
char *markup;
format_box = g_object_get_data (G_OBJECT (entry), "zoitechat-format-box");
@@ -1114,12 +1095,12 @@ mg_input_format_update (GtkEntry *entry)
if (state.foreground >= 0)
{
mg_input_format_color_value (color, sizeof (color), "Text color", state.foreground);
g_snprintf (color, sizeof (color), "Text color <b>%02d</b>", state.foreground);
mg_input_format_append (summary, color);
}
if (state.background >= 0)
{
mg_input_format_color_value (color, sizeof (color), "Background", state.background);
g_snprintf (color, sizeof (color), "Background <b>%02d</b>", state.background);
mg_input_format_append (summary, color);
}
if (state.pending_foreground)