helpon porting gtk-1.2 to gtk-2.x
I had references to god web pages on this subject, but I have lost them. Can someone point me in the right direction? Tom Corner --- |\/\/\___/\/\/| Carol Anne Corner & \ o o / Thomas Corner [EMAIL PROTECTED] ) ( 30-Dec-2003 14:47:34 Vienna, Austria ( * * ) mailer: xfmail \___/ Web Page: www.corner.chello.at --- ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: helpon porting gtk-1.2 to gtk-2.x
On Tue, 2003-12-30 at 13:49, [EMAIL PROTECTED] wrote: > I had references to god web pages on this subject, but I have lost > them. Can someone point me in the right direction? Try: http://developer.gnome.org/dotplan/porting/ Keith. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
someone please answer, clearing text in a GtkTextView!
I have a GtkTextView in a window used for data entry into a database. The text typed in the view gets put in the database no problem, but once the data entry has occurred, I want to clear the view so that the next screen of data can be input. Looking through the API, there isn't a "set text" function for this view (per se) like the GtkEntry widgets, except in the GtkTextBuffer. The other funcition in that widget is gtk_text_buffer_delete, which I called but I'm getting an error. Here's the code I was using to get the buffer, then delete it: /* the GtkTextView in this window requires a bit of extra work to get the text value stored in it. */ specialView = lookup_widget(customers, "cust_instructions"); specialBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(specialView)); gtk_text_buffer_get_bounds(specialBuffer, &start, &end); gtk_text_buffer_delete(specialBuffer, &start, &end); But here's the error I'm getting when I try to do that: (dispatcher:1523): Gtk-WARNING **: Invalid text buffer iterator: either the iter ator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created. You must use marks, character numbers, or line numbers to preserve a position ac ross buffer modifications. You can apply tags and insert marks without invalidating your iterators, but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset) will invalidate all outstanding iterators (dispatcher:1523): Gtk-CRITICAL **: file gtktextbuffer.c: line 1297 (gtk_text_bu ffer_delete): assertion `gtk_text_iter_get_buffer (start) == buffer' failed Then it segfaults. So I tried the set text call like this: gtk_text_buffer_set_text(specialBuffer,"", 0); but that makes my app segfault as well. Can anyone help? -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom "Claiming that your operating system is the best in the world because more people use it is like saying McDonalds makes the best food in the world." ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
RE: someone please answer, clearing text in a GtkTextView!
What I did is gtk_text_buffer_set_text (pbuffer, "", -1); > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Carl B. Constantine > Sent: Tuesday, December 30, 2003 12:43 PM > To: [EMAIL PROTECTED] > Subject: someone please answer, clearing text in a GtkTextView! > > > I have a GtkTextView in a window used for data entry into a database. > The text typed in the view gets put in the database no problem, but once > the data entry has occurred, I want to clear the view so that the next > screen of data can be input. > > Looking through the API, there isn't a "set text" function for this view > (per se) like the GtkEntry widgets, except in the GtkTextBuffer. The > other funcition in that widget is gtk_text_buffer_delete, which I called > but I'm getting an error. > > Here's the code I was using to get the buffer, then delete it: > > /* the GtkTextView in this window requires a bit of extra work > to get the text value stored in it. > */ > > specialView = lookup_widget(customers, "cust_instructions"); > specialBuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(specialView)); > gtk_text_buffer_get_bounds(specialBuffer, &start, &end); > gtk_text_buffer_delete(specialBuffer, &start, &end); > > > But here's the error I'm getting when I try to do that: > > (dispatcher:1523): Gtk-WARNING **: Invalid text buffer iterator: either > the iter > ator is uninitialized, or the characters/pixbufs/widgets in the buffer > have been > modified since the iterator was created. > You must use marks, character numbers, or line numbers to preserve a > position ac > ross buffer modifications. > You can apply tags and insert marks without invalidating your iterators, > but any mutation that affects 'indexable' buffer contents (contents that > can be > referred to by character offset) > will invalidate all outstanding iterators > > (dispatcher:1523): Gtk-CRITICAL **: file gtktextbuffer.c: line 1297 > (gtk_text_bu > ffer_delete): assertion `gtk_text_iter_get_buffer (start) == buffer' > failed > > Then it segfaults. > > So I tried the set text call like this: > > gtk_text_buffer_set_text(specialBuffer,"", 0); > > but that makes my app segfault as well. > > Can anyone help? > > -- > .''`. Carl B. Constantine > : :' : [EMAIL PROTECTED] > `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 > `- Debian GNU/Linux -- The power of freedom > "Claiming that your operating system is the best in the world because > more > people use it is like saying McDonalds makes the best food in the > world." > ___ > gtk-list mailing list > [EMAIL PROTECTED] > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ > gtk-list mailing list > [EMAIL PROTECTED] > http://mail.gnome.org/mailman/listinfo/gtk-list > ___ > gtk-list mailing list > [EMAIL PROTECTED] > http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: someone please answer, clearing text in a GtkTextView!
"Carl B. Constantine" <[EMAIL PROTECTED]> writes: > I have a GtkTextView in a window used for data entry into a database. > The text typed in the view gets put in the database no problem, but once > the data entry has occurred, I want to clear the view so that the next > screen of data can be input. Do you want to clear the *view* (the GtkTextView) or the *model* (the GtkTextBuffer)? If the former, you want to remove the TextBuffer and replace it with a new one. If the latter, you just need to clear the buffer. Try something like: textbuffer.erase(textbuffer.start(), textbuffer.end()); for Gtkmm, or else for GTK+ (untested), try GtkTextIter start, end; gtk_text_buffer_get_start_iter(textbuffer, &start); gtk_text_buffer_get_end_iter(textbuffer, &end); gtk_textbuffer_delete(textbuffer, &start, &end); Both should have the same effect. HTH, Roger -- Roger Leigh Printing on GNU/Linux? http://gimp-print.sourceforge.net/ GPG Public Key: 0x25BFB848. Please sign and encrypt your mail. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
GTK under Windows
Hi.Could somebody expains me how to build and use GTK under Windows.It looks quite strange for me when I compare it with using in linux.I'd rather use MSVC to do this.Thank for your help in advance. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GTK under Windows
Hi, http://www.gimp.org/win32/http://www.dropline.net/gtk Please refer to these links...The dropline site has a forum with more info. Regards Sriram[EMAIL PROTECTED] wrote: Hi.Could somebody expains me how to build and use GTK under Windows.It looks quite strange for me when I compare it with using in linux.I'd rather use MSVC to do this.Thank for your help in advance.___gtk-list mailing list[EMAIL PROTECTED]http://mail.gnome.org/mailman/listinfo/gtk-list