1487 |
g_signal_connect(G_OBJECT(context.in_finds), "toggled", |
g_signal_connect(G_OBJECT(context.in_finds), "toggled", |
1488 |
G_CALLBACK(callback_finds_toggled), &context); |
G_CALLBACK(callback_finds_toggled), &context); |
1489 |
|
|
1490 |
#ifndef USE_MAEMO |
context.spinner = number_editor_new(appdata->search_days, 0, 99); |
|
GtkObject *adj = gtk_adjustment_new(appdata->search_days, 0, 99, 1, 10, 10); |
|
|
context.spinner = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1, 0); |
|
|
#else |
|
|
context.spinner = hildon_number_editor_new(0, 99); |
|
|
hildon_number_editor_set_value(HILDON_NUMBER_EDITOR(context.spinner), |
|
|
appdata->search_days); |
|
|
#endif |
|
1491 |
gtk_box_pack_start_defaults(GTK_BOX(hbox), context.spinner); |
gtk_box_pack_start_defaults(GTK_BOX(hbox), context.spinner); |
1492 |
|
|
1493 |
gtk_box_pack_start_defaults(GTK_BOX(hbox), gtk_label_new(_("days"))); |
gtk_box_pack_start_defaults(GTK_BOX(hbox), gtk_label_new(_("days"))); |
1494 |
|
|
1495 |
gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox); |
gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox); |
1507 |
if(strlen(p) > 0) |
if(strlen(p) > 0) |
1508 |
appdata->search_str = strdup(p); |
appdata->search_str = strdup(p); |
1509 |
|
|
1510 |
#ifndef USE_MAEMO |
appdata->search_days = number_editor_get_value(context.spinner); |
|
appdata->search_days = gtk_spin_button_get_value_as_int( |
|
|
GTK_SPIN_BUTTON(context.spinner)); |
|
|
#else |
|
|
appdata->search_days = hildon_number_editor_get_value( |
|
|
HILDON_NUMBER_EDITOR(context.spinner)); |
|
|
#endif |
|
1511 |
|
|
1512 |
if(check_button_get_active(context.in_finds)) |
if(check_button_get_active(context.in_finds)) |
1513 |
appdata->search |= SEARCH_FINDS; |
appdata->search |= SEARCH_FINDS; |
1543 |
printf("Search for %s (flags = %x)...\n", p, appdata->search); |
printf("Search for %s (flags = %x)...\n", p, appdata->search); |
1544 |
|
|
1545 |
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
#if !defined(USE_BREAD_CRUMB_TRAIL) && !defined(BCT) |
1546 |
gpx_t *found = |
|
1547 |
search_do(appdata, appdata->gpx, p, appdata->search, FALSE); |
if(appdata->cur_gpx) |
1548 |
|
appdata->search_results = |
1549 |
|
search_do(appdata, appdata->cur_gpx, p, appdata->search, TRUE); |
1550 |
|
else |
1551 |
|
appdata->search_results = |
1552 |
|
search_do(appdata, appdata->gpx, p, appdata->search, FALSE); |
1553 |
|
|
1554 |
/* do search result dialog here ... */ |
/* do search result dialog here ... */ |
1555 |
cachelist_dialog(appdata, found); |
cachelist_dialog(appdata, appdata->search_results); |
1556 |
|
|
1557 |
#ifndef USE_STACKABLE_WINDOW |
#ifndef USE_STACKABLE_WINDOW |
1558 |
search_result_free(found); |
search_result_free(appdata->search_results); |
1559 |
#else |
appdata->search_results = NULL; |
|
appdata->search_results = found; |
|
1560 |
#endif |
#endif |
1561 |
#else |
#else |
1562 |
gpx_t *found = NULL; |
gpx_t *found = NULL; |