Also, added api to allow an input method to internally handle
key press and release events in the GtkTextView and GtkEntry
cases.
This is simply a wrapper to the gtk_im_context_filter_keypress()
function, but It's added to not access the ->im_context
directly.
Based on a Christian Dywan patch
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=163251
Adds a 'model' type buffer for GtkEntry in which the actual
textual data is stored. GtkEntryBuffer can be subclassed.
Among other things, this allows GtkEntry to be used for secrets
that need to be stored in non-pageable memory. It also allows
buffers to be shared by entries.
See bug #576801.
* gtk/gtk.symbols:
* gtk/gtkentry.[hc]: Use the last chance to get the api right,
and rename things for consistency, requested by Murray Cumming.
In detail,
gtk_entry_get_stock -> gtk_entry_get_icon_stock
gtk_entry_get_pixbuf -> gtk_entry_get_icon_pixbuf
gtk_entry_get_gicon -> gtk_entry_get_icon_gicon
gtk_entry_get_storage_type -> gtk_entry_get_icon_storage_type
::prelight -> ::icon-prelight
::pixbuf-primary -> ::primary-icon-pixbuf
::stock-primary -> ::primary-icon-stock
::icon-name-primary -> ::primary-icon-name
::gicon-primary-> ::primary-icon-gicon
::storage-type-primary -> ::primary-icon-storage-type
::activatable->primary -> ::primary-icon-activatable
::sensitive-primary -> ::primary-icon-sensitive
(and similar for secondary properties)
svn path=/trunk/; revision=22134
2008-12-19 Cody Russell <bratsche@gnome.org>
Bug 85292 – add an icon to gtkentry
* gtk/gtkmarshalers.list: Add VOID:INT,BOXED
* tests/testentryicons.c: Initial icon entry test
* tests/Makefile.am: Add testentryicons
* gtk/gtkentry.[ch]: Add API for setting primary/secondary icons
and other features related to them.
svn path=/trunk/; revision=21914
2008-12-05 Michael Natterer <mitch@imendio.com>
Bug 546285 – Allow GtkEntry to draw progress
* gtk/gtkentry.[ch]: add new API similar to GtkProgressBar which
allows to set the entry's progress_fraction, its progress_pulse_step
and to let the entry's progress pulse.
* gtk/gtk.symbols: updated.
* tests/testgtk.c: add progress demo code to the "Entry" window.
svn path=/trunk/; revision=21846
2008-10-30 Michael Natterer <mitch@imendio.com>
* gtk/*.h: no need to include <gdk/gdk.h> in any widget header,
it's included via gtkwidget.h anyway.
svn path=/trunk/; revision=21732
2008-09-19 Carlos Garnacho <carlos@imendio.com>
Bug 83935 – GtkEntry's default invisible char should be U+25CF
* gtk/gtkentry.c (find_invisible_char) (gtk_entry_init): Find a
more suitable invisible char than '*' based on the used font.
(gtk_entry_class_init) (gtk_entry_set_property)
(gtk_entry_get_property): Add a "invisible-char-set" property.
(gtk_entry_unset_invisible_char): New function, needed now that the
default invisible char isn't fixed.
* gtk/gtkentry.h:
* gtk/gtk.symbols:
* docs/reference/gtk/gtk-sections.txt: Add the new function.
svn path=/trunk/; revision=21446
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-05-28 Michael Natterer <mitch@imendio.com>
* gtk/gtk*.h: whitespace cleanup: remove trailing whitespace and
excess newlines and sprinkled some newlines where needed. Zero
code or formatting changes included.
svn path=/trunk/; revision=20225
2008-05-28 Michael Natterer <mitch@imendio.com>
* gtk/gtk.h: define __GTK_H_INSIDE__ around including all other
headers.
* gtk/gtktypebuiltins.h.template
* gtk/gtkversion.h.in
* gtk/gtk*.h: add single-include guards that #error out if
GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
included individually.
* gtk/gtkprintbackend.h
* gtk/gtkprinter-private.h
* gtk/gtktextlayout.h
* gtk/gtktexttagprivate.h
* gtk/gtktexttypes.h
* gtk/gtktreedatalist.h: include <gtk/gtk.h> instead of individual
headers in these private or semi-private headers.
* gtk/gtkimmodule.h: also here because it's not in gtk.h.
* gtk/gtkpagesetupunixdialog.h
* gtk/gtkprinter.h
* gtk/gtkprintjob.h
* gtk/gtkprintunixdialog.h: likewise in the gtkunixprint headers.
* gtk/gtkclist.h
* gtk/gtkcombo.h
* gtk/gtkctree.h
* gtk/gtkfilesel.h
* gtk/gtkitemfactory.h
* gtk/gtklist.h
* gtk/gtklistitem.h
* gtk/gtkoldeditable.h
* gtk/gtkoptionmenu.h
* gtk/gtkpixmap.h
* gtk/gtkpreview.h
* gtk/gtksignal.h
* gtk/gtktipsquery.h: whenever possible, include only <gtk/gtk.h>
instead of individual headers in these deprecated headers. They
don't get included at all when GTK_DISABLE_DEPRECATED is defined,
so if an app needs them anyway, it must undef GTK_DISABLE_DEPRECATED
and include them individually, which should continue to work.
* gtk/gtkclist.c: include "gtkctree.h" because of the change
above.
svn path=/trunk/; revision=20221
2006-08-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentryprivate.h:
* gtk/gtkentry.c (_gtk_entry_effective_inner_border): Export
privately. Adjust all callers.
* gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use it
here to get the actual inner border. (#349429, Benjamin Berg)
2006-03-10 Michael Natterer <mitch@gimp.org>
* gtk/gtkentry.[ch]: applied refactored patch from maemo-gtk that
replaces the INNER_BORDER define by an "inner-border" style
property of type GtkBorder. Additionally, add an "inner-border"
object property plus API which allows to override any theme
border, to allow pixel-perfect positioning of entries for inline
editing. Fixes bug #333922.
* gtk/gtk.symbols: add the new public functions.
2005-03-20 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gtk/grk.symbols: Group symbols by header and source file.
* gtk/makegtkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegtkalias.pl -def
* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
this file.
* gtk/*.c: Include gtkalias.h after the other headers,
include gtkaliasdef.c at the bottom.
* gtk/*.h: Small cleanups.
2004-10-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentry.h:
* gtk/gtkentry.c:
* gtk/gtkentrycompletion.c:
* gtk/gtkspinbutton.c: Share the three copies of get_borders()
under the name _gtk_entry_get_borders(). (#116368, Owen Taylor)
Mon Aug 9 10:50:05 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentry.h: Add gtk_entry_layout_index_to_text_index()
and its inverse. The have always been exported and are meant
to be public.
Mon Aug 2 01:30:03 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.[hc]:
* gtk/gtkentry.[hc]: Add a new binding signal ::backspace,
bind it to the backspace key, and make it pay attention
to the Pango backspace_deletes_character
attribute. (#119891, Noah Levitt, patch by Theppitak
Karoonboonyanan)
Mon Mar 1 10:41:27 2004 Owen Taylor <otaylor@redhat.com>
Patch from Dov Grobgeld to implement auto-bidi-direction
for GtkTextView (#118543)
* gtk/gtktextbtree.[ch]: Resolve bidi base direction
for each line by propagating backwards/forwards as
necessary.
* gtk/gtktextlayout.[ch] gtk/gtktextview.c: Set the
bidi base direction for the ;ine with the cursor from
the keyboard direction. Add gtk_text_layout_set_keyboard_direction().
Mon Mar 1 10:31:11 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.[ch]: Implement auto-bidi-direction,
based on a patch from Dov Grobgeld. (#118540)
Sun Feb 29 22:01:49 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.[ch]: Add gtk_entry_set_alignment()
to allow right-aligned entries and a "xalign"
property. (#59799, patch from Egon Andersen and
Steffen Gutmann)
* gtk/gtkmisc.c (gtk_misc_class_init): Use improved
xalign property description here too.
* tests/testtext.c: UNDERLINE_ERROR test addition
from Nicolas Settons' patch.
Fri Jul 11 14:32:43 2003 Kristian Rietveld <kris@gtk.org>
Landing GtkTreeModelFilter and the completion code. (Test program
and documentation will follow next week).
* gtk/gtkcellayout.[ch], gtk/gtkentrycompletion.[ch],
gtk/gtktreemodelfilter.[ch], gtk/gtkentryprivate.h: new files.
* gtkentry.[ch]: added gtk_entry_{get,set}_completion, wrote
necessary code to hook up completion.
* gtktreeviewcolumn.c: made GtkTreeViewColumn implement the new
GtkCellLayout interface.
* gtkmarshalers.list: added BOOLEAN:OBJECT,BOXED.
* gtk/gtk.h, gtk/Makefile.am, po/POTFILES.in: all updated for the new
source files.
Sun Mar 3 14:26:33 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.[ch] (_gtk_get_insertion_cursor_gc):
Centralize lookup and caching of cursor GC's here.
* gtk/gtkentry.[ch] gtk/gtktextview.[ch] gtk/gtktextdisplay.c
gtk/gtklabel.c: Move to using _gtk_get_insertion_cursor_gc().
* gtk/gtkentry.c (gtk_entry_expose): Draw cursors
under the text, not over the text.
* gtk/gtkwidget.c (gtk_widget_class_init): add
a secondary-cursor-color property.
* gtk/gtkwidget.c (gtk_widget_class_init): Decrease
the default aspect ratio to 1/25 (0.04).
* tests/testgtkrc (bell_duration): Comment out
cursor color setting.
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
* gtk/gtktextmark.h: Fix a FIXME about G_CONST_RETURN.
2002-01-27 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.h (struct _GtkTextView): add mouse_cursor_obscured.
* gtk/gtkentry.h (struct _GtkEntry): Add mouse_cursor_obscured.
* gtk/gtktextview.c (set_invisible_cursor): New function.
(gtk_text_view_obscure_mouse_cursor): Likewise.
(gtk_text_view_key_press_event): Call obscure_cursor if text
has been inserted.
(gtk_text_view_motion_event): Restore the mouse cursor.
* gtk/gtkentry.c (gtk_entry_realize): Add GDK_POINTER_MOTION_MASK.
(set_invisible_cursor): New function.
(gtk_entry_obscure_mouse_cursor): Likewise.
(gtk_entry_key_press): call obscure_cursor if text has been inserted.
(gtk_entry_motion_notify): Restore the mouse cursor.
Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return
the currently selected column when we get the column, #64380
* gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc
to cancel CellRendererText editting, #63613
* gtk/gtkcellrenderertext.c: ditto
* gtk/gtkcellrenderertext.h: formatting changes
Wed Oct 3 23:47:25 Kristian Rietveld <kristian@planet.nl>
* gtk/gtkeditable.[ch]: move insert_text and delete_text virtual
functions to do_insert_text and do_delete_text, add signals
insert_text, delete_text and changed
* gtk/gtkentry.[ch]: remove signals insert_text, delete_text
and changed. Updates to match new situation.
* gtk/gtkspinbutton.c: updates to match new situation
* gtk/gtkoldeditable.h: remove signals changed, insert_text
and delete_text
* gtk/gtkoldeditable.c: updates to match new situation
* gtk/gtktext.c: updates to match new situation
Fixes bug #59803
Tue Sep 25 12:34:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkentry.c: Make a GtkCellEditable
(get_widget_window_size): Change to let it honor size_allocate
when a CellEditable.
* gtk/gtktreeview.c: M-x clean-line-ends. Lots of focus and
editable changes.
(gtk_tree_view_set_cursor): Now you can set the cursor
horizontally, as well as start editing.
* gtk/gtkstyle.c (gtk_default_draw_check): changing toggle drawing
code to look more like the other check buttons.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
Change the way we calculate cell size.
* gtk/gtkmarshal.list (VOID:STRING,STRING): new marshaller.
* demos/gtk-demo/sizegroup.c: Add mnemonics.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_get_size): Fix docs.
Fix logic.
* gtk/gtkcellrenderertext.c: Change to be editable.
* gtk/gtkcellrenderertoggle.c: Change to be activatable.
* test/testtreesort.c: Fix misspelling
* test/testreecolumns.c: Add mnemonics.
* test/testreeedit.c: New test program.
Thu Jul 19 14:24:34 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_set_positions): Fix
typo that sometimes caused selection not to work properly.
* gtk/gtkentry.c (gtk_entry_grab_focus): Select text in
entry when tabbing in. (#57743)
* gtk/gtkentry.c (gtk_entry_motion_notify): If the
user drags up above or down below the entry, move
to the end or the beginning of the entry. (Suggestion
from Jay Cox, #50940)
* gtk/gtkentry.c (gtk_entry_move_cursor): If we have
a current selection, then when moving by chars or
words, move to the end of the selection rather than
from entry->current_pos. (Suggestion from Jay Cox,
#50942)
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkentry.c (gtk_entry_class_init): add read-only
"scroll_offset" property for notification when the layout offsets
may have changed
(gtk_entry_adjust_scroll): add notify for scroll_offset
(gtk_entry_layout_index_to_text_index): function to compensate for
preedit string when doing coordinate stuff on the entry's layout
(gtk_entry_text_index_to_layout_index): inverse function
(gtk_entry_get_layout_offsets): hook to get current position of
the layout
(gtk_entry_get_layout): hook to get the layout itself.
* gtk/gtklabel.c (gtk_label_get_layout): new function
Wed May 30 15:56:30 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Validate
value from GDK settings against parameter spec.
* gdk/x11/gdkevents-x11.c (gdk_setting_get): Add assignments
to temporary values and use g_value_transform(), since
thinking that GValue was going to be easy or efficient
to use was, of course, a mistake.
* gtk/gtksettings.c: Add cursor blink setting.
* gdk/x11/gdkevents-x11.c: Add cursor blink X settings.
* gtk/gtkentry.c: Add cursor blinking.
* gtk/gtktextview.c (gtk_text_view_check_cursor_blink): Use
cursor blink global settings.
* gtk/gtkentry.c (gtk_entry_button_press): Add notification
for :text_position in places where it is missing.
Mon Apr 2 16:13:58 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkinvisible.c (gtk_invisible_style_set): Avoid
chaining up to parent impl, since we have a INPUT_ONLY
window.
* gtk/gtkentry.[ch]: Add a cursor_color property to set the
foreground color for the cursor.