Commit Graph

108 Commits

Author SHA1 Message Date
Matthias Clasen
88623b98a7 Allow to populate bubbles with extra content
We do this by making the ::populate-popup signals a little more
flexible. They used to just accept a GtkMenu as argument, now
they can take a menu or a toolbar. To not break the expectations
of existing callbacks, we only emit ::populate-popup with a toolbar
if the :populate-toolbar property is TRUE.
2013-03-05 16:48:00 -05:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Paolo Borelli
afd99d3579 Make spinbutton orientable
https://bugzilla.gnome.org/show_bug.cgi?id=683168
2012-09-03 11:45:51 -04:00
Matthias Clasen
1ac2982265 Allow setting Pango attributes on entries
This is useful to adjust the weight or scale of the text.
2012-08-31 15:09:55 -04:00
Matthias Clasen
eaaee081b1 GtkEntry: Add input purpose and hints
Add input-purpose and input-hints properties to GtkEntry,
and pass these on to GtkIMContext.

https://bugzilla.gnome.org/show_bug.cgi?id=651244
2012-08-20 18:54:21 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
2c25bd85b8 gtk: Use versioned deprecations
This patch changes all uses of GDK_DEPRECATED(_FOR) in gtk headers
by the versioned variants, GDK_DEPRECATED_IN_3_x(_FOR). At the same
time, we add GDK_AVAILABLE_IN_3_x annotations for all API additions
in 3.2 and 3.4.
2012-02-27 07:11:43 -05:00
Cosimo Cecchi
2cbe088674 entry: deprecate inner-border and gtk_entry_get/set_inner_border()
They're unused in GTK now and have suitable replacements in the CSS
properties.
2012-01-31 10:04:27 -05:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Carlos Garcia Campos
ef061c4e96 gtkentry: Add hinting to GtkEntry
gtk_entry_set_placeholder_text() makes the entry display the given text
when it is empty and unfocused. Based on previous patch by Alberto
Garcia.

https://bugzilla.gnome.org/show_bug.cgi?id=440963
2011-03-21 09:37:37 +01:00
Javier Jardón
c4be956473 gtkentry: move public members to private structure 2010-11-19 08:38:12 +01:00
Javier Jardón
0e0c4ee129 docs: move documentation to inline comments: GtkEntry 2010-11-05 20:49:20 +01:00
Michael Natterer
ba9efeda4b gtk: add gtk_entry_get_text_area() and gtk_entry_get_icon_area()
as replacement for the removed get_foo_window() functions, so draw()
callbacks can figure where to paint.
2010-10-22 14:48:08 +02:00
Matthias Clasen
596da84312 Make GtkEntry a no-window widget
Use input-only windows for capturing input, and just draw onto
the parent window. This allows themes to make entries with rounded
corners. Patch by Boram Park.

https://bugzilla.gnome.org/show_bug.cgi?id=632736
2010-10-21 13:17:33 +02:00
Matthias Clasen
4824a73084 Add padding to class structs 2010-10-19 19:07:36 +02:00
Matthias Clasen
29aa3818a4 Remove deprecated text and text_length field in GtkEntry
These fields have been superseded by GtkEntryBuffer.
2010-08-28 22:27:36 -04:00
Matthias Clasen
77d4d3cdae Merge branch 'gtk-2-90'
Conflicts:
	gtk/gtkentry.h
2010-05-06 22:55:02 -04:00
Javier Jardón
713f2b638e Use event instead key in the previous patch 2010-05-05 04:06:17 +02:00
Javier Jardón
7692a427a6 Added api to reset the im context in GtkTextView and GtkEntry
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
2010-05-05 03:14:28 +02:00
Javier Jardón
244ed9aec7 Restore gtk_entry_get_icon_window() again 2010-05-03 01:51:21 +02:00
Michael Natterer
5e29973773 Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDES
...and disallow inclusion of individual files unconditionally.
2010-05-03 01:51:18 +02:00
Christian Dywan
90d514a8a5 Remove deprecated GtkEntry functions 2010-05-03 01:51:18 +02:00
Michael Natterer
2f9c4be0a8 Bug 607778 - Add accessors for GtkEntry's windows
Add gtk_entry_get_text_window() and get_icon_window() so we can
distinguigh them in expose-event callbacks.
2010-01-22 17:20:01 +01:00
Stef Walter
eab02f697a GtkEntryBuffer holds text for GtkEntry
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.
2009-07-08 20:41:53 -05:00
Matthias Clasen
92019f40eb Add properties and getters for icon tooltips.
* gtk/gtk.symbols:
        * gtk/gtkentry.[hc]: Add properties and getters for icon tooltips.


svn path=/trunk/; revision=22139
2009-01-18 20:22:10 +00:00
Matthias Clasen
85efb2bb61 Use the last chance to get the api right, and rename things for
* 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
2009-01-18 16:07:00 +00:00
Cody Russell
d6ca973cab Bug 85292 – add an icon to gtkentry
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-19 17:44:56 +00:00
Michael Natterer
9b59889847 Bug 546285 – Allow GtkEntry to draw progress
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-12-05 11:31:30 +00:00
Michael Natterer
7c0e3091fe gtk/gtkcellrenderertext.h gtk/gtkentry.[ch] gtk/gtkimcontext.h
2008-10-30  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkcellrenderertext.h
	* gtk/gtkentry.[ch]
	* gtk/gtkimcontext.h
	* gtk/gtklabel.c
	* gtk/gtkstyle.h: <pango/pango.h> is pulled in by <gdk/gdk.h>,
	remove its inclusion here.


svn path=/trunk/; revision=21735
2008-10-30 18:38:06 +00:00
Michael Natterer
e7b18d2a61 no need to include <gdk/gdk.h> in any widget header, it's included via
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-10-30 15:58:06 +00:00
Carlos Garnacho
ee06ce951b Bug 83935 – GtkEntry's default invisible char should be U+25CF
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-09-19 13:45:07 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
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-06-30 23:01:56 +00:00
Tim Janik
cd19149ad5 Switch to "guint GSEAL (foo) : width;" when packing fields in guints.
* gtk/gtkbox.h:
* gtk/gtkbutton.h:
* gtk/gtkcellrenderer.h:
* gtk/gtkcellrenderertext.h:
* gtk/gtkcheckmenuitem.h:
* gtk/gtkcontainer.h:
* gtk/gtkentry.h:
* gtk/gtkhandlebox.h:
* gtk/gtkimcontextsimple.h:
* gtk/gtklabel.h:
* gtk/gtkliststore.h:
* gtk/gtkmenu.h:
* gtk/gtkmenuitem.h:
* gtk/gtkmenushell.h:
* gtk/gtknotebook.h:
* gtk/gtkpaned.h:
* gtk/gtkplug.h:
* gtk/gtkprintjob.h:
* gtk/gtkprogressbar.h:
* gtk/gtkrange.h:
* gtk/gtkscale.h:
* gtk/gtkscrolledwindow.h:
* gtk/gtksizegroup.h:
* gtk/gtksocket.h:
* gtk/gtkspinbutton.h:
* gtk/gtkstatusbar.h:
* gtk/gtktable.h:
* gtk/gtktearoffmenuitem.h:
* gtk/gtktextbuffer.h:
* gtk/gtktextview.h:
* gtk/gtktogglebutton.h:
* gtk/gtktoolbar.h:
* gtk/gtktreestore.h:
* gtk/gtktreeviewcolumn.h:
* gtk/gtkwindow.h: Do not specify width inside GSEAL() when packing fields in guints.

svn path=/trunk/; revision=20621
2008-06-20 11:09:49 +00:00
Tim Janik
b2b1dbc121 gtkentry.h: include bit-size of fields inside GSEAL parens.
svn path=/trunk/; revision=20545
2008-06-20 11:02:58 +00:00
Tim Janik
49b07b9460 Seal GtkEntry
svn path=/trunk/; revision=20534
2008-06-20 11:01:56 +00:00
Michael Natterer
2c5f8a5c2b whitespace cleanup: remove trailing whitespace and excess newlines and
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 15:35:43 +00:00
Michael Natterer
eff99c282c define __GTK_H_INSIDE__ around including all other headers.
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
2008-05-28 15:07:04 +00:00
Jan Arne Petersen
4ebacd8376 Reorder strange window hierarchy of the GtkSpinButton (#466000).
2008-05-25  Jan Arne Petersen  <jpetersen@jpetersen.org>

	* gtk/gtkentry.c: (gtk_entry_class_init), (get_text_area_size),
	(gtk_entry_get_text_area_size), (gtk_entry_draw_frame):
	* gtk/gtkentry.h:
	* gtk/gtkspinbutton.c: (gtk_spin_button_class_init),
	(gtk_spin_button_realize), (gtk_spin_button_size_allocate),
	(gtk_spin_button_expose), (gtk_spin_button_draw_arrow),
	(gtk_spin_button_enter_notify), (gtk_spin_button_leave_notify),
	(gtk_spin_button_grab_notify), (gtk_spin_button_state_changed),
	(start_spinning), (gtk_spin_button_button_release),
	(gtk_spin_button_motion_notify), (gtk_spin_button_value_changed),
	(gtk_spin_button_get_text_area_size), (gtk_spin_button_real_spin),
	(gtk_spin_button_update): Reorder strange window hierarchy of the
	GtkSpinButton (#466000).


svn path=/trunk/; revision=20147
2008-05-25 12:46:26 +00:00
Matthias Clasen
4c1173b7f3 Add gtk_entry_[gs]et_cursor_hadjustment() to allow automatic scrolling in
2007-05-18  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkentry.[hc]: Add gtk_entry_[gs]et_cursor_hadjustment()
        to allow automatic scrolling in response to cursor movements
        in the entry.  (#438651, Nate Nielsen)



svn path=/trunk/; revision=17871
2007-05-19 02:31:53 +00:00
Matthias Clasen
83e9b96337 Export privately. Adjust all callers.
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-08-15 18:52:14 +00:00
Michael Natterer
1d2bcff97d applied refactored patch from maemo-gtk that replaces the INNER_BORDER
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.
2006-03-10 10:30:36 +00:00
Matthias Clasen
a7a85ac867 Shrink the private structs of these a bit.
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.[hc]:
	* gtk/gtklabel.[hc]: Shrink the private structs of these a bit.
2006-01-08 07:54:43 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
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.
2005-03-20 07:01:23 +00:00
Matthias Clasen
daeea8b871 Share the three copies of get_borders() under the name
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)
2004-10-08 04:24:45 +00:00
Tim Janik
b9a31bbcb2 removed redundant gtk_entry_get_layout() decl.
Tue Oct  5 19:29:06 2004  Tim Janik  <timj@gtk.org>

        * gtk/gtkentry.h: removed redundant gtk_entry_get_layout() decl.
2004-10-05 17:30:03 +00:00
Matthias Clasen
b94a8883ac Add gtk_entry_layout_index_to_text_index() and its inverse. The have
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.
2004-08-09 15:09:10 +00:00
Matthias Clasen
4134499c25 Add a new binding signal ::backspace, bind it to the backspace key, and
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)
2004-08-02 05:34:08 +00:00
Owen Taylor
8130a8a227 Patch from Dov Grobgeld to implement auto-bidi-direction for GtkTextView
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)
2004-03-01 16:07:45 +00:00
Owen Taylor
4ea9813d23 Add gtk_entry_set_alignment() to allow right-aligned entries and a
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.
2004-03-01 03:30:27 +00:00