Christoph Reiter
2d5cf2b4c4
Drop fallback-c89.c
...
We require a C compiler supporting C99 now. The main purpose of
these fallbacks was for MSVC. From what I can see this is now all supported
by MSVC 2015+ anyway.
The only other change this includes is to replace isnanf() with the
(type infering) C99 isnan() macro, because MSVC doesn't provide isnanf().
2020-05-31 17:09:23 +02:00
Matthias Clasen
75d9310986
Change coordinate translation apis to take doubles
...
Change gtk_widget_translate_coordinates and
gtk_native_get_surface_transform to operate
on doubles. Update all callers.
2020-05-17 17:17:31 -04:00
Matthias Clasen
b93631164f
Remove lots of focus vfuncs
...
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
2020-05-11 00:11:37 -04:00
Matthias Clasen
632524f679
Reinstate expected focus behavior
...
After the :can-focus change in the previous commit, widgets
need to set suitable focus and grab_focus implementations
to implement the desired focus behavior.
This commit does that for all widgets.
2020-04-09 17:50:29 -04:00
Matthias Clasen
12b97ffd24
entry: Document buildable support
2020-04-06 23:33:22 -04:00
Matthias Clasen
1ae60cb713
entry: Add <attributes> support
...
Make entries support the same <attributes> syntax
as labels.
Closes : #1335
2020-04-06 22:59:54 -04:00
Emmanuele Bassi
f61d520ab1
entry: Remove unused include
2020-03-25 21:53:06 -04:00
Matthias Clasen
31db615885
Revert "Merge branch 'disable-window-test' into 'master'"
...
This reverts commit 3ac4c76b18
, reversing
changes made to 6ec96d2e98
.
2020-03-19 18:03:16 -04:00
Emmanuele Bassi
9b1d593967
entry: Remove unused include
2020-03-18 23:00:50 -04:00
Matthias Clasen
bc4637fff6
Remove unused includes
...
We eventually want to get rid of GtkSelectionData.
As a first step, stop including gtkselection.h unnecessarily.
2020-02-09 23:59:22 -05:00
Timm Bäder
655711fef2
Rename gtk_widget{get,set,has}_style_class to _css_class
...
We want to use css instead of style everywhere now.
2020-02-07 13:16:45 -05:00
Timm Bäder
b7ee2cbc28
Start using GtkWidget's new style class API
2020-02-07 13:16:32 -05:00
Matthias Clasen
005ea7a09d
entry: Avoid criticals in dispose
...
The accessible gets properties of the entry, and
resetting the entry icons triggers accessible change
notification, so do that before we dismantle the entry
too far to respond to a g_object_get () call.
2020-02-05 01:01:47 -05:00
Robert Ancell
2b6162116d
Fix docstring errors with drag and drop code
2020-01-13 12:30:17 +13:00
Matthias Clasen
e09f2b8b56
entry: Use gdk_drag_begin
...
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e8b830a3dd
dragsource: Reshuffle api a bit
...
Remove arguments from the constructor.
For actions, we now default to COPY, which is the most common one
that we should enable by default (MOVE requires handling deletion
on the the source side, and ASK only makes sense if we have
multiple actions).
For the content provider, we add a new ::prepare signal where
it should be provided just-in-time.
2020-01-08 18:48:21 -05:00
Matthias Clasen
f3be49838f
Move code over
...
Move remaining code from gtkdnd.c to gtkdragdest.c
and nuke gtkdnd.c and gtkdndprivate.h.
2020-01-08 18:48:21 -05:00
Matthias Clasen
1e000c3dac
Remove gtkdnd.h
2020-01-08 18:48:20 -05:00
Matthias Clasen
337057eb35
entry: Port icon dnd to GtkDragSource
...
This requires a small change in the api,
since we need to provide a GdkContentProvider now.
2020-01-08 18:48:19 -05:00
Matthias Clasen
7ee5779efc
gtk: Remove menu code
...
GtkMenu, GtkMenuBar, GtkMenuItem and their subclasses
and supporting classes are replaced by model-based popover
implementations.
2019-12-29 20:31:58 -05:00
Timm Bäder
11a38dd455
entry: Remove unused function
2019-10-22 09:37:08 +02:00
Benjamin Otte
bab7f56f64
entry: Return boolean from gtk_entry_grab_focus_without_selecting()
...
This follows recent changes to gtk_widget_grab_focus().
2019-10-16 22:08:53 +02:00
Benjamin Otte
427deb4f13
widget: Make gtk_widget_grab_focus() return a boolean
...
So now it can actually fail.
It doesn't yet though.
2019-10-15 16:33:05 +02:00
Matthias Clasen
222e05c2d2
Remove unused includes
...
Don't include gtkmenu.h in places where
it isn't used anymore.
2019-09-16 07:23:17 -04:00
Rico Tzschichholz
97231ca231
gtk: Fix some g-i annotation warnings
2019-09-15 17:57:28 +02:00
Timm Bäder
b658a1a8e3
entry: Measure icons again
...
This was previously removed because it changes the minimum and natural
size of the entry when the icons are shown/hidden at runtime. Just not
measuring them does not work however, so reintroduce this.
2019-07-21 09:58:08 +02:00
Matthias Clasen
72d306c132
entry: Remove hacky code
...
We can leave it up to apps to not set less-than-useful
combinations, such as show-emoji-icon, but a no-emoji
input hint.
2019-06-15 21:40:50 -04:00
Matthias Clasen
1b21d6ecba
password entry: Adapt to new context menu api
2019-06-13 11:59:50 +00:00
Matthias Clasen
a28d5d1888
text, entry: Implement context menu api
...
Drop the ::populate-popup signal and implement
the new context menu api.
2019-06-13 11:59:50 +00:00
Christian Hergert
bd26cce812
gtk: rely on default marshallers
...
Similar to previous removals of g_cclosure_marshal_VOID__VOID we can remove
other marshallers for which are a simple G_TYPE_NONE with single parameter.
In those cases, GLib will setup both a c_marshaller and va_marshaller for
us. Before this commit, we would not get a va_marshaller because the
c_marshaller is set.
Related to GNOME/Initiatives#10
2019-05-30 20:56:50 -07:00
Matthias Clasen
7f65e5f96b
Rename GtkGestureMultiPress to GtkGestureClick
...
The name just made it hard for people to find the
right gesture to use.
2019-05-29 17:10:46 +00:00
Matthias Clasen
18788c2a86
Remove gtk_widget_get/set_has_surface
...
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
4cab6ae61a
entry: Allocate popovers
2019-05-28 20:25:15 +00:00
Matthias Clasen
4bf4f04d1f
Adapt to new popover lifecycle
...
We need to unparent popovers in dispose.
2019-05-28 20:25:13 +00:00
Matthias Clasen
ff115472e3
entry: Use standard padding
2019-05-27 03:03:47 +00:00
Matthias Clasen
44b0a893fc
entry: Drop our own Emoji chooser
...
We were using one Emoji chooser when triggered
via the context menu, and another one when
triggered via the icon.
Change things to always use the same Emoji
chooser instance.
2019-05-04 18:54:37 +00:00
Matthias Clasen
b2a23a9a90
entry: only notify properties we have
...
GtkText now has the propagate-text-width property,
which is not present on GtkEntry, so we can't just
blindly forward all properties.
2019-05-01 04:41:28 +00:00
Matthias Clasen
218d635ca2
entry: Activate default via action
...
Switch to the new way of activating default.
2019-04-28 23:20:13 +00:00
Timm Bäder
59fd48cee0
entry: Fix primary icon allocation in RTL entries
...
The primary icon is on the right in RTL, so don't offset the text child
to the right for it.
Fixes the text and icon overlapping in the second entry
in tests/testentryicons
2019-04-28 08:36:36 +02:00
Timm Bäder
ddd044f283
entry: Remove some unused constants
2019-04-13 06:18:43 +02:00
Matthias Clasen
ef982b7d46
Rename things
...
Rename the can-pick property to can-target,
and redo the pick flags with more descriptive names.
2019-04-08 08:42:25 -04:00
Matthias Clasen
56df49971a
entry: Disconnect text signals in dispose
...
This was showing up as crashes when closing
the file chooser.
2019-03-21 19:15:55 -04:00
Matthias Clasen
c3f43cf1f2
entry: Make progress bar not pickable
...
There is no need for that, we don't want to
handle input here at all.
2019-03-14 19:15:31 -04:00
Timm Bäder
39fbf13fcb
entry: Update CSS node docs
...
Remove all the nodes that are subnodes of GtkText nowadays and refer to
the GtkText docs instead.
2019-03-06 09:03:17 +01:00
Matthias Clasen
02318dbda7
entries: Fix mnemonic activation
...
Since entries are no longer can-focus, the default
mnemonic_activate handler refuses to act on them.
2019-03-03 22:25:52 -05:00
Matthias Clasen
9e0c471b03
entry, spin button: Drop redundant API
...
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Matthias Clasen
5caf8ca76b
entry: Don't use the buffer directly
...
We want to be a wrapper of the GtkText, which in turn
wraps the GtkEntryBuffer. Not some weird mix.
2019-02-28 00:36:44 -05:00
Matthias Clasen
9335cde8e8
entry: Make placeholder-text work again
2019-02-25 09:21:56 -05:00
Benjamin Otte
01f7f255b5
gtk: Check return value of compute_bounds()
...
Half of these calls will completely break if anybody ever uses CSS
transforms with them, but hey...
2019-02-20 05:26:31 +01:00
Matthias Clasen
45fb1d06e3
entry: Delegate to GtkText
...
Use a GtkText child, and delegate the editable functionality
to it. Also forward all the properties that are provided by
GtkText.
Some of the more internal APIs, such as layout and im context
access and caps-lock warning, are removed here, but we preserve
most of the plain GtkEntry API by forwarding it to the GtkText
child.
2019-02-19 00:25:59 -05:00