Applied patch from <lupus@lettere.unipd.it> which adds

Sat Jan 17 13:26:15 CST 1998 Shawn T. Amundson <amundson@gimp.org>

        * gtk/gtkentry.[ch]:  Applied patch from <lupus@lettere.unipd.it>
          which adds gtk_entry_set_max_length function.  This was
          part of gtk-lupus-970112-0.

        * gtk/testgtk.c: Applied gtk-wille-980113-0 which fixes
          a problem with a shaped widget keeping grab forever
          when double clicked.

        * docs/gtk.texi: patch from Gregory McLean <gregm@randomc.com>
          to add some on aspect_frame, button_box, and color_selection
          widgets
This commit is contained in:
CST 1998 Shawn T. Amundson
1998-01-17 22:48:31 +00:00
committed by Shawn Amundson
parent 8d721e5b75
commit 2e99581612
13 changed files with 561 additions and 24 deletions

View File

@ -1764,7 +1764,7 @@ gtk_real_entry_insert_text (GtkEntry *entry,
new_text_length = entry->text_max_length - entry->text_length;
/* Don't insert anything, if there was nothing to insert. */
if (new_text_length == 0)
if (new_text_length <= 0)
return;
start_pos = *position;
@ -2109,3 +2109,12 @@ gtk_entry_paste_clipboard (GtkEntry *entry, GdkEventKey *event)
gtk_selection_convert (GTK_WIDGET(entry),
clipboard_atom, ctext_atom, event->time);
}
void
gtk_entry_set_max_length (GtkEntry *entry, guint16 max)
{
g_return_if_fail (entry != NULL);
g_return_if_fail (GTK_IS_ENTRY (entry));
entry->text_max_length = max;
}