Timm Bäder
9047a5dc52
entry: make sure priv->current_pos is valid
...
We can e.g. get the entry dispose()d and a focus_out event after that
(because the toplevel unsets the focus which previously was the entry).
We then later use priv->current_pos in a call to pango API which makes
sure the given index is valid for the given layout. Since we lazily
create a GtkEntryBuffer in get_buffer() and a PangoLayout lazily in
gtk_entry_create_layout, these 2 are always valid but don't match
priv->current_pos in this situation.
Fix this by resetting priv->current-pos in dispose().
2017-03-13 12:08:58 +01:00
Timm Bäder
fca6bef697
entry: Remove cursor type parameter from get_cursor_locations
...
We are only ever passing CURSOR_STANDARD anyway.
2017-03-13 12:08:58 +01:00
Daniel Boles
c4fbce52ce
Entry: Add newlines to ease reading huge switches
...
These are monstrosities!
2017-02-19 12:39:05 +00:00
Daniel Boles
4bea7b0ae8
Entry—Fix inverted movements by arrow keys in RTL
...
Using Ctrl + left/right to skip between words, or left/right to cancel a
selection, were causing movement on the screen in the opposite direction
of the glyph on the key. This was surprising and awful UX for RTL users.
This is based on a patch covering the former case by:
Author: Ori Avtalion <ori@avtalion.name>
Date: Tue Apr 20 08:06:23 2010 +0000
https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-19 12:39:05 +00:00
Timm Bäder
f4afa000a1
entry: Remove unused struct member
2017-01-16 17:22:29 +01:00
Benjamin Otte
6055028c96
snapshot: Rename append APIs
...
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Sébastien Wilmet
88699f588d
docs: improve the documentation of GtkEntry:attributes
...
See the implementation of gtk_entry_create_layout():
pango_attr_list_splice() is used to add the PangoAttrList of the preedit
string. And that is done *after* applying the PangoAttrList of the
"attributes" property.
https://bugzilla.gnome.org/show_bug.cgi?id=776868
2017-01-04 19:56:30 +01:00
Benjamin Otte
0dbdf0c428
gadget: Remove gtk_css_gadget_draw()
...
And with it, remove the draw func from custom gadgets, that has been
NULL everywhere.
All gadgets are snapshot now.
2016-12-20 18:01:12 +01:00
Piotr Drąg
a2da4ddceb
Use Unicode in translatable strings
...
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772371
2016-12-19 15:08:10 -05:00
Timm Bäder
3dac21f20b
entry: Refactor get_icon_pixbuf
...
This way it will only return a pixbuf if the icon helper has a pixbuf.
2016-12-03 13:19:26 +01:00
Sébastien Wilmet
82b2bf2184
docs: fix a parameter name of GtkEntry::populate-popup
...
Trivial commit.
The documentation block refers to @widget, not @popup. @widget is a
better name since the type is GtkWidget.
2016-11-26 12:31:34 +01:00
Sébastien Wilmet
e2881d1e4f
docs: fix docs of functions to convert layout_index <-> text_index
...
Trivial commit.
The documentation was swapped. The documentation for the parameters and
the return values is good.
2016-11-26 12:31:34 +01:00
Emmanuele Bassi
4cbe079767
Use Graphene init macros for compound literals
...
The Graphene init macros can now be used for compound literals, which
means we need to update our mixed uses.
2016-11-21 16:21:38 +00:00
Matthias Clasen
0cec768b54
entry: Fix input window position for icons
...
This makes the icon in the placesview address entry and
in widget-factory's progress entry work again.
2016-11-17 12:04:35 -05:00
Benjamin Otte
64e802c441
snapshot: Convert entry and spinbutton
2016-11-15 17:48:45 +01:00
Benjamin Otte
da207c9fdd
snapshot: Add a snapshot function to GtkCssCustomGadget
2016-11-15 17:48:45 +01:00
Matthias Clasen
d462c31233
entry: Avoid recursion in gtk_entry_ensure_layout
...
This was unintentional, and lead to a memory leak.
2016-11-14 15:17:41 -05:00
Timm Bäder
fdc24c7505
entry: Fix coordinates after rendernode conversion
...
Ease the transition by removing the text_area and frame vfuncs which are
unused inside GTK+.
2016-11-05 11:56:37 +01:00
Timm Bäder
932b9acb39
Revert "Revert "Convert GtkEntry to indirect rendering""
...
This reverts commit f4fa111e32
.
2016-11-05 11:56:36 +01:00
Matthias Clasen
f4fa111e32
Revert "Convert GtkEntry to indirect rendering"
...
This reverts commit 3656c9f94c
.
Still causes to many unresolved drawing issues.
2016-11-04 13:22:48 -04:00
Matthias Clasen
3656c9f94c
Convert GtkEntry to indirect rendering
...
Warning! This unveils some positioning issue with the secondary icon.
2016-11-01 14:29:25 -04:00
Matthias Clasen
775b42ef92
Revert "Convert GtkEntry to indirect rendering"
...
This reverts commit 8e29222d95
.
This needs more work - spin buttons need to be converted at
the same time, and we should make sure that text still appears.
2016-10-28 06:47:26 -04:00
Matthias Clasen
8e29222d95
Convert GtkEntry to indirect rendering
...
Warning! This unveils some positioning issue with the secondary icon.
2016-10-27 20:46:08 -04:00
Timm Bäder
9992a616ef
widget: Use ::measure vfunc to measure size
...
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Benjamin Otte
c61e669e56
entry: Use gdk_window_new_input()
2016-10-18 00:22:35 +02:00
Benjamin Otte
4df6ddad54
API: container: Remove gtk_container_set_border_width()
2016-10-16 18:18:58 +02:00
Benjamin Otte
1518fe0a8f
API: stylecontext: Remove state argument from getters
...
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Timm Bäder
f360a69f4c
entry: Remove invisible-char style property
2016-10-16 18:17:21 +02:00
Timm Bäder
86dbe591d2
entry: Remove deprecated style properties
2016-10-16 18:17:21 +02:00
Timm Bäder
1add02879e
entry: Remove inner-border (style) property
2016-10-16 18:17:21 +02:00
Timm Bäder
ad155fb26c
Remove GtkStock API from GtkImage
2016-10-16 18:17:21 +02:00
Benjamin Otte
fcbd480c76
API: Remove GDK_WA_CURSOR
...
The cursor was set using gdk_window_set_cursor() even in
gdk_window_new().
So instead of having yet another flag, just make the users of that flag
call gdk_window_set_cursor() directly after the window was created.
2016-10-16 18:17:21 +02:00
Matthias Clasen
ddd1ac0934
entry: Fix a corner case of overwrite mode
...
We currently beep when a character is appended at the end in
overwrite mode. That is obviously not right. Patch based on
a patch by Ian MacDonald.
https://bugzilla.gnome.org/show_bug.cgi?id=772389
2016-10-05 12:22:21 -04:00
Christian Hergert
b684b23c74
entry: handle NULL cursor when updating cursors
...
If we got a NULL cursor from gdk_cursor_new_from_name(), we need
to handle that when unreffing.
2016-09-27 14:12:43 -07:00
Christian Hergert
7ecd337877
entry: handle NULL cursor when releasing reference
...
If we happen to have gotten NULL back for a cursor, then we
need to check before unreffing it.
2016-09-27 14:09:02 -07:00
Benjamin Otte
e1a03ead7a
Use NULL for generic marshallers in g_signal_new()
...
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
Timm Bäder
a985e62b25
Use gtk_popover_popdown/popup where appropriate
...
https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
William Hua
8701e34f74
port to new gtk_menu_popup_at_* () functions
...
https://bugzilla.gnome.org/show_bug.cgi?id=756579
2016-07-19 09:38:54 -04:00
Timm Bäder
4dbe7c99c2
entry: Fix undershoot position wrt entry icons
...
Draw them inside of the icons, which is where the text scrolls.
2016-05-31 09:41:08 +02:00
Timm Bäder
301652de1f
Remove useless casts from gdk_event_triggers_context_menu calls
2016-05-12 20:39:51 +02:00
Matthias Clasen
b5fb9ae3b7
gtk: Port to new monitor api
...
Use the GdkDisplay monitor api instead of the GdkScreen one.
2016-04-27 23:18:16 -04:00
Matt Watson
511f138328
entry: port to progress tracker
2016-04-08 16:09:30 -07:00
Matthias Clasen
2fee5fbda7
entry: Fix drag highlight problems
...
We don't want drag highlights around icons or progress, so don't
propagate the :drop(active) state to them.
2016-03-11 08:02:10 -05:00
Matthias Clasen
6b2cde94b4
entry: Make progress node invisible when appropriate
...
We were failing to do that, leading to progress not disappearing
anymore after it was initially shown, in the gtk3-widget-factory
entry progress example.
2016-03-04 08:04:45 -05:00
Benjamin Otte
cf71d98b05
entry: Make the get_text_area() vfunc relative to top left of entry
...
This fixes GdTaggedEntry. I hope.
2016-02-23 04:22:19 +01:00
Matthias Clasen
966dd56e45
entry: Fix baseline allocation
...
Position the text on the baseline again.
2016-02-20 18:55:17 -05:00
Benjamin Otte
d2fb069426
entry: Make get_text_area_size() vfunc work again
...
GdTaggedEntry needs that. Though there's probably a bunch of work left
inside GdTaggedEntry to make it look cute again (like storing the area
it reserves for itself to allocate tags in).
2016-02-20 03:25:39 +01:00
Chun-wei Fan
0e9f24b5a4
gtk/gtkentry.c: Fix build on pre-C99
...
This file now uses nearbyint(), so include fallback-c89.c so that
compilers that don't provide the function will not get upset.
2016-02-15 17:22:00 +08:00
Benjamin Otte
c95087c70a
entry: queue an allocate when pulsing
...
We need to reposition the progress gadget and that's done during
allocation.
2016-02-04 12:25:13 +01:00
Benjamin Otte
429bec54e5
entry: Turn progress node into a gadget
2016-02-03 22:53:22 +01:00