Matthias Clasen
8c6c2be316
entry: Stop using ::focus-in/out-event
...
We can just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Timm Bäder
60d3378dd1
entry: Fix text clipping
...
Clipping the text to the entire widget allocation is wrong if there are
icons involved.
2018-01-10 11:02:10 +01:00
Timm Bäder
6235b12ca4
entry: Fix get_text_allocation
...
These should be reported in GtkEntry coordinates, so relative to the
entry's origin. This fixes entrys with top/bottom padding applied.
2018-01-10 10:49:13 +01:00
Timm Bäder
5cd138f0f2
entry: Remove some questionable code examples
2018-01-03 17:11:32 +01:00
Matthias Clasen
1293209d23
Don't place dnd cursor in placeholder text
...
That is just misleading - the entire placeholder text is going
to be replaced by the drop.
2017-12-17 10:52:33 -05:00
Matthias Clasen
e92c0e85ec
Replace gdk_keymap_get_for_display by gdk_display_get_keymap
...
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Carlos Garnacho
d491e49fd6
gtk: s/gdk_event_free/g_object_unref/
2017-12-14 01:05:48 +01:00
Carlos Garnacho
0c8c9f59fc
gtk: Adapt marshallers to GdkEvent as GObject
2017-12-14 01:05:48 +01:00
Benjamin Otte
04ac4c66ae
dnd: Pass device, not event
...
You don't start a dnd operation with a device, you start it with an
event.
2017-12-12 00:31:49 +01:00
Benjamin Otte
756b276070
dnd: Remove button argument from drag_begin()
...
It was unused.
2017-12-12 00:29:51 +01:00
Matthias Clasen
c35cb0eb1b
entry: Allocate the progress bar only what it needs
...
We were allocating the progress bar to the full size
of the entry. This made entry icons loose their cursors,
since they were 'covered' by the progress bar, even though
it doesn't draw anything there.
2017-12-09 23:48:35 -05:00
Benjamin Otte
7a17865b22
dnd: Remove "delete" argument from gtk_drag_finish()
...
The argument is ignored by anything but X11.
It's treated like suggested_action == MOVE.
So do that in gtk_drag_finish(), too.
2017-12-10 01:33:38 +01:00
Benjamin Otte
4658d7ea54
dnd: Remove x/y coordinates from drag-data-received
...
This is in preparation of using input streams to show that these
coordinates aren't needed most of the time and can otherwise be saved
during GtkWidget::drag-drop.
2017-12-05 05:29:00 +01:00
Timm Bäder
93df23d962
Remove some more gtk_widget_get_content_size uses
2017-12-04 12:42:52 +01:00
Benjamin Otte
24c934f8c0
entry: Port to GdkClipboard
2017-12-03 05:46:49 +01:00
Benjamin Otte
a59572f96d
widget: gtk_widget_get_clipboard => gtk_widget_get_old_clipboard
...
Just rename the function, so the previous one can be used for the
new clipboard.
2017-12-03 05:46:47 +01:00
Matthias Clasen
8c95071eea
entry: Remove references to stock ids from the docs
...
We no longer support stock images.
2017-12-01 10:30:20 -05:00
Daniel Boles
630f83957a
Entry:show-emoji-icon is in GTK+ 3 too
...
Document the earliest version reached.
2017-11-23 17:21:36 +00:00
Daniel Boles
89c51f51e2
Be more specific in ::insert-emoji Since tag
...
I had been unsure whether to include the minor version, but
:show-emoji-icon already did, so do the same here to match.
2017-11-23 17:18:36 +00:00
Daniel Boles
9fef90b0f7
Add Since to ::insert-emoji, and some trivialities
...
Document when these keybinding signals were added.
2017-11-22 22:36:31 +00:00
Matthias Clasen
462a77ffb5
Fix indentation mishap
2017-11-22 16:50:10 -05:00
Benjamin Otte
fc2ce5a925
gdk: Make GdkContentFormats immutable
2017-11-20 23:13:10 +01:00
Benjamin Otte
9a6ec4e959
contentformats: Rename GtkTargetList
...
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Matthias Clasen
4d9b7b2359
entry: Add a key binding for the emoji chooser
...
Make Ctrl-. and Ctrl-; bring up the emoji chooser.
https://bugzilla.gnome.org/show_bug.cgi?id=789160
2017-11-19 18:06:19 -05:00
Matthias Clasen
ffd6baec42
gtk: Intern css names
...
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Benjamin Otte
3f5178dc21
selection: Remove the info uint
...
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.
The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Matthias Clasen
dbfaa99107
image: Remove icon-size argument from icon setters
...
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.
Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
4c4e914806
gdk: Replace GDK_NONE with NULL
2017-11-15 19:07:17 +01:00
Benjamin Otte
5a1a11bcde
dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
...
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
2017-11-15 19:07:17 +01:00
Benjamin Otte
7efc5a1558
clipboard: Consistently use GtkTargetList
...
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Benjamin Otte
22472c1924
entry: Remove surface icons
...
We have texture icons.
2017-11-05 06:45:01 +01:00
Benjamin Otte
897fdaf1c0
entry: Texture properties are objects
...
Carelessly copy/pasting made them boxeds. Oops.
2017-11-05 05:13:17 +01:00
Benjamin Otte
2d959553e9
image: Add the ability to set textures
...
This also adds it to all other places that use the same infrastructure:
GtkEntry and GtkCellRendererPixbuf
2017-11-05 00:07:17 +01:00
Benjamin Otte
a409320cda
gtk: Use gtk_widget_set_cursor()
...
... and gtk_widget_set_cursor_from_name() instead of setting cursors on
GdkWindows.
2017-11-04 01:37:03 +01:00
Benjamin Otte
9323d098a6
gdk: Cursors no longer have a display
...
Change constructors to reflect that.
While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
2017-11-04 00:07:13 +01:00
Benjamin Otte
9d51134459
entry: Remove unused variable
2017-11-01 20:55:41 +01:00
Benjamin Otte
44614394e6
widget: Turn screen-changed signal into display-changed
2017-10-31 00:43:11 +01:00
Alexander Larsson
96b04836d8
Drop all uses of GdkPixbufAnimation in the gtk APIs
...
These are basically animated gifs, and don't fit well in how
modern things animate.
2017-10-23 16:56:49 +02:00
Alexander Larsson
0089e4ad58
Drop pixbuf support in IconHelper and ImageDefinition
...
These are no longer used, instead we always covert to surface as
early as possible and drop the pixbuf.
This means we never store both the pixbuf and the surface at
for any longer time, which is wasteful. Also, its one step further
to drop GdkPixbufs from generic use in our APIs.
2017-10-23 15:28:33 +02:00
Alexander Larsson
6f8644ad25
GtkEntry: Use surfaces, not pixbufs for bitmapped icons
2017-10-23 13:45:25 +02:00
Benjamin Otte
43c212ac28
build: Enable -Wswitch-enum and -Wswitch-default
...
This patch makes that work using 1 of 2 options:
1. Add all missing enums to the switch statement
or
2. Cast the switch argument to a uint to avoid having to do that (mostly
for GdkEventType).
I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.
The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Matthias Clasen
88664f7ccb
Fix a typo
2017-09-21 22:53:49 -04:00
Carlos Garnacho
a9988e18b0
gtk: Remove 2BUTTON and 3BUTTON events and event types
...
Those should be interpreted by widget-local gestures, not guessed at a
high level with no notions of the specific context. Users will want
GtkGestureMultiPress to replace these events.
2017-09-19 18:40:50 +02:00
Matthias Clasen
7ed6add550
entry: Convert to GdkEvent API
2017-09-19 18:39:02 +02:00
Carlos Garnacho
e46a1d32f0
entry: Update to using GdkEvent API
2017-09-19 18:39:02 +02:00
Daniel Boles
09d1d5a0d6
Entry: Fix leak of text in ensure_has_tooltip()
...
Thanks to Mohammed Sadiq for noticing this. I guess I got
Widget.get_tooltip_text() confused with Label.get_label().
https://bugzilla.gnome.org/show_bug.cgi?id=787410
2017-09-07 14:56:20 +01:00
Matthias Clasen
863a9cef98
entry: Set a clip
...
Now that GtkEntry is using a text node, we were spilling
the contents out to the side when the entry is scrolling.
Avoid that by setting a clip.
2017-09-05 23:29:59 -04:00
Matthias Clasen
3694104f67
entry: Consider input hints for Emoji support
...
Don't show "insert emoji" in the context menu if input
hints indicate that Emoji input is not useful.
2017-09-02 08:47:17 -04:00
Matthias Clasen
f414e1b15f
emoji chooser: Avoid a crash
...
The emoji chooser gets disposed already, because it is attached
to the toplevel as a popover. Doing it again when the object data
is cleared is leading to a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=787103
2017-09-01 19:55:21 -04:00
Daniel Boles
7a3548e10c
Entry: Set tooltip text on icon for emoji chooser
...
https://bugzilla.gnome.org/show_bug.cgi?id=786885
2017-09-01 17:28:31 -04:00