Matthias Clasen
b66594b2ed
Add a forgotten return
2016-07-06 22:56:17 -04:00
Matthias Clasen
938960f229
Add a forgotten break
...
Stop iterating when we've found the printer we're looking for.
2016-07-06 22:51:52 -04:00
Matthias Clasen
bd9ceb3124
Move code after declarations
2016-07-06 22:50:34 -04:00
Matthias Clasen
29e76ad0d5
Don't call quit if the loop is NULL
...
As it will be, in the async case.
2016-07-06 22:48:37 -04:00
Matthias Clasen
821ba3dbaf
print portal: Factor out common code
...
The sync and async variants of run_dialog were mostly identical,
so factor out what they have in common.
2016-07-06 22:44:27 -04:00
Matthias Clasen
35b126ac00
portal print fixes
...
The conversion to the new print portal api had some typos
(like the inevitable 'destkop'). Also, mark window titles
for translation.
2016-07-06 22:20:23 -04:00
Matthias Clasen
66248e1270
Use g_filename_to/from_uri
...
This is slightly better than manual operation with "file://".
2016-07-06 21:59:16 -04:00
Matthias Clasen
6c68572c1e
Make sure fd is positive
2016-07-06 21:59:16 -04:00
Matthias Clasen
e56e8c5246
Use the new papersize api when serializing a page setup
2016-07-06 21:59:16 -04:00
Matthias Clasen
535eb882dd
Add api to serialize a GtkPaperSize to a GVariant
...
This will be useful in portalized printing.
2016-07-06 21:31:49 -04:00
Matthias Clasen
f9bb3296a8
Avoid a strdup
...
We can use g_variant_new_take_string to avoid a strdup here.
2016-07-06 21:05:24 -04:00
Matthias Clasen
21ab2de527
file filter: Properly serialize pattern filters
...
A very keen observation by Cosimo.
2016-07-06 21:03:35 -04:00
Matthias Clasen
9ed26abe3d
Clean up choices in finalize
...
This omission was pointed out by Cosimo.
2016-07-06 21:01:41 -04:00
Matthias Clasen
3e75bd324f
Don't leak keys
...
Spotted by Cosimo.
2016-07-06 20:57:58 -04:00
Matthias Clasen
3691ec0e7f
Clear self->mode_data when freeing the data
...
Pointed out by Cosimo.
2016-07-06 20:55:10 -04:00
Matthias Clasen
56c87d48b3
Use g_clear_object
...
Just a small cleanup.
2016-07-06 20:54:47 -04:00
Matthias Clasen
e9136a9028
Fix the 'multiple' addition
...
I was trying to add a native boolean for 'v'. Ouch.
2016-07-06 20:53:40 -04:00
Matthias Clasen
113e1e562e
Don't leak the D-Bus connection
...
I couldn't reproduce the crash that Alex was mentioning here,
so lets go with the correct unref.
2016-07-06 20:52:37 -04:00
Matthias Clasen
bd6adf7d75
Don't leak manually constructed D-Bus messages
...
Spotted by Cosimo.
2016-07-06 20:32:56 -04:00
Matthias Clasen
86c2dcc1c8
Don't leak a GError
...
Spotted by Cosimo.
2016-07-06 20:23:46 -04:00
Matthias Clasen
acefa57462
Use G_MAXINT for 'no timeout'
2016-07-06 20:23:46 -04:00
Matthias Clasen
3b25a42637
Trivial consistency fix
2016-07-06 20:23:46 -04:00
Matthias Clasen
9f05f44c7c
prepend instead of appending
...
It is cheaper.
2016-07-06 20:16:32 -04:00
Matthias Clasen
b130d1d964
Take out a redundant assignment
...
g_new0 already initializes the field appropriately.
2016-07-06 20:15:13 -04:00
Matthias Clasen
1512f6984b
Add a missing break
...
Spotted by Cosimo.
2016-07-06 20:10:35 -04:00
Matthias Clasen
02b61966f3
Use g_clear_object
...
The field we are freeing here might be NULL, as pointed
out by Cosimo.
2016-07-06 20:08:20 -04:00
Matthias Clasen
ce28ecf7d4
Improve warning messages
...
Refer to the D-Bus interface that we were actually calling out to.
2016-07-06 20:07:08 -04:00
Matthias Clasen
1f810f5109
Remove unnecessary clear call
...
As Cosimo pointed out, client_proxy is already NULL in this
case anyway.
2016-07-06 20:01:37 -04:00
Matthias Clasen
f5ce291e7c
Add portal support to GtkPrintOperation
...
Make GtkPrintOperation talk to org.freedesktop.portal.Print when
running in a sandbox.
2016-07-06 15:17:44 -04:00
Matthias Clasen
f828cf3205
print job: Add api to send data from an fd
...
This will be useful for portalized print support.
2016-07-06 13:01:25 -04:00
Matthias Clasen
4d1f4593d0
page setup: Add api to serialize to a GVariant
...
This will be useful for portalized print support.
2016-07-06 13:01:24 -04:00
Matthias Clasen
b6b0ad856e
print settings: Add api to serialize to a GVariant
...
This will be useful for portalized print support.
2016-07-06 13:01:24 -04:00
Matthias Clasen
0bbc271894
Support the Inhibit portal
...
xdg-desktop-portal now has a portal for inhibiting session status
changes. We don't need to use it if we can talk to the session
manager, but if can't, try org.freedesktop.portal.Inhibit.
2016-07-06 13:01:24 -04:00
Matthias Clasen
b3416eb80a
Implement combobox apis for GtkFileChooserNativePortal
2016-07-06 13:01:24 -04:00
Matthias Clasen
83bc2ee095
Implement combobox apis in GtkFileChooserWidget
2016-07-06 13:01:24 -04:00
Matthias Clasen
ca2967ed0a
GtkFileChooser: Add abstract api for comboboxes and checkbuttons
...
This commit adds API for adding combo boxes and check buttons to
GtkFileChooser, and getting the selected value back in ::response.
In contrast to gtk_file_chooser_set_extra_widget, these APIs are
abstract and suitable for implementation in GtkFileChooserNative.
2016-07-06 13:01:24 -04:00
Matthias Clasen
2d69f2e5f3
Adapt to simplified file chooser portal api
...
OpenFiles is gone, just set the 'multiple' option instead.
2016-07-06 13:01:24 -04:00
Matthias Clasen
2cf09e002c
file chooser portal: Port to new Request API
...
The portal API has changed, we need to adapt.
2016-07-06 12:55:19 -04:00
Matthias Clasen
8978fe5835
Use the portal when sandboxed
...
Use the sandbox helper api to find out whether to use
the file chooser portal.
2016-07-06 12:55:19 -04:00
Matthias Clasen
f0d420c319
portal: Sent more data along
...
Send the current_name, current_folder or current_file fields to
the portal.
2016-07-06 12:55:19 -04:00
Matthias Clasen
d9bf3a9eb9
portal: Send file filters to the portal
2016-07-06 12:55:18 -04:00
Matthias Clasen
e9216bbba3
Add api to serialize GtkFileFilter to a variant
...
This will be used to send filters over D-Bus in future commits.
2016-07-06 12:55:18 -04:00
Alexander Larsson
254085ba6f
Initial version of file chooser portal support
...
Implement GtkFileChooserNative for sandboxed applications
by talking to org.freedesktop.portal.FileChooser. Currently,
this supports OPEN and SAVE mode.
2016-07-05 21:42:44 -04:00
Matthias Clasen
69f63cd99c
Add a portal helper
...
Instead of open-coding checks for sandboxing in multiple
places, add a helper function. This function is identical
to glib_should_use_portal() in gio.
2016-07-05 21:42:43 -04:00
Matthias Clasen
66e2522c5a
about dialog: Use gtk_show_uri_on_window
2016-07-05 21:42:43 -04:00
Matthias Clasen
38b1716a74
Add gtk_show_uri_on_window
...
The gtk_show_uri API doesn't let us specify a parent window. With
portals, there may be an intermediate dialog, for which it is nice
to have parent window information, to place it properly.
2016-07-05 21:42:43 -04:00
Matthias Clasen
c7654c737c
Add a css parser test for background-blend-mode
2016-07-05 13:16:43 -04:00
Matthias Clasen
93f20315d1
gtk3-demo: Simplify the blendmodes example a bit
...
Just put all of the template into the resource.
2016-07-04 09:59:25 -04:00
Olivier Fourdan
e032c83822
wayland: remove unneeded statement
...
seat->pointer_info.focus is already set to NULL 2 lines above, no need to
repeat it there.
2016-07-04 09:46:24 +02:00
Olivier Fourdan
298221bfba
wayland: return child only in device_query_state()
...
On X11, device_query_state() uses XIQueryPointer() which will return a
child window only if the pointer is within an actual child of the given
window.
Wayland backend would return the pointer->focus window independently of
the given window, but that breaks the logic in get_device_state() and
later in gdk_window_get_device_position_double() because the window is
searched based on coordinates from another window without sibling
relationship, breaking gtkmenu sub-menus further down the line.
Fix the Wayland backend to mimic X11's XIQueryPointer() to return a
child only if really a child of the given window.
That's the most sensible thing to do to fix the issue, but the API here
seems to be modeled after the X11 implementation and the description of
gdk_window_get_device_position_double() is not entirely accurate.
https://bugzilla.gnome.org/show_bug.cgi?id=768016
2016-07-04 09:46:18 +02:00