Commit Graph

197 Commits

Author SHA1 Message Date
Benjamin Otte
632fab0ca7 stylecontext: Get rid of gtk_style_context_get()
... and replace all the calls to it with
gtk_style_context_peek_property().

All the calls are hacks that need to go away btw.
2020-01-28 02:58:02 +01:00
Matthias Clasen
72932d2776 cell renderer text: Fix this to work again
We were showing the entry, and removing it right
away when the focus moved to the text child.
Avoid that.
2019-12-24 03:13:58 -05:00
Matthias Clasen
53c9eb5a5b Move the ifdef to the right spot 2019-11-04 23:24:49 +00:00
Matthias Clasen
6e5da14294 cell text: Handle new pango enum values
The PangoUnderline enum grew some new values.
2019-11-04 23:14:44 +00:00
Timm Bäder
1583200e24 cellrenderertext: Remove some unnecessary NULL checks 2019-07-21 10:26:00 +02:00
Timm Bäder
03fa8ed259 cellrenderertext: Don't unnecessarily ref a layout
We never pass a NULL layout to get_size().
2019-07-21 10:22:05 +02:00
Matthias Clasen
3dd7b41077 cell renderer: remove populate-popup 2019-06-13 11:59:51 +00:00
Christian Hergert
828c36636c va_marshaller: add various va_marshallers
We don't need to cover every case with a va_marshaller, but there are a
number of them that are useful because they will often only be connected
to by a single signal handler.

Generally speaking, if I opened into a file to add a va_marshaller, I just
set all of them.
2019-06-06 15:30:42 -07:00
Matthias Clasen
70af933804 cell renderer text: Drop the priv pointer 2019-05-26 20:28:38 -04:00
Benjamin Otte
a44ac75e65 gtk: Don't include gtkstylecontext.h from gtkcsstypesprivate.h
And make sure it's included everywhere it's needed.
2019-03-19 08:53:25 +01: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
Emmanuele Bassi
25fd230327 gtk: Drop the "plus"
Source names should use "[gtk]" without the plus.
2019-02-05 11:26:20 +01:00
Matthias Clasen
8755d884f3 Remove a lot of Since annotations
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
2018-06-25 19:55:04 -04:00
Benjamin Otte
73b4a62f51 snapshot: Redo debug messages
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
2018-04-24 04:06:58 +02:00
Benjamin Otte
9c7874214e a11y: Remove gtk.h include 2018-02-08 23:39:17 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Emmanuele Bassi
c655759cef Replace gdk_threads_add_timeout* with g_timeout_add()
The main GDK thread lock is not portable and deprecated.

The only reason why gdk_threads_add_timeout() and
gdk_threads_add_timeout_full() exist is to allow invoking a callback
with the GDK lock held, in case 3rd party libraries still use the
deprecated gdk_threads_enter()/gdk_threads_leave() API.

Since we're removing the GDK lock, and we're releasing a new major API,
such code cannot exist any more; this means we can use the GLib API for
installing timeout callbacks.

https://bugzilla.gnome.org/show_bug.cgi?id=793124
2018-02-03 12:06:58 +01:00
Matthias Clasen
5d57f0be8a text cell renderer: Stop using ::focus-out-event
The has-focus property works fine here.
2018-01-16 14:14:10 -05: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
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
Benjamin Otte
b58de2d16c snapshot: Redo pop() API
gtk_snapshot_pop() => removed
gtk_snapshot_pop_and_append() => gtk_snapshot_pop()

So now there is no way to get a rendernode out of the snapshotting API
until you gtk_snapshot_finish().
2017-01-13 03:38:36 +01:00
Benjamin Otte
c412a717f1 cellrenderertext: Implement snapshot() 2016-12-23 09:23:07 +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
a5867ffe71 Remove some more GdkColor properties 2016-10-20 20:12:08 +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
Matthias Clasen
f53706b003 cell renderer text: Allow entries to shrink
Set a small max-width on entries used for editing cells, so they
adapt to small columns and don't overlap the next column.

https://bugzilla.gnome.org/show_bug.cgi?id=770374
2016-08-25 07:53:32 -04:00
Matthias Clasen
3c54fbd3ac Use stupid quotes instead of dumb quotes
Following a similar change in GLib a while ago.

'bla' may by stupid, but it looks less dumb than `bla'.
2015-09-23 07:01:16 -04:00
Matthias Clasen
65be0f5be9 text cell renderer: Convert to g_object_notify_by_pspec
This avoids pspec lookup overhead in g_object_notify.
2015-09-06 17:13:29 -04:00
Matthias Clasen
4453c4401f Support alpha in text cell renderer colors
This is easily possible, now that Pango supports alpha.
2015-08-15 11:24:55 -04:00
Sebastien Lafargue
43d6ebf9fb cellrenderertext: notify inverted
The notify for "size" and "size-points" properties
are inverted.

https://bugzilla.gnome.org/show_bug.cgi?id=742311
2015-01-04 12:48:14 +01:00
Matthias Clasen
c96f5b953a GtkCellRendererText: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:57 -04:00
Matthias Clasen
1139b21997 GtkCellRendererText: Use G_PARAM_EXPLICIT_NOTIFY for 'alignment' 2014-06-09 13:30:54 -04:00
Matthias Clasen
49cf5142ba Deprecate GdkColor
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695
2014-05-22 09:09:55 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Benjamin Otte
16e902d20a API: Export gtk_cell_renderer_class_set_accessible_type()
This function is necessary to implement cell renderer accessibility
support.
2013-02-25 21:42:31 +01:00
Simon Feltman
283c974680 gtkcellrenderertext: Sink floating entry before using as signal argument
Sink the GtkEntry assigned to the private structure of GtkCellRendererText
before signals containing it as an argument are sent out. This keeps
language bindings from sinking the reference and then destroying the entry
when the signal closure is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=693400
2013-02-11 17:46:33 -08:00
Benjamin Otte
055b5d83d5 gtk: Use gtk_style_context_get()
... instead of soon-to-be-deprecated gtk_style_context_get_font().
2012-12-06 02:57:18 +01:00
Benjamin Otte
7747910b9d gtk: Use context's font
Instead of using gtk_style_context_get_font() in
pango_context_get_metrics(), use pango_context_get_font_description().
The context contains the font description we are about to use after all.
2012-12-06 02:57:18 +01:00
Carlos Garcia Campos
a18f018d87 cellrenderertext: Add placeholder-text property
It works similar to placeholder text in a GtkEntry, if the cell renderer
is editable and it's empty, the placeholder text is displayed.
https://bugzilla.gnome.org/show_bug.cgi?id=645514
2012-05-03 23:35:34 -04:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Cosimo Cecchi
dd2bbd1b85 cell-renderer-text: don't use gtk_entry_set_inner_border()
There's no need to, since now the theme can just tweak the padding like:

.cell.entry {
  padding: 12;
}
2012-01-31 10:04:26 -05:00
Javier Jardón
a3abc18858 Deprecate all the public API that is using GdkColor struct 2011-12-22 02:59:39 +00:00
Benjamin Otte
c5433e852b gtk: Add accessible types for cell renderers 2011-12-16 04:53:16 +01:00
Matthias Clasen
a6db55b774 GtkCellRendererTextPrivate: Improve struct packing 2011-04-12 12:31:28 -04:00
Carlos Garnacho
7c2f35d7c1 Make GtkCellRendererText use GtkStyleContext 2011-01-27 20:57:12 +01: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