32 |
* Compile with: gcc -lm -o wwl wwl.c |
* Compile with: gcc -lm -o wwl wwl.c |
33 |
* |
* |
34 |
* $Log$ |
* $Log$ |
35 |
|
* Revision 1.7 2003/08/13 19:21:14 pa4tu |
36 |
|
* fix locatorframe theming |
37 |
|
* |
38 |
* Revision 1.6 2003/08/10 16:48:48 fillods |
* Revision 1.6 2003/08/10 16:48:48 fillods |
39 |
* Added wwl_dist(), which computes distance in Km between 2 locators. |
* Added wwl_dist(), which computes distance in Km between 2 locators. |
40 |
* logfile/EDI needs such a function. |
* logfile/EDI needs such a function. |
264 |
updatelocatorframe (gchar * locator) |
updatelocatorframe (gchar * locator) |
265 |
{ |
{ |
266 |
gchar *label; |
gchar *label; |
267 |
GtkWidget *locatorframe, *locatorlabel1; |
GtkWidget *locatorframe, *framelabel, *locatorlabel; |
268 |
|
|
269 |
/* initialize */ |
/* initialize */ |
270 |
locatorframe = lookup_widget (mainwindow, "locatorframe"); |
locatorframe = lookup_widget (mainwindow, "locatorframe"); |
271 |
locatorlabel1 = lookup_widget (mainwindow, "locatorlabel1"); |
locatorlabel = lookup_widget (mainwindow, "locatorlabel1"); |
272 |
|
framelabel = gtk_frame_get_label_widget (GTK_FRAME(locatorframe)); |
273 |
label = g_strdup (""); |
label = g_strdup (""); |
274 |
gtk_frame_set_label (GTK_FRAME (locatorframe), "Locator"); |
gtk_label_set_text (GTK_LABEL (framelabel), "Locator"); |
275 |
|
|
276 |
if (strlen (locator) >= 2) |
if (strlen (locator) >= 2) |
277 |
{ |
{ |
278 |
label = wwl (preferences.locator, locator); |
label = wwl (preferences.locator, locator); |
279 |
g_ascii_strup (locator, -1); |
g_ascii_strup (locator, -1); |
280 |
} |
} |
281 |
gtk_frame_set_label (GTK_FRAME (locatorframe), locator); |
gtk_label_set_text (GTK_LABEL (framelabel), locator); |
282 |
gtk_label_set_text (GTK_LABEL (locatorlabel1), label); |
gtk_label_set_text (GTK_LABEL (locatorlabel), label); |
283 |
g_free (label); |
g_free (label); |
284 |
} |
} |