38 |
#define SAT_WIDTH 330 |
#define SAT_WIDTH 330 |
39 |
#define SAT_HEIGHT 60 |
#define SAT_HEIGHT 60 |
40 |
|
|
41 |
|
#ifdef ESPEAK |
42 |
|
|
43 |
|
#endif |
44 |
|
|
45 |
static float rad2deg(float rad) { |
static float rad2deg(float rad) { |
46 |
return fmodf(360.0 + (180.0/M_PI) * rad, 360.0); |
return fmodf(360.0 + (180.0/M_PI) * rad, 360.0); |
47 |
} |
} |
481 |
goto_update(context); |
goto_update(context); |
482 |
} |
} |
483 |
|
|
484 |
|
#ifdef ESPEAK |
485 |
|
static void espeak_clicked(GtkWidget *widget, gpointer data) { |
486 |
|
appdata_t *appdata = (appdata_t*)data; |
487 |
|
|
488 |
|
GtkWidget *icon = gtk_button_get_image(GTK_BUTTON(widget)); |
489 |
|
gtk_widget_destroy(icon); |
490 |
|
appdata->espeak.enabled = !appdata->espeak.enabled; |
491 |
|
gtk_button_set_image(GTK_BUTTON(widget), icon_get_widget(ICON_MISC, |
492 |
|
appdata->espeak.enabled?6:7)); |
493 |
|
} |
494 |
|
#endif |
495 |
|
|
496 |
GtkWidget *goto_cache(cache_context_t *context) { |
GtkWidget *goto_cache(cache_context_t *context) { |
497 |
int i; |
int i; |
498 |
|
|
580 |
|
|
581 |
gtk_box_pack_start(GTK_BOX(ihbox), context->gotoc.sat_area, 1,0,0); |
gtk_box_pack_start(GTK_BOX(ihbox), context->gotoc.sat_area, 1,0,0); |
582 |
|
|
583 |
|
#ifdef ESPEAK |
584 |
|
GtkWidget *ivbox = gtk_vbox_new(FALSE, 0); |
585 |
|
GtkWidget *button = button_new(); |
586 |
|
gtk_button_set_image(GTK_BUTTON(button), icon_get_widget(ICON_MISC, |
587 |
|
context->appdata->espeak.enabled?6:7)); |
588 |
|
gtk_signal_connect (GTK_OBJECT(button), "clicked", |
589 |
|
GTK_SIGNAL_FUNC(espeak_clicked), context->appdata); |
590 |
|
if(context->appdata->espeak.sample_rate < 0) |
591 |
|
gtk_widget_set_sensitive(button, FALSE); |
592 |
|
|
593 |
|
gtk_box_pack_start(GTK_BOX(ivbox), button, 1,0,0); |
594 |
|
gtk_box_pack_start(GTK_BOX(ihbox), ivbox, 1,0,0); |
595 |
|
#endif |
596 |
|
|
597 |
gtk_table_attach_defaults(GTK_TABLE(table), ihbox, 0,3,5,6); |
gtk_table_attach_defaults(GTK_TABLE(table), ihbox, 0,3,5,6); |
598 |
|
|
599 |
/* ------------------------------------------------------- */ |
/* ------------------------------------------------------- */ |