Matthias Clasen
2ba9c4b4a7
Make focus rectangles optional
...
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.
'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.
'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.
'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.
https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Matthias Clasen
d324a99454
Fix entry drawing in the presence of margins
...
Margins need to be taken into account when comparing requisitions
and allocations, which GtkEntry (and subclasses) do for some reason.
2011-08-09 15:12:21 +02:00
Matthias Clasen
a1cf2315a0
Fix up signal ordering issues in GtkEntry
...
Ensure that text and selection boundaries are in a
consistent state when we emit notifications, that ::insert-text
and ::delete-text are emitted before any changes, and that
::changed is emitted after property notifications when inserting
or deleting text.
2011-07-05 16:08:08 -04:00
Matthias Clasen
918514d51d
First cut at GailEntry -> GtkEntryAccessible
...
Replace the factory for entry and spin button with
gtk_widget_class_set_accessible_type() calls, and move then
to the GtkAccessible namespace.
2011-07-05 16:08:08 -04:00
Claudio Saavedra
ca801abb4c
Use a PAGE_STEP macro instead of a magic number
...
Helps to understand the code.
https://bugzilla.gnome.org/show_bug.cgi?id=653512
2011-06-28 09:47:44 +03:00
Javier Jardón
bf0d8402f5
gtk: Use const instead G_CONST_RETURN
2011-06-10 13:07:54 +01:00
Cosimo Cecchi
aa37e7323f
entry: use the current state when rendering symbolic icons
...
Make sure the current state is picked up when rendering symbolic icons
too.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
8efa8a067e
entry: use GTK_STYLE_CLASS_IMAGE when rendering the entry icon
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
02e82d69b8
entry: use gtk_render_icon()
2011-06-09 23:17:09 +02:00
Matthias Clasen
d2c682c9e9
Remove an unneeded include
2011-06-07 13:04:22 -04:00
Matthias Clasen
0705474be6
GtkEntry: don't forget to disconnect idles
...
As pointed out by John Lindgren in bug 650114, GtkEntry forgets
to disconnect an idle source when the completion is set to NULL.
2011-05-31 20:11:28 -04:00
Matthew Barnes
54c3f05848
Desensitize "Select All" when GtkEntry is empty
...
This avoids possible confusion in some situations, and
selecting an empty string is not very useful.
https://bugzilla.gnome.org/show_bug.cgi?id=647962
2011-04-26 07:56:09 -04:00
Matthias Clasen
7d3693b82b
GtkEntry: Explicitly disconnect keymap signals
...
Might fix https://bugzilla.gnome.org/show_bug.cgi?id=648419
2011-04-26 07:48:27 -04:00
Benjamin Otte
da1f618b09
entry: Translate progress region properly when drawing text
2011-04-19 22:18:19 +02:00
Benjamin Otte
76294fcf1d
entry: No need to queue a redraw on state changes
...
GtkWidget already does that.
2011-04-19 22:18:19 +02:00
Benjamin Otte
2d58625e02
entry: Also update cached style values when the state changes
2011-04-19 22:18:19 +02:00
Benjamin Otte
66dc6ea150
entry: Initialize cached values
2011-04-19 22:18:19 +02:00
Benjamin Otte
a9a2a08162
entry: g_object_notify*( when we change the invisible char
2011-04-19 22:18:19 +02:00
Benjamin Otte
0aae66c15e
entry: Split out style-updating things into their own function
2011-04-19 22:18:19 +02:00
Benjamin Otte
72ebc788a6
entry: Move cairo_save() call for clarity
...
We want save, clip, draw1, restore, save, clip, draw2, restore
and not save, save, clip, draw1, restore, clip, draw2, restore
Functionally the same thing, but not as obvious
2011-04-19 22:18:19 +02:00
Benjamin Otte
6fee78341a
entry: Omit useless clip
...
We do the same clip further above, so no need to repeat it
2011-04-19 22:18:19 +02:00
Benjamin Otte
033d204b9e
entry: Guard clipping with a save/restore
...
Just t be sure, so people don't get bugs later when they refactor code.
2011-04-19 22:18:18 +02:00
Benjamin Otte
c70698084c
entry: Remove needless check
...
The only window we're ever called to draw is our own window. D'oh.
2011-04-19 22:18:18 +02:00
Benjamin Otte
49c7869582
docs fix typo
...
Was accidentally introduced in 1351d40cfe
Thanks Paolo for noticing.
2011-04-17 12:49:58 +02:00
Benjamin Otte
1351d40cfe
entry: Fix gtk_entry_get_icon_at_pos()
...
The passed in coordinates are widget-relative, not window-relative.
2011-04-16 22:31:24 +02:00
Benjamin Otte
f2a20cd9fd
entry: Use the new get_frame_size() argument in gtk_entry_draw_frame()
2011-04-16 22:31:24 +02:00
Benjamin Otte
fd9aac8225
entry: Add the ability to query frame size in two ways
...
TRUE: relative to widget->window
FALSE: relative to widget
For now, no caller has beeen changed.
2011-04-16 22:31:24 +02:00
Juan Pablo Ugarte
a77e6b1593
Added GtkEntry:completion property
2011-04-01 19:35:32 -03: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
Carlos Garnacho
b93a2ebeed
entry: Do not clobber state when rendering the default icons.
...
Use lower level methods that just require changing the state in the
GtkStyleContext instead. Fixes a problem where the insensitive state
was being set to the entry becasuse a parent was insensitive, spotted
by Alex Larsson.
2011-03-07 12:48:31 +01:00
John (J5) Palmieri
cdf69b4bed
[gi] add missing annotations for signals that emit Gdk.Events
2011-03-03 16:05:28 -05:00
Matthias Clasen
63c7701ca3
Don't use GDK_NONE when GDK_SELECTION_CLIPBOARD is meant
2011-02-28 19:25:35 -05:00
Murray Cumming
f91c04e284
Minor documentation improvements
...
Mostly correcting it's to its and changing some , to .
2011-02-23 10:26:21 +01:00
Matthias Clasen
beb8c290d1
Always chain up in ::style-updated
...
This was not handled consistently, but the default handler
does useful things, so we should always chain up.
2011-02-07 07:30:37 -05:00
Michael Natterer
858ba35873
gtk: remove function gtk_entry_queue_draw() and call gtk_widget_queue_draw()
...
the old function was a leftover from when GtkEntry had a window
and was now invalidating the entire toplevel on each entry change.
2011-02-06 11:17:58 +01:00
Matthias Clasen
38f6065b2b
Make GtkEntryCompletion::match-selected arguments consistent
...
For keynav, we were still passing it the filter model.
https://bugzilla.gnome.org/show_bug.cgi?id=640698
2011-01-31 10:48:40 -05:00
Paolo Borelli
001697a22a
Move the get_cursor_color in GtkStyleContext
...
Move the private get_cursor_color method belongs to StyleContext. Change
the api so that retrieving both primary and secondary color is possible.
I left the method private for now, though it should probably be public
as all the other getters.
2011-01-29 13:13:42 +01:00
Paolo Borelli
9e20341775
Use GtkRGBA for the cursor color priv api.
2011-01-29 12:38:50 +01:00
Matthias Clasen
b42b47e7d3
Port gtk_draw_insertion_cursor to GtkStyleContext
2011-01-24 00:24:12 -05:00
Matthias Clasen
d9fcc4c630
Silence new gcc warnings
...
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Michael Natterer
5d3106275a
gtk: no need to add GTK_STYLE_FLAG_FOCUSED to the widget's state flags
...
because they correctly contain that flag now if the widget has focus.
2011-01-21 15:38:52 +01:00
Michael Natterer
287a388415
gtk: remove unused "window" variable from gtk_entry_draw_frame()
2011-01-21 14:19:48 +01:00
Pavel Holejsovsky
2fb1c06402
[GI] Add missing (out) and (array) annotations
2011-01-20 13:57:20 +01:00
Carlos Garnacho
0e77486e91
Make GtkEntry set the style context state.
2011-01-17 04:43:23 +01:00
Matthias Clasen
8e420bca02
Unify handling of prelighted icons
...
Make GtkEntry use gtk_render_icon_pixbuf for rendering the
icons, and move the working icon prelighting code from GtkEntry
to GtkThemingEngine.
https://bugzilla.gnome.org/show_bug.cgi?id=636691
2011-01-14 23:59:22 -05:00
Tristan Van Berkom
3f911b2516
Fixed GtkEntry to report the proper default value for "primary/secondary-icon-activatable"
2011-01-10 22:26:46 +09:00
Matthias Clasen
98440ad031
Remove gtktypeutils altogether
...
Based on patches by Javier Jardón.
https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Matthias Clasen
b5c6904c2f
Drop explicit includes of gdkkeysyms.h
...
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Carlos Garnacho
e4c509837f
GtkEntry: get font description from GtkStyleContext
2011-01-04 03:06:20 +01:00
Carlos Garnacho
55145e0e4e
GtkEntry: Remove unneeded calls
2011-01-04 03:06:19 +01:00