Re: need help in looping many times...
On Tue, Jan 24, 2012 at 11:11:34AM -0700, Michael Torrie wrote: > Date: Tue, 24 Jan 2012 11:11:34 -0700 > From: Michael Torrie > Subject: Re: need help in looping many times... > To: gtk-app-devel-list@gnome.org > > On 01/24/2012 07:27 AM, John Coppens wrote: > > Wouldn't it be easier to simply add an editor window to your program? > > Use for example, the GtkTextView widget. You won't have to spawn > > external editors, and always have the text available. > > You can even implement cut/copy/paste, re-use recent text, etc. > > > > Also, you launch the reproduction as a thread, and permit editing while > > permitting edition. > > Thread or process, it doesn't matter. GTK's g_spawn_async can do the job. > > As for the first, as Gary explained to me, whatever editor he uses has > to be able to expand abbreviations. He can only type slowly, and > automatic abbreviations can speed up his typing dramatically. He > already has a nice system in vim that works for him, so he wanted to use > that here. GtkTextView does not have completion capabilities. However > GtkSourceView does. I've written a demo program for Gary that does use > GtkSourceCompletion to do the abbreviations. Another option is to embed > a vim widget (Pida embeds gvim somehow) somehow, if he's got to remain > with vim. the reason for sticking with gvim or kate [which is another vi-like editor] or another fork-able editor--the reason is that i'm assuming the user cannot speak--for w hatever reason--and the cleanly spawned editor would give him a change to reply to whomever he was talking to. he wouldn't have to clear the screen of his last-typed words: Example using a small laptop: >> hi, i'm jon. i'm looking for a book on the computer programming language 'python.' the sales cleark says something; maybe she points somewhere. >> you mean at the end on the left? the clerk responds. offers to show jon the computer books section. >> Super! thanks. [[jon closes his netbook and follows the clerk. ]] End example. there are an endless number of ways this gtk app could be used to assist people who have trouble communicating verbally. it might be helpful for people recovering from strokes who =know= what they want to say but who's brain and vocal cords have temporarily lost the ability to sync up. they may be able to use this application to help them remember more quickly. this may be my chance to learn python, :) i know what i need to code, just not the intricacies of gtk {yet!} finally, altho i want to add the std menubar with [File], [Edit], [HElp], etc. , one major thought is simplicity. i like the KISS paradigm: 'keep it simple, sir'. i've talked to the educational One Laptop Per Child org. their $100 laptop is for the non-expert. children from grade school up. gary > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix Journey Toward the Dawn, E-Book: http://www.thought.org The 8.57a release of Jottings: http://jottings.thought.org Twenty-five years of service to the Unix community. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On 01/24/2012 07:27 AM, John Coppens wrote: > Wouldn't it be easier to simply add an editor window to your program? > Use for example, the GtkTextView widget. You won't have to spawn > external editors, and always have the text available. > You can even implement cut/copy/paste, re-use recent text, etc. > > Also, you launch the reproduction as a thread, and permit editing while > permitting edition. Thread or process, it doesn't matter. GTK's g_spawn_async can do the job. As for the first, as Gary explained to me, whatever editor he uses has to be able to expand abbreviations. He can only type slowly, and automatic abbreviations can speed up his typing dramatically. He already has a nice system in vim that works for him, so he wanted to use that here. GtkTextView does not have completion capabilities. However GtkSourceView does. I've written a demo program for Gary that does use GtkSourceCompletion to do the abbreviations. Another option is to embed a vim widget (Pida embeds gvim somehow) somehow, if he's got to remain with vim. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On Mon, 23 Jan 2012 18:17:41 -0800 Gary Kline wrote: > right now, the user has to click and wait for gvim to spawn before > he can type. how can i code this so that the editor pops up over > and over *while waiting for the user to type.* if the user typed > nothing, the program would pause. > Wouldn't it be easier to simply add an editor window to your program? Use for example, the GtkTextView widget. You won't have to spawn external editors, and always have the text available. You can even implement cut/copy/paste, re-use recent text, etc. Also, you launch the reproduction as a thread, and permit editing while permitting edition. John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On Mon, Jan 23, 2012 at 08:59:40PM -0700, Michael Torrie wrote: > Date: Mon, 23 Jan 2012 20:59:40 -0700 > From: Michael Torrie > To: gtk-app-devel-list@gnome.org > Subject: Re: need help in looping many times... > > On 01/23/2012 08:49 PM, Michael Torrie wrote: > > On 01/23/2012 07:17 PM, Gary Kline wrote: > >> vbc.tgz is enclosed; find someplace to save it, untar and make the > >> 'vbc' binary. > > > > Unfortunately the attachment seems to have been filtered out by the > > mailing list. Can you post it on our web site somewhere perhaps and > > post a link here? > > Meant to say, post it on your web site. yeah; forgot about the filter. I just stuck it in: http://www.thought.org/vbc I checked; it's there. but the fact that *I* can grab it doesn't necessarily mean that others can, so would you please let me know if you can retrieve it? gary why are all my I's -> caps? oh, I'm writing from my server. I've got the vi/vim abbrev stuff partly set up on ethic. > > Or if it's a single file, you can post the code somewhere like > http://pastie.org/ and send us the link. If it's a single source code > file that would work. > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix The 7.98a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org server ethic ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On 01/23/2012 08:49 PM, Michael Torrie wrote: > On 01/23/2012 07:17 PM, Gary Kline wrote: >> vbc.tgz is enclosed; find someplace to save it, untar and make the >> 'vbc' binary. > > Unfortunately the attachment seems to have been filtered out by the > mailing list. Can you post it on our web site somewhere perhaps and > post a link here? Meant to say, post it on your web site. Or if it's a single file, you can post the code somewhere like http://pastie.org/ and send us the link. If it's a single source code file that would work. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: need help in looping many times...
On 01/23/2012 07:17 PM, Gary Kline wrote: > vbc.tgz is enclosed; find someplace to save it, untar and make the > 'vbc' binary. Unfortunately the attachment seems to have been filtered out by the mailing list. Can you post it on our web site somewhere perhaps and post a link here? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
need help in looping many times...
thanks to a slew of you guys assistance, i have the beginnings of a gtk written in C. i'm into my 6th week of this and keep getting ideas from a few on this this. vbc.tgz is enclosed; find someplace to save it, untar and make the 'vbc' binary. the button i have a question about it labeled "Run Text-To-Speech". since this program is for people whose speech is impaired [or lost] and ==can== type, the user click the Run button. you need gvim and espeak to make things work. After clicking Run, gvim will open a GUI editor. the user who needs help speaking simply types what he wants to say, then hit [ESC] and :x. the computer then speaks whatever he had typewritten. right now, the user has to click and wait for gvim to spawn before he can type. how can i code this so that the editor pops up over and over *while waiting for the user to type.* if the user typed nothing, the program would pause. i actually did this is a separate function several days ago, but the main window always went grey after about three invocations of gvim. i am assuming the gvim [or kate or kwrite--any editor] must be called from a callback; i'm just not sure why. michael torrie and at least one other suggested that i use the while(gtk_events_pending) iteration loop. that may be the magic code ... or maybe not! if the speech-impaired user lost his voice to laryngeal cancer or deafness---in other words, cannot speak at all, then maybe he is shy and having to click-and-speak is no big deal. but what if you have your laptop with you and run into old friends. there could be hundreds of type-and-speak times. that could cause shoulder pain in moving from mouse to keyboard and back. then the idea of the automatic editor popup occurred. tia, of course, for any insights. the more i learn about gtk, the more i see how advanced it is over XAw, the athena toolkit that i used years ago, :) gary -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix Journey Toward the Dawn, E-Book: http://www.thought.org The 8.57a release of Jottings: http://jottings.thought.org Twenty-five years of service to the Unix community. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list