21 |
* |
* |
22 |
* we create a dialog where a string can be entered. If OK is clicked this |
* we create a dialog where a string can be entered. If OK is clicked this |
23 |
* string is checked against the callsigns in all logs. If there is a partial |
* string is checked against the callsigns in all logs. If there is a partial |
24 |
* match, the QSO is selected. If there is no match, a warinig is displayed. |
* match, the QSO is selected. If there is no match, a warning is displayed. |
25 |
*/ |
*/ |
26 |
|
|
27 |
#include <gtk/gtk.h> |
#include <gtk/gtk.h> |
61 |
|
|
62 |
searchopen = gtk_toggle_button_get_active |
searchopen = gtk_toggle_button_get_active |
63 |
(GTK_TOGGLE_BUTTON(searchcheckbutton)); |
(GTK_TOGGLE_BUTTON(searchcheckbutton)); |
64 |
searchstr = gtk_editable_get_chars |
searchstr = gtk_editable_get_chars |
65 |
(GTK_EDITABLE (GTK_BIN(searchcombo)->child), 0, -1); |
(GTK_EDITABLE (GTK_BIN(searchcombo)->child), 0, -1); |
66 |
len = strlen (searchstr); |
len = strlen (searchstr); |
67 |
|
|
74 |
gtk_combo_box_append_text (GTK_COMBO_BOX (searchcombo), searchstr); |
gtk_combo_box_append_text (GTK_COMBO_BOX (searchcombo), searchstr); |
75 |
} |
} |
76 |
if (g_list_length (searchhistory) > SEARCHHISTORY) |
if (g_list_length (searchhistory) > SEARCHHISTORY) |
77 |
|
{ |
78 |
searchhistory = g_list_remove |
searchhistory = g_list_remove |
79 |
(searchhistory, g_list_last (searchhistory)->data); |
(searchhistory, g_list_last (searchhistory)->data); |
80 |
|
gtk_combo_box_remove_text (GTK_COMBO_BOX (searchcombo), 0); |
81 |
|
} |
82 |
|
|
83 |
upsearchstr = g_ascii_strup (searchstr, -1); |
upsearchstr = g_ascii_strup (searchstr, -1); |
84 |
|
|
204 |
for (i = 0; i < num; i++) |
for (i = 0; i < num; i++) |
205 |
{ |
{ |
206 |
s = g_list_nth_data (searchhistory, i); |
s = g_list_nth_data (searchhistory, i); |
207 |
gtk_combo_box_append_text (GTK_COMBO_BOX (searchcombo), s); |
gtk_combo_box_prepend_text (GTK_COMBO_BOX (searchcombo), s); |
208 |
} |
} |
209 |
} |
} |
210 |
|
|