Commit 2e995816 authored by CST 1998 Shawn T. Amundson's avatar CST 1998 Shawn T. Amundson Committed by Shawn Amundson
Browse files

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
parent 8d721e5b
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
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
......
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
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
......
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
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
......
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
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
......
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
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
......
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
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
......
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
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
......
Makefile
Makefile.in
*.info*
*.dvi
*.ps
*.pg
*.ky
*.cp
*.fn
*.tp
*.vr
*.log
*.aux
*.toc
*.cps
*.fns
*.vrs
This diff is collapsed.
......@@ -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;
}
......@@ -97,6 +97,10 @@ void gtk_entry_set_visibility (GtkEntry *entry,
void gtk_entry_set_editable (GtkEntry *entry,
gboolean editable);
/* If entry->text is already > max it's up to you to change it */
void gtk_entry_set_max_length (GtkEntry *entry,
guint16 max);
#ifdef __cplusplus
}
......
......@@ -2736,12 +2736,17 @@ static GtkWidget *rings = NULL;
typedef struct _cursoroffset {gint x,y;} CursorOffset;
static void
shape_pressed (GtkWidget *widget)
shape_pressed (GtkWidget *widget, GdkEventButton *event)
{
CursorOffset *p;
/* ignore double and triple click */
if (event->type != GDK_BUTTON_PRESS)
return;
p = gtk_object_get_user_data (GTK_OBJECT(widget));
gtk_widget_get_pointer (widget, &(p->x), &(p->y));
p->x = (int) event->x;
p->y = (int) event->y;
gtk_grab_add (widget);
gdk_pointer_grab (widget->window, TRUE,
......
......@@ -2736,12 +2736,17 @@ static GtkWidget *rings = NULL;
typedef struct _cursoroffset {gint x,y;} CursorOffset;
static void
shape_pressed (GtkWidget *widget)
shape_pressed (GtkWidget *widget, GdkEventButton *event)
{
CursorOffset *p;
/* ignore double and triple click */
if (event->type != GDK_BUTTON_PRESS)
return;
p = gtk_object_get_user_data (GTK_OBJECT(widget));
gtk_widget_get_pointer (widget, &(p->x), &(p->y));
p->x = (int) event->x;
p->y = (int) event->y;
gtk_grab_add (widget);
gdk_pointer_grab (widget->window, TRUE,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment