appened to this main is Part....
- From: Gary Kline <kline thought org>
- To: Gnome Accessibility List <gnome-accessibility-list gnome org>, GTK Devel List <gtk-app-devel-list gnome org>
- Subject: appened to this main is Part....
- Date: Sun, 22 Jan 2012 13:15:52 -0800
here in the 2nd button that runs the editor increases the
file[N].txt count, and voices what the user typed.
how can do do this is an endless loop so that user doesn't
have the stress of moving fingers from keyboard to mouse
each time? it can bed an infinite loop or something large
like 100 to 500 typings; i'm assuming this would be some
serious discussing.
thanks for any insights.
gary
ps: i'm thinking of having two horiz buttons: one for a
click-at-a-time, and the other for chat endlessly....
OH: and another that would end the chat wsithout Quit'ing
the app.
Appended: run__button_click_cb()
--
Gary Kline kline thought org http://www.thought.org Public Service Unix
void
run_button_click_cb (GtkButton * button)
{
extern int counter;
gboolean matchWithinString(char *argument, char *pattern);
gchar *editString = EDITCMD; // gvim -c startinsert
extern char voice[];
int done = FALSE, fret,i, sret;
extern char titlebuffer[];
memset (&titlebuffer, 0, sizeof titlebuffer);
gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE);
sprintf(accessbuf, "%s%s", VBCPATH, ifbuf);
sprintf(editcmd, "%s %s", editString, accessbuf);
system(editcmd ); //run_button_cb
gtk_widget_set_sensitive (GTK_WIDGET (button), TRUE);
chdir(VBCPATH);
while (done == 0)
{
if ((fret = file_exist(accessbuf))) // accessbuf is /home/kline./VBC/talk.[N].txt
{
done = 1;
}
else
{
continue;
}
}
done = 0;
sprintf(voice, "%s %s %s %s %s -f %s %s | %s", ESPEAK, A1,PITCH,SPEED,LANG, ifbuf,OUT,APLAY);
while (!done)
{
sret = system(voice);
if (sret != 0)
{
done = 0;
}
else
{
done = 1;
}
}
counter++; // inc talk.[N].txt to talk[N+1].txt
/*
Update label to show updated counter
*/
if (prefix)
{
sprintf (ifbuf, "%s%c%d%s", prefix, DOT, counter, suffix);
}
else
{
sprintf (ifbuf, "%d%s", counter, suffix);
//fprintf (stdout, "\nDEBUG: internsl filename = [%s]\n", ifbuf);
}
update_label ();
if (counter >= 1)
{
if (prefix)
{
g_snprintf (titlebuffer, 1023, "<span foreground=\"red\" background=\"yellow\"size=\"x-large\">%s%c%d%s</span>", prefix, DOT, counter, suffix);
}
else
{
g_snprintf (titlebuffer, 1023, "<span foreground=\"red\" background=\"yellow\" size=\"x-large\">%d%s</span>", counter, suffix); }
gtk_label_set_markup (GTK_LABEL (label), titlebuffer);
}
//gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]