Commit Graph

15 Commits

Author SHA1 Message Date
Matthias Clasen
e499a09759 Drop gtkintl.h
Include gtkprivate.h for I_() and glib-i18n.h for
gettext macros.
2022-09-24 10:03:37 -04:00
Benjamin Otte
3078b180fe Replace "gdouble" with "double" 2020-07-25 00:47:36 +02:00
Casey Jao
cc8bb5fc54 Remember to call print_cb even if print operation is cancelled.
Closes #2917.
2020-07-08 23:32:43 -04:00
Matthias Clasen
432b741ab7 gtk: Port all users to the new gtk_show_uri()
We were only handling the error in one place anyway.
2020-04-11 22:10:08 -04:00
Matthias Clasen
15f4c40a91 Rename gtkprintbackend.h to gtkprintbackendprivate.h
Follow the naming convention for private headers.
2019-05-26 22:23:52 +00:00
Matthias Clasen
d6945d81f0 print portal: use request path utilities
Less code duplication, more cookies!
2018-08-30 22:53:36 -04:00
Matthias Clasen
79b87cc543 print portal: don't leak window handles
Pointed out by Christian Persch.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1274
2018-08-15 23:21:15 +00:00
Matthias Clasen
3c2aceba63 print portal: Plug a memory leak
Pointed out by Christian Persch.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1271
2018-08-15 23:13:15 +00:00
Matthias Clasen
a01feae15b Use defines for bus names
This helps eradicate typos (we had some here).

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1267
2018-08-15 15:54:34 -07:00
Emmanuele Bassi
888dfe499d Drop the Big GDK Lock
GDK has a lock to mark critical sections inside the backends.
Additionally, code that would re-enter into the GTK main loop was
supposed to hold the lock.

Back in the Good Old Days™ this was guaranteed to kind of work only on
the X11 backend, and would cause a neat explosion on any other GDK
backend.

During GTK+ 3.x we deprecated the API to enter and leave the critical
sections, and now we can remove all the internal uses of the lock, since
external API that uses GTK+ 4.x won't be able to hold the GDK lock.

https://bugzilla.gnome.org/show_bug.cgi?id=793124
2018-02-03 12:07:10 +01: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
d9e38198c7 Avoid a race in the print portal
Same as the previous commit; use the new predictable request
object path to connect to the Response signal early.
2017-07-07 12:03:55 -04:00
Emmanuele Bassi
9557364216 gtk: Mark internal functions as static
These functions are only used within their compilation unit.
2016-10-17 11:44:10 +01:00
Matthias Clasen
b01e975667 Port GtkPrintOperationPortal to gtk_window_export_handle 2016-07-28 13:01:22 -04:00
Matthias Clasen
25fed03420 Add portal support to GtkPrintOperation
Make GtkPrintOperation talk to org.freedesktop.portal.Print when
running in a sandbox.

https://bugzilla.gnome.org/show_bug.cgi?id=768499
2016-07-08 00:09:05 -04:00