wedged on enclosed with arrow code
- From: Gary Kline <kline thought org>
- To: gtk-app <gtk-app-devel-list gnome org>
- Subject: wedged on enclosed with arrow code
- Date: Thu, 24 Jul 2014 14:37:16 -0700
well, after racking up somewhere in the neighborhood of 25 hours,
I'm stuck. the snippet below is from my *voice* code.
this program is in the Accessibility category and intended for the
users who are speech-impaired. the others can presumable speak and
hear normally.
every sentence/word/paragraph the impaired user types is stored in
/usr/share/voice. lets assume that the user had a laptop or tablet
and meets with his friends at a starbucks. before long, the textfiles
in /usr/share/voice {{*may*}} run into the scores. just in case
somebody asks the user to re-read or re-play something he said before
I want the user to be able to arrow-up or -down until he finds the
misunderstood text string.
right now, most of my program works. I use gvim with a simple set of
instructions; the program uses espeak and aplay to voice what is typed.
the problem is if there are more than a few strings to search. (each
"filename" opens a separate gvim. there are Next, Prev, Play, Quit
buttons on each gvim. searching thru many typewritten entries can get
messy.) Having a separate button without a gvim would be far easier.
/* from voice.c */
filename = g_build_filename (vhome, ifbuf, NULL);
infile = fopen (filename, "r");
if (infile)
{
while (1)
{
nchars = fread (file_buff, 1, MAXCHAT, infile);
gtk_text_buffer_insert (buffer, &iter, file_buff, nchars);
if (nchars < MAXCHAT)
break;
}
fclose (infile);
}
else
{
g_print ("\nERROR! could not open %s\n", filename);
}
hope this makes sense!
--
Gary Kline kline thought org http://www.thought.org Public Service Unix
Twenty-eight years of service to the Unix community.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]