mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-13 17:20:21 +00:00
Variable cleanup for the rest
This commit is contained in:
@@ -51,11 +51,11 @@ search_search (session * sess, const gchar *text)
|
||||
textentry *last;
|
||||
GError *err = NULL;
|
||||
|
||||
flags = ((prefs.text_search_case_match == 1? case_match: 0) |
|
||||
(prefs.text_search_backward == 1? backward: 0) |
|
||||
(prefs.text_search_highlight_all == 1? highlight: 0) |
|
||||
(prefs.text_search_follow == 1? follow: 0) |
|
||||
(prefs.text_search_regexp == 1? regexp: 0));
|
||||
flags = ((prefs.hex_text_search_case_match == 1? case_match: 0) |
|
||||
(prefs.hex_text_search_backward == 1? backward: 0) |
|
||||
(prefs.hex_text_search_highlight_all == 1? highlight: 0) |
|
||||
(prefs.hex_text_search_follow == 1? follow: 0) |
|
||||
(prefs.hex_text_search_regexp == 1? regexp: 0));
|
||||
if (!is_session (sess))
|
||||
{
|
||||
fe_message (_("The window you opened this Search "
|
||||
@@ -130,25 +130,25 @@ search_key_cb (GtkWidget * window, GdkEventKey * key, gpointer userdata)
|
||||
static void
|
||||
search_caseign_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_case_match = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_case_match = (but->active)? 1: 0;
|
||||
}
|
||||
|
||||
static void
|
||||
search_dirbwd_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_backward = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_backward = (but->active)? 1: 0;
|
||||
}
|
||||
|
||||
static void
|
||||
search_regexp_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_regexp = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_regexp = (but->active)? 1: 0;
|
||||
}
|
||||
|
||||
static void
|
||||
search_highlight_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_highlight_all = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_highlight_all = (but->active)? 1: 0;
|
||||
search_search (sess, NULL);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ search_open (session * sess)
|
||||
|
||||
/* Second line: X Match case */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("_Match case"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_case_match;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_case_match;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_caseign_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Perform a case-sensitive search.");
|
||||
@@ -203,7 +203,7 @@ search_open (session * sess)
|
||||
|
||||
/* Third line: X Search backwards */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("Search _backwards"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_backward;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_backward;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_dirbwd_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Search from the newest text line to the oldest.");
|
||||
@@ -211,7 +211,7 @@ search_open (session * sess)
|
||||
|
||||
/* Fourth line: X Highlight all */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("_Highlight all"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_highlight_all;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_highlight_all;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_highlight_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Highlight all occurrences, and underline the current occurrence.");
|
||||
@@ -219,7 +219,7 @@ search_open (session * sess)
|
||||
|
||||
/* Fifth line: X Regular expression */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("R_egular expression"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_regexp;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_regexp;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_regexp_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Regard search string as a regular expression.");
|
||||
|
||||
Reference in New Issue
Block a user