Skip to content

Instantly share code, notes, and snippets.

@bert
Created December 19, 2009 14:48
Show Gist options
  • Save bert/260106 to your computer and use it in GitHub Desktop.
Save bert/260106 to your computer and use it in GitHub Desktop.
GTK entry insert text comment snippet
/*!
* \file gtk_entry_insert_text_comment.c
* \brief
*
* The algorithms here will work as long as the text size (a
* multiple of 2), fits into a guint16. We specify a shorter
* maximum length so that if the user pastes a very long text, there
* is not a long hang from the slow X_LOCALE functions.
*/
if (entry->text_max_length == 0)
max_length = 2047;
else
max_length = MIN (2047, entry->text_max_length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment