Re: gtk_text_buffer_delete ?

2015-10-09 Thread Liam R E Quin
On Thu, 08 Oct 2015 20:59:21 +0200 Stefan Salewski wrote: > I was hoping that it could be possible to simple block input when buffer > has a maximum length, but I got that not working. Note that this can give an unpleasant user experience. It might be more helpful just to

Re: gtk_text_buffer_delete ?

2015-10-08 Thread Pierre Wieser
> - Original Message - >> From: "Stefan Salewski" >> Sent: Wednesday, October 7, 2015 7:36:05 PM > >> On Wed, 2015-10-07 at 13:14 +0200, Pierre Wieser wrote: >>> I so connected to the 'changed' signal of the GtkTextBuffer, >> >> Maybe try connecting to insert-text

Re: gtk_text_buffer_delete ?

2015-10-08 Thread Stefan Salewski
On Thu, 2015-10-08 at 10:30 +0200, Pierre Wieser wrote: > Oop's. Sorry ! I've clicked on the bad button !! Yes, it is sad that this trivial task is so hard, and that no one can really help. I was hoping that it could be possible to simple block input when buffer has a maximum length, but I got

gtk_text_buffer_delete ?

2015-10-07 Thread Pierre Wieser
, start=%d, end=%d", thisfn, count, gtk_text_iter_get_offset( ), gtk_text_iter_get_offset( )); gtk_text_buffer_delete( buffer, , ); in = FALSE; } } } As stated in the comment, the code works (the size if actually

Re: gtk_text_buffer_delete ?

2015-10-07 Thread Pierre Wieser
> On the application I'm currently working on [1], I want limit the size of the > [...] I omit the application link, for reference ;) [1] https://github.com/trychlos/openbook/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: gtk_text_buffer_delete ?

2015-10-07 Thread Jim Charlton
count=%d, start=%d, end=%d", thisfn, count, gtk_text_iter_get_offset( ), gtk_text_iter_get_offset( )); gtk_text_buffer_delete( buffer, , ); in = FALSE; } } } As stated in the

Re: gtk_text_buffer_delete ?

2015-10-07 Thread Stefan Salewski
On Wed, 2015-10-07 at 13:14 +0200, Pierre Wieser wrote: > Hello, > > On the application I'm currently working on [1], I want limit the size > of the > text entered in a GtkTextBuffer to those saved in the DBMS, so 4096 > chars. Seen that: http://www.gtkforums.com/viewtopic.php?t=1012 Very

Re: gtk_text_buffer_delete ?

2015-10-07 Thread Stefan Salewski
On Wed, 2015-10-07 at 13:14 +0200, Pierre Wieser wrote: > I so connected to the 'changed' signal of the GtkTextBuffer, Maybe try connecting to insert-text signal -- changed signal may be emitted again when you delete. See http://stackoverflow.com/questions/2791035/how-do-i-set-buffer-limit-for

Re: gtk_text_buffer_delete ?

2015-10-07 Thread Pierre Wieser
On Wed, 2015-10-07 at 15:05 +0200, Stefan Salewski wrote: > On Wed, 2015-10-07 at 13:14 +0200, Pierre Wieser wrote: >> Hello, >> >> On the application I'm currently working on [1], I want limit the size >> of the >> text entered in a GtkTextBuffer to those saved in the DBMS, so 4096 >> chars.