56 |
extern statetype state; |
extern statetype state; |
57 |
extern GList *logwindowlist; |
extern GList *logwindowlist; |
58 |
extern preferencestype preferences; |
extern preferencestype preferences; |
59 |
|
extern GList *logwindowlist; |
60 |
|
|
61 |
/* QSO FRAME */ |
/* QSO FRAME */ |
62 |
/* get current date and fill in the dateentry */ |
/* get current date and fill in the dateentry */ |
115 |
g_free(result); |
g_free(result); |
116 |
} |
} |
117 |
|
|
118 |
|
static void updateb4dialog(gchar *callsign) |
119 |
|
{ |
120 |
|
GtkWidget *b4clist; |
121 |
|
guint i, j, row; |
122 |
|
logtype *logwindow; |
123 |
|
gchar *logcallsign, **b4 = NULL, *temp; |
124 |
|
|
125 |
|
if (GTK_WIDGET_VISIBLE(b4dialog)) |
126 |
|
{ |
127 |
|
b4clist = lookup_widget(b4dialog, "b4clist"); |
128 |
|
if(strlen(callsign) == 0) |
129 |
|
gtk_clist_clear(GTK_CLIST(b4clist)); |
130 |
|
else |
131 |
|
{ |
132 |
|
gtk_clist_clear(GTK_CLIST(b4clist)); |
133 |
|
b4 = g_new0(gchar *, 7); |
134 |
|
for (j = 0; j < 7; j++) b4[j] = g_new0(gchar, 100); |
135 |
|
for (i = 0; i < g_list_length(logwindowlist); i++) |
136 |
|
{ |
137 |
|
logwindow = g_list_nth_data(logwindowlist, i); |
138 |
|
for (row = 0; row < logwindow->qsos; row++) |
139 |
|
{ |
140 |
|
gtk_clist_get_text(GTK_CLIST(logwindow->clist), |
141 |
|
row, CALL, &logcallsign); |
142 |
|
if (!g_strncasecmp(callsign, logcallsign, |
143 |
|
strlen(callsign))) |
144 |
|
{ |
145 |
|
b4[0] = g_strdup(logwindow->logname); |
146 |
|
gtk_clist_get_text(GTK_CLIST(logwindow->clist), row, NR, &temp); |
147 |
|
b4[1] = g_strdup(temp); |
148 |
|
gtk_clist_get_text(GTK_CLIST(logwindow->clist), row, DATE, &temp); |
149 |
|
b4[2] = g_strdup(temp); |
150 |
|
gtk_clist_get_text(GTK_CLIST(logwindow->clist), row, GMT, &temp); |
151 |
|
b4[3] = g_strdup(temp); |
152 |
|
b4[4] = g_strdup(logcallsign); |
153 |
|
gtk_clist_get_text(GTK_CLIST(logwindow->clist), row, BAND, &temp); |
154 |
|
b4[5] = g_strdup(temp); |
155 |
|
gtk_clist_get_text(GTK_CLIST(logwindow->clist), row, MODE, &temp); |
156 |
|
b4[6] = g_strdup(temp); |
157 |
|
gtk_clist_append(GTK_CLIST(b4clist), b4); |
158 |
|
} |
159 |
|
} |
160 |
|
} |
161 |
|
for (j = 0; j < 7; j++) g_free(b4[j]); |
162 |
|
g_free(b4); |
163 |
|
} |
164 |
|
} |
165 |
|
} |
166 |
|
|
167 |
void on_callentry_changed(GtkEditable *editable, gpointer user_data) |
void on_callentry_changed(GtkEditable *editable, gpointer user_data) |
168 |
{ |
{ |
169 |
gchar *call, *errorstr; |
gchar *call, *errorstr; |
170 |
|
|
171 |
call = gtk_editable_get_chars(GTK_EDITABLE(editable), 0 , -1); |
call = gtk_editable_get_chars(GTK_EDITABLE(editable), 0 , -1); |
172 |
|
|
173 |
updatedxccframe(call); |
updatedxccframe(call); |
174 |
if (GTK_WIDGET_VISIBLE(b4dialog)) g_print("visible\n"); else g_print("not visible\n"); |
updateb4dialog(call); |
175 |
|
|
176 |
/* twpsk support */ |
/* twpsk support */ |
177 |
if (state.shmid == -1) /* if no IPC ID yet, create one */ |
if (state.shmid == -1) /* if no IPC ID yet, create one */ |
178 |
{ |
{ |