mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-08-31 20:39:24 +00:00
Compare commits
1 Commits
retain-sea
...
keepalive_
| Author | SHA1 | Date | |
|---|---|---|---|
| cc3cc8f6d8 |
@@ -591,7 +591,6 @@ const struct prefs vars[] =
|
|||||||
{"text_replay", P_OFFINT (hex_text_replay), TYPE_BOOL},
|
{"text_replay", P_OFFINT (hex_text_replay), TYPE_BOOL},
|
||||||
{"text_search_case_match", P_OFFINT (hex_text_search_case_match), 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_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_follow", P_OFFINT (hex_text_search_follow), TYPE_BOOL},
|
||||||
{"text_search_regexp", P_OFFINT (hex_text_search_regexp), TYPE_BOOL},
|
{"text_search_regexp", P_OFFINT (hex_text_search_regexp), TYPE_BOOL},
|
||||||
{"text_show_marker", P_OFFINT (hex_text_show_marker), TYPE_BOOL},
|
{"text_show_marker", P_OFFINT (hex_text_show_marker), TYPE_BOOL},
|
||||||
|
|||||||
@@ -1169,6 +1169,8 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case WORDL('P', 'I', 'N', 'G'):
|
case WORDL('P', 'I', 'N', 'G'):
|
||||||
|
serv->ping_recv = time (0);
|
||||||
|
serv->lag_sent = 0;
|
||||||
tcp_sendf (sess->server, "PONG %s\r\n", word_eol[3]);
|
tcp_sendf (sess->server, "PONG %s\r\n", word_eol[3]);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1489,6 +1491,8 @@ process_named_servermsg (session *sess, char *buf, char *rawname, char *word_eol
|
|||||||
|
|
||||||
if (!strncmp (buf, "PING ", 5))
|
if (!strncmp (buf, "PING ", 5))
|
||||||
{
|
{
|
||||||
|
sess->server->ping_recv = time (0);
|
||||||
|
sess->server->lag_sent = 0;
|
||||||
tcp_sendf (sess->server, "PONG %s\r\n", buf + 5);
|
tcp_sendf (sess->server, "PONG %s\r\n", buf + 5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,7 +217,6 @@ struct zoitechatprefs
|
|||||||
unsigned int hex_text_replay;
|
unsigned int hex_text_replay;
|
||||||
unsigned int hex_text_search_case_match;
|
unsigned int hex_text_search_case_match;
|
||||||
unsigned int hex_text_search_highlight_all;
|
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_follow;
|
||||||
unsigned int hex_text_search_regexp;
|
unsigned int hex_text_search_regexp;
|
||||||
unsigned int hex_text_show_marker;
|
unsigned int hex_text_show_marker;
|
||||||
|
|||||||
@@ -4688,11 +4688,7 @@ mg_search_toggle(session *sess)
|
|||||||
{
|
{
|
||||||
gtk_widget_hide(sess->gui->shbox);
|
gtk_widget_hide(sess->gui->shbox);
|
||||||
gtk_widget_grab_focus(sess->gui->input_box);
|
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), "");
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -4706,19 +4702,10 @@ mg_search_toggle(session *sess)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
search_handle_keypress (GtkWidget *win, GdkEventKey *key, session *sess)
|
search_handle_esc (GtkWidget *win, GdkEventKey *key, session *sess)
|
||||||
{
|
{
|
||||||
if (key->keyval == GDK_KEY_Escape)
|
if (key->keyval == GDK_KEY_Escape)
|
||||||
{
|
|
||||||
mg_search_toggle(sess);
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -4745,9 +4732,10 @@ mg_create_search(session *sess, GtkWidget *box)
|
|||||||
gui->shentry = entry = gtk_entry_new();
|
gui->shentry = entry = gtk_entry_new();
|
||||||
gtk_box_pack_start(GTK_BOX(gui->shbox), entry, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(gui->shbox), entry, FALSE, FALSE, 0);
|
||||||
gtk_widget_set_size_request (gui->shentry, 180, -1);
|
gtk_widget_set_size_request (gui->shentry, 180, -1);
|
||||||
|
mg_apply_emoji_fallback_widget (entry);
|
||||||
mg_apply_entry_scroll_artifact_fix (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);
|
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_keypress), sess);
|
g_signal_connect (G_OBJECT (entry), "key-press-event", G_CALLBACK (search_handle_esc), sess);
|
||||||
g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(mg_search_handle_next), 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_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."));
|
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (sess->gui->shentry), GTK_ENTRY_ICON_SECONDARY, _("Search hit end or not found."));
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ 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_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_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_ ("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_HEADER, N_("Timestamps"),0,0,0},
|
||||||
{ST_TOGGLE, N_("Enable timestamps"), P_OFFINTNL(hex_stamp_text),0,0,1},
|
{ST_TOGGLE, N_("Enable timestamps"), P_OFFINTNL(hex_stamp_text),0,0,1},
|
||||||
|
|||||||
Reference in New Issue
Block a user