Compare commits

...

988 Commits

Author SHA1 Message Date
Matthias Clasen
e72d54c8a7 3.22.24 2017-10-04 08:09:26 -04:00
Matthias Clasen
899cfb3c50 Fix several issues with resizing
Some of the border windows were not placed correctly.

Patch by Jan Steffens.
2017-10-04 07:35:45 -04:00
Matthias Clasen
223a709403 wayland: Fix a typo
We were not setting the right tiling hint in some cases.

Patch by Jan Steffens.
2017-10-04 07:35:45 -04:00
Daniel Boles
b9989e554b ComboBox: Don’t try to remove grab on NULL device
gtk_device_grab_remove() quite rightly expects a non-NULL GdkDevice, and
we already have a branch ensuring that, into which we can move this call
2017-10-04 12:23:49 +01:00
Daniel Boles
fa4d814462 TreeMenu: Remove accidentally duplicated doc lines
Not that it actually matters, as this is not public anymore, but this
was done accidentally. Also, sync a property description to ComboBox.
2017-10-04 12:03:55 +01:00
Daniel Boles
3783934436 testcombo: Test grid :row- and :column-span-column
Ditch two items that were white and so weren’t visible on our standard
theme anyway, and use the new space to test extra grid-mode properties.

Note that if we do this then, as before, we set the ListStore on the
ComboBox before appending to it, that produced runtime warnings like:

Gtk-CRITICAL **: gtk_menu_attach: assertion 'left_attach < right_attach' failed

I didn’t look into that yet, but it may indicate that attaching items
vs. recognising their spans don’t occur in the correct order. For the
purposes of testing this, I just create the CB after filling its model.
2017-10-04 11:04:52 +01:00
Daniel Boles
4163a53630 ComboBox|TreeMenu: Slightly clarify wrap-width doc 2017-10-04 10:21:18 +01:00
Daniel Boles
7559eaf5f9 ComboBox|TreeMenu: Clarify :row|column-span-column
ComboBox and TreeMenu warned in the doc for :row-span-column that the
value must not exceed :wrap-width, but :wrap-width does not interact
with the number of rows; it’s the :column-span-column that’s relevant.

Also: Warn that spans must be > 0 for rows too, and that column spans <=
:wrap-width are also not useful for items at menu column positions > 0.

Finally, refer to items having spans, not values, as we were already
talking about values in the model (and rows in the menu).
2017-10-04 10:21:01 +01:00
Matthias Clasen
a5c2472941 3.22.23 2017-10-03 22:40:44 -04:00
Marco Trevisan (Treviño)
c91a4f31f0 HighContrast: set min-height for headerbars
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-03 22:26:36 -04:00
Marco Trevisan (Treviño)
b4371728de HighContrast: don't select .titlebar when is an headerbar
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-03 22:26:36 -04:00
Georges Basile Stavracas Neto
79bf5b8592 window: Add individual CSS classes based on edge constraints
The last touch on this patch series is making GtkWindow able to
selectively adjust various UI details based on the different
tiled edges. The main driver here is that we don't want to show
shadows on edges that are constrained.

This patch adds the necessary code to do that, while still
maintaining compatibility with the old ways.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
c415bef5de x11: Add support for _GTK_EDGE_CONSTRAINTS atom
Following the previous patch, where edge constraints support
was added to the Wayland backend, this patch introduces the
necessary code to handle the _GTK_EDGE_CONSTRAINTS atom from
X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
3bae80dfc1 wayland: consider edge constraints in surface configuration
Now that GTK windows have the ability to properly handle
per-edge tiling constraints, this patch extends GTK's
internal Wayland protocol to have a proper enum with the
relevant edge data.

Once this approach is validated, we can think of upstreaming
this work as an official Wayland protocol extension.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
d73c49ecef window: handle tiled edges separately
GTK windows don't have their tiling states really
hooked into the client-side decoration code, and
the only effect it has is disabling the resizing
edges.

With the introduction of per-edge tiling information,
we are backed by much more precise data on how the
window manager wants the app to behave.

This patch, then, fixes GtkWindow to take into account
per-edge tiling information. For compatibility purposes,
the previous tiled field was kept, and thing will just
continue working if no edge information is supplied.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
f1a3bc2f2c gdk: introduce edge constraint states
These states will be consumed by GtkWindow in order to
have better edge management on tiling situations. Their
values are supplied by the compositor, and will be send
through and X11 Atom or a Wayland protocol extension.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:43 -03:00
Daniel Boles
66767adc63 widget-factory: Demo different Frame border-styles
This shows not all, but the interesting/less predictable styles, and
the ones that correspond to the :shadow-types that were here before.
2017-10-02 20:22:33 +01:00
Daniel Boles
93fc2a8edd Revert "widget-factory: Usefully demo Frame shadow types"
This reverts commit 15a3747406.

There is a way to get different kinds of borders: it's CSS. It's better
to keep the 4 Frames and demo the different styles we can do using CSS.
2017-10-02 19:50:06 +01:00
Daniel Boles
1d80453e47 Frame: Enhance CSS docs
Note optional .flat class and that the old shadow types are replaced by
CSS border-style et al.; quote names of nodes & classes for readability.
2017-10-02 19:50:06 +01:00
Matthias Clasen
364559b789 3.22.22 2017-10-02 12:45:24 -04:00
Daniel Boles
142ef42d22 Widget: Fix obvious copypasto in set_mapped() doc 2017-10-01 20:23:59 +01:00
Daniel Boles
82a9331144 docs: css-properties: Fix wrongly repeated colour 2017-09-29 18:13:44 +01:00
Sam Thursfield
d6547060e9 flowbox: Fix annotation for GListModel binding callback
The GtkFlowBoxCreateWidgetFunc type lacked GObject Introspection
annotations for its arguments. This made gtk_flow_box_bind_model()
unusable from Python as the callback function would be passed useless
values.

The annotations that I've added match those of the similar callback
type GtkListBoxCreateWidgetFunc.

https://bugzilla.gnome.org/show_bug.cgi?id=780758
2017-09-27 13:45:08 +02:00
Daniel Elstner
a57630b30c gdk-wayland: Do not leak dummy 1x1 surface on every draw
When using EGL, neither leak nor re-create the dummy 1x1 Cairo
surface every time gdk_wayland_window_ensure_cairo_surface()
is called.

https://bugzilla.gnome.org/show_bug.cgi?id=775126
2017-09-26 21:15:21 +02:00
Daniel Boles
701f82d1c3 Button: Annotate set_image() argument as nullable
Passing NULL is valid and results in the image child being unset/removed
2017-09-24 22:20:34 +01:00
Daniel Boles
ca4730cc95 Label: Replace allow-none with nullable/optional 2017-09-24 19:19:20 +01:00
Timm Bäder
3501a7ea41 emojichooser: Plug a memory leak 2017-09-24 19:19:20 +01:00
Andre Klapper
6b899bb782 Fix broken translations of 'calendar:' settings (ignored translator comments) 2017-09-24 19:19:20 +01:00
Arash Mousavi
1b9d1105c3 Update Persian translations 2017-09-22 22:54:57 +03:30
Daniel Boles
e9570e6084 ToolItem: Fix nullable annotation put on wrong arg
D’oh
2017-09-20 23:53:54 +01:00
Daniel Boles
5c700cf575 gdkseatdefault: Grab touch events where applicable
gdk_seat_default_grab() grabs POINTER_EVENTS if the capability is
GDK_SEAT_CAPABILITY_ALL_POINTING. But that enumerator is a union that
includes GDK_SEAT_CAPABILITY_TOUCH, but we never grabbed TOUCH_EVENTS,
an unused macro that was presumably created with this purpose in mind.

So, check which of the ALL_POINTING capabilities we have, and set the
right mask of POINTER_EVENTS and/or TOUCH_EVENTS as required.

As part of this, explicitly let TABLET_STYLUS take over pointer events,
as this is the intended behaviour and was the effective result before.

This should fix touch events being lost in migrating from Device.grab()
to Seat.grab(GDK_SEAT_CAPABILITY_ALL_POINTING), as found by Inkscape.

https://bugzilla.gnome.org/show_bug.cgi?id=781757
2017-09-20 19:19:31 +01:00
Daniel Boles
f6eb767c83 Overlay: Document style classes added per position 2017-09-20 19:19:23 +01:00
Piotr Drąg
a33e8053a8 Update Polish translation 2017-09-19 02:05:52 +02:00
Daniel Boles
47879de090 Window: Clarify documentation of set_application()
Clarify that ::destroy, not ::hide*, removes a window from its app, by
replacing the mention of open windows with the blurb on destruction from
:application, completing commit 7db4bee4b6

Also link to the equivalent gtk_application_(add|remove)_window() calls,
since Application.add_window() already links back to Window:application.

* unless you use gtkmm…

https://bugzilla.gnome.org/show_bug.cgi?id=639931
2017-09-19 00:20:06 +01:00
Daniel Boles
6e42d3a34a PlacesSidebar: Avoid unused mem if !CLOUDPROVIDERS
The member GList *cloud_rows is only ever used if HAVE_CLOUDPROVIDERS is
defined, so don’t declare it if not.
2017-09-19 00:20:06 +01:00
Daniel Boles
c18ac0c4e3 PlacesSidebar: Unref cloud_manager in dispose()
We ref the CloudProviders singleton in init() but did not unref it in
dispose(). Do so, using g_clear_object().

https://bugzilla.gnome.org/show_bug.cgi?id=787600
2017-09-18 18:20:02 +01:00
Daniel Boles
bfe54d1185 SidebarRow: Unref CloudProvider on change/finalize
It was never unref()d, either when replacing the existing GObject in
set_property(), cleaning up in finalize(), or becoming a placeholder.

Fix by using g_set_object() and g_clear_object() to unref as needed.

This also drops the check that the newly set object is a valid cloud
provider account, as we don’t do the equivalent for any of the other
object-typed properties, and Carlos didn’t think this was important.

https://bugzilla.gnome.org/show_bug.cgi?id=787600
2017-09-18 18:20:02 +01:00
Anders Jonsson
c477dad41d Update Swedish translation 2017-09-18 11:14:19 +00:00
Daniel Boles
30cb5b0754 Adwaita: Fix color of focus outline on colorswatch
The focus outline disappeared as the colour of the swatch got close to
the normal focus outline colour, which is alpha(currentColor, 0.3).

Fix by making the outline an alpha’d version of the tick colour, but
more opaque than normal outlines. 0.6 seems good enough; feel free to
improve it, but at least this ensures the outline can’t vanish anymore.

HighContrast achieves this already because it applies the color property
to the main node, not the overlay. Doing that means the outline is fully
opaque, which is fine for HC obviously but was excessive for Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=787757
2017-09-16 17:02:24 +01:00
Daniel Boles
437ce0197b Adwaita: dark: Make colorswatch.light tick visible
It used $text_color unconditionally, but in :dark, text is white, so we
overlaid a white tick on any light colours, all the way to white itself.

Using these named colours doesn’t make practical or semantic sense.
Instead, use white/black over dark/light swatches, as in HC, so all
variant–swatch combos work. Light looks the same, & :dark works now.

For backdrop, use alpha 0.5, unlike 0.7 in HC, as that seemed excessive
& different from the current effect. 0.5 is almost identical to how
$backdrop_fg_colour is a 50% mix of $fg_color, & matches backdrop text.

https://bugzilla.gnome.org/show_bug.cgi?id=787531
2017-09-16 16:11:47 +01:00
Daniel Boles
009e388bb7 Expander: get_label() return is nullable
Also, use gchar to match the header.
2017-09-15 18:25:19 +01:00
Daniel Boles
b68892b5be Expander: Annotate new()’s label arg as nullable
to match new_with_mnemonic()
2017-09-14 21:19:33 +01:00
Daniel Boles
7b08d11891 Expander: Replace (allow-none) with (nullable)
The former is deprecated in favour of the latter.
2017-09-14 21:19:14 +01:00
Daniel Boles
4e1e0cf138 Expander: Explain how to conditionally style arrow 2017-09-14 21:16:16 +01:00
Daniel Boles
f2a4b2f14c Spinner: Document how to select on animated in CSS
This is not particularly obvious, so it seems worth including.
2017-09-14 19:25:26 +01:00
Daniel Boles
1b08e34c11 gtk-demo/theming: Don’t mislead about raised class
This class is not added by any widgets nor themed by Adwaita/HC.
However, it is presented here as if it does something. It doesn’t.

But we changed the 2 buttons with the .raised class to use symbolic
icons, unlike their ‘unraised’ counterparts, which is unnecessarily
confusing and might make people think .raised affects icons somehow.

So, make them use the same icons in all cases; that way, if .raised is
ever made to do anything, 6 years later, what it does will be clear.

https://bugzilla.gnome.org/show_bug.cgi?id=644248
2017-09-14 18:34:07 +01:00
Daniel Boles
1421855234 gtk-demo/Makefile: Really get deps of C GResource
The XML resides in $(srcdir), not $(builddir); it is not a built source.
Using the latter, changes to the referenced files did not cause rebuild.
2017-09-14 18:34:07 +01:00
Daniel Boles
15a3747406 widget-factory: Usefully demo Frame shadow types
Instead of showing the 4 types except for GTK_SHADOW_NONE, which are all
treated identically and provide no way for themes to differentiate, just
keep 2 Frames, and make one of them GTK_SHADOW_NONE to demo a flat Frame
2017-09-14 18:34:07 +01:00
Daniel Boles
441a144e29 Frame: Add missing fixed-width format to enums 2017-09-13 19:51:23 +01:00
Daniel Boles
26104a30a5 FlowBox: Explain how to avoid inflated min size
along the orthogonal orientation. It seems a FlowBox on its own can only
handle being shrunk along its main orientation. The orthogonal requests
a huge min size – reserving what it would need if the main orientation
got its min size, which would flow all children in 1 line orthogonally.

Adding it to a ScrolledWindow (any policy) enables free shrinking, so
size_allocate() can reflow how users in this situation probably expect.

https://bugzilla.gnome.org/show_bug.cgi?id=787021
2017-09-12 22:48:58 +01:00
Hiroyuki Ito
e7fbfdd067 ColorButton: Don’t destroy dialog @ ::delete-event
Without specifically connecting ::delete-event to something, the dialog
will be destroyed when it is closed, for example by pressing Esc. This
meant that when dismissing it this way, unlike by pressing Cancel, any
custom palette would be lost when the dialog was next opened, and so on.

Resolve this by making ::delete-event just do GTK_RESPONSE_CANCEL, so
closing the dialog has the same effect as clicking its Cancel button.

https://bugzilla.gnome.org/show_bug.cgi?id=787444
2017-09-12 21:15:53 +01:00
Philip Withnall
4b88560feb gtknotebook: Simplify some if-conditions
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=787303
2017-09-12 21:15:53 +01:00
Philip Withnall
abef21776d gtkmountoperation-x11: Do array length check before dereference
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=787302
2017-09-12 21:15:53 +01:00
Efstathios Iosifidis
92e309c84c Update Greek translation 2017-09-12 19:42:33 +00:00
Efstathios Iosifidis
3a88aac5e6 Update Greek translation 2017-09-12 19:40:44 +00:00
Stas Solovey
e9bbcf7b15 Update Russian translation 2017-09-12 19:30:36 +00:00
Stas Solovey
eeeb8f21e2 Update Russian translation 2017-09-12 19:15:22 +00:00
Cheng-Chia Tseng
d80969ae8e Update Chinese (Taiwan) translation 2017-09-12 17:24:00 +00:00
Cheng-Chia Tseng
9b52ac66fd Update Chinese (Taiwan) translation 2017-09-12 17:07:41 +00:00
hanniedu
88152adedd Updated Dutch translation 3.22 2017-09-12 12:38:19 +02:00
Matthias Clasen
fad199b406 3.22.21 2017-09-11 11:19:47 -04:00
Matthias Clasen
cf288a1b09 Fix a corner-case for emoji input
As reported in https://github.com/ibus/ibus/issues/1944,
typing u201e while holding Ctrl+Shift used to give a „
when letting go of Ctrl+Shift. This broke when we introduced
Ctrl+Shift+e to start Emoji sequences. Fix this by only
looking for Ctrl+Shift+e if we are not already in a hex
sequence.
2017-09-11 11:19:47 -04:00
Daniel Mustieles
2102f78582 Update Spanish translation 2017-09-11 13:57:21 +00:00
Ask Hjorth Larsen
d251daffeb Updated Danish translation 2017-09-10 18:16:33 +02:00
Ask Hjorth Larsen
58801a0b03 Updated Danish translation 2017-09-10 18:15:01 +02:00
Muhammet Kara
60dea67275 Update Turkish translation 2017-09-10 15:09:31 +00:00
Jordi Mas
b939932cad Fixes to Catalan translation 2017-09-10 08:22:12 +02:00
Inaki Larranaga Murgoitio
4d5e12c075 Update Basque language 2017-09-09 17:54:59 +02:00
Inaki Larranaga Murgoitio
34b4fe49ff Update Basque language 2017-09-09 17:54:30 +02:00
Matej Urbančič
6d7103b462 Updated Slovenian translation 2017-09-08 11:02:10 +02:00
gogo
9fe68b8c12 Update Croatian translation 2017-09-07 18:35:09 +00:00
Daniel Boles
660cc709fc 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:54:14 +01:00
Jiri Grönroos
70648318a3 Update Finnish translation 2017-09-07 08:41:41 +00:00
Piotr Drąg
323ce68e98 Update Polish translation 2017-09-06 20:14:41 +02:00
Çağatay Yiğit Şahin
8e434d20ae Update Turkish translation 2017-09-06 06:48:16 +00:00
Mario Blättermann
f272a2facc Update German translation 2017-09-05 17:48:13 +00:00
Marek Cernocky
4dfee01af6 Updated Czech translation 2017-09-05 16:37:09 +02:00
Jakub Steiner
417d345019 adwaita: use generic sidebar icon style
https://bugzilla.gnome.org/show_bug.cgi?id=786613
2017-09-05 13:55:44 +02:00
Daniel Mustieles
bb445a9a75 Update Spanish translation 2017-09-05 10:36:15 +00:00
Daniel Boles
a6393e1a47 Adwaita: Leave fg color of hovered emoji alone
Only HighContrast has a clear problem, and this avoids some probably
unwanted changes of certain colours in the weird greyscale emoji I have
available to test here.
2017-09-05 01:38:35 +01:00
Daniel Boles
464df4007b themes: Use $selected_fg_color for :hovered emoji
This is much needed for HighContrast as otherwise emoji are invisible
(or nearly in Inverse). It also syncs up with hovered menu items, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=787279
2017-09-05 01:03:54 +01:00
Daniel Boles
21c7ea2bd4 HighContrast: Kill abominable headerbar vseparator
Commit 70b61973fc fixed a syntax error and
unwittingly released this bizarre mutant.

https://bugzilla.gnome.org/show_bug.cgi?id=787280
2017-09-05 01:01:50 +01:00
Daniel Boles
99e27ab145 ComboBox: Don’t popdown if releasing on scrollbar
On button release, we were popping down if the event widget was anything
but priv->button. This broke scrolling by clicking a mouse button, i.e.
when releasing a click in the trough or finishing a drag of either bar.
That’s unexpected, inconvenient, and pointless. So, let’s stop doing it.

https://bugzilla.gnome.org/show_bug.cgi?id=738893
2017-09-04 23:59:56 +01:00
Anders Jonsson
2e866ca293 Update Swedish translation 2017-09-04 22:16:39 +00:00
Daniel Boles
7210945292 EmojiChooser: Ensure always have a selected button
We were only selecting a section’s button if the adjustment y coord was
within its heading, so scrolling slightly into it unchecked all buttons.
This also fixes how we could end up with the first 2 selected, somehow.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:33:24 +01:00
Daniel Boles
02e310a1d5 EmojiChooser: Check the 1st button before 1st show
We scroll to the top in show() but only ever selected a button when the
adjustment changed, which doesn’t happen in init(). Check it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:33:24 +01:00
Timm Bäder
14d376a2a6 sidebarrow: Remove useless size group
Nice try, but size groups don't work with invisible widgets anyway.
Invisible widgets request 0×0.

[reapplying after accidental reintroduction in the cloudproviders patch;
see https://bugzilla.gnome.org/show_bug.cgi?id=786123#c39]
2017-09-04 22:33:24 +01:00
Matthias Clasen
51e636be0f 3.22.20 2017-09-04 13:02:58 -04:00
Baurzhan Muftakhidinov
dd99aeb4bb Update Kazakh translation 2017-09-04 15:48:15 +00:00
Matthias Clasen
9913c4cbaa 3.22.20 2017-09-04 11:29:19 -04:00
Julius Härtl
8a940474d7 gtkplacessidebar: adapt libcloudproviders api rename
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-09-04 11:27:31 -04:00
Daniel Boles
dc7952d2c6 HighContrast: basic port of emoji CSS from Adwaita
This is better than nothing: without specific CSS, the Chooser was too
large, the emoji were too small, and the buttons were generally ugly.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 10:58:50 -04:00
Daniel Boles
517b5360f4 Adwaita: proper colours for inactive emoji buttons
Use opacity to differentiate unselected/hovered/selected buttons. It had
assumed bg < border < fg colours, which may be false, as in Adwaita:dark

This also means we do not need to special-case for the backdrop state.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 10:58:42 -04:00
Daniel Boles
419ecc9e80 Adwaita: Make use of SASS syntax for emoji stuff
This makes the theme easier to maintain.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 10:58:28 -04:00
Matthias Clasen
429a9e6b60 Updates 2017-09-04 09:56:24 -04:00
Milo Casagrande
192ca899fc Update Italian translation 2017-09-04 11:43:05 +00:00
Aurimas Černius
1e1012696a Updated Lithuanian translation 2017-09-03 23:37:27 +03:00
Balázs Úr
911ac2e3c6 Update Hungarian translation 2017-09-03 16:51:46 +00:00
Rūdolfs Mazurs
a53c533293 Update Latvian translation 2017-09-03 19:27:50 +03:00
Daniel Boles
56027e079d Adwaita: Fix ineffective theming of switch slider
in a specific case, which was applying .slider as a class on the parent
switch, instead of correctly selecting on its child node named slider.

This makes the border on the outside of a switch in a selected listbox
row look better in the light variant. Since the code was never removed,
it was clearly meant to work, and making it work is a clear improvement.
2017-09-03 14:01:17 +01:00
Daniel Boles
70b61973fc HighContrast: Fix outdated name for headerbar box 2017-09-03 13:37:39 +01:00
Daniel Boles
80bd795969 Adwaita: Fix outdated name of selection-menu arrow 2017-09-03 13:37:24 +01:00
Daniel Boles
bc7a4e5abd docs: css-overview: Don’t recommend broken syntax
Using this produced warnings about the Pango syntax of <Family> <size>
being deprecated, and the size being invalid due to no unit specified.
Also, that multi-word font family presumably wouldn’t work as expected.
2017-09-03 12:25:22 +01:00
Timm Bäder
87e76c12a9 testgtk: fix css 2017-09-03 12:20:13 +01:00
Daniel Boles
8dbb17e1f3 Toolbar: Clarify set_show_arrow() a bit more 2017-09-03 11:04:48 +01:00
Daniel Boles
66d63e4a47 Toolbar: Clarify how the arrow overflow menu works
The fact it affects the preferred size, and only works with ToolItems
that return a menu proxy item, was unclear unless deduced from other
sources, and this led to users thinking it was broken, for example:

https://stackoverflow.com/q/44644642/2757035

https://bugzilla.gnome.org/show_bug.cgi?id=787158
https://bugzilla.gnome.org/show_bug.cgi?id=787195
2017-09-03 10:58:58 +01:00
Daniel Boles
111ce61517 ToolItem: Add see-also from proxy setter to signal 2017-09-03 10:58:58 +01:00
Daniel Boles
ea73e0e0bd ToolItem: Annotate menu proxy item as nullable
It can be NULL. ::create-menu-proxy gave an example of when a NULL proxy
menu item could be useful, but the accessors did not annotate it as such.
2017-09-03 10:58:58 +01:00
Rafael Fontenelle
8216a7aa0f Update Brazilian Portuguese translation 2017-09-02 20:51:14 +00:00
Daniel Boles
baf725a795 Revert "sk.po: Consistently translate “Insert”"
This reverts commit d09bc2b108.

As an English-speaker, I know nothing about complex grammar, and it’s
been brought to my attention that some languages might differ in the
translation of the same command depending on where it appears.

So, I’d better assume everyone else knows better than me. Apologies!
2017-09-02 16:11:06 +01:00
Daniel Boles
ed782577e8 Adwaita: Fix colour mixing of emoji section button
when hovered, by using %, since SASS does not handle decimal mixes.
2017-09-02 16:01:39 +01:00
Daniel Boles
d09bc2b108 sk.po: Consistently translate “Insert”
The two occurrences disagreed on the translation, and my amateur
investigation indicates this one is correct.
2017-09-02 16:01:39 +01:00
Daniel Boles
64976f1f0d gl.po: Consistently translate/capitalise “Emoji”
GTK+ 3 and 4 disagreed on capitalisation and the translation of “Emoji”.
Use sentence case as elsewhere & the most common translation: emoticono.
2017-09-02 16:01:39 +01:00
Jordi Mas
84331b394c Update Catalan translation 2017-09-02 16:21:10 +02:00
Jordi Mas
554e1487a5 Update Catalan translation 2017-09-02 16:20:07 +02:00
Jordi Mas
9278310b3a Update Catalan translation 2017-09-02 16:16:12 +02:00
Matthias Clasen
434ece4a1c emoji chooser: No emoji in the search entry
Recursion is fun, but better avoided in the ui.

https://bugzilla.gnome.org/show_bug.cgi?id=786960
2017-09-02 08:48:47 -04:00
Matthias Clasen
172c6c1949 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:48:07 -04:00
Matthias Clasen
f3df85e528 Add input hints for Emoji input
Allow hinting input methods about whether Emoji support is
useful or not.
2017-09-02 08:48:00 -04:00
Fran Dieguez
f120334700 Update Galician translation 2017-09-02 10:07:51 +00:00
Dušan Kazik
85ca7fa612 Update Slovak translation 2017-09-02 08:06:18 +00:00
Dušan Kazik
cfafd1d69f Update Slovak translation 2017-09-02 08:02:39 +00:00
Andika Triwidada
152e9c0b3a Update Indonesian translation 2017-09-02 00:58:14 +00:00
Matthias Clasen
f0b4b45b76 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:53:11 -04:00
Piotr Drąg
1694a67083 Update Polish translation 2017-09-02 01:50:34 +02:00
Mohammed Sadiq
8d0dc64e61 emoji-chooser: fix subsequent scroll
Event handlers on scroll window should only be run once the widget
is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=786964
2017-09-01 18:31:40 -04:00
Daniel Boles
38b8b3ce1d Entry: Set tooltip text on icon for emoji chooser
https://bugzilla.gnome.org/show_bug.cgi?id=786885
2017-09-01 18:18:45 -04:00
gogo
0388f16fb4 Update Croatian translation 2017-09-01 21:55:48 +00:00
Daniel Boles
d9b5fd357f ComboBox: Dodge possible surplus disconnects
in case anyone connected any other signal on the model to this ComboBox.
2017-09-01 20:17:11 +01:00
Daniel Boles
423cd8e73e ScrolledWindow: Dodge possible surplus disconnects
In case the outgoing Adjustment for whatever reason has other handlers
referring to this SW, be sure to avoid disconnecting any but our own.
2017-09-01 16:28:44 +01:00
Daniel Boles
3ff04099a7 ComboBox: Remove pointless signal ID member fields
We don’t need to store these for disconnection, as we can just use
g_signal_handlers_disconnect_by_data(). Also, merge redundant ifs.
2017-09-01 16:28:44 +01:00
Daniel Boles
85ca68b1c2 ComboBox: Clean up handler disconnection some more 2017-09-01 16:28:44 +01:00
Dušan Kazik
d6ae627069 Update Slovak translation 2017-09-01 14:19:10 +00:00
Daniel Boles
5dc5576e14 ScrolledWindow: Fix non-disconnection of handlers
• Use disconnect_by_data() to catch both _adjustment_changed() and now
  _adjustment_value_changed(), as the latter had been missed until now.

• Also disconnect from indicator_value_changed(), which was not done in
  destroy() due to indicator_reset() and remove_indicator() disagreeing.

https://bugzilla.gnome.org/show_bug.cgi?id=775074
2017-08-31 23:17:03 +01:00
Timm Bäder
64d05b5dc6 scrolledwindow: Properly remove scrollbars
Instead of keeping an extra ref, then unparent+destroy+unref, don't keep
an extra ref and just unparent the scrollbar when appropriate.
2017-08-31 22:59:40 +01:00
Daniel Boles
f0522e9944 Window: Connect screen signals properly in init()
Do not connect to get_settings_for_screen() if we have no screen…

Use g_signal_connect(), not connect_object(), to match how set_screen()
makes these same connections, and how finalize() already disconnects.

https://bugzilla.gnome.org/show_bug.cgi?id=705640
2017-08-31 20:23:00 +01:00
Daniel Boles
169e5502d1 FileChooserWidget: Remove an unused #include 2017-08-31 20:05:32 +01:00
Daniel Boles
794c0946a5 Entry: Rename int helper to gtk_entry_clear_icon()
It was called gtk_entry_clear(), which was unnecessarily vague.
2017-08-30 21:12:56 +01:00
Daniel Boles
12d96f27d3 Entry: Fix Shift-click → extend/truncate selection
Since the move from button-press to gesture events, Shift-clicking did
not work to start a selection (from none) or truncate an existing one.

This was due to the code being copy-pasted around and some logic being
broken in the process. This makes both of those work as they should, by
shuffling it again so the end result is the same as before. Highlights:

(1) ::button-press if extending due to a single press would call
set_positions(tmp_pos, tmp_pos), which is what made the Shift+click to
create a selection work. That was lost. Add it back to make that work.

(2) ::button-press in the “Truncate current selection” branch would not
execute all the stuff around “extend_to_left”, as that was the else
case. So, set extend_selection = FALSE so we skip over that later on.

(3) BUT! This Truncate case never fired because it was in the else
branch of if (in_selection())! Of course, it must be in the true branch.

(4) The IM context was not reset if the Shift-click occurred within an
existing selection, only if it did not. In ::button-press this was the
first thing done if extending a selection, regardless. Make it so again.

https://bugzilla.gnome.org/show_bug.cgi?id=780750
2017-08-30 18:25:00 +01:00
Daniel Boles
81d6f8d81c gl.po: Remove mnemonic underlines from tooltips
It looks like these were copy-paste errors from the corresponding labels
for buttons, which should have mnemonics. Of course, tooltips cannot.
2017-08-30 14:25:14 +01:00
Matthias Clasen
beb7bba3ce Avoid empty space in the emoji chooser
We need to hide the empty flow boxes as well, to avoid
spacing between them.

https://bugzilla.gnome.org/show_bug.cgi?id=786966
2017-08-30 14:25:14 +01:00
Fran Dieguez
305ac38b6a Update Galician translation 2017-08-30 13:10:56 +00:00
Fabio Tomat
b956cba4fb Update Friulian translation 2017-08-30 09:22:45 +00:00
Daniel Boles
9f1d57e032 PlacesSidebar: Reuse strings, mark for translation
The new menu items were not marked for translation, had no mnemonics,
and were not title-cased. Reuse the strings that we already had for the
buttons shortly down the file, and mark these for translation.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-29 20:09:11 +01:00
Nelson Benítez León
07320200d1 textview: fix bug on DnD displaced limits of selection
The fix of commit f2fd655754
should be confined to DnD coords only, because otherwise
it causes the start and end of the selection to be displaced.

https://bugzilla.gnome.org/show_bug.cgi?id=785736
2017-08-29 19:12:14 +01:00
Daniel Boles
afd624bf4b TextView: :border-width broke window→widget coords
Do the converse of commit bd7c87c762 so
that a TextView with Container:border-width > 0 does not get its handles
and magnified region shifted up/left from where they should be.

https://bugzilla.gnome.org/show_bug.cgi?id=786986
2017-08-29 19:04:26 +01:00
Daniel Boles
18a6c5c4c6 Expander: Don’t set event_window over whole widget
realize() gave the event_window the allocation of the whole widget. This
was wrong; it should be that of the title_gadget, as in size_allocate().

This broke expanders in which :expanded is TRUE before showing: Input
over the entire widget was sent to the title, making the child unable to
receive it. Clicking the child unexpectedly collapsed it. Once expanded
again, things fixed themselves as size_allocate() fixed the event_window
alloc. So, queuing a reallocate or resize after show() was a workaround.

Fix by giving event_window the allocation of the title_gadget, to match
what size_allocate() does. That is symmetrical and just plain correct.

https://bugzilla.gnome.org/show_bug.cgi?id=774134
2017-08-29 18:47:33 +01:00
Debarshi Ray
a827e92226 GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:42:56 +02:00
Aurimas Černius
bbb233464c Updated Lithuanian translation 2017-08-29 15:49:02 +03:00
Rūdolfs Mazurs
07936ac71f Update Latvian translation 2017-08-29 12:17:44 +03:00
Chun-wei Fan
935e48ce09 build: Install Emoji chooser GSettings files in MSVC projects
This is needed for the Emoji chooser to work on Visual Studio builds.
2017-08-29 13:05:52 +08:00
Daniel Boles
c85f34b6fc LevelBar: Really fix underallocation of blocks
Themes should not enforce min sizes on blocks in continuous mode; in
this case, the filled block should be as large as it needs to be to
reflect the current value, and no larger or smaller than that. So, the
fact that the minimal size was selected on just levelbar block is wrong:
we should also require the levelbar.discrete class to apply min sizes.

The widget should enforce whatever correct minimum size results from the
above fix, by reapplying commit 78b4885fe8

Except: we should not allocate/draw the filled block if the value is 0,
as in this case, the LevelBar should be empty, not have a min-size fill.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-29 00:03:47 +01:00
Daniel Boles
bd7c87c762 TextView: Fix gesture coords with :border-width >0
Container:border-width caused the x/y coords converted to iters to be
offset inwards by that width, breaking positioning/selecting by gesture.

So, subtract :border-width in widget_to_text_window_coords(). This fixes
gesture positions, & plays fine with :margin & CSS margin/border/padding

N.B.: This is not to endorse :border-width. It’s gone in GTK+ 4 & weird
on a TextView: it’d be more intuitive to – if you must! – set it on the
TV parent. Really, please just use CSS instead. Still, it’s easy to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=759725
2017-08-28 22:28:49 +01:00
gogo
25abbfdcf6 Update Croatian translation 2017-08-28 21:12:23 +00:00
Daniel Boles
669e8c4de5 Entry: Handle :show-emoji-icon becoming false
Disconnect the now-unwanted signal handler, and hide the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:29 +01:00
Daniel Boles
6094caf984 Entry: Drop redundant typecasts
https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:26 +01:00
Daniel Boles
fccf19b905 Entry: Only open emoji picker on 2ndary icon click
We hijack the secondary icon for the emoji picker, but the handler for
::icon-press did not check the pressed icon and opened it for either.

https://bugzilla.gnome.org/show_bug.cgi?id=786938
2017-08-28 20:31:02 +01:00
Daniel Boles
1fd834c54d ComboBox: Don’t redundantly show() scrolled_window
It and its child were already show()n in list_setup().
2017-08-28 20:01:57 +01:00
Daniel Boles
1f1fdfe757 ComboBox: Fix wrongly matched signal disconnect()s
Various disconnections had the wrong flags and/or data, so we failed to
disconnect a pile of signals, shown by 0 returned by the disconnect_*()
functions. Fix this, and use the nicer disconnect_by_*() while here.
2017-08-28 20:01:57 +01:00
Daniel Boles
1301723905 Revert "combobox: remove superfluous GTK+ grabs"
This reverts commit 46b4e5d388.

Apparently these weren’t so redundant, because their removal introduced
at least 2 bugs in list-mode ComboBoxes: failure to close the popup upon
clicking out of it, and failing to receive mouse input in the popup of a
CB in a modal window. It may also have caused (even more!) stuck grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=738387
https://bugzilla.gnome.org/show_bug.cgi?id=776793
2017-08-28 20:00:59 +01:00
Daniel Boles
c789bf7718 ComboBox: Really set list-mode popup transient-for
set_transient_for(toplevel) was only called in list_setup(). It was easy
to make a test showing a NULL :transient-for instead of the correct one.

So, move the call from list_setup() to popup_for_device(). Also do that
for window_group_add_window(), which means not calling it redundantly.

(I tried using a ComboBox:parent-set handler, but the Inspector’s CB
didn’t like that: it calls popup_for_device() twice and closes on button
release. Anyway, using popup() is much more concise than a new handler.)
2017-08-28 20:00:17 +01:00
Daniel Boles
70534de382 ComboBox: List-mode popup must open on CB’s screen
The screen for the list-mode popup_window was only being set in
set_popup_widget(), i.e. when changing modes, so if the ComboBox was
moved to a different screen later, the popup would appear on the
original one, which is wrong.

Worse, this (somehow) broke opening some combos in the Inspector.

Fix this by moving the call to set_screen() to popup_for_device(), so
the popup_window is put on the correct screen each time around.

https://bugzilla.gnome.org/show_bug.cgi?id=468868
https://bugzilla.gnome.org/show_bug.cgi?id=786771
2017-08-28 19:33:54 +01:00
Ask Hjorth Larsen
3b1e4031df Updated Danish translation 2017-08-28 19:27:02 +02:00
Matej Urbančič
7d7284ddbb Updated Slovenian translation 2017-08-28 19:23:15 +02:00
Matej Urbančič
0a1fba2172 Updated Slovenian translation 2017-08-28 19:19:40 +02:00
Gábor Kelemen
64eae69ff7 Update Hungarian translation 2017-08-28 16:09:38 +00:00
Balázs Meskó
ff625f69ea Update Hungarian translation 2017-08-28 16:05:37 +00:00
Fabio Tomat
13efeb0ad3 Update Friulian translation 2017-08-28 14:38:07 +00:00
Fabio Tomat
429b46d6aa Update Friulian translation 2017-08-28 14:12:06 +00:00
Marek Cernocky
639e2e992f Updated Czech translation 2017-08-28 15:54:20 +02:00
Милош Поповић
1169751955 Update Serbian Latin translation 2017-08-28 11:03:13 +00:00
Марко Костић
1ae2c662ff Update Serbian translation 2017-08-28 11:00:46 +00:00
Chun-wei Fan
3d4b721e28 build: Fix last commit
Another pango-1.0.lib was added accidently to the list of .lib files for
the GTK+ to link to.  Remove that, although it shouldn't really matter.
2017-08-28 16:28:18 +08:00
Chun-wei Fan
09b7dc81a6 build: Integrate introspection builds into MSVC projects
This is so that it is easier for one building GTK+ with Visual Studio to
build the introspection files as well in one shot.  Note that this is
not built by default, so one needs to select the gtk3-introspect
explicitly to build (and clean up) the introspection files.

For this to work, one needs to ensure the following:
-A complete build of GObject-Introspection in $(GlibEtcInstallRoot),
 that is built with the same installation of the Python interpretor that
 is used here (see PythonDir and PythonDirX64 in
 gtk3-version-paths.[vsprops|props]).
-Introspection files for ATK, GDK-Pixbuf and Pango, also in their proper
 locations under $(GlibEtcInstallRoot), which should be built with the
 same G-I installation.
2017-08-28 16:18:24 +08:00
Chun-wei Fan
e579245b1d build: Prepare NMake Makefiles for MSVC project integration
The build/win32/detectenv-msvc.mak needs to be updated for Visual Studio
2017, and we ought to add quotes to surround the copy destination path
for the introspection files, so that we do not bail out in the copy
process (cmd.exe's copy command does not like '+' in them that are not
quoted).
2017-08-28 16:15:11 +08:00
Chun-wei Fan
24fd61512b build: Set PythonDir according to MSVC version in projects
This is to make this more in-line with what is in the G-I projects, so
that we could use this to build the introspection files for GTK+-3.22.x
directly from the project files.  This is intended to follow the MSVC
versions used to build the official CPython Windows binaries, i.e.:
-3.3.x, 3.4.x: for MSVC 2010, 2012, 2013, which is built with 2010
-3.5.x, 3.6.x: for 2015 and 2017, which is built with 2015.
2017-08-28 15:56:18 +08:00
Chun-wei Fan
74ffc85b80 build: Use PythonDir in Visual Studio projects
This is to avoid any confusion with the PYTHONPATH envvar that is used
by Python for additional locations for looking for modules.
2017-08-28 15:55:59 +08:00
Julius Härtl
f68421376b gtkplacessidebar: remove oversight of old code
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-28 08:13:12 +02:00
Changwoo Ryu
35cf9fefd6 Update Korean translation 2017-08-27 21:24:01 +00:00
Changwoo Ryu
cd33f3abc4 Update Korean translation 2017-08-27 21:22:39 +00:00
Carlos Garnacho
26d8a6dfba menu: Avoid cancelling the menu on GTK+ grabs inside the GtkMenu
Allows again sliders as menuitems, broken by commit 9b032073.

https://bugzilla.gnome.org/show_bug.cgi?id=786029
2017-08-27 20:43:11 +01:00
Daniel Boles
d1d8658898 PlacesSidebar: Avoid warning about unused variable
end_icon is only used if HAVE_CLOUDPROVIDERS is defined, so only declare
it under the same condition.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-27 15:37:34 +01:00
Daniel Boles
53e0bd91e6 SidebarRow: need config.h for HAVE_CLOUDPROVIDERS
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-27 15:37:34 +01:00
Daniel Boles
b1705523bb testgtk: Remove an unused variable 2017-08-27 15:36:13 +01:00
Mario Blättermann
532f665135 Update German translation 2017-08-27 08:28:45 +00:00
Andika Triwidada
4c982d7e7f Update Indonesian translation 2017-08-27 01:43:41 +00:00
Matthias Clasen
7b7a4bf1d0 Remove an unused field
Drag contexts are objects, so there is no need to carry a
manual refcount around.
2017-08-26 19:58:52 -04:00
Matthias Clasen
888559235f x11: Fix initial drag cursors
Under X, we were not setting the right drag cursor initially,
because at current_action == action == 0, initially. Fix this
by explicitly using the right cursor when grabbing.
2017-08-26 19:58:52 -04:00
Anders Jonsson
c2df454621 Update Swedish translation 2017-08-26 22:20:51 +00:00
Milo Casagrande
2029ad0484 Update Italian translation 2017-08-26 15:40:24 +00:00
Matthias Clasen
45b54041ed emoji: Use the right gettext domain
Otherwise, strings are not translated.

https://bugzilla.gnome.org/show_bug.cgi?id=786841
2017-08-26 10:26:47 -04:00
Piotr Drąg
91e684b667 Update Polish translation 2017-08-26 16:11:51 +02:00
Fabio Tomat
3fbcab528f Update Friulian translation 2017-08-26 11:23:42 +00:00
Baurzhan Muftakhidinov
0911cac1fe Update Kazakh translation 2017-08-26 06:26:39 +00:00
Rafael Fontenelle
7a9ad88270 Update Brazilian Portuguese translation 2017-08-26 02:17:43 +00:00
Julius Härtl
a446da7eb6 gtkplacessidebar: implement libcloudproviders support
Add integration of the libcloudproviders DBus API to the
GtkPlacesSidebar by showing name and sync status of the cloud providers.
The exported menu is rendered as a GtkPopover.

The sidebar will be updated if the list of cloudproviders changes e.g.
by adding or removing an account. If any cloud provider changes detailed
information like sync status only the individual sidebar row gets
updated.

Co-authored-by: Carlos Soriano <csoriano@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-25 16:58:21 -04:00
Daniel Boles
696b9a5df7 ComboBox: Use iter before popdown() may invalidate
Bad actors, such as our very own FileChooserButton, may connect to the
:popped-up property and alter the model as the menu becomes in/visible.

We were getting an iter to the model while popped-up, then doing
popdown(), then using the iter, which may have just been invalidated by
the errant notify::popped-up handler. If so, we quickly crash fatally.

This is clearly bonkers, but until such patterns are removed, we have to
work around them. So, set_active() from the clicked item while it is
known to be valid, by moving the call to set_active() before popdown().

While here, change set_active_iter(iter) to set_active_internal(path) to
avoid pointlessly going through the iter to get the path we already have

https://bugzilla.gnome.org/show_bug.cgi?id=729651
2017-08-25 21:00:51 +01:00
Daniel Boles
32553ad3a2 Expander: Also hide child GdkWindow when collapsed
Just adding/removing to/from the BoxGadget is not sufficient; that
leaves the GdkWindow hanging around, taking input, changing the cursor,
and all sorts of other nefarious shenanigans.

Resolve by ensuring the child’s GdkWindow is unmapped if collapsed.

Note: the reflexive solution is just to set_visible(child, expanded),
but it is best to avoid messing with the child’s :visible property.

https://bugzilla.gnome.org/show_bug.cgi?id=776937
2017-08-24 21:18:55 +01:00
Daniel Boles
4ac58badf6 ComboBox: Clarify documentation of get_active_iter
https://bugzilla.gnome.org/show_bug.cgi?id=618160
2017-08-24 20:57:01 +01:00
Daniel Boles
947bca195c Popover: Include window shadows in overshoot calcs
.update_position() enforces that non-Wayland platforms must position a
Popover within its parent Window. We use the allocation of the Window
to translate the position and check for overshoot on each of its sides.
Calling Widget.get_allocation() of a CSD Window includes its shadows.

But shadows were not excluded from the area in which we can position.
Thus, Popovers could get positioned in the shadow of CSD windows, where,
at least on X11, no input is received. Therefore, positioning a Popover
over a shadow meant its child widgets within that area became unusable.

Fix by calling Window.get_shadow() and including it in the overshoot on
each side. This adjusts for how the allocation includes shadows, making
overshoots with and without shadows the same. Thus, we avoid considering
shadows as viable for positioning, favouring a side where input works.

https://bugzilla.gnome.org/show_bug.cgi?id=786209
2017-08-24 20:57:01 +01:00
Daniel Boles
3a2c379f3c testpopover: Use HeaderBar to get CSD decorations
This helps test whether the Popover positioning gets messed up by the
presence of CSD shadow or other accessories around the content area.

https://bugzilla.gnome.org/show_bug.cgi?id=786209
2017-08-24 20:57:00 +01:00
Cheng-Chia Tseng
53be5d2fc9 Update Chinese (Taiwan) translation 2017-08-24 16:39:23 +00:00
Anders Jonsson
64f3b38cd7 Update Swedish translation 2017-08-24 09:44:28 +00:00
Anders Jonsson
29d733b457 Update Swedish translation 2017-08-24 09:37:42 +00:00
Piotr Drąg
beca77441d Update POTFILES.in and POTFILES.skip 2017-08-24 02:45:44 +02:00
Daniel Boles
0969419610 SidebarRow: Add Unmount tooltip to eject_button
It was reported that the lack of a tooltip made its purpose unclear.
This can be solved by just copying PlacesViewRow’s eject_button tooltip.

https://bugzilla.gnome.org/show_bug.cgi?id=766909
2017-08-23 21:41:47 +01:00
Tom Schoonjans
b9b4684740 GtkFileChooserNativeQuartz: restore parent focus after closing dialog
Tested for both modal and non-modal dialogs

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:30 -04:00
Tom Schoonjans
bed1bd1a0c GtkFileChooserNativeQuartz: improve support for file filters
Instead of using conditional compilation, use respondsToSelector to
check at runtime for setAccessoryViewDisclosed.

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:30 -04:00
Tom Schoonjans
fb59b090d6 GtkFileChooserNativeQuartz: add support for Mountain Lion and Mavericks
https://bugzilla.gnome.org/show_bug.cgi?id=784723 introduced support for
native file chooser dialogs on macOS, but due to the use of generics in
the patch, there will be compilation errors on pre-Xcode 7 platforms,
such as Mountain Lion and Mavericks.

I strongly recommend to revert this patch when the oldest supported
macOS release is bumped to Yosemite (10.10).

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:30 -04:00
Lionel Landwerlin
12d10f239b gdk: wayland: always set buffer scale on size update
We're only updating this when we have an EGL window. This means we
have the wrong scaling factor when using Vulkan.

https://bugzilla.gnome.org/show_bug.cgi?id=786492
2017-08-23 10:44:20 -04:00
Fabio Tomat
f955c3eabc Update Friulian translation 2017-08-23 12:55:53 +00:00
Milo Casagrande
0ba84208ab Update Italian translation 2017-08-23 07:12:14 +00:00
Milo Casagrande
012dc8f12a Update Italian translation 2017-08-22 16:41:00 +00:00
Daniel Boles
6537f7dad8 getting_started: Sync filenames & section headings
The order of Examples 3 and 4 was swapped, so the headings updated
themselves, but the filenames were left reflecting the old order.

https://bugzilla.gnome.org/show_bug.cgi?id=786553
2017-08-22 14:19:40 +01:00
Matthias Clasen
efbf6f183e 3.22.19 2017-08-22 08:33:11 -04:00
Matthias Clasen
cfdb9f95dc Handle emoji data change in emoji chooser
Update the settings schema to follow the change in Emoji data,
and make the emoji chooser code handle the new format.
2017-08-22 08:20:03 -04:00
Matthias Clasen
bdff792462 Add shortnames to emoji data
The json file is from

https://github.com/emojione/emojione/tree/master/extras/alpha-codes

It is under the MIT license.
2017-08-22 08:19:56 -04:00
Matthias Clasen
7a3126f4bb Don't consume too many key releases
The Emoji input support in GtkIMContextSimple was
unintentionally consuming too many key release
events. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=786594
2017-08-22 06:41:31 -04:00
Daniel Mustieles
45322136ed Update Spanish translation 2017-08-21 11:33:27 +00:00
Pawan Chitrakar
02273ffd05 Update Nepali translation 2017-08-20 22:44:56 +00:00
Mario Blättermann
70cfeb5dcd Update German translation 2017-08-20 14:40:07 +00:00
Christian Kirbach
30b264d0b7 Update German translation 2017-08-20 14:33:49 +00:00
Pawan Chitrakar
866a795683 Update Nepali translation 2017-08-20 09:42:28 +00:00
Baurzhan Muftakhidinov
1660665f53 Update Kazakh translation 2017-08-19 17:33:57 +00:00
Alexandre Franke
b43cad266d Update French translation 2017-08-19 14:44:33 +00:00
Alexandre Franke
d752ce4800 Update French translation 2017-08-19 14:41:23 +00:00
Mario Blättermann
6a3a0cdb48 Update German translation 2017-08-19 11:46:22 +00:00
gogo
e5e182285b Update Croatian translation 2017-08-18 20:38:20 +00:00
gogo
f0031fc356 Update Croatian translation 2017-08-18 20:36:41 +00:00
Carlos Garnacho
2218b5a116 gtkbutton: Avoid keyboard grabs
Seems to be there for the sole purpose of ensuring the button
shall receive the key release on keyboard-triggered activation.

For the cases where this makes sense (eg. comboboxes, menubuttons,
...) gtk+ already does ensure the menu is popup after key release.
This makes the grab pretty useless, and there's many other cases
where it doesn't make sense (eg. button being activated
programmatically from an event handler in another widget).

Fixes button activation unintendedly triggering shortcut inhibition
on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=786480
2017-08-18 20:45:07 +02:00
Rui Matos
d17aeec08c gdkwindow: Avoid re-setting the opaque region if it doesn't change
This avoids, at least, needless chatter with the compositor and the X
server in X11's case.

https://bugzilla.gnome.org/show_bug.cgi?id=786469
2017-08-18 18:58:19 +02:00
Dušan Kazik
690bfacb16 Update Slovak translation 2017-08-18 16:07:04 +00:00
Marek Cernocky
170d73e549 Updated Czech translation 2017-08-18 10:56:19 +02:00
Chun-wei Fan
ebadaaa3e0 GDK-Win32: Fix AeroSnap on HiDPI
Commit 1d0fad3 revealed that there were some assumptions made that were
actually to compensate for the bug fixed by that commit, so we need to
remove those assumptions as they would result in AerSnap to not work
properly on HiDPI screens.

Also re-do how we set the x and y positions of our GdkWindow, so that we
are more consistent across the board when we go between a GDK window
coordinate and a Windows API window cooredinate.

This would also simplify the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=785999
2017-08-18 13:26:58 +08:00
Carlos Garnacho
136f43e329 gdk/x11: Extract GdkDeviceTool tool ID from "Wacom Serial IDs" property
This property contains 5 integers, of which the last 2 respectively
contain the tool serial number and tool ID. We were only extracting the
first so far, but GdkDeviceTool also has API getters for the latter,
which remained 0.

https://bugzilla.gnome.org/show_bug.cgi?id=786400
2017-08-17 16:26:12 +02:00
Fran Dieguez
c3622b2454 Update Galician translation 2017-08-16 22:46:55 +00:00
Daniel Boles
0721dad970 GdkDisplay: Call the correct push|pop_error_trap()
It is wrong to assume all Displays are of the same class as the default.

https://bugzilla.gnome.org/show_bug.cgi?id=784016
2017-08-15 20:34:12 +01:00
Daniel Boles
99c8e30c02 ScrolledWindow: Bin unreachable ternary branches
We already checked that the child is not NULL above.

Coverity CID 1454191
2017-08-15 20:32:56 +01:00
Daniel Boles
3249b351af Widget: Fix outdated comments about tooltips
They are not usually yellow anymore, the previous advice about how to
style them was for pre-3.20 versions, and the immediate replacement (CSS
class .tooltip) does not seem ready for primetime.

https://bugzilla.gnome.org/show_bug.cgi?id=784421
2017-08-15 19:17:33 +01:00
Chun-wei Fan
7b240ae298 gtk/gtkemojichooser.c: Don't use g_autoptr()
We can't use g_autoptr() on non-GCC-style compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-08-15 23:40:18 +08:00
Aurimas Černius
727be58e6f Updated Lithuanian translation 2017-08-15 16:48:49 +03:00
Matthias Clasen
4cb9ba57b4 Remove an erroneous unref
This was leftover by accident.
2017-08-15 06:41:19 -04:00
Matthias Clasen
c56545f721 Redo emoji data slightly
No longer store variation sequences explicitly. Instead, put a 0
in the sequence where the modifiers will be inserted. This is more
compact, and it allows us to put variations directly into the
recent section. Update the type of the recent-emoji setting to
match these changes.
2017-08-15 06:41:19 -04:00
Matthias Clasen
f27d928e33 Don't update headings in an idle
It is not necessary since flow box invalidation is
all synchronous currently. If that ever changes,
this code will need adjustment.
2017-08-15 06:41:18 -04:00
Daniel Boles
1efbcb0f82 testpopover: Sync initial vals of controls & props
The ComboBoxes were initially empty, rather than reflecting the initial
values of the properties. The CheckButtons were only correct by chance.
Fix this by setting the initial values on the widgets and binding them
to the properties using SYNC_CREATE, so the two are always synced up.

https://bugzilla.gnome.org/show_bug.cgi?id=786209
2017-08-14 23:17:14 +01:00
Hannes Müller
7b68c234b1 configure: Add missing quotes to unbreak an AS_IF
Without quoting, the comma in AC_MSG_ERROR was wrongly interpreted as
separating the if and else paths.

https://bugzilla.gnome.org/show_bug.cgi?id=786287
2017-08-14 23:15:41 +01:00
Daniel Mustieles
9faf1348c9 Update Spanish translation 2017-08-14 16:04:33 +00:00
Fran Dieguez
bf780d7ee3 Update Galician translation 2017-08-13 22:20:29 +00:00
Muhammet Kara
a6de59845a Update Turkish translation 2017-08-13 16:34:57 +00:00
Matthias Clasen
c7061d88a2 emoji: Fix a leak
We were leaking the list of recently used Emoji here.
Pointed out by Timm Bädert.
2017-08-13 07:52:31 -04:00
Matthias Clasen
66d9f4fe95 emoji: Start search on the first character
There is no need to wait for a longer prefix here.
We already display all the content anyway, it will
only get less.
2017-08-13 07:52:19 -04:00
Matthias Clasen
3b493d2937 Drop a redundant helper
We already had a function that does exactly what
is needed here.
2017-08-13 07:52:04 -04:00
Matthias Clasen
e6fd4837a2 Remove an unused field
Nothing uses bubble_window, so it can go.
2017-08-13 07:52:04 -04:00
Rafael Fontenelle
01c1c7f45d Update Brazilian Portuguese translation 2017-08-12 22:55:14 +00:00
Rafael Fontenelle
373a02feee Update Brazilian Portuguese translation 2017-08-12 22:41:32 +00:00
Daniel Boles
127cc11e30 InfoBar: Fix wrong/uninit var use in code example
https://bugzilla.gnome.org/show_bug.cgi?id=786144
2017-08-12 21:08:05 +01:00
Мирослав Николић
6c235d5a5a Updated Serbian translation 2017-08-12 20:03:28 +02:00
Мирослав Николић
4326f565b2 Updated Serbian translation 2017-08-12 20:02:20 +02:00
Daniel Boles
e85cea7b3d Adwaita: Sync CSS files with current SASS
A recent commit for emoji also updated seemingly unrelated parts of the
generated CSS files, presumably due to other things that changed in
master. The CSS files should be kept in sync with their SASS sources.
2017-08-12 15:49:07 +01:00
Daniel Boles
53ce02344c LevelBar: Avoid unnecessarily copying allocation
Just use the original allocation, instead of copying it and passing that
2017-08-12 14:25:56 +01:00
Andika Triwidada
6bdb4b12cb Update Indonesian translation 2017-08-12 13:15:04 +00:00
Andika Triwidada
517d568f40 Update Indonesian translation 2017-08-12 13:13:04 +00:00
Daniel Boles
bfafe9aaee convert-emoji: Add missing braces 2017-08-12 14:06:09 +01:00
Daniel Boles
929108d31a convert-emoji: Don’t pointlessly do rest of loop
skip can never become FALSE again, so break as soon as it becomes TRUE.
2017-08-12 14:04:35 +01:00
Piotr Drąg
130b6d836d Update Polish translation 2017-08-11 22:27:40 +02:00
Piotr Drąg
9b49baa992 emojichooser: Add context to the Objects category string
To disambiguate it from Objects in the Inspector.
2017-08-11 22:18:50 +02:00
Piotr Drąg
a2f142edb2 Update POTFILES.skip 2017-08-11 21:55:24 +02:00
Matthias Clasen
d428739770 widget-factory: Add a use of show-emoji-icon
This also adds a testcase for nested popovers that was
missing in widget-factory so far.
2017-08-11 15:44:11 -04:00
Matthias Clasen
d56505f74d entry: Add support for an Emoji chooser
Add an "Insert Emoji" item to the context menu in entries.
We also add a show-emoji-icon property, which when set to
TRUE, will add an icon that can be clicked to bring up
the Emoji chooser.
2017-08-11 15:43:49 -04:00
Matthias Clasen
340c520bd0 Fix a problem with focus handling in modal popovers
When the popover is dismissed, we return the focus to
where it came from. However, by using gtk_widget_grab_focus,
we were messing up the selection if that widget happens to
be an entry. Special-case GtkEntry and use
gtk_entry_grab_focus_without_selecting to avoid this issue.
2017-08-11 15:42:54 -04:00
Matthias Clasen
45b2e162ae Add an Emoji chooser widget
Add a popover that shows color Emoji, with a search entry.
The recently-used Emoji are stored in a GSetting.
2017-08-11 15:42:54 -04:00
Matthias Clasen
a584bcb88e Add Emoji data
The json file is imported from the (MIT-licensed) emoji.json[0] node
module, which generates it from the emoji list published by the
Unicode Consortium.

This commit also adds a little tool to convert the data into
a compact GVariant, and the result of that conversion, which is
added to libgtk as a resource. The following commits will make use
of it.

[0] https://github.com/amio/emoji.json
2017-08-11 15:04:07 -04:00
Piotr Drąg
edca930e75 Update Polish translation 2017-08-11 00:09:45 +02:00
Fran Dieguez
56ce335612 Update Galician translation 2017-08-10 13:55:33 +00:00
Fran Dieguez
cf4ddf07e7 Update Galician translation 2017-08-10 09:52:33 +00:00
Fabio Tomat
ba99e23861 Update Friulian translation 2017-08-09 12:52:10 +00:00
John Ralls
d09bd2e2d3 Duplicate the TIC strings before NULLing the GObject data.
NULLing the data strings in GObject frees and invalidates the pointers
returned by g_object_get_data so we need our own copy of the values.
2017-08-08 23:19:26 +03:00
Daniel Boles
8a22e3598d Revert "levelbar: Don't underallocate block widgets"
This reverts commit 78b4885fe8.

That commit causes a block always to be shown at the min side, even when
the value is 0, in which case, no fill should be shown.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-08 18:59:03 +01:00
Chun-wei Fan
7f065b379c gtk/gtkfilechoosernativewin32.c: Declare variables at top-of-block
Since GTK+-3.22.x is not advertised to use C99, make sure that the build
works on pre-C99 compilers such as pre-2013 Visual Studio.
2017-08-08 17:13:34 +08:00
Matthias Clasen
f534c971df Avoid the use of g_autofree
We can't use this in code that may be built on win32,
so lets just not use it at all.
2017-08-08 17:10:00 +08:00
Matthias Clasen
e1cf6281fe 3.22.18 2017-08-07 19:36:19 -04:00
Daniel Boles
a6a547c2e0 Layout: Fix documentation on getting the GdkWindow
Members are not public like they used to be, so accessors must be used.
2017-08-08 00:00:55 +01:00
Daniel Boles
4ce5bed724 Revert "Widget: Remove obsolete hack-arounds for HandleBox"
This reverts commit 12805a4fbf.

I must have been looking at the wrong tree because HandleBox is only
deprecated in GTK+ 3, not removed.
2017-08-07 19:38:12 +01:00
Daniel Boles
cf955a5459 Container: Don’t scroll to unset focus child coord
In gtk_container_real_set_focus_child(), we try to scroll to the
position of the new :focus-child if we have h or v adjustments.

gtk_widget_translate_coordinates() returns FALSE if neither widget is
realized or in other situations that cause output parameters x and y not
to be set. Thus, if the caller did not initialise x/y and uses them even
if the function returns FALSE, they are using uninitialised variables.

In gtk_container_real_set_focus_child(), we did not check the return
value but merrily went ahead and used x and y regardless. This is UB, as
caught by Valgrind, as well as being pointless.

The trivial fix is to exit early if (!gtk_widget_translate_coordinates).

https://bugzilla.gnome.org/show_bug.cgi?id=776909
2017-08-07 19:21:03 +01:00
Daniel Boles
12805a4fbf Widget: Remove obsolete hack-arounds for HandleBox
It is long gone. The commit c9d9db0fcc
identified these as ugly-but-functional workarounds for it, only.

https://bugzilla.gnome.org/show_bug.cgi?id=776909
2017-08-07 18:48:18 +01:00
Debarshi Ray
65b18a4fc1 main: Set the error if gtk_init_with_args fails
This fixes a fallout from 8a7d0ab481 where the error wasn't being
set when a display couldn't be opened right after parsing the
commandline.

It also fixes an older bug where the error would be left unset if the
commandline had already been parsed before (ie. when gtk_initialized
is TRUE).

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2017-08-07 19:34:55 +02:00
Debarshi Ray
66b24f29e1 docs: gtk_init_with_args will also fail if the commandline was invalid
Be more explicit to match the gtk_init_check documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2017-08-07 19:34:55 +02:00
Debarshi Ray
1031fa914a docs: gtk_init_check will also fail if the commandline was invalid
The existing documentation seems to suggest that gtk_init_check will
ignore any failure to parse the commandline arguments, and that its
return value only depends on its ability to initialize the windowing
system. That's not true.

Be more explicit to avoid misunderstandings.

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2017-08-07 19:34:55 +02:00
Daniel Boles
2b049d5d66 AccelLabel: set_accel_closure() arg is nullable 2017-08-07 10:33:05 +01:00
Daniel Boles
777caab077 AccelLabel: set_accel_widget() arg is nullable 2017-08-07 10:29:00 +01:00
Matej Urbančič
b5b0c57a95 Updated Slovenian translation 2017-08-07 09:13:06 +02:00
Daniel Boles
69576cd510 HeaderBar: Use less clashing appmenu fallback icon
process-stop-symbolic is unintuitive if represented as a stop sign as in
Adwaita, and completely ambiguous if represented as a cross like the
window close button in other icon themes.

Instead, use application-x-executable, which is already used elsewhere
as a fallback if no specific icon can be found for the application.

https://bugzilla.gnome.org/show_bug.cgi?id=784624
2017-08-06 18:07:30 +01:00
Daniel Boles
f70796dea3 docs: gtk/running: Document the GTK_CSD env var
It was not documented before.

https://bugzilla.gnome.org/show_bug.cgi?id=778791#c1
2017-08-06 17:42:17 +01:00
Daniel Boles
b03f787a99 AccelLabel: Fix typos of Ctl to Ctrl 2017-08-06 17:38:08 +01:00
Daniel Boles
fd5e929905 icon-browser: Add missing document-edit icon
https://bugzilla.gnome.org/show_bug.cgi?id=777515
2017-08-06 03:24:06 +01:00
Daniel Boles
9d532da2dd gdkdisplay: Remove a pointless assignment 2017-08-06 01:12:08 +01:00
Matthias Clasen
43195fd997 Enough with the beeping!
Don't beep when modifiers are released in entries.
This was an inadvertent change that snuck in with
the emoji support.

Also, don't beep while entering an emoji name.
There is entirely too much beeping here.
2017-08-05 19:33:28 -04:00
Daniel Boles
c48297ed12 AccelLabel: Fix displaying accel unichars >= 0x80
In GTK+ 2, the ch < 0x80 was ORd with klass->latin1_to_char, and that
was unconditionally set to TRUE in the class init function, so
effectively the ch < 0x80 never mattered before or served any purpose.

When klass->latin1_to_char was deleted from the class in commit
f760538f17, this check’s sense changed.

The resuls was that accel keyvals with gunichar value >= 0x80 stopped
being rendered as symbols, instead falling back to their keysym name.
Instead of recognisable symbols for these, we get raw, often obscure,
and untranslatable keysym names. This breaks accessibility as well as
client users who may be parsing such accels and migrating from GTK+ 2.

So, remove the < 0x80 to restore the behaviour from before said commit.

https://bugzilla.gnome.org/show_bug.cgi?id=783906
2017-08-05 20:28:08 +01:00
Matthias Clasen
a86de5905c Add support for entering emoji by name
This commit adds some basic support for entering emoji by name
to GtkIMContextSimple. To begin an emoji sequence, use Ctrl-Shift-e
instead of Ctrl-Shift-u that is used for hex input. Otherwise, the
behavior is the same: you can can let go of the modifier keys and
end the sequence with space or enter, or hold on to the modifier
keys and end the sequence by releasing them.

Only a limited, fixed set of names is supported at this time, see
the GtkIMContextSimple docs for a full list.
2017-08-04 14:57:05 -04:00
Timm Bäder
78b4885fe8 levelbar: Don't underallocate block widgets
https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-04 01:50:58 +01:00
Daniel Boles
46a8559cd4 Window: Also quote Window address in Popover error
This is symmetrical with how we already do that for the Popover, and it
could be useful for debugging.
2017-08-03 21:18:49 +01:00
Daniel Boles
fe5f650088 widget-factory: Add tooltip to Entry icon
just to show we can.
2017-08-03 20:42:54 +01:00
Daniel Boles
9af612d314 Fix some nullable Returns annotations
based on reports and patches by Iñaki García Etxebarria:

https://bugzilla.gnome.org/show_bug.cgi?id=781246
https://bugzilla.gnome.org/show_bug.cgi?id=785423
2017-08-03 20:26:20 +01:00
Daniel Boles
4ba86706be GtkFixed: Update documentation intro
• Add GtkLayout as a @See_also since it includes fixed-pos functionality
• Drop mention of the long-gone Linux framebuffer port
• Explain how to work around the problems with RTL text
2017-08-03 13:02:20 +01:00
Jiri Grönroos
ef7ee16368 Update Finnish translation 2017-08-03 09:51:38 +00:00
Timm Bäder
8a17848f02 entry: get_icon_area returns in entry coordinates
Document what the returned coordinates are relative to.
2017-08-03 10:23:27 +01:00
Daniel Boles
5acee3a3e0 Layout: Tweak documentation blurb
Being addable to a ScrolledWindow is not interesting; now that SW
auto-adds a Viewport if needed, so can DrawingArea and any other widget.

Mention GtkFixed in case the reader just wants that bit of functionality
2017-08-03 10:18:14 +01:00
Olivier Fourdan
1c23bce350 wayland: add shortcut inhibitor support
This adds support for the shortcut inhibitor protocol in gdk/wayland
backend.

A shortcut inhibitor request is issued from the gdk wayland backend for
both the older, deprecated API gdk_device_grab() and the new gdk seat
API gdk_seat_grab(), but only if the requested capability is for the
keyboard only.

https://bugzilla.gnome.org/show_bug.cgi?id=783343
2017-08-02 12:38:52 +02:00
Daniel Boles
7dd3349751 bindings: Avoid iterating array if it is never set
If query.return_type is not one we want, binding_compose_params() is
not called, and so params remains a NULL pointer. However, the code was
then unconditionally iterating it regardless. Don't if it is still NULL.

CID 1452218 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
15. var_deref_op: Dereferencing null pointer params.
2017-08-01 20:41:23 +01:00
Daniel Boles
6063a89235 cssselector: Ensure we do not index out of bounds
This would only happen if the last element was deprecated, but it should
be avoided anyway.

CID 1388852 (#1 of 1): Out-of-bounds read (OVERRUN)
12. overrun-local: Overrunning array pseudo_classes of 16 32-byte
elements at element index 16 (byte offset 512) using index i + 1U (which
evaluates to 16).
2017-08-01 20:16:40 +01:00
Daniel Boles
a381a06b12 Notebook: Remove null check after dereference
This function clearly assumes the parameter children cannot be NULL, and
the call sites seem to perform enough checks to confirm this.

CID 1388869 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking children suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
2017-08-01 20:15:15 +01:00
Daniel Boles
cd7e5fae22 Calendar: Add default case to appease Coverity
CID 1432024 (#1 of 1): Uninitialized scalar variable (UNINIT)
2. uninit_use_in_call: Using uninitialized value rect.x when calling
calendar_arrow_rectangle.

Add a default case to the switch which will bail out with
g_assert_not_reached(), which should reassure Coverity that the method
is always called with a valid value that is handled in the switch.
2017-08-01 20:15:15 +01:00
Daniel Boles
5e6293e54f cssbordervalue: Fix possible use of uninitialised
If value->values[i] is NULL, then values[i] was left uninitialised.
The code then reads each element of values[].

CID 1432029 (#1 of 1): Uninitialized pointer read (UNINIT)
11. uninit_use: Using uninitialized value values[i].
2017-08-01 20:12:44 +01:00
Timm Bäder
0b230d34c4 scrolledwindow: Remove useless function call
We never use the result.
2017-08-01 19:10:10 +01:00
Daniel Boles
1088056a5d Widget: Do not dereference before type check 2017-08-01 18:54:12 +01:00
Timm Bäder
505d5e41c2 gtkapplication: g_dbus_proxy_new_sync can return NULL
Specifically, in the case where @error is set.
2017-08-01 18:54:12 +01:00
Daniel Boles
df10ec7b9b Entry: Fix unset icon tooltip hiding Entry tooltip
Our ::query-tooltip handler first checks whether the pointer is over any
of the icons, returning their tooltip if so, and if not chains up to
Widget::query-tooltip in order to show the text for the widget overall.

But ensure_has_tooltip(), which exists to update :has-tooltip based on
whether ::query-tooltip is needed, only set :has-tooltip to TRUE if any
icon had a tooltip, without caring whether the widget as a whole does.

That is asymmetrical and meant that if the Entry had a tooltip, but
subsequently all icons had their tooltips unset, :has-tooltip would be
set to FALSE, and hence the tooltip for the widget would become lost.

The fix is to set :has-tooltip to TRUE if the widget has a tooltip of
its own, and we only need to check the icons if that is not the case.

https://bugzilla.gnome.org/show_bug.cgi?id=785672
2017-08-01 18:10:38 +01:00
Daniel Boles
ce792384c5 Entry: Warn about corner case hiding icon tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=785672#c4
2017-08-01 18:10:38 +01:00
Daniel Boles
3680e3d40b Entry: Fix get_icon_at_pos()
This was comparing the input position, which is documented as being
relative to the top-left of the Entry allocation, to icon allocations
that were not adjusted accordingly. This could result in tooltips for
icons not being shown in various conditions, since the ::query-tooltip
handler uses get_icon_at_pos() to check whether to show an icon tooltip.

The fix is to compare to the icon border box, not border allocation, as
CssGadget::get_border_box() adjusts relative to the widget. Better yet:
we can just make CssGadget::border_box_contains_point() compare for us.

Delegating to Entry::get_icon_area(), which manually reimplements
CssGadget::get_border_box(), would also work, but this is simpler.

https://bugzilla.gnome.org/show_bug.cgi?id=780938
2017-07-31 20:05:11 +01:00
Daniel Boles
ad06a08b99 testentryicons: Set tooltips on all icons
Just to test tooltips in all cases; what was already here
should have been sufficient, but this doesn't hurt.

While here, also add some instructive placeholder text.

https://bugzilla.gnome.org/show_bug.cgi?id=780938
2017-07-31 20:05:11 +01:00
Timm Bäder
d9170e1978 entry: make sure priv->current_pos is valid
We can e.g. get the entry dispose()d and a focus_out event after that
(because the toplevel unsets the focus which previously was the entry).
We then later use priv->current_pos in a call to pango API which makes
sure the given index is valid for the given layout. Since we lazily
create a GtkEntryBuffer in get_buffer() and a PangoLayout lazily in
gtk_entry_create_layout, these 2 are always valid but don't match
priv->current_pos in this situation.

Fix this by resetting priv->current-pos in dispose().

https://bugzilla.gnome.org/show_bug.cgi?id=785255
2017-07-31 20:05:04 +01:00
Matej Urbančič
a30220d4e3 Updated Slovenian translation 2017-07-27 15:53:08 +02:00
Matej Urbančič
c0d88a5b7b Updated Slovenian translation 2017-07-27 15:51:09 +02:00
Carlos Garnacho
9b032073cb gtkrange: Instaurate GTK+ grabs while manipulating ranges
It should not be necessary for most situations, except while there's
GDK grabs coercing events in a different way.

https://bugzilla.gnome.org/show_bug.cgi?id=782870
2017-07-26 12:53:33 +02:00
Carlos Garnacho
54c26e0983 gtkgesture: Do not ignore events from other GdkWindows than the widget's
There's GDK grab situations (eg. pointer motion outside the grab window
in combination with a GTK+ grab) where a gesture may receive events from
windows that are not the widget's.

The _update_widget_coordinates() still does work for those situations, so
just let these events go through instead of ignoring them.

https://bugzilla.gnome.org/show_bug.cgi?id=782870
2017-07-26 12:48:44 +02:00
Carlos Garnacho
d6d4217f3d gtklabel: Fix touch link handling under wayland
Refactor the code updating the active link under the current coordinates
into a separate function, and call it on GtkGestureMultiPress::pressed
so the link is updated on GDK_TOUCH_BEGIN. Based on a patch by
Jan-Michael Brummer <jan.brummer@tabos.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=776903
2017-07-25 18:36:12 +02:00
Carlos Garnacho
0daf796763 gtklinkbutton: Set cursor on button's event window
Setting the cursor on the widget window (i.e. the parent widget's) is
finicky because the cursor needs to be updated on crossing events, and
will yield the wrong result for other master devices that happen to be
in other areas of the same parent widget's window.

Just set it always on the event window created by the GtkButton parent
class. That window was causing the crossing events, so the rectangle
that gets the hand cursor set will be the same size, and we don't need
to track pointer crossing state that way.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-25 18:36:12 +02:00
Carlos Garnacho
b53a6fb092 wayland: Clear tablet tool cursor on proximity out
This ensures that the tablet tool will get the cursor updated even if it
happens to fall within the same window again on the next proximity in.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-25 18:36:12 +02:00
Carlos Garnacho
18eeaf704e gdkwindow: Update cursor for tablet tools in the window
This check must be done explicitly on Wayland as the master device for
tablet tools differ from the Core Pointer. This ensures that whenever a
tablet tool is inside a window and the cursor is programmatically changed,
it will be visually updated too.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-25 18:36:12 +02:00
Carlos Garnacho
3f09833253 wayland: Observe GDK_SEAT_CAPABILITY_TABLET_STYLUS on gdk_seat_get_slaves()
This flag wasn't being honored so far...
2017-07-25 15:35:41 +02:00
Jason Gerecke
32919a4a02 wayland: Implement support for tablet wheel scrolling
Adds support for creating scroll events from Wayland tablet wheel events.
Even though no Wacom tablet puck has a smooth-scrolling wheel, both event
types need to be generated to make the upper layers happy.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-20 14:11:26 +02:00
Carlos Garnacho
e6863da8fc wayland: Make function to create scroll event more generic
Add GdkWaylandPointerData and GdkDevice arguments so it can be
used across master devices.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-20 14:11:26 +02:00
Jason Gerecke
3a83de295d wayland: Get implicit grab serial information from tablet devices
If a tablet device is used to perform actions like window moving or resizing,
GTK must provide the correct implicit grab serial number over Wayland to Mutter
in order for the action to succeed. This commit adds tablet support to the
implicit serial getters.

https://bugzilla.gnome.org/show_bug.cgi?id=777333
2017-07-20 12:23:15 +02:00
Jonas Ådahl
376ff1ae60 wayland: Throttle system bell requests
If a bad behaving application tries to make the window/display beep too
often, throttle the beep requests so that we don't end up filling the
Wayland socket queue.

The throttle is set to 50 beeps per second, which far more beeps than
will ever make any sense from a user experience point of view, but will
avoid terminating due to an excessive amount of requests.

https://bugzilla.gnome.org/show_bug.cgi?id=778188
2017-07-20 10:03:51 +08:00
Jonas Ådahl
f78585b7c3 wayland: Make beep requests go through the GdkDisplay
This way we can add things like throttling.

https://bugzilla.gnome.org/show_bug.cgi?id=778188
2017-07-20 10:03:43 +08:00
Matthias Clasen
59857e8f20 3.22.17 2017-07-18 22:55:39 -04:00
Matthias Clasen
448d76b8e8 update expected test results 2017-07-18 22:55:39 -04:00
Timm Bäder
65b6aafb45 filechooserwidget: Let the rename entry hexpand
This makes a difference with other locals where error messages are
longer than the standard width of entry+spacing+button.
2017-07-18 15:11:36 -04:00
Iñaki García Etxebarria
5edeba5965 Add nullable return annotation to gtk_text_mark_get_name
https://bugzilla.gnome.org/show_bug.cgi?id=781936
2017-07-18 15:10:24 -04:00
Iñaki García Etxebarria
743eaeecf2 Add nullable return annotation to gtk_notebook_get_tab_label
https://bugzilla.gnome.org/show_bug.cgi?id=781935
2017-07-18 15:08:02 -04:00
Cody Russell
68b92cc6ef Update API for El Capitan+
Use NSAnimationContext where possible.
2017-07-18 14:54:11 -04:00
Cody Russell
fc1f0b171c os x: Add new versions 2017-07-18 14:46:45 -04:00
Daniel Aleksandersen
ff982658ee Update the URLs of known licenses to HTTPS
Use HTTPS by default for security/privacy. Avoids slow redirects.

https://bugzilla.gnome.org/show_bug.cgi?id=766517
2017-07-18 14:36:02 -04:00
Arun Raghavan
f05e6b2936 gtkapplication: Mark gtk_application_get_active_window() as nullable
https://bugzilla.gnome.org/show_bug.cgi?id=784888
2017-07-18 14:35:39 -04:00
John Ralls
7e362638ac Copy gtk_clipboard_get_default implementation to gtkclipboard-quartz.c
Fixes bug 784323.
2017-07-18 11:16:58 -07:00
Piotr Drąg
4b6c68b51e Update POTFILES.in 2017-07-18 19:53:57 +02:00
Tom Schoonjans
8c691b8232 GtkFileChooserNativeWin32: add support for get_filter and set_filter
https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
626ac112f0 testgtk.c: native file chooser filter changes
Set the filter before showing the dialog
Afterwards, fetch the last active filter and display its name.

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
291eda6675 GtkFileChooserNativeQuartz: add support for get_filter and set_filter
https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
2f6c90636d GtkFileChooserNative: documentation updated
https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
db87140cf3 GtkFileChooserNativeQuartz: add support for filters
Includes:
* Simple glob patterns (*.ext, *.*,...)
* MIME types
* pixbuf formats

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
6d104813cc GtkFileChooserNativeQuartz: add partial support for extra widget
When the extra widget is a GtkLabel, then its text will be displayed as
a message in the NSSavePanel or NSOpenPanel

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
af7022988c GtkFileChooserNativeQuartz: add support for GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
Which is via NSOpenPanel, not NSSavePanel...

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
ce4c9a9ad6 GtkFilechooserNative: add macOS support
Based on the Win32 implementation, as well as the macOS file chooser
from
https://github.com/GNOME/gedit/blob/master/gedit/gedit-file-chooser-dialog-osx.[ch]
Not fully tested yet, but working properly so far.
TODO: filter support, extra widget (label), documentation...

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Fabio Tomat
1dd559134c Add Friulian translation 2017-07-15 20:28:20 +02:00
Bastien Nocera
a6dcb80fb4 image: Fix loading of pixdata GResources
Pixdata is deprecated but some software already use GtkImage widgets
with image data loaded from GResource-backed pixdata. As the
security-problem ridden pixdata loader was removed, we need to manually
check whether the GResource data is pixdata, and load it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=781583
2017-07-12 14:05:49 +02:00
Matthias Clasen
91614e38e3 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:21:42 -04:00
Matthias Clasen
15e361e793 Avoid a race in the file chooser portal
Use the new predictable request object path and connect
to the Response signal before issuing the portal call.
This avoids a race that is pretty unlikely to hit in
the filechooser case.
2017-07-07 12:21:34 -04:00
Daniel Boles
c23205dc82 label: Remove extra quote in code example 2017-07-07 08:14:27 +01:00
Daniel Boles
ac21aff55b GdkRGBA: Fix typo precentage => percentage 2017-07-06 13:59:53 +01:00
Jason Gerecke
3d9a945803 x11: Assign GDK_SOURCE_TABLET_PAD when necessary
Wacom tablets often have a "pad" device which houses multiple buttons. At
present, these devices are incorrectly marked as GDK_SOURCE_PEN which can
cause problems for some software.

https://bugzilla.gnome.org/show_bug.cgi?id=782040
2017-06-30 20:41:36 +02:00
Daniel Boles
6ecf0ff055 migrating-StyleContext: CSS does support bindings
so remove the bit in the migration guide that says it doesn’t.
2017-06-22 20:51:41 +01:00
Daniel Boles
d33540c607 css-overview: Fix typo “{with=>which} is disabled” 2017-06-22 20:41:41 +01:00
Baurzhan Muftakhidinov
fcb00d7493 Update Kazakh translation 2017-06-22 14:28:19 +00:00
Mart Raudsepp
bb13421fd3 GdkWaylandWindow: Fix version numbers in export_handle() docs
This change appeared first in 3.22.16 release, not 3.22.13.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-06-22 05:39:25 +03:00
Matthias Clasen
4bb0d25c5b 3.22.16 2017-06-20 15:16:19 -04:00
Matthias Clasen
1a6ccd1b0a Update a11y tests
Expected output of a11y tests has changed.
2017-06-20 15:16:19 -04:00
Marek Cernocky
33fbad4580 Updated Czech translation 2017-06-20 14:32:46 +02:00
Daniel Mustieles
4bbf444a1a Updated Spanish translation 2017-06-19 17:35:54 +02:00
Carlos Garnacho
9e740bd435 gdk: Set vid/pid on wayland tablets
This was missed so far... Use %.4x format, in order to behave just
the same than X11.
2017-06-16 19:30:10 +02:00
Will Thompson
fdb3cc94f6 headerbar: fix "widow" typo in docs 2017-06-15 16:28:16 +01:00
Kjartan Maraas
9b1c175961 Updated Norwegian bokmål translation 2017-06-14 07:45:40 +02:00
Debarshi Ray
d1f53b1e07 GtkActionHelper: Remove unnecessary NULL check
This NULL check has existed since commit 652f16dd98, when
GtkActionHelper was first introduced, but so has the assertion at the
top to ensure the validity of 'widget'.

https://bugzilla.gnome.org/show_bug.cgi?id=783587
2017-06-13 21:58:18 +02:00
Debarshi Ray
aed628f100 GtkActionHelper: Allow a NULL action-name to unset the previous GAction
https://bugzilla.gnome.org/show_bug.cgi?id=783587
2017-06-13 21:58:18 +02:00
Matthias Clasen
6f4e4952a3 file chooser: Don't pass NULL as title to the portal
This causes critical warnings.
2017-06-13 13:09:56 -04:00
Felipe Borges
d940388561 printunixdialog: Update collate icon as entry changes
By relying on GtkSpinButton default activation behavior, the
collate icon doesn't get updated when a new number is typed
in the copies spin button.

https://bugzilla.gnome.org/show_bug.cgi?id=759308
2017-06-07 14:29:34 +02:00
Nelson Benítez León
9d5c6aaabc gtktextdisplay: remove unused code
In render_para() function, which is called for every text line that
needs to be drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=783397
2017-06-05 14:27:46 +01:00
Matthias Clasen
3b5195c44f dist icon.list
Otherwise things will not work in a release tarball.
2017-06-02 22:28:27 -04:00
Matthias Clasen
2eb389c951 icon-browser: Add a few icons
These have appeared recently.
2017-06-02 22:05:58 -04:00
Matthias Clasen
23b7e81ed4 icon browser: Make icons a bit larger
Use 48x48 in the list, instead of 32x32. We have the space.
2017-06-02 22:05:58 -04:00
Matthias Clasen
51b1445cd1 icon browser: Add a 'copy to clipboard' button
This makes it more obvious how to use the icon.
2017-06-02 22:05:58 -04:00
Matthias Clasen
ebb00ad680 icon browser: put icons as data
Instead of hardcoding all the add_icon calls,
read the icon list from a keyfile, for easier
extensibility.
2017-06-02 22:05:58 -04:00
Daniel Boles
2aa4248e8f testsuite/scrolledwindow: Try non-overlay/non-auto
It was only testing the default configuration, where overlay scrolling
is on and both scrollbars use POLICY_AUTOMATIC. We should also test the
other 3 configurations that are available by including non-overlay
scrollbars and/or those that use POLICY_ALWAYS.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-06-02 19:36:06 +01:00
Daniel Boles
fcfad2dd7e ScrolledWindow: Don’t req size for autohidden bars
POLICY_AUTOMATIC means scrollbars are only shown when needed, i.e. when
the size of the window is not large enough to show the entire child. So
when measuring the preferred size, such scrollbars should be ignored.

But measure() added size for *any* non-overlay scrollbar of the opposite
orientation, e.g. for horizontal size, it added the width of vscrollbar.
So we requested for child + bar, & having enough for child meant that the
policy hid the bar, leaving extra space empty below/right of the child.

Fix this by only adding size for such bars if they use POLICY_ALWAYS.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-06-02 19:36:04 +01:00
Timm Bäder
7214f4d4c9 scrolledwindow: Avoid critical when removing source
Make sure indicator->conceil_timer is actually set before trying to
remove it.
2017-06-02 19:02:01 +01:00
Dan Torop
d9a9530f28 wayland: selectively cancel key repeat on key release
Under Wayland, when multiple keys are pressed and the user releases a
key, key repeat should continue unless the key released is the one
currently repeating.

In the case of:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key2 repeat
- key2 release

The behavior should be to cancel keyboard repeat, though key1 is still
held down. This is consistent with prior X11/XWayland behavior.

The following also must work:

- key1 press
- key2 press
- key2 release
- key2 press
- key1 release
- key2 should continue to repeat

The fix for bug #778019 should continue to work:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key1 release
- key2 should repeat

The choice to change the counter nkeys to the flag repeat_active
helps to solve the second test case.

https://bugzilla.gnome.org/show_bug.cgi?id=781285
2017-06-02 19:18:05 +02:00
Olivier Fourdan
2d41d772d7 wayland: fix xdg_surface test in move/resize drag
begin_resize_drag() and begin_move_drag() check for xdg_surface being
not null, but those apply on xdg_toplevel so they should check for
xdg_toplevel being non-null instead.

https://bugzilla.gnome.org/show_bug.cgi?id=781945
2017-06-02 15:54:50 +02:00
Olivier Fourdan
c94f40b893 wayland: check parent surface for subsurface
When an event is received while a tooltip is showing, the GtkTooltip's
event handling code can end up calling gdk_window_set_transient_for()
from gtk_tooltip_set_last_window().

The Wayland GDK backend will try to automatically create a subsurface
in gdk_wayland_window_set_transient_for() but if the parent surface is
gone meanwhile, this will will cause a crash when trying to create a
subsurface from a parent with a null surface.

Checking for the parent is not sufficient, we ought to check for the
parent surface as well to avoid the crash.

https://bugzilla.gnome.org/show_bug.cgi?id=782283
2017-06-02 15:43:34 +02:00
Olivier Fourdan
63e05158ea wayland: Do not map toplevel utility as popup
Applications can specify the type hint as utility even on toplevel
windows.

When that toplevel is also marked as a transient for another window,
GDK Wayland backend would translate that as an xdg_popup which is not
appropriate.

While utility temp windows should remain mapped as subsurfaces (such as
the ones used by treeviews), regular windows should not translate as
neither a subsurface nor an xdg_popup.

https://bugzilla.gnome.org/show_bug.cgi?id=781945
2017-06-02 15:16:13 +02:00
Christoph Reiter
a2e2f38642 gtkfilechoosernativewin32: Fix support for non-ASCII paths
The code used SIGDN_URL to get an URL for the selected item, but Windows URLs
are a mix of unicode and percent encoded characters in the locale encoding
and not something GFile can understand. The result is a garbage file
path.

Instead use SIGDN_FILESYSPATH to get a real file path if available.

Also checks the return value of g_utf16_to_utf8 because file paths on
Windows can contain lone surrogates which would make the conversion fail.

https://bugzilla.gnome.org/show_bug.cgi?id=783347
2017-06-02 13:20:25 +02:00
Matthias Clasen
6b3f2131c5 Redo the listbox dnd example
Rewrite this example to have better drag highlighting.
2017-05-31 21:15:34 -04:00
Daniel Boles
3850574146 Adwaita: Add missing rule for fullscreen headerbar
Another selector forces round corners for headerbars in a stack, and it
has higher priority than the selector covering the non-stack case from
commit 712a8adbd9. Totem’s MainToolbar
happens to be in a stack, and we should maintain symmetry here anyway.

So, as window classes .maximized and .tiled are excluded from this other
selector, the newly handled .fullscreen case must be excluded here also.

https://bugzilla.gnome.org/show_bug.cgi?id=770513
2017-05-31 19:08:28 +01:00
Daniel Boles
c7fd37bd5b HighContrast: Regenerate CSS files with sassc 2017-05-31 18:45:59 +01:00
Daniel Boles
ae4bd65acd HighContrast: Update parse-sass.sh; remove Gemfile
Make parse-sass.sh use sassc instead of the old Ruby method.
2017-05-31 18:45:24 +01:00
Daniel Boles
1cb3fc75b3 Adwaita: Remove unused Gemfile 2017-05-31 18:45:04 +01:00
Daniel Boles
712a8adbd9 themes: Square corners on fullscreen win headerbar
Totem uses a fullscreen window with a headerbar at the top, and without
this change, that headerbar has rounded corners, which look different
from a maximised window and let video content show through beneath.

https://bugzilla.gnome.org/show_bug.cgi?id=770513
2017-05-31 08:16:46 +01:00
Aurimas Černius
cfaaf8300d Updated Lithuanian translation 2017-05-30 22:32:23 +03:00
Debarshi Ray
bebd5020ec wayland: Don't warn if the display is lost, skip exit handlers
There is no need to have every application log a warning when the
Wayland display server goes away, and we are using _exit instead of
exit elsewhere.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=745289
2017-05-30 09:16:45 +02:00
Марко Костић
1d52356855 Update Serbian translation 2017-05-27 22:41:26 +00:00
Debarshi Ray
425e4df100 wayland: Don't abort when preparing the source if connection is lost
Aborting the application makes it look like an application bug, when
it is the expected thing to do when the Wayland display server goes
way. eg., when the user logs out. The log level is also demoted to
avoid a storm of warnings in the log from all applications whenever
this happens.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=783047
2017-05-25 11:53:15 +02:00
Emmanuele Bassi
b492db25a1 textview: Make GTK_TEXT_WINDOW_PRIVATE public
The GTK_TEXT_WINDOW_PRIVATE enumeration value is really *not* private.
Internally, it's used as a simple "invalid value" marker, and
application and library developers are supposed to use it as such in
their own code.

Let's just document it, and since the GtkTextView documentation and
internals go a long way to state the fact that it should not be used as
an argument value, let's add some pre-condition checks as well.

This commit fixes GtkSourceView's use of GTK_TEXT_WINDOW_PRIVATE as
default value for a GObject property that was broken by the change in
glib-mkenums to honor the `/*< public >*/` and `/*< private >*/`
trigraphs.
2017-05-23 06:41:18 +01:00
Jonas Ådahl
e5ed52b6c9 tests: Add testforeign
Add a test for exporting a handle. There are no GTK+ API for this, but
only per backend GDK API, and so far only Wayland is supported. There
is a private GdkWindow API but it's not exposed externally.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-05-23 09:39:29 +08:00
Jonas Ådahl
dba57db1f3 GdkWaylandWindow: Allow calling export() multiple time
Allow getting the same export handle multiple times by calling
gdk_wayland_window_export_handle() multiple times. For each time
export() is called, a unexport() must be called to unexport.

When the window is already exported, the exported callback is called
via a idle handler. If there are multiple export() calls, they are
invoked in order either when the handle is received by the display
server, or when the idle callback is invoked.

Calling unexport() will not affect future invokations of the exported
callback, unless all export() calls have their unexport() call count
matched.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-05-23 09:39:29 +08:00
Olof-Joachim Frahm
8cf774d668 Move style change for popover creation.
Creating with `gtk_popover_new_from_model` should be exactly the same as
if via `gtk_popover_new` plus `gtk_popover_bind_model`.

Also remove the style if the model is unbound at any point.
2017-05-22 14:26:32 +01:00
Timm Bäder
91f83011da widget: Remove useless assignment
We don't use adjusted_allocation after this line.
2017-05-22 14:26:32 +01:00
Timm Bäder
7d5ac88232 examples/drawing: Don't call gtk_main_quit
This is a GtkApplication so it will do the right thing when closing the
window.
2017-05-22 14:26:32 +01:00
Timm Bäder
eb8870c912 fallback-c89: Include config.h
It holds all the HAVE_<func> definitions.
2017-05-22 14:26:32 +01:00
Timm Bäder
a2c8af7f32 widget: remove double assignment
We never read the value we assign here.
2017-05-22 14:26:32 +01:00
Timm Bäder
94dd289fd0 placesview: Remove duplicate GtkMountOperation assignment
we assign a new mount operation a few lines later again.
2017-05-22 14:26:32 +01:00
Timm Bäder
3380cd63c1 levelbar: Don't allocate 0 blocks
Could result in a division by zero later on and doesn't make a lot of
sense anyway.
2017-05-22 14:26:31 +01:00
Timm Bäder
46decc6182 grid: Remove unnecessary NULL checks
The minimum and natural pointers passed to measure are never NULL and
that's the only place where we call gtk_grid_get_size_for_size.
2017-05-22 14:23:14 +01:00
Timm Bäder
7adc38a64c GtkGestureMultiPress: Remove superfluous NULL check
The rect parameter in gtk_gesture_multi_press_set_area is annotated as
nullable and the code handles the rect==NULL case, but the
g_return_if_fail kept that case from ever happening.
2017-05-22 14:23:14 +01:00
Timm Bäder
b831e97af4 label: Remove dead ternary operator 2017-05-22 14:23:14 +01:00
Timm Bäder
48ee8016c8 filechooserwidget: Remove always-false error case
_gtk_search_engine_new never returns NULL, it always returns a valid
GObject with at least the simple search engine initialized.
2017-05-22 14:23:14 +01:00
Timm Bäder
6c9b11d367 sidebarrow: Remove useless size group
Nice try, but size groups don't work with invisible widgets anyway.
Invisible widgets request 0×0.
2017-05-22 14:23:14 +01:00
Timm Bäder
c08f2cb7b5 label: Remove useless if statements
We never pass nullable pointers into get_size_for_allocation.
2017-05-22 14:23:14 +01:00
Olivier Fourdan
5209995171 gtkwindow: Hide CSD title bar when undecorated
When switching from decorated to undecorated, the title bar should be
hidden as well.

https://bugzilla.gnome.org/show_bug.cgi?id=782117
2017-05-22 09:54:11 +02:00
Robert Ancell
de4818f088 docs: Fix copy-paste error in gtk_file_chooser_get_extra_widget() doc comment 2017-05-20 13:07:33 +12:00
Lapo Calamandrei
622a0f8611 Adwaita: Avoid accindental border on last treeview header
The :last-child selector supposed to reset the border was
overridden by the :hover selector. This is fixed by moving the
:last-child selector after the overriding one.
Thanks to Sebastian Keller for spotting.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=779078.
2017-05-17 18:16:28 +02:00
Lapo Calamandrei
15f3a527ef Adwaita: regenerate the css with sassc 2017-05-17 18:06:39 +02:00
Lapo Calamandrei
67953e9cfb Adwaita: modify parse-sass.sh script to use sassc 2017-05-17 18:05:13 +02:00
Robert Ancell
4d1c0317cc EntryBuffer: Don't generate changed events when input is truncated 2017-05-17 09:05:38 +12:00
Daniel Boles
16e23bebe3 widget-factory: Use :relief=none, not class .flat
The rest of the ui file follows that convention.
2017-05-13 21:55:28 +01:00
Matthias Clasen
2dfcb47190 3.22.15 2017-05-11 15:09:33 -04:00
Timm Bäder
73179d3771 listbox: Manually unparent placeholder in dispose
We can't make the placeholder a non-internal child as that breaks
applications that previously relied on foreach() to only return
GtkListBoxRow instances. Instead, unparent the placeholder manually in
dispose.

https://bugzilla.gnome.org/show_bug.cgi?id=782494
2017-05-11 15:01:42 -04:00
Matthias Clasen
866bd834e4 Revert "listbox: Properly remove placeholders"
This reverts commit b7fdc5b447.

This was found to break the expectations of existing listbox
users.
2017-05-11 15:01:05 -04:00
Lapo Calamandrei
31a0eead4c Adwaita: regenerate the css 2017-05-11 15:19:49 +02:00
Lapo Calamandrei
5c98b2b8ed Adwaita: restyle entry-tag
Fix the sizing and spacing, blue tags for the bright variant,
similar to what gnome-documents was shipping, and inverted gray
tags for the dark variant, not vanishing on hover.
2017-05-11 15:19:49 +02:00
Matthias Clasen
e0ad573c82 3.22.14 2017-05-10 14:57:00 -04:00
Carlos Garnacho
a3178fd665 gtkclipboard: Fix typo
The standard atom is UTF8_STRING.
2017-05-10 20:25:40 +02:00
Emmanuele Bassi
1a489831b3 build: Fix the check on sassc's presence
If sassc is not available we do not want to include the rules to
regenerate the CSS out of the SCSS files.
2017-05-10 14:31:09 +01:00
Chun-wei Fan
801e9cf74b build/win32/replace.py: Fix replacing items in files with UTF-8 content
Some files that this script will process might have UTF-8 items in
there, which can cause problems on Python 3.x as it is more strict and
careful on unicode issues.

Fix this by:
-Doing what we did before on Python 2.x
-Opening the file with encoding='utf-8' on Python 3.x
2017-05-09 18:37:20 -07:00
Matthias Clasen
a3b852e9ac 3.22.13 2017-05-09 14:01:57 -04:00
Matthias Clasen
2b0eafb8dc Fix the build
It seems that new gtk-doc doesn't like this variable,
so drop it.
2017-05-09 14:01:57 -04:00
Jonas Ådahl
d8bb38588a GtkWindow: Don't double free export user data
The user data passed when exporting a Wayland window was supposed to be
freed using the destroy_func, as is commonly done. This was previously
broken, as the user data was just NULL:ed when exported, and only
actually destroyed when unexporting before having exported.

While e016d9a5db fixed this, it introduced
a regression, as GtkWindow was nice enough to free the memory anyway
after having received the exported handle, causing it now to double
free.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-09 23:19:20 +08:00
Emmanuele Bassi
eba10161c1 build: Disable deprecation warnings in broadway
Avoid compiler warnings while building code that uses deprecated API.
2017-05-09 14:30:40 +01:00
Emmanuele Bassi
a7db887c0b Specify more options to sassc
We should use the compact style, to minimize the whitespace; and we
should omit the source map URL comment as well.
2017-05-09 14:23:14 +01:00
Emmanuele Bassi
5376fa36a8 build: De-duplicate options to sassc
If we want to change the list of options we use with sassc, not having
to copy-paste them in multiple rules would be a good start.
2017-05-09 14:23:09 +01:00
Emmanuele Bassi
dc471fa258 build: Enable subdir-objects
Like we did in the master branch.

Using subdir-objects removes the forward compatibility warnings coming
from autotools.
2017-05-09 14:19:51 +01:00
Emmanuele Bassi
d237b255f9 build: Remove unused rules
The foreign drawing example was moved to the GTK demos.
2017-05-09 14:19:51 +01:00
Emmanuele Bassi
d9e0ea2905 build: Don't include the marshallers header file
We used to inject the inclusion of the generated header file into the
generated body of the marshallers source code in order to avoid compiler
warnings about missing prototypes. The glib-genmarshal utility has been
fixed in GLib to include the prototype in the generated source, so now
we're going to trip -Werror=redundant-decls.
2017-05-09 14:19:51 +01:00
Lapo Calamandrei
01a94a06e7 Adwaita: regenerate css 2017-05-09 13:32:56 +02:00
Lapo Calamandrei
9f402d15bc Adwaita: add a comment
Add a comment pointing to the related bug for the dropdown menu
margin.
2017-05-09 13:31:31 +02:00
Lapo Calamandrei
3e48a80d85 Revert "Adwaita: remove unneeded margin on dropdown menu"
This reverts commit bb1679b247.
The margin was actually related to:
https://bugzilla.gnome.org/show_bug.cgi?id=591258
2017-05-09 13:30:23 +02:00
Lapo Calamandrei
5336998bee Revert "Adwaita: regenerate the css"
This reverts commit f2f09b9574.
2017-05-09 13:30:23 +02:00
Olof-Joachim Frahm
c05c78f9c9 Make sure to remove tooltip timeout.
Otherwise in GC-ed environments the `g_source_remove` call during
disposal might be called on an already removed source, which results in
unnecessary console output.

https://bugzilla.gnome.org/show_bug.cgi?id=778301
2017-05-09 06:55:21 -04:00
Lapo Calamandrei
f2f09b9574 Adwaita: regenerate the css 2017-05-09 12:50:49 +02:00
Lapo Calamandrei
bb1679b247 Adwaita: remove unneeded margin on dropdown menu
That margin was probably a left over to workaround some placement
issue on dropdowns which doesn't exist anymore.
2017-05-09 12:49:10 +02:00
Gianvito Cavasoli
853ce80137 Update Italian translation 2017-05-09 08:48:31 +00:00
Jonas Ådahl
31c72bd7df GdkWaylandWindow: Unexport when finalizing
The application might not have exported, and it'll be too late for it
at this point anyway, so lets be helpful and not leak it.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-09 10:16:32 +08:00
Timm Bäder
f3f71ef0ac box: Initialize size arrays to 0
Thats the right thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=773814
2017-05-08 18:03:26 -04:00
Jakub Steiner
dfe993ff1d style entry-tags
https://bugzilla.gnome.org/show_bug.cgi?id=781214
2017-05-08 17:55:29 -04:00
Jonas Ådahl
64312d79f7 wayland: Remove self assignment
Don't assign the value of a variable to itself. It was added just for
clarity, but it makes coverity complain, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=780301
2017-05-08 17:51:41 -04:00
Jonas Ådahl
6f326a71d4 wayland: Use correct enum type and values
Use the gravity enum values when converting to gravity. It doesn't fix
anything, since the enum values were identical, but it makes a coverity
warning go away.

https://bugzilla.gnome.org/show_bug.cgi?id=780301
2017-05-08 17:51:30 -04:00
Matthias Clasen
0f929fb6e3 file filter: Be save against NULL
g_content_type_from_mime_type may return NULL, deal with that.

https://bugzilla.gnome.org/show_bug.cgi?id=782180
2017-05-08 16:39:20 -04:00
Matthias Clasen
7c66c68f48 Revert "GdkWaylandWindow: Unexport when finalizing"
This reverts commit ab4e4bd3ae.
2017-05-08 16:00:49 -04:00
Jonas Ådahl
ab4e4bd3ae GdkWaylandWindow: Unexport when finalizing
The application might not have exported, and it'll be too late for it
at this point anyway, so lets be helpful and not leak it.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-08 15:47:12 -04:00
Jonas Ådahl
e016d9a5db GdkWaylandWindow: Clear export user data when used
It was only cleared when unexported, but we could just as well clear it
when its used too.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-08 15:47:12 -04:00
Mohammed Sadiq
088cf99763 linkbutton: Fix memory leak
strings returned by gtk_widget_get_tooltip_text() and
gtk_widget_get_tooltip_markup() has to be freed when no longer
required.

https://bugzilla.gnome.org/show_bug.cgi?id=782202
2017-05-08 15:57:53 +02:00
Michael Catanzaro
001fa0a810 menubutton: Remove prelight state when button is deactivated
If the button is deactivated, it should not appear to be hovered
anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=781992
2017-05-08 15:57:04 +02:00
Balázs Úr
656130a032 Update Hungarian translation 2017-05-05 18:52:59 +00:00
Christoph Reiter
4496c5388b gtkdnd: restore drag window movement for the unmanaged case
5bb12474d9 removed the dnd window movement code to let
the gdk backends handle the window movement instead. While this
works for X11/wayland the win32 backend still uses the unmanaged
interface and expects the window movement to be handled on the gtk
side. This restores the functionality in case the dnd is unmanaged.

This fixes the drag window on Windows being stuck in the top left
corner instead of following the drag position.

https://bugzilla.gnome.org/show_bug.cgi?id=781737
2017-05-05 17:29:37 +02:00
Paolo Borelli
7e9077c794 shortcutssection: plug a tiny mem leak 2017-05-05 10:53:46 +02:00
Matthias Clasen
7d9450fb60 clipboard: Try the mimetype first
Try text/plain;charset=utf-8 first, before falling back to
X11-isms like UTF8_TEXT. This makes things work on Wayland
compositors that don't carry a heavy X11 legacy around.

https://bugzilla.gnome.org/show_bug.cgi?id=781814
2017-05-03 18:49:45 -04:00
Lapo Calamandrei
1fb9db547d Adwaita: regenerate css 2017-05-03 17:47:14 +02:00
Lapo Calamandrei
57031135a0 Adwaita: add more space between check/radio and label in popovers
See https://bugzilla.gnome.org/show_bug.cgi?id=779570 for details.
2017-05-03 17:45:44 +02:00
Daniel Boles
5269d134b0 Scale: Improve documentation of set_has_origin()
Properly format the property name, and avoid saying scale so many times.
2017-05-02 12:28:21 +01:00
Daniel Boles
aded963251 Scale: Explain how to round value when !draw-value
Scale:digits is (now, again) ineffective if Scale:draw-value is FALSE.
To get rounding in that case, the base Range:round-digits must be used.
2017-05-02 12:28:20 +01:00
Anders Jonsson
4452414635 Update Swedish translation 2017-05-01 22:25:39 +00:00
Dušan Kazik
6a9d6d5986 Update Slovak translation 2017-04-30 08:01:40 +00:00
Мирослав Николић
7299f3942e Updated Serbian translation 2017-04-30 08:47:39 +02:00
Мирослав Николић
182d984a1f Updated Serbian translation 2017-04-30 08:30:24 +02:00
Мирослав Николић
c8d8956a6d Updated Serbian translation 2017-04-30 08:25:14 +02:00
Мирослав Николић
1302c8046e Updated Serbian translation 2017-04-30 08:15:13 +02:00
Kukuh Syafaat
a647eb04e2 Update Indonesian translation 2017-04-29 02:09:31 +00:00
Olivier Fourdan
c770b5cbbc wayland: make key event log more explicit
With Wayland, GDK_DEBUG=events would log key events but not explicitly
state whether the event is a key press or release, or if it's
originating from a key repeat.

Add some more verbosity to make sure these informations are logged on
key delivery when GDK_DEBUG is set.

https://bugzilla.gnome.org/show_bug.cgi?id=781767
2017-04-28 13:08:37 +02:00
Mario Blättermann
6071006206 Update German translation 2017-04-28 09:50:43 +00:00
Florian Müllner
a866937d08 gdk: Relicense translate_wm_button_layout_to_gtk()
It is generally a good idea to license individual files under the
same terms as the project license (in particular when the mismatch
boils down to having copied the wrong license header), so relicense
the code under the LGPL.

https://bugzilla.gnome.org/show_bug.cgi?id=781422
2017-04-27 21:06:15 +02:00
Rafael Fontenelle
1a16991254 Update Brazilian Portuguese translation 2017-04-27 00:58:43 +00:00
Piotr Drąg
11f746e204 Update Polish translation 2017-04-26 19:42:55 +02:00
Stas Solovey
edf00914e5 Update Russian translation 2017-04-26 14:44:34 +00:00
Daniel Boles
1cd0a8de0b Scale: Fix documentation of digits per last revert
Revert doc changes that were for the behavioural change just reverted.

Add a clarifying note that, under the original behaviour, :digits only
rounds the Adjustment if :draw-value is TRUE at the time of the change.

https://bugzilla.gnome.org/show_bug.cgi?id=781605
https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-04-26 12:26:56 +01:00
Matthias Clasen
9f8b1a8aa8 Revert "Scale: Always sync ::digits to Range::round-digits"
This reverts commit 4a6bd134bd.

This change in behavior broke various things.

https://bugzilla.gnome.org/show_bug.cgi?id=781605
2017-04-26 06:33:27 -04:00
Timm Bäder
b7fdc5b447 listbox: Properly remove placeholders
https://bugzilla.gnome.org/show_bug.cgi?id=778617
2017-04-25 21:51:59 +02:00
Timm Bäder
9b05176eb2 spinbutton: Add undershoot nodes to CSS docs 2017-04-25 11:15:13 +01:00
Timm Bäder
34c135be7c spinbutton: Remove an unused define 2017-04-25 11:15:12 +01:00
Timm Bäder
0a7151b22e window: Expand CSS node docs 2017-04-25 11:15:11 +01:00
Timm Bäder
7798764377 paned: Fix typo 2017-04-25 11:15:09 +01:00
Daniel Boles
687b38f87e ProgressBar: Update node summary per b5eb37eba4
The node named "progress" is a child of the node named "trough".
2017-04-25 11:15:08 +01:00
Matthias Clasen
d94f16562e Add a cleaned-up example for listbox DND
I want to refer to this as an example, so make it look nice.
2017-04-23 10:39:44 -04:00
Matthias Clasen
ae6f95878e testlist3: Handle dropping a row onto itself
Instead of spewing criticals, we should handle this
gracefully by doing nothing.
2017-04-22 21:39:10 -04:00
Carlos Soriano
918445bf40 gtkplacesview.ui: Update helper label to include IPv6 addresses
This is a backport from 16bce17168. Thing is Nautilus pulled the
code from master until now, so right now gtk-3-22 and Nautilus 3.24
differ.

Would be great to have them share the same code, and at the same time
have this small string helper issue fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=781622
2017-04-22 21:41:29 +02:00
Carlos Soriano
60a1e1d0e9 gtkplacesview.ui: Remove translatable from server label helper
Translating it seems pointless if we can use a non-translatable example
such as gnome.org instead of foo.example.com.

This will help to make changes in here without breaking string freeze.

https://bugzilla.gnome.org/show_bug.cgi?id=781622
2017-04-22 21:41:29 +02:00
Matthias Clasen
7ab48458a0 Refine the listbox dnd example
Add a drag handle, and demonstrate broken offsets.
2017-04-22 08:07:42 -04:00
Carlos Soriano
fba4e8fb47 gtkplacesview: Fix unmounted open in tab/window
We were send the "open-location" signal without mounting first the
location if necessary, making the open in tab/window context menu not
work for those.

This patch makes sure we mount the location before emitting the signal.

https://bugzilla.gnome.org/show_bug.cgi?id=771269
2017-04-22 11:51:21 +02:00
Timm Bäder
b5eb37eba4 progressbar: Fix position of text node in CSS docs
The text node has always been a child node of the progressbar node, not
the trough node, but the docs claimed otherwise.
2017-04-22 06:35:54 +02:00
Matthias Clasen
991e84fe3a Fix a typo 2017-04-21 18:27:43 -04:00
Matthias Clasen
930acacf94 Implement dnd for list box rows in an example
This shows very basic DND of list box rows.
2017-04-21 17:02:05 -04:00
Georges Basile Stavracas Neto
42aa4c138c placesview: fix testsuite
Because the network monitor can perfectly be NULL,
the tests were failing on that for GtkPlacesView
always tries to disconnect this handler.

Fix that by only disconnecting the handler when
the network monitor exists.

https://bugzilla.gnome.org/show_bug.cgi?id=781195
2017-04-11 16:55:23 -03:00
John Ralls
9b5a92f5cc Save Changes Bug 781118 - gtk 3.22.12 quartz backend segfault
Calling 'width' on an NSValue won't work, must call sizeValue on it.
2017-04-10 16:40:05 -07:00
Georges Basile Stavracas Neto
dfb5d11a53 places-view: monitor network
GtkPlacesView exposes local access points and network
shares transparently by using the 'network:///' URI,
which is handled by GIO.

Currently, however, it doesn't monitor the network
for new available points, such as computers that just
join the network. It may happen too that the backend
won't find all the networks before the network enumeration
finishes.

Fix that by keeping a file monitor inspecting the network
uri, and update the places list when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=781162
2017-04-10 19:36:52 -03:00
gogo
6e87915b05 Update Croatian translation 2017-04-10 20:43:09 +00:00
gogo
4f3ff05943 Update Croatian translation 2017-04-10 20:39:13 +00:00
Rūdolfs Mazurs
8ec4a65f52 Update Latvian translation 2017-04-09 13:04:50 +03:00
Matthias Clasen
28d2edcb22 3.22.12 2017-04-08 15:15:58 -04:00
Tom Tryfonidis
0c8ad72410 Update Greek translation 2017-04-08 16:36:15 +00:00
Matthias Clasen
02d537834a flowbox: don’t try to focus or draw NULL widgets
Rubberbanding over an empty area results in warnings, due to the code
trying to focus and queue a null pointer for drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=780734
2017-04-06 15:12:33 +01:00
Alberts Muktupāvels
124b62881a gtkheaderbar: add style classes to all title buttons
Commit b187773053 added CSS style
classes for minimize, maximize and close buttons. Add similar classes
also to icon and menu buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=780944
2017-04-06 15:35:55 +03:00
Jeremy Bicha
85f25f4a3e docs: Use https for more links
https://bugzilla.gnome.org/show_bug.cgi?id=780878
2017-04-03 16:14:13 -04:00
William Hua
6e711beb0b mir: clean up an ugly function 2017-04-03 13:29:59 -04:00
Olivier Fourdan
efbe40214b gdkwindow: different displays, different classes
GdkWindow's before_process_all_updates() and after_process_all_updates()
wrongly assume that all displays are from the same class, which is not
the case if for example a client open different displays with different
backends such as X11 and Wayland.

Use the actual class for each display in the display list to avoid a
crash when mixing displays from different classes.

Fix suggested by Christian Persch <chpe@gnome.org> in bug #776472.

https://bugzilla.gnome.org/show_bug.cgi?id=776472
2017-04-03 19:16:10 +02:00
Emmanuele Bassi
81bfc91c7a Ignore deprecation warnings for g_object_newv()
GLib has deprecated GParameter and g_object_newv(); until we switch to
the new g_object_new_with_properties() API, and bump GLib required
version, we should simply ignore the compiler warnings.
2017-04-03 12:10:17 +01:00
Emmanuele Bassi
f82329de35 Optionally depend on sassc to generate the theme CSS
Instead of using Ruby/Sass to generate the CSS from SCSS files, we can
use the faster and more lightweight libsass/sassc binary.

We can keep the CSS files in Git to make it easier to dist GTK+, but we
can add rules to ensure they get rebuilt if the source SCSS changes.

https://bugzilla.gnome.org/show_bug.cgi?id=780041
2017-04-03 12:02:11 +01:00
John Ralls
b6aaae7dea Replace NSScreen:userSpaceScaleFactor, deprecated since MacOS X 10.7.
userSpaceScaleFactor is not compatible with high-resolution (aka HiDPI)
displays.
2017-04-02 18:16:59 -07:00
John Ralls
8074626fc6 Add missing file and correct some warnings from quartz: Add monitor support. 2017-04-02 17:55:55 -07:00
Matthias Clasen
dbfa8e86c5 quartz: Add a forgotten file 2017-04-01 17:41:00 -04:00
Matthias Clasen
2ad14d393b quartz: Add monitor support
This is a backport of a patch by Tom Schoonjans,

https://bugzilla.gnome.org/show_bug.cgi?id=779184
2017-04-01 16:50:12 -04:00
William Hua
2f851530f4 mir: set application name when creating connection 2017-04-01 10:56:54 -04:00
William Hua
ecf9c06ada mir: remove keymap and input device state warnings 2017-03-31 23:18:06 -04:00
William Hua
01b7307296 mir: re-write settings implementation 2017-03-31 15:55:29 -04:00
Ernestas Kulik
69234066a4 flowbox: don’t select when rubberbanding over nothing
When rubberbanding over an empty area, everything is selected on gesture
end, which is a bit counter-intuitive.

https://bugzilla.gnome.org/show_bug.cgi?id=780735
2017-03-31 07:27:05 +03:00
Yosef Or Boczko
1082b77702 Updated Hebrew translation 2017-03-30 19:28:41 +03:00
Yosef Or Boczko
7cb6ab37f3 Updted Hebrew translation 2017-03-30 19:28:31 +03:00
Yosef Or Boczko
6eeb546c4a Updated Hebrew translation 2017-03-30 18:13:13 +03:00
Christoph Reiter
30b961c84b osx: fix build
https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-30 09:55:45 -04:00
Christoph Reiter
cc53017b3e gtk_widget_intersect: fix annotations
https://bugzilla.gnome.org/show_bug.cgi?id=773228
2017-03-30 11:16:14 +02:00
Daniel Boles
cff35b36a3 TextView: Drop an unnecessary #include 2017-03-27 19:30:17 +01:00
Daniel Boles
08887f0577 TextView: Be const-correct when passing a pointer
The TextIter is passed by pointer for efficiency. We neither need to
modify it, nor should we leave it possible to accidentally do so. So,
it should be passed as a pointer-to-const.
2017-03-27 19:23:40 +01:00
Daniel Boles
87b579cf2b TextView: Get line direction in more efficient way
We do not need to go through the heavyweight process of constructing a
TextLineDisplay just to get the direction out of it, when we can simply
use TextIter API to get the text and then get its direction using Pango.

Adapted from a patch by Mehdi Sadeghi for GtkSourceView:

https://bugzilla.gnome.org/show_bug.cgi?id=779081#c20
2017-03-26 16:13:40 +01:00
Daniel Boles
536f713a1c TextBuffer: Add missing transfer full annotations 2017-03-26 15:50:57 +01:00
Kjell Ahlstedt
c3d759c3b6 printjob: Clarify array ownership in gtk_print_job_set_page_ranges()
Add a documentation annotation saying that set_page_ranges transfers
ownership of the GtkPageRange array.
Add a g_free() call to fix a memory leak when set_page_ranges is
used repeatedly.

https://bugzilla.gnome.org/show_bug.cgi?id=780234
2017-03-26 15:07:09 +01:00
Matthias Clasen
a7ca5335e4 Avoid more compiler warnings 2017-03-26 15:07:01 +01:00
Matthias Clasen
80a177db8b Avoid unused variable warnings 2017-03-26 15:05:37 +01:00
Matthias Clasen
12155b4ee3 Avoid redefining GNU_SOURCE
Gives a compiler warning with the wrong flags.
2017-03-26 15:05:27 +01:00
Matthias Clasen
0155009d57 Avoid some compiler warnings 2017-03-26 15:05:18 +01:00
Piotr Drąg
a331741117 Update Polish translation 2017-03-25 22:55:00 +01:00
Kjartan Maraas
2224fb58dd Updated Norwegian bokmål translation. 2017-03-25 11:58:36 +01:00
Jordi Mas
d190263272 Update Catalan translation 2017-03-24 19:42:57 +01:00
Marek Kasik
931f7863ec printing: Don't hang in gtk_enumerate_printers()
Stop enumerating printers when all backends were removed.

https://bugzilla.gnome.org/show_bug.cgi?id=686838
2017-03-23 13:19:54 +01:00
Stas Solovey
a7f3fd12d5 Update Russian translation 2017-03-22 21:46:35 +00:00
Timm Bäder
6f30e97c3d gdkdragsource: Ensure button >= 1
So the left shift later doesn't overflow.
2017-03-22 08:11:40 +00:00
Timm Bäder
92fd8cb81b widget: Prepend style classes to list when parsing
Since the later gtk_style_context_add_class doesn't care about the order
of the style classes, we can as well just prepend style classes to the
list and avoid the squared behavior when appending to a linked list.
2017-03-22 08:10:54 +00:00
William Hua
ff1a78788f mir: always emit a resize when creating windows 2017-03-22 02:44:38 -04:00
Andika Triwidada
6adc00ef1d Update Indonesian translation 2017-03-21 14:16:11 +00:00
Daniel Boles
54ffec9bb0 Scrollbar: grammar fix for previous commit 2017-03-21 00:05:32 +00:00
Daniel Boles
369377369f Scrollbar: Tweak intro docs a bit
Explain where the adjustment comes from, clarify some of the wording
about how its fields influence the scrollbar, and also note that the
steppers may not be present, since they aren’t in our default themes.
2017-03-21 00:00:37 +00:00
Daniel Boles
93d68270c4 ScrolledWindow: Don’t check if child is Scrollable
If the child added is not a Scrollable, it gets wrapped in a ViewPort –
which is. So it is impossible to end up with a non-Scrollable child.

Just check we have /any/ child where needed, which is semantically nicer

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-03-20 23:20:29 +00:00
Daniel Boles
16b9e8261d ScrolledWindow: Streamline/clarify the intro docs
• intro: Clarify that external policy and/or adjustments can be used.
 • add(): Don’t waffle on about having to add a ViewPort since we handle
          that transparently for the user, so they can add() any widget.
 • Adjustment stuff: most of this was repeating the docs for Scrollbar,
                     so just refer the user to that. Also, mention how
                     policies NEVER and EXTERNAL interact with all this.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-03-20 23:20:26 +00:00
Daniel Boles
3178a7a301 Tooltip: Avoid redundant variable initialisations
has_tooltip_widget was assigned twice in immediate succession.

return_value is not used anywhere else in this function since commit
14a864c8b5 and does not need a default
value anymore, so move it to the inner scope and don't init to NULL.
2017-03-20 21:14:41 +00:00
Timm Bäder
57ea1796e3 tooltip: Remove unused assignment
hide_tooltip  gets overriden in any case 2 lines down, and return_value
isn't used later in that function. The second assignment was introduced
in ef1da5f6c2, directly below the first
assignment.
2017-03-20 20:59:21 +00:00
Timm Bäder
d2c79b966b css-editor: Remove unused if statement
The static local is set to NULL and never set to anything else, so we
never use it anyway.
2017-03-20 20:58:56 +00:00
Timm Bäder
1daa41bf96 box: Make sure center_req is initialized
In case we have an invisible center widget, we never initialize it, but
later still use it.
2017-03-20 20:57:07 +00:00
Timm Bäder
d689ee7d7e progressbar: Remove useless if statement
Both the if and the else block contained exactly the same code.
2017-03-20 20:45:11 +00:00
Timm Bäder
a92ca3518b notebook: Remove dead assignment 2017-03-20 20:45:11 +00:00
Timm Bäder
7074607635 GtkRecentManager: Remove superfluous local variable 2017-03-20 20:45:11 +00:00
Timm Bäder
e63748f231 GdkX11DeviceManager: Fix debugging output
The 2 values added in 3.22 were missing from the source_names array.
2017-03-20 20:45:11 +00:00
Matthias Clasen
a7ebe62e67 3.22.11 2017-03-19 12:11:14 +00:00
Matthias Clasen
b04a863328 Avoid a critical warning in the filechooser portal
This was showing up when cancelling a portal file chooser
in recipes.
2017-03-19 07:34:21 -04:00
Daniel Boles
122cbcf17f css-overview: Fix inconsistent British English use 2017-03-18 12:33:05 +00:00
Timm Bäder
9c52d8e8f0 entrycompletion: Remove unnecessary NULL check
completion really shouldn't be NULL at this point, especially since it
gets dereferenced higher up in the function.
2017-03-18 12:33:05 +00:00
Timm Bäder
61c85ba89d calendar: Fix else branch indentations 2017-03-18 12:33:04 +00:00
Daniel Boles
b73e6ffbd8 css-overview: Fix+Explain color expr number ranges
Last try, promise. They don’t all use 0 to 1. We should probably explain
the effects too. Hopefully this manages that while not being too verbose
2017-03-18 01:17:28 +00:00
Daniel Boles
76eb8e3e98 css-overview: Elaborate how color expressions work 2017-03-17 23:55:15 +00:00
Daniel Boles
98fe7f5b5c docs/css-overview: Fix color functions’ arg orders
shade/alpha/mix() take colour(s) and a number that is the ratio by which
to transform them. It was written here that these shall be passed in the
order (number, colour). That was wrong: they must be passed in the order
(colour[s], number) to work, and for the Inspector not to flag an error.
2017-03-17 23:32:19 +00:00
Christoph Reiter
64ec7c2640 quartz: fix build for <10.12
The style mask type was changed from NSUInteger to NSWindowStyleMask.
Use NSUInteger so it also works on older macOS.

https://bugzilla.gnome.org/show_bug.cgi?id=780019
2017-03-15 07:26:07 -04:00
Matthias Clasen
c3190edd93 3.22.10 2017-03-13 20:52:49 -04:00
William Hua
ad5d95e062 mir: start handling resize events again 2017-03-13 10:54:35 -04:00
William Hua
3be1bffc77 mir: remove unused generate_configure_event () 2017-03-13 04:09:48 -04:00
William Hua
16e36e5399 mir: set placement for menu-type windows 2017-03-13 03:52:14 -04:00
William Hua
f0e3781566 mir: synthesize resize events 2017-03-13 03:52:11 -04:00
William Hua
91f4b0c31f mir: ignore resize events 2017-03-13 03:52:09 -04:00
William Hua
05a060c6a6 mir: try mir before x11 2017-03-13 03:52:06 -04:00
Dušan Kazik
b8d88eb960 Update Slovak translation 2017-03-12 10:15:33 +00:00
Dušan Kazik
52a4f73bc6 Update Slovak translation 2017-03-12 10:02:48 +00:00
Andika Triwidada
8bf40ebb88 Update Indonesian translation 2017-03-11 08:59:12 +00:00
Andika Triwidada
ad50af4011 Update Indonesian translation 2017-03-11 07:49:44 +00:00
Marek Černocký
dc05a8e7fb Updated Czech translation 2017-03-11 02:12:00 +01:00
Matthias Clasen
6a02bd4fa9 quartz: Fix another typo 2017-03-10 07:27:12 -05:00
Matthias Clasen
9caa50ca0d quartz: Fix the build
A ; was left out inadvertently.
2017-03-10 07:10:26 -05:00
William Hua
b4df881542 mir: log additional event types 2017-03-10 00:30:38 -05:00
TingPing
e387f807e4 Improve GContentType usage
Convert to content type where needed.
Should fix various issues on Windows and OS X.

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-08 23:08:56 -05:00
Andika Triwidada
504321019e Update Indonesian translation 2017-03-09 03:57:10 +00:00
Andika Triwidada
4a8ad03e10 Update Indonesian translation 2017-03-09 03:56:48 +00:00
GNOME Translation Robot
112437f5ad Update Scottish Gaelic translation 2017-03-07 12:17:26 +00:00
GNOME Translation Robot
2fdcdfa403 Update Scottish Gaelic translation 2017-03-07 12:11:43 +00:00
Philip Withnall
c00448f7c6 tests: Fix use of C99 inline declaration
We don’t claim to use them yet, even if we perhaps should.
2017-03-07 09:48:44 +00:00
Daniel Boles
5bdc85d34e testheightforwidth: cleanups 2017-03-07 09:17:29 +00:00
Daniel Boles
5f24d87a5b testframe: Don’t unnecessarily query the padding
The [hv]padding variables control and hence track this.
Also, simplify the CSS using shorthand 2-value notation (again).
2017-03-07 01:32:24 +00:00
Daniel Boles
ec30a03153 testframe: Actually set the padding
The CSS was targeting node GtkFrame, which is wrong: it is called frame.

This commit also assumes the interesting padding is that between the
border and the child widget, not the padding around the entire Frame.
Some additional hoops must be jumped through to preserve padding values
not being changed in either callback. However, the way this is done
means I must set the initial paddings to 0, which simplifies main().
2017-03-07 01:04:34 +00:00
Daniel Boles
685493075f testframe: Add CheckButton to toggle border off/on
We should test this.
2017-03-07 01:04:34 +00:00
Daniel Boles
39d5f22774 testframe: Order controls better & improve labels
The :label-widget is drawn before the child, so put the controls that
set the alignment of the :label-widget before those that pad the child.

We set (horizontal|vertical) padding, not "[xy]thickness". Also change
to "label [xy]align" & use grid spacing, not spaces at end of Labels.
2017-03-07 01:04:34 +00:00
Daniel Boles
9f1916f29e testframe: Minimise typecasts 2017-03-07 01:02:08 +00:00
Daniel Boles
5059348d9f testframe: Set value before connecting callbacks
The value comes from the widget, and we were setting this after
connecting the callback, which applies the value to the widget…
2017-03-07 01:02:08 +00:00
Daniel Boles
4bec5432ce testframe: Use a generic widget pointer 2017-03-07 01:02:08 +00:00
Daniel Boles
0349574b47 testheightforwidth: Add missing unref 2017-03-06 20:57:17 +00:00
Daniel Boles
77f01c374b testheightforwidth: Remove deprecations & clean up
cherry-pick of master commit bf0ea7b7bc
2017-03-06 20:50:33 +00:00
William Hua
e63d4111a4 mir: don't create GDK_INPUT_ONLY windows 2017-03-06 13:12:22 -05:00
Jakub Steiner
41d3f99e44 Adwaita: border for selmode checkboxes
- there was an extra border for selection mode
2017-03-06 15:35:14 +01:00
Daniel Boles
629c931f1f Frame: Fix another piece of .flat documentation 2017-03-06 07:19:30 +00:00
Matthias Clasen
7160e3a12f Quartz: Implement gdk_window_set_functions
This is useful, and easy to implement.
2017-03-05 22:53:03 -05:00
Daniel Boles
31832f8648 Revert move of .flat from frame > border to frame
Changing code to agree with docs, which said frame.flat, was backwards.
Mea culpa. Theme authors ran with the actual behaviour, not the docs. As
stability is more important, let’s go back to frame > border.flat, and
fix the docs to reflect what the code does and how to set .flat in code.

N.B. This retains the change in HighContrast of "frame border" to "frame
> border". Not using the direct child selector contradicted Adwaita &
could conceivably have unwanted results on nested nodes named border.

https://bugzilla.gnome.org/show_bug.cgi?id=778905
2017-03-05 18:23:43 +00:00
Inaki Larranaga Murgoitio
06cf2c84a4 Update Basque language 2017-03-04 17:43:00 +01:00
Changwoo Ryu
e4bbb5bb0b Update Korean translation 2017-03-03 17:01:12 +00:00
Changwoo Ryu
d65851f7db Update Korean translation 2017-03-03 17:00:52 +00:00
Inaki Larranaga Murgoitio
7dcb94579a Update Basque language 2017-03-03 12:58:52 +01:00
Inaki Larranaga Murgoitio
de9a399eaa Update Basque language 2017-03-03 12:57:34 +01:00
Inaki Larranaga Murgoitio
a6432cc6d0 Update Basque language 2017-03-03 12:50:41 +01:00
Inaki Larranaga Murgoitio
ff779af97f Update Basque language 2017-03-03 12:47:55 +01:00
Chun-wei Fan
76d7c0bbed build/Makefile.msvcproj: Remove MSVC 2017 projects before re-generation
This ensures a fresh version from the 2010 projects are copied and
processed.
2017-03-03 17:35:28 +08:00
Daniel Boles
02b5886975 themes: Actually fix the frame.flat style class
by changing the source scss, not just the generated css files.

Thanks to Christoph Reiter for pointing this out!
2017-03-03 08:44:30 +00:00
Daniel Boles
0bada2506e HighContrast/parse-sass.sh: Use a reliable shebang
/usr/bin/sh does not exist on e.g. Debian sid.
Use the same shebang as Adwaita/parse-sass.sh
2017-03-03 08:42:34 +00:00
Daniel Boles
17da1e9f35 Adwaita: :insensitive is deprecated; use :disabled 2017-03-02 18:59:25 +00:00
Daniel Boles
d6166921a8 Adwaita: Restore documented behaviour of .flat
This was changed in commit 0c20604932
but got clobbered by commit 8817c1ad6d
2017-03-02 18:45:37 +00:00
Timm Bäder
f7479bf369 placesview: Simplify button construction 2017-03-02 18:16:58 +00:00
Timm Bäder
1880cf48ad placessidebar: Fix css node name typo 2017-03-02 18:16:58 +00:00
Timm Bäder
e44e7ba0df widgetnode: Remove unused define 2017-03-02 18:16:58 +00:00
Timm Bäder
ec8192420e cssnodestylecache: Use const pointer in lookup 2017-03-02 18:16:58 +00:00
Carlos Garnacho
4b38a39c9d gtk-demo: Add 3fg touchpad swipe handling to gestures demo
We can handle those on wayland, so we should show it's possible.
2017-03-02 18:21:36 +01:00
Carlos Garnacho
76af1904db gtkgesturesingle: Fallback to GtkGesture handling on GDK_TOUCHPAD_SWIPE
There are GtkGestureSingle subclasses that can be made to handle multiple
fingers (GtkGestureSingle is a subclass of GtkGesture, and not the
opposite, after all). And GtkGestureSwipe already tries to handle
GDK_TOUCHPAD_SWIPE events, except this event handler silently ignores
those.

Falling back to the GtkGesture generic handler which already
handles touchpad gesture events fixes this.
2017-03-02 18:21:36 +01:00
Matthias Clasen
cf1e2b9042 Convince OS X to fully fullscreen windows
We typically want to have the full screen given to
the content, not the aspect-ratio preserving behavior
that newer OS X has.

https://bugzilla.gnome.org/show_bug.cgi?id=779383
2017-03-02 08:12:37 -05:00
Sveinn í Felli
36e1761c84 Update Icelandic translation 2017-03-02 12:59:38 +00:00
Ask Hjorth Larsen
313ae3ad01 Updated Danish translation 2017-03-02 13:23:27 +01:00
Ask Hjorth Larsen
ecdd353266 Updated Danish translation 2017-03-02 13:21:24 +01:00
Sveinn í Felli
fb53855fc8 Update Icelandic translation 2017-03-02 11:54:46 +00:00
Jakub Steiner
fc81dc17d4 Adwaita: style selectionmode checks for flowbox tiles
- continue being asset based rather than drawn by CSS
- using node 'check' rather than style '.check'

https://bugzilla.gnome.org/show_bug.cgi?id=779074
2017-03-02 12:39:02 +01:00
Jakub Steiner
8817c1ad6d Adwaita: style flowbox tiles
https://bugzilla.gnome.org/show_bug.cgi?id=779073
2017-03-02 12:29:20 +01:00
William Hua
6f3d1e1046 mir: deprecate gdk_mir_window_get_mir_surface () 2017-03-01 15:31:54 -05:00
William Hua
45d33b063f mir: delete commented debug output 2017-03-01 15:31:52 -05:00
William Hua
7949069b9d mir: migrate away from deprecated mir api 2017-03-01 15:31:41 -05:00
William Hua
a497938358 mir: move #include to correct file 2017-03-01 15:31:32 -05:00
Matthias Clasen
953abc19da Implement backdrop for Quartz
We need to send window state change events to make GTK+
pick up on focus changed for backdrop.

https://bugzilla.gnome.org/show_bug.cgi?id=779392
2017-03-01 11:49:42 -05:00
Matthias Clasen
60e7e15f54 quartz: Let CSD windows be fullscreen
I've found that I need this patch to make it possible for
windows with headerbar to be made fullscreen on OS X.

https://bugzilla.gnome.org/show_bug.cgi?id=779383
2017-03-01 11:49:31 -05:00
Olivier Fourdan
aebe3a74ec wayland: make sure to clear up the number of keys
Make sure to clear up the number of keys being pressed on enter/leave so
that we don't end up with leftovers if a new window is mapped by a
keyboard shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=779374
2017-03-01 16:09:40 +01:00
cedlemo
75e98fd252 Fix bad check of GtkActionPadType in gtk_pad_controller_set_action
https://bugzilla.gnome.org/show_bug.cgi?id=779317
2017-03-01 12:56:45 +01:00
Matthias Clasen
c391417838 3.22.9 2017-02-27 17:57:11 -05:00
Daniel Boles
ce1b2bef2b Range: Remove leftover comment about update policy
Update policies were removed way back in 2011… in
commit c43a31ea33
2017-02-27 20:04:51 +00:00
Daniel Mustieles
20ee36f9e0 Updated Spanish translation 2017-02-27 18:51:24 +01:00
Daniel Mustieles
bd4f861727 Updated Spanish translation 2017-02-27 18:50:54 +01:00
Balázs Meskó
a9c70c4fe6 Update Hungarian translation 2017-02-27 14:19:41 +00:00
Olivier Fourdan
4146d7f3cc wayland: do not cancel key repeat on key press
The key repeat is stopped as soon as a key is pressed, so if the user
quickly presses a key while another is already pressed and being
repeated, key repeat gets cancelled:

 - key1 press
 - key1 repeat
 - key2 press -> key1 repeat stopped
 - key1 release
 - key 2 is not repeated even though it's kept depressed

This is a different behavior from X11, which confuses migrating users.

To mimic the X11 behavior, keep track of the number of keys pressed
simultaneously and cancel key repeat only when none is pressed.

This way, if a user pressed a key while another one is being repeated,
the new key press can possibly be repeated as well.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=778019
2017-02-27 10:14:49 +01:00
Chao-Hsiung Liao
7c09153d20 Update Chinese (Taiwan) translation 2017-02-27 00:02:49 +00:00
Chao-Hsiung Liao
e2666ba96d Update Chinese (Taiwan) translation 2017-02-26 23:59:54 +00:00
Fran Dieguez
c676d4268e Update Galician translation 2017-02-26 21:45:21 +00:00
Fran Dieguez
6259794709 Update Galician translation 2017-02-26 21:42:22 +00:00
Мирослав Николић
a6c925e836 Updated Serbian translation 2017-02-26 15:33:37 +01:00
Christian Kirbach
8d3102e1a9 Update German translation 2017-02-25 19:51:35 +00:00
Aurimas Černius
375a68fc6b Updated Lithuanian translation 2017-02-25 18:21:42 +02:00
Milo Casagrande
29f2da5587 Update Italian translation 2017-02-24 13:16:16 +00:00
Olivier Fourdan
68188fc948 wayland: Fix a race condition with xdg_popup resize
When resizing an xdg_popup immediately after the initial mapping, there
is a race condition between the client and the compositor which is
processing the initial size given by the xdg_positioner, leading to the
xdg_popup to be eventually of the wrong size.

Only way to make sure the size is correct in that case is to hide and
show the window again. Considering this occurs before the initial
configure is processed, it should not be noticeable.

https://bugzilla.gnome.org/show_bug.cgi?id=772505
2017-02-24 10:03:50 +01:00
Daniel Boles
c3a2e0035c Revert "Inspector: Use Title Case for labels & menu items"
This reverts commit 85f2c5f830.

I absent-mindedly forgot the string freeze; sorry.

https://bugzilla.gnome.org/show_bug.cgi?id=779147
2017-02-23 19:22:39 +00:00
Daniel Boles
85f2c5f830 Inspector: Use Title Case for labels & menu items
https://developer.gnome.org/hig/stable/writing-style.html.en

https://bugzilla.gnome.org/show_bug.cgi?id=779147
2017-02-23 19:15:03 +00:00
Daniel Boles
06f7728631 ComboBox: rm pointless var in get_popup_accessible 2017-02-23 18:47:19 +00:00
Olivier Fourdan
e5b6375914 gdkwindow: subsurface in gdk_window_get_effective_parent()
When the GtkWidget hierarchy does not match the GdkWindow hierarchy, the
GtkWidget code may find a common ancestor that cannot be found while
traversing the GdkWindow tree using gdk_window_get_effective_parent().

This happens with for example on Wayland, a GtkPopover has another
GtkPopover as parent, in this case, the GdkWindow parent is the root
window, whereas the GtkWidget parent is the other GtkPopover.

That confuses the gtk_widget_translate_coordinates() logic which will
bail out in this case and won't return the translated coordinates.

Make gdk_window_get_effective_parent() aware of subsurfaces and use the
transient_for which represents the actual parent (whereas the parent
might be pointing to the root window).

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=774148
2017-02-23 14:10:56 +01:00
Daniel Boles
03429df872 TextView—Avoid pointless Pango in iter_line_is_rtl
Get the direction that was already worked out and stored in the
TextLineDisplay, rather than making Pango figure it out again.

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-22 21:29:16 +00:00
Daniel Boles
00b8b18795 TextView—Plug a memory leak
Thanks to Nelson Benitez for pointing this out.

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-22 21:29:16 +00:00
Daniel Boles
188929e2ea Revert "testsuite/scrolledwindow—Test non-overlay/non-auto"
This reverts commit fbd876fe93.

Reverting until I can be sure gtkscrolledwindow.c does the right thing.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-22 19:32:32 +00:00
Daniel Boles
555847d44f Revert "ScrolledWindow—Don’t req size for auto-hidden bars"
This reverts commit 367e021652.

This causes criticals in e.g. the Text View: Multiple Buffers demo.
More work is required to get a fix for Bug 778853 that does not cause
anything else to regress.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-22 19:16:33 +00:00
Daniel Boles
4e61aaa0a4 Scale: Fix erroneously removed : in a signal doc 2017-02-22 08:53:05 +00:00
Daniel Boles
13f781d99d Frame—Note set_label always destroys :label-widget
The fact that it doesn’t reuse the existing GtkLabel if present is not
immediately obvious to users (or is it just me?), so clarify that the
pre-existing :label-widget, if any, is always removed and replaced.
2017-02-21 21:21:25 +00:00
Daniel Boles
42108a82c7 Frame—Clarify relationship of :shadow-type & .flat 2017-02-21 21:13:43 +00:00
Florian Müllner
2e4fb45435 GtkFrame: Fix shadow after theme changes
Commit 0c20604932 changed the theme to expect the .flat class on
the frame node rather than the border one, but didn't update the
code that applies the style according to the :shadow-type property.

https://bugzilla.gnome.org/show_bug.cgi?id=779005
2017-02-21 13:03:39 +00:00
Rafael Fontenelle
f3b3acfe53 Update Brazilian Portuguese translation 2017-02-21 10:21:52 +00:00
Anders Jonsson
4f7e9bf25f Update Swedish translation 2017-02-19 18:11:34 +00:00
Piotr Drąg
22ca110a60 Update Polish translation 2017-02-19 18:26:19 +01:00
Daniel Boles
cc0e6eb374 Frame: Explain the .flat style class 2017-02-19 17:17:41 +00:00
Daniel Boles
fbd876fe93 testsuite/scrolledwindow—Test non-overlay/non-auto
It was only testing the default configuration where overlay-scrolling is
TRUE and the policy is POLICY_AUTOMATIC. We should also test FALSE and
POLICY_ALWAYS. This commit adds those tests and makes the !overlay &&
POLICY_ALWAYS case pass by excluding the size of the relevant scrollbar,
as we are only interested in whether the content size is as requested.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-19 12:48:22 +00:00
Daniel Boles
367e021652 ScrolledWindow—Don’t req size for auto-hidden bars
POLICY_AUTOMATIC means scrollbars are only shown when needed, i.e. when
the size of the window is not large enough to show the entire child. So
when measuring the preferred size, such scrollbars should be ignored.

But measure() was adding size for bars for which policy_may_be_visible()
was TRUE, which it returns for POLICY_ALWAYS (good) & _AUTOMATIC (bad).
So we reserved space for child plus scrollbars, & because we have enough
space for the child, POLICY_AUTOMATIC hides the scrollbar, leaving the
extra reserved space empty at the right/bottom sides of the child. This
is very noticeable/inconvenient for non-overlay, automatic scrollbars.

Fix this by only requesting size for scrollbars that use POLICY_ALWAYS,
rather than basing the decision on policy_may_be_visible().

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-19 12:48:22 +00:00
Daniel Boles
3e5d5f8899 TextView—Fix inverted movements by arrows in RTL
Using Ctrl + left/right to skip between words, or left/right to cancel a
selection, were causing movement on the screen in the opposite direction
of the glyph on the key. This was surprising and awful UX for RTL users.

This is based on a patch covering the former case by:
Author:    Mehdi Sadeghi <mehdi@mehdix.org>
Date:      Sat Feb 18 02:16:00 2017 +0000

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-19 12:38:54 +00:00
Daniel Boles
393e7aacc6 Entry: Add newlines to ease reading huge switches
These are monstrosities!
2017-02-19 12:38:54 +00:00
Daniel Boles
a3d70b4ab2 Entry—Fix inverted movements by arrow keys in RTL
Using Ctrl + left/right to skip between words, or left/right to cancel a
selection, were causing movement on the screen in the opposite direction
of the glyph on the key. This was surprising and awful UX for RTL users.

This is based on a patch covering the former case by:
Author:    Ori Avtalion <ori@avtalion.name>
Date:      Tue Apr 20 08:06:23 2010 +0000

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-19 12:38:53 +00:00
Daniel Boles
0c20604932 themes: Actually apply the frame.flat style class
The docs say that this class should be put on the frame node, and that’s
all we can do from C code, but the CSS was selecting on the border node.
The result was that adding .flat did not disable the border as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=778905
2017-02-19 12:22:48 +00:00
Daniel Boles
563063d66b Scale: Fix signal documentation syntax
Oops, sorry. Thanks to Cristoph Reiter for correcting me on this.
2017-02-19 10:13:34 +00:00
Daniel Boles
0478bfd37b Scale: Improve docs of format-value property 2017-02-19 09:12:17 +00:00
Daniel Boles
b3b2f6b5d4 Scale: Improve docs of prop digits in other places
There were places still implying that it was only used for display.
2017-02-19 09:04:17 +00:00
Daniel Boles
ee6c514406 Scale: consistent #Class:signal-or-property syntax
Use : everywhere, not a mixture of : and ::
2017-02-19 09:04:17 +00:00
Руслан Ижбулатов
f9df0fc94c GDK W32: Handle drivers that do not send WT_CSRCHANGE after WT_PROXIMITY
Some drivers don't do that (not sure whether that is the correct behaviour
or not). Remember each WT_PROXIMITY with LOWORD(lParam) != 0 that we get,
then look for a WT_CSRCHANGE. If WT_CSRCHANGE doesn't come, but a WT_PACKET
does, assume that this device is the one that sent WT_PROXIMITY.

Also include fallback code to ensure that WT_PACKETs for an enabled device
disable the system pointer, because WT_PROXIMITY handler might have
enabled it by mistake, since it's not possible to know which device left
the proximity (it might have been a disabled device).

https://bugzilla.gnome.org/show_bug.cgi?id=778328
2017-02-19 07:12:13 +00:00
Руслан Ижбулатов
1d0fad3d70 GDK W32: Apply HiDPI scale properly to monitors
Previously HiDPI scale was retrieved and applied too late in the initialization
process to affect monitor size and monitor workarea size, but the code that
initializes these sizes *did* try to use the scale, even though it was always
getting scale=1.

To fix this, move the too-late code into monitor enumeration routine.
This also fixes a probable semantic bug where width and height were divided
by scale, again.

Now monitor and workarea should be in application pixels (i.e. divided by scale),
as intended.

https://bugzilla.gnome.org/show_bug.cgi?id=778835
2017-02-19 07:00:17 +00:00
Daniel Boles
11f81e77f9 CssSelector: Fix warning for bad pseudo-class name
It was "Missing name of pseudo-class", but the real problem is exactly
the opposite: we /have/ been given a name, but it is not a valid one.
Change it to "Invalid name of pseudo-class" to minimise confusion.
2017-02-18 21:03:47 +00:00
Daniel Boles
a6ba8df4b7 testsuite/gtk/textiter: Add missing assertion
gboolean ret for whether gtk_text_iter_backward_line() moved the iter
was declared but not used anywhere. I presume it was meant to be
checked, and it passes now, so let’s do it.
2017-02-18 20:18:05 +00:00
Nelson Benítez León
c4874aeaa5 textiter: fix bug in gtk_text_iter_backward_line()
gtk_text_iter_backward_line() checks the value of
real->line_char_offset without previously calling
ensure_char_offsets (real) to make sure the former
is up-to-date.

As a consequence of this, when gtk_text_iter_backward_line()
is called after a gtk_text_buffer_insert_range() in the
first line of buffer, the iter is not moved to the start of
the line, and the return value is wrong.

Fixed by adding the ensure_char_offsets() call.

A test case for this bug is added to the textiter gtk testsuite.
2017-02-18 20:00:32 +00:00
Daniel Boles
6cdeac1c6a Image—Add some more missing (nullable) annotations 2017-02-17 22:13:48 +00:00
Timm Bäder
a729eeab0a filechooserentry: Avoid an uninitialized value
|= with a garbage value on the left side results in a still-garbage
value.
2017-02-17 21:46:51 +00:00
Timm Bäder
42d8b70b0e filechooserwidget: Fix profiling code compilation 2017-02-17 21:46:51 +00:00
Timm Bäder
8aa9fb38a3 Add a few missing (nullable) annotations 2017-02-17 21:46:51 +00:00
Timm Bäder
98c04230c3 builder: avoid an uninitialized value
When g_module_supported() returns FALSE, args.module is garbage
otherwise.
2017-02-17 21:46:51 +00:00
Timm Bäder
26cab782cd filechooserwidget: Fix rename popover position calculation
Since the browse_file_popover is positioned correctly, just convert the
coordinates in the same way we do there.

https://bugzilla.gnome.org/show_bug.cgi?id=778746
2017-02-17 21:46:51 +00:00
Carlos Garnacho
d825c34ca3 gdk: Ensure GdkDragContext instantly updates drag window position
Otherwise we wait for the next gdk_drag_motion() call, which will
happen on the next motion event, making the drag window briefly visible
on the 0,0 root coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=778203
2017-02-17 19:30:46 +01:00
Daniel Boles
fdc79c804a docs/css-properties: Fix info on 3value properties
https://developer.mozilla.org/en/docs/Web/CSS/margin#Values
2017-02-17 15:18:16 +00:00
Chun-wei Fan
c6f0df26f6 Visual Studio builds: Support Visual Studio 2017
Update the autotools scripts so that we can support Visual Studio 2017
by copying the 2010 projects and updating items as needed to obtain
the 2017 projects.

Note that since the toolset version string changed for Visual Studio
2017, so allow the use of a custom toolset version string, otherwise
just generate the toolset version string as we did before.

Also, note that Visual Studio 2017 aims to be compatible with 2015
on the CRT level, so there should not be any problems using 2017-compiled
binaries with 2015-compiled ones.
2017-02-17 15:09:16 +08:00
Bastien Nocera
eca35180f9 docs: Advise to use gtk_show_uri_on_window()
Instead of gtk_show_uri() which is now deprecated, and mention an
additional benefit of doing so.

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:35:29 +01:00
Emmanuele Bassi
d93dd81e65 Use gtk_show_uri_on_window() in GtkLabel
Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
72ac208052 GtkMountOperation: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
e4fbfde07b gtk: Ignore gtk_show_uri() deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
da0291950d GtkLinkButton: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
f2febf7c71 GtkAboutDialog: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
c495ffb1ba docs: Fix reference to non-existent gtk_show_uri_on_parent()
It's called gtk_show_uri_on_window().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:33:44 +01:00
Lionel Landwerlin
977b26dcf5 widget: propagate scale factor upon reparenting a widget
When a widget is created, its default scale is the scale of the
primary screen (for instance 2). But once parented to another widget
its scale factor should be the one of its parent (if parented to a
widget on a screen at scale factor 1, it should be 1).

The problem is that we don't emit the notify::scale-factor signal when
reparenting happens.

https://bugzilla.gnome.org/show_bug.cgi?id=776821
2017-02-16 12:31:57 +00:00
Daniel Boles
f8af23553b widget: Document signal mnemonic-activate
Name the extra bool argument, and move the explanatory paragraph from
the emitting method to the signal, with some minor tweaks to wording.

https://bugzilla.gnome.org/show_bug.cgi?id=778534
2017-02-15 21:45:01 +00:00
Bastien Nocera
104c9ac845 gtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps
gtk_show_uri_on_window() will pass enough information for Portal helpers
to allow dialogue parenting in Flatpak, gtk_show_uri() won't, so
deprecate it.

https://bugzilla.gnome.org/show_bug.cgi?id=778678
2017-02-15 16:23:48 +01:00
Tong Hui
9589505e19 Update zh_CN translation 2017-02-15 20:11:27 +08:00
Matthias Clasen
dad4aecfc0 3.22.8 2017-02-13 13:28:00 -05:00
Руслан Ижбулатов
dca4f1e715 GDK W32: Different maximized window position for non-CSD windows
It seems that WM interprets the same MINMAXINFO contents differently
depending on which styles the window has. Play along.

https://bugzilla.gnome.org/show_bug.cgi?id=765161
2017-02-10 18:21:13 +00:00
Lapo Calamandrei
8f01d6c5f4 HC: insensitive styling for views. 2017-02-08 16:53:10 +01:00
Lapo Calamandrei
efde7d15aa adwaita: insensitive styling for views
Add an insensitive style to views, somehow we didn't ship one, so
for example, disabled textviews looked the same as sensitive ones.
2017-02-08 16:45:51 +01:00
Olivier Fourdan
7ec16c5c53 wayland: do not clamp anchor values
Clamping the anchor values as introduced in commit 9a5ffcd to fix bug
777176 breaks menu positioning.

By keeping the anchors rectangle size greater than zero, we end up
deducting some positive value from the original position, so there is no
need to clamp() actually, keeping the values positive is enough and
avoids the issue with menu positioning on the menubar.

An additional benefit is to make the code a lot simpler.

https://bugzilla.gnome.org/show_bug.cgi?id=778009
2017-02-06 09:19:26 +01:00
Philip Chimento
e338b4589d quartz: Implement gtk_clipboard_get_selection
This function is trivial and can be copied from the X11 implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=772281
2017-02-05 14:54:37 -08:00
Chris Martin
eaf9fc60bf getting-started: typo tie->the
https://bugzilla.gnome.org/show_bug.cgi?id=775864
2017-02-05 20:01:41 +00:00
Michael Catanzaro
644c2d9617 notebook: redraw arrows after closing a tab
Thanks to Daniel Boles for helping with a crash in an earlier version of
this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-02-04 12:54:12 -06:00
Sveinn í Felli
494d8f36aa Update Icelandic translation 2017-02-04 15:32:13 +00:00
Matthias Clasen
09b2c54d41 range: Add a queue_resize call
This is a workaround for a regression in updating scrollbars in
some applications; notably eog. We haven't fully tracked down yet
why a queue_allocation is not sufficient here, it should.

https://bugzilla.gnome.org/show_bug.cgi?id=765410
2017-02-01 21:16:29 +01:00
Daniel Boles
43de771574 searchentry: Fix typo in documentation 2017-01-31 09:47:42 +00:00
William Hua
d9947b671a mir: handle surface placement events
This allows the Mir backend to properly emit "moved-to-rect."
2017-01-30 03:40:18 -05:00
William Hua
14c8e25cb2 mir: use mir_surface_spec_set_placement for menus
This API was added to Mir for GTK menus, combo boxes, etc.
2017-01-30 03:23:50 -05:00
Michael Catanzaro
3708e5cc7c Revert "notebook: redraw arrows after closing a tab"
This reverts commit 8caaba82cc.
2017-01-27 08:53:54 -06:00
Carlos Garnacho
baa83e9753 wayland: Ensure to set gtk_surface dbus properties after hide()
Currently hiding destroys the wl_surface and all related interfaces,
(including the gtk_surface1) so the next time the GdkWindow is mapped,
we don't bother to set the DBus properties. Toggle the check off so
it's actually issued again after the GdkWindow gets a gtk_surface1.

https://bugzilla.gnome.org/show_bug.cgi?id=773686
2017-01-25 18:01:26 +01:00
Michael Catanzaro
8caaba82cc notebook: redraw arrows after closing a tab
https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-01-24 08:32:53 -06:00
William Hua
5d7db3246e mir: use modal window hint 2017-01-23 10:58:09 -05:00
William Hua
a95feb4984 mir: fix compile-time warnings 2017-01-22 11:14:34 -05:00
Daniel Boles
aff42686ce combobox: Fix documentation typo bx => box 2017-01-21 16:11:54 +00:00
Daniel Boles
167ef42c5c menushell: Don’t dereference before typechecking 2017-01-20 22:18:40 +00:00
Daniel Boles
f705d0a5fa combobox: If typechecking, don’t reference before 2017-01-20 21:07:26 +00:00
Daniel Boles
7401794de6 combobox: popdown() the menu during unmap()
combo_box_popdown() of course doesn’t popdown our menu if it is NULL.
But the required call to this at end-of-life was in destroy(), by which
point dispose() already NULLed the menu, so Menu::popdown() would never
run, even if it should. Fix this by trying popdown() earlier in unmap().
Also, add a converse assurance that we don’t popup() while not mapped.
2017-01-20 13:47:33 +00:00
Руслан Ижбулатов
4a5cd127ff GDK W32: Ensure that we use made-up monitors when there are none
Previously GDK only made up monitors when it initially found none. Now it
also makes up monitors when it initially finds some, but later fails to get
their informatin in a normal way and finally prunes them out, being left with
zero monitors.

Having zero-length monitor array is unexpected and causes a number
of critical warnings and some critical functionality (such as displaying
drop-down menus) fails in such cases.

Ideally, there might be such a way to interrogate W32 API that produces the
information about non-real (but active) monitors out of it so that it isn't
necessary for us to make stuff up. However, this code is already complicated,
and i am not prepared to dig W32 API to find a way to do this.

This fixes the issues people had when they accessed a Windows desktop via RDP.

https://bugzilla.gnome.org/show_bug.cgi?id=777527
2017-01-20 12:45:57 +00:00
Mandy Wang
e831bb6ce7 update zh_CN translation 2017-01-20 20:37:01 +08:00
Chun-wei Fan
1063460db2 demos: Fix build
Include gtk/fallback-c89.c so that we can ensure that we have round(), and
that file already includes math.h
2017-01-20 18:17:33 +08:00
Руслан Ижбулатов
a7ff95ce73 GDK W32: Fix idiotic gdk_win32_display_get_monitor() implementation
Replace the code borrowed from the X11 backend with the code borrowed from Wayland backend. Now GTK doesn't crash when the number of monitors is zero.
2017-01-20 09:08:41 +00:00
Carlos Garnacho
bbcc3ee456 Revert "wayland: Push NULL buffer when hiding a GdkWindow"
This reverts commit 0f2e19c010.
2017-01-19 21:21:57 +01:00
David King
bd3d7b8a9a docs: Add gtk_print_job_set_source_fd() 2017-01-19 18:06:38 +00:00
Carlos Garnacho
0f2e19c010 wayland: Push NULL buffer when hiding a GdkWindow
This is how windows are meant to be hidden as per the wayland
protocol, there's no need to destroy the xdg_surface and other
interfaces.

Also, rename gdk_wayland_window_hide_surface() to clear_surface(),
as that's what it does.

https://bugzilla.gnome.org/show_bug.cgi?id=773686
2017-01-19 16:18:22 +01:00
Daniel Boles
eb26b57cba combobox: Avoid a pointless assignment
Don’t get the active item pointer before the grid/non-grid conditional,
because if we’re in grid mode, we re-get it before selecting it anyway.
2017-01-19 03:26:09 +00:00
Daniel Boles
b7cfe3c778 combobox: Also preselect active item in grid popup
i.e. when wrap-width > 0. This was only being done for non-grid cases.
So, ComboBoxes in grid mode did not indicate their selection when popped
up and required users to keynav from ‘nothing’ (at the top-left) to the
item they wanted to select. By selecting the active item in advance, now
it’s highlighted & acts as the starting point for keynav around the grid
2017-01-19 03:12:32 +00:00
Daniel Boles
a58dd993b2 scale: Really fix documentation of set_digits()
This previously only mentioned its effect on the displayed value, and
even after the previous commit, its rounding of the actual value upon
change still reads like too much of an afterthought. Worse, it wasn’t
mentioned at all in the doc for the @digits parameter. Change this to
emphasise rounding always occurs and the displayed value is secondary.
2017-01-19 00:44:35 +00:00
Daniel Boles
8377850127 scale: doc: set_digits doesn’t round retroactively
Whether it should is an open question, but for now, the documentation
should clearly indicate that currently rounding is only applied upon
changes to the value, not to the existing value when ::digits changes.
This is already clear in the doc for the underlying Range::round-digits.

https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-01-19 00:17:40 +00:00
Daniel Boles
4a6bd134bd Scale: Always sync ::digits to Range::round-digits
The documents state that gtk_scale_set_digits() “causes the value of the
adjustment to be rounded off to this number of digits, so the retrieved
value matches the value the user saw.” Note the lack of any condition.

But in fact, if draw-value was false, rounding was disabled on the base
Range, so values that weren’t displayed weren’t rounded. This made the
docs wrong and made an apparently cosmetic detail alter functionality.

Fix by ensuring the number of digits set on Scale is always propagated
along to gtk_range_set_round_digits(), thus rounding to it in all cases
when the value changes, regardless of whether the value is displayed.

This doesn’t address the other idea from Bugzilla: that changing the
number of digits should clamp the _existing_ value if it’s more precise.
This contradicts digits docs in the base Range, but the above from Scale
can be read as implying it’ll happen. For now, that’s an open question.

https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-01-19 00:17:40 +00:00
Daniel Boles
ccba2eaace Remove executable bit from C source files in tests 2017-01-19 00:17:40 +00:00
Daniel Boles
e98e6f73be combobox: Work around popup handler altering model
GtkFileChooserButton installs a handler for the popped-up signal, which
refilters the menu, in order to hide the “(None)” item from the popup
if it was previously selected in the ComboBox. This oddity means that:

 • Until recently, this item would be selected in the menu shell, which
   would then be popped up and change the selection away from that item.
   This was therefore redundant (more on which below!) but benign.

 • After the patch for https://bugzilla.gnome.org/show_bug.cgi?id=771242
   however, this causes a critical assertion fail, as now we stash the
   originally selected item in a pointer so that it can be selected only
   after realisation/popup – but by that stage, the model has just been
   refiltered and the previous pointer no longer refers to a valid item.

This commit works around this problem by, after popping up the menu,
getting the active item again, in case a popped-up handler has gone and
invalidated the pointer to the active item that we saved before popup.

If a handler does this, everything done to find/use the original item is
pointless. But this avoids the ugly critical in FileChooserButton, while
not harming every other ComboBox that doesn’t mess with its model while
popping up (hopefully the vast majority), and it’s very difficult to
imagine a way to check if the active item is /going to/ be hidden later)
2017-01-18 22:22:52 +00:00
Daniel Boles
dfe89a381f combobox: Don’t select active item if it’s hidden
I hope no one ever actually brings such a silly item into this world,
but this achieves symmetry with the similar checks immediately after.
2017-01-18 22:17:37 +00:00
Daniel Boles
ac4e1625f5 combobox: Move variables into narrowest scopes 2017-01-18 21:43:42 +00:00
Matthias Clasen
31fee675e4 Revert "filechooser portal: Make sure we can save"
This reverts commit 4875c689a0.

This was a thinko. Writable is not actually settable from the
application side, but only for the user, from the backend side.
2017-01-17 14:15:39 -05:00
Matthias Clasen
f4a0f2e5ca filechooser portal: Make sure we can save
Explicitly request files for saving to be writable, otherwise
we are at the mercy of the portal, which currently gets it wrong.
2017-01-17 14:10:50 -05:00
Rui Matos
4f80d234bf gdk/wayland: Always get the seat's key modifiers from the GdkKeymap
Elsewhere we already go through the keymap to get modifiers so we
should do the same here. In fact, this was relying on xkb modifier
mask values being bitwise compatible with GdkModifierType which isn't
necessarily true.

https://bugzilla.gnome.org/show_bug.cgi?id=770112
2017-01-17 18:12:54 +01:00
Rui Matos
33c10204e4 gdk/wayland: Don't add GDK_META_MASK to gdk mod masks if MOD1 is set
Gtk+ treats MOD1 as a synonym for Alt, and does not expect it to be
mapped around, so we should avoid adding GDK_META_MASK if MOD1 is
already included to avoid confusing gtk+ and applications that rely on
that behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=770112
2017-01-17 18:12:54 +01:00
William Hua
248ef2d6a0 mir: properly handle empty clipboard
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
41732391d8 mir: paste clipboard data from content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
5c4c3f1afd mir: copy clipboard data to content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
210d1279e5 mir: connect to content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
0acb58b40f mir: track focused window
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
b6baa088dc mir: implement window properties
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
Matthias Clasen
a22e80122e 3.22.7 2017-01-16 14:10:47 -05:00
Olivier Fourdan
9a5ffcd1b5 wayland: avoid 0 width/height anchor rectangle
Passing a rectangle with zero width or height to xdg_shell-v6
set_anchor_rect() will cause a protocol error and terminate the client,
as with gedit when pressing the Win key.

Reason for this is because the rectangle used to set the anchor comes
from gtk_text_layout_get_iter_location() which uses the pango layout
width/height, which can be empty if there is not character at the given
location.

Make sure we don't use 0 as width or height as an anchor rectangle to
avoid the protocol error, and compensate the logical position of the
given rectangle if the size is changed, so that the actual position
remains as expected by the client.

https://bugzilla.gnome.org/show_bug.cgi?id=777176
2017-01-16 13:55:36 +01:00
Daniel Boles
afd19e9433 grid: Fix plural error in docs' @Short_description 2017-01-15 20:39:43 +00:00
Benjamin Otte
21a71e94c6 cssimage: Fallback images have no aspect ratio
The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.
2017-01-13 03:39:50 +01:00
Benjamin Otte
2e7d5c08cb cssimage: Scale images to contain, not cover
Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.
2017-01-13 03:39:49 +01:00
Matthias Clasen
6da8cbc87e Deprecate gdk_window_process[_all]_updates
These functions should not be used anymore now that we have a
frame clock, and are gone in GTK+ 4
2017-01-10 20:25:15 -05:00
Rui Matos
99abc6363a gdk/wayland: Handle non-existant gsettings keys
Since we're a library, crashing on gsettings keys, whose presence is out
of our control, isn't appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:18:09 +01:00
Rui Matos
22b1e0b678 gdk/wayland: Add support for the gtk-enable-primary-paste gsetting
The gsetting was recently added so that we can have this configurable
on the wayland backend too.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:18:09 +01:00
Руслан Ижбулатов
eece8a7dd2 GDK W32: Use keyboard hook to detect AeroSnap combinations better
Windows WM handles AeroSnap for normal windows on keydown. We did this
on keyup only because we do not get a keydown message, even if Windows WM
does nothing with a combination. However, in some specific cases it DOES
do something - and we have no way to detect that. Specifically, winkey+downarrow
causes maximized window to be restored by WM, and GDK fails to detect that. Then
GDK gets a keyup message, figures that winkey+downarrow was pressed and released,
and handles the combination - by minimizing the window.

To overcome this, install a low-level keyboard hook (high-level ones have
the same problem as normal message loop - they don't get messages when
Windows WM handles combinations) and use it to detect interesting key combinations
before Windows WM has a chance to block them from being processed.

Once an interesting combination is detected, post a message to the window, which
will be handled in due order.

It should be noted that this code handles key repetitions in a very crude manner.

The downside is that AeroSnap will not work if hook installation function call fails.
Also, this is a global hook, and if the hook procedure does something wrong, bad things
can happen.

https://bugzilla.gnome.org/show_bug.cgi?id=776031
2017-01-10 12:54:43 +00:00
Руслан Ижбулатов
ca79296061 GDK W32: Handle CapsLock as part of the key shift level
Instead of using some kind of flawed logic about modifying a keypress result
when CapsLock is toggled, just add a CapsLock shift level (and all derived
shift levels, i.e. Shift+CapsLock and CapsLock+AltGr and Shift+CapsLock+AltGr)
and query Windows keyboard layout API about the result of keypresses involving
CapsLock.

Keysym table is going to be (roughly) twice as large now, but CapsLock'ed
keypresses will give correct results for some keyboard layouts (such as
Czech keyboard layout, which without this change produces lowercase letters
for CapsLock->[0,2,3,4...] instead of uppercase ones).

Keymap update time also increases accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=165385
2017-01-10 07:59:53 +00:00
Daniel Boles
cc4ea94d8b revealer: Fix a typo in a function doc
Also, "ie" wasn't very clear, but fixing that to "i.e." would cause
truncation of the summary when processed by bindings using doxygen. So,
I replaced it with "in other words", which is no _less_ clear, at least.
2017-01-09 22:46:21 +00:00
Carlos Garnacho
ab66c3d7bf wayland: Disable EGL swap interval
We have a frame clock that ensures rendering is done as per the
output vsync. There is no need to have Mesa do the same for us.

This, most notably, ensures Mesa doesn't schedule frame callbacks
that will be left unattended if the compositor stops throttling
frames for its surface, this is eg. the case if the toplevel is
moved to another workspace.

Also, given a SwapInterval!=0 will always bring these unexpected
side effects, check that it's possible to disable it, and spew
a debug message if that isn't the case.

https://bugzilla.gnome.org/show_bug.cgi?id=769835
2017-01-09 19:04:23 +01:00
Carlos Garnacho
eb57651ff7 gtkdnd: Remove unnecessary call
drag-data-delete is emitted based on the interchange of the
DELETE atom, which may well be set or bypassed locally by
the app. As such emitting it here is not right, the other
paths handling the DELETE atom interchange are still valid
and there.

https://bugzilla.gnome.org/show_bug.cgi?id=774726
2017-01-09 19:04:23 +01:00
Carlos Garnacho
c4f1545c5e wayland: Add fake mimetype for local DnD cases
If there are no targets, DnD is probably intended to be local,
add a mimetype for matching then. The wayland protocol requires
at least one wl_data_offer.target call with the mimetype selected
for transfer.
2017-01-09 19:04:23 +01:00
Руслан Ижбулатов
125ef3539c GDK W32: Special handling for VK_PAUSE
Similar to VK_DIVIDE, this key can't be mapped to a scancode by
MapVirtualKeyEx(). Googling suggests that this is a known bug.

https://bugzilla.gnome.org/show_bug.cgi?id=769214
2017-01-09 15:15:52 +00:00
Руслан Ижбулатов
3326fba524 GDK W32: Change WM_SYSMENU style switch logic
Instead of checking for window state and giving it extra styles that
fit, just give it all styles that it is missing. It turned out that
otherwise it is impossible to, for example, restore a maximized window
via sysmenu. Also, be more flexible towards GDK/WM window state mismatches
and consider the window minimized/maximized if *either* GDK or WM thinks so.

https://bugzilla.gnome.org/show_bug.cgi?id=776485
2017-01-09 14:17:32 +00:00
Руслан Ижбулатов
51645b5851 GDK W32: Remove unneeded assertion
Just set check_for_dpi_awareness = TRUE and eventually it will be handled
correctly, even if setDpiAwareFunc() returns E_ACCESSDENIED or shcore functions
are NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=777031
2017-01-09 10:00:22 +00:00
Matthias Clasen
074f391f10 Make GTK_DEBUG=interactive work better
We currently have various ways to initialize GTK+, and not
all of them were supporting this way of bringing up the
inspector. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=776807
2017-01-07 19:18:09 -05:00
Aurimas Černius
ea4af401d7 Updated Lithuanian translation 2017-01-07 14:53:31 +02:00
Benjamin Otte
8b118eb8b5 gtk-demo: Make icon counter work from ui file
Gets rid of update always being 1 frame late.
2017-01-07 03:44:25 +01:00
Benjamin Otte
dd406c8062 gtk-demo: Add GtkFishbowl
Avoids usage of GtkFixed where child properties eat up all the CPU time.
And that's kinda not what I want to benchmark.
2017-01-07 03:41:33 +01:00
Benjamin Otte
a7b0af5d8d gtk-demo: Allow locking of icon count in fishbowl demo
I'm not sure I'm proud of the hack to get the changing icon into the UI
file without having to write code. But it works.
2017-01-07 03:41:33 +01:00
Jonas Ådahl
5bae71f896 wayland: Handle subsurface as popup parent
When a subsurface is used as a parent of a popup, GDK needs to traverse
up to the transient-for as the next parent, to properly find the parent
used by the popup positioner. This is because the parent of a popup
must always either be an xdg_popup or an xdg_surface, but traversing
the "parent" (in GDK terms) upwards from a subsurface will end up on
the fake root window before we hit the actual parent (in Wayland terms).

https://bugzilla.gnome.org/show_bug.cgi?id=776225
2017-01-06 10:44:54 +08:00
Matthias Clasen
bea4c0898d Revert "Make it possible to set style classes for label links"
This reverts commit 9a2527b361.

This needs more work to have a chance of working properly.
2017-01-05 19:40:40 -05:00
Matthias Clasen
41b14fd148 Revert "Use CSS for styling links in labels"
This reverts commit 34264667ed.
2017-01-05 19:40:12 -05:00
Matthias Clasen
34264667ed Use CSS for styling links in labels
This was implemented only halfway, and was hardcoding the
underline. We don't need to do that anymore.
2017-01-05 18:12:20 -05:00
Matthias Clasen
790d5960c4 Bump version to 3.22.7 2017-01-05 17:33:51 -05:00
Matthias Clasen
9a2527b361 Make it possible to set style classes for label links
This makes it possible to style links in labels differently
in certain situations.
2017-01-05 17:33:04 -05:00
Matthias Clasen
92f6bcdca6 3.22.6 2017-01-04 15:48:17 -05:00
Matthias Clasen
c7096c4586 Update expected output for a11y tests
This is a followup to the GtkAboutDialog template change.
2017-01-04 15:48:17 -05:00
Daniel Boles
eceb9add1f demos/icon-browser: increase default window size
...to get more than 1 row of icons to browse!

https://bugzilla.gnome.org/show_bug.cgi?id=776560

I've bumped the size a bit further, to 1024x768
2017-01-04 15:48:17 -05:00
Sébastien Wilmet
e75601c058 docs: improve the documentation of GtkEntry:attributes
See the implementation of gtk_entry_create_layout():
pango_attr_list_splice() is used to add the PangoAttrList of the preedit
string. And that is done *after* applying the PangoAttrList of the
"attributes" property.

https://bugzilla.gnome.org/show_bug.cgi?id=776868
2017-01-04 20:01:28 +01:00
Daniel Boles
7960e94112 scrolledwindow: Fix func summary being cut off in bindings using doxygen
...which treats the first '.' in doc comments as the end of the summary.
So, e.g., in gtkmm, get_kinetic_scrolling() is currently summarised as
"Changes the behaviour of @scrolled_window wrt." Not very informative!

No need for a period there & anyway, the phrase "wrt to" is superfluous,
and we have space to actually say "with regard to", so just do that now.
2016-12-31 13:28:51 +00:00
Chris Mayo
d9748563c8 GtkAboutDialog: Fix formatting of example email address in html
Signed-off-by: Chris Mayo <aklhfex@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=776524
2016-12-30 10:37:38 -05:00
Matthias Clasen
1fc3fe4a0a about dialog: Simplify the template a bit
Remove some unnecessary complications, like an extraneous
box, and some child property settings that are not needed.
2016-12-30 10:20:16 -05:00
Stas Solovey
c7dce1018b Update Russian translation 2016-12-29 16:23:12 +00:00
Matthias Clasen
f19ecbb850 Avoid a possible crash in ::activate-url handlers
If the signal handler ends up changing the label text,
the link is no longer around to update the css node.
Check for this possibility to avoid a crash here.
2016-12-29 11:08:29 -05:00
Руслан Ижбулатов
a1aee4602c GDK W32: Handle maximizing correctly for small primary monitors
When primary monitor is smaller than the actual monitor on which the
window is being maximized, the WM will do widnow size adjustments
that will completely screw the window size if we try to make it
smaller than 100% fullscreen (to account for taskbar size, for example).

Fix this by overriding maximized window size during WM_WINDOWPOSCHANGING.

https://bugzilla.gnome.org/show_bug.cgi?id=775808
2016-12-24 17:29:50 +00:00
Christian Kirbach
e0856226c5 Update German translation 2016-12-20 19:11:29 +00:00
Debarshi Ray
8155c33d80 flowbox: Don't emit child-activated while dragging the pointer
https://bugzilla.gnome.org/show_bug.cgi?id=776306
2016-12-20 12:55:41 +01:00
Debarshi Ray
9679ef6b00 flowbox: Export gtk_flow_box_get_child_at_pos as public API
Bump the gtk+ version so that others can depend on this new API.

https://bugzilla.gnome.org/show_bug.cgi?id=776187
2016-12-20 00:35:48 +01:00
Philip Chimento
30b5187e60 GtkApplication: Lack of optional components shouldn't warn
When running uninstalled tests with GtkApplication on an autobuilder with
a fake session bus, warnings will cause the tests to abort. The GNOME
session manager, the Xfce session manager, and the Inhibit portal are all
not needed for normal operation of GTK, so we should not log warnings if
they are not found.

As well as not being present on a fake session bus, it's also not
expected that they'll be present on all platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=774784
2016-12-19 15:25:58 -08:00
Debarshi Ray
3073419ff1 flowbox: Don't emit selected-children-changed during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
2016-12-19 18:06:41 +01:00
Debarshi Ray
e779ec4b1f listbox: Don't emit selected-rows-changed, etc. during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
2016-12-19 18:06:41 +01:00
Debarshi Ray
bebcb5e094 flowbox: Rename gtk_flow_box_find_child_at_pos for consistency
... with gtk_list_box_get_row_at_y. It would be nice to avoid the
'find' versus 'get' discrepancy since we are planning to expose it as
public API.

https://bugzilla.gnome.org/show_bug.cgi?id=776187
2016-12-19 15:10:07 +01:00
Debarshi Ray
2b32008eeb Mention that gdk_window_create_similar_image_surface inherits the scale
https://bugzilla.gnome.org/show_bug.cgi?id=776132
2016-12-17 22:50:48 +01:00
Olivier Fourdan
78f8f236e9 wayland: apply empty input shape on parent commit
For subsurfaces, the new state which includes the input shape is not
applied by the compositor if the subsurface is in effective synchronous
mode.

So we need to apply the input shape once parent surface is in effective
desynchronized mode, which is when it's committed, otherwise the input
shape may never be applied if the widget is not using being_paint() /
end_paint() to draw on its subsurface, like clutter does.

We do that only for empty input shape as those won't need update when
the subsurface is resized, for all other non-empty input shape, the
client still has to use begin_paint()/end_paint() for the input shape to
be applied.

https://bugzilla.gnome.org/show_bug.cgi?id=774534
2016-12-15 13:30:05 +01:00
Emmanuele Bassi
da43bfd272 demo: Fix the GLES fragment shader for GLArea
We have a couple of syntax errors, like 'f' modifier for floating point
values.
2016-12-14 20:56:01 +00:00
Emmanuele Bassi
33e4826efd gl: Check for GL_EXT_framebuffer_blit before using glBlitFramebuffer
We check when we realize the GdkGLContext, but we never use the check
before using the API, and it breaks on drivers that do not implement the
extension, or on drivers that only support OpenGL ES 2.0.
2016-12-14 20:55:21 +00:00
Benjamin Otte
e04654f865 css: An opaque background does not allow omitting push_group
When the background-clip of the background is smaller than the
background-clip of blended images, not pushing a group is wrong.

Test testing exactly that included.
2016-12-13 23:01:54 +01:00
Matthias Clasen
a8991a6bea 3.22.5 2016-12-09 11:54:24 -05:00
Matthias Clasen
5b12c21d20 css nodes tests: Update expected output for progressbar
This changed since we add some more style classes now.
2016-12-09 11:54:24 -05:00
Gianvito Cavasoli
44fb5c9c70 Update Italian translation 2016-12-09 10:34:45 +00:00
Olivier Fourdan
7f39c7cbf7 wayland: destroy subsurfaces along with parents
Wayland subsurfaces can have other native window parents, but those need
to be destroyed along with the rest of the window hierarchy otherwise
an assert() is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=774915
2016-12-05 10:57:04 +01:00
Lapo Calamandrei
155dbaaa14 HC: progressbar style fix
Reset styling on the progress node when trough node has the `empty'
styleclass.

See https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-12-03 16:30:23 +00:00
Lapo Calamandrei
d55aa2a859 Adwaita: progressbar style fix
Reset styling on the progress node when trough node has the `empty'
styleclass.

See https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-12-03 16:30:23 +00:00
Daniel Boles
42d7f81649 GtkProgressBar: trivial conditional optimisation
I'd hope the compiler would realise this for us, but let's be explicit.
2016-12-03 16:30:23 +00:00
Simon Steinbeiss
a793f8f243 progressbar: add empty and full classes on trough based on fill-level
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-12-03 16:26:15 +00:00
Debarshi Ray
8952975304 flowbox: Fix get_child_at_index crash with an invalid index
https://bugzilla.gnome.org/show_bug.cgi?id=775525
2016-12-02 16:38:05 +01:00
Lapo Calamandrei
e6d7df7233 Adwaita: render updated assets. 2016-12-01 13:17:02 +00:00
Lapo Calamandrei
35e6a8eb0d Adwaita: update assets svg
correct colors for pointy sliders assets.
2016-12-01 13:17:02 +00:00
Daniel Boles
7fca502115 ComboBox: Do not select item before menu realised
For a menu mode CB with wrap_width == 0 and an active item, that item is
selected in gtk_combo_box_menu_popup. Selection causes the MenuShell to
activate and hence take a grab. This was done before the menu was popped
up. A patch distributed in Debian sid - after being proposed on our BZ -
revealed that on the 1st popup of any such ComboBox, within grab_add,
the MenuShell's toplevel's GdkWindow is NULL. This causes a Gdk-CRITICAL
assertion fail on the 1st time opening any such CB, on Debian and if
that patch were merged to GTK+. By selecting after popup, we ensure the
MenuShell is realised before its grab_add and so avoid the critical.

https://bugzilla.gnome.org/show_bug.cgi?id=771242
2016-12-01 12:58:59 +00:00
William Hua
f50ed5b358 gtkcombobox: pass trigger event when popping up menu
https://bugzilla.gnome.org/show_bug.cgi?id=771242
2016-12-01 12:58:59 +00:00
Daniel Boles
3971439a17 ComboBox: Fix whitespace
* Replace tabs for indentation with spaces
 * Remove whitespace at ends of lines
2016-12-01 12:58:59 +00:00
Matthias Clasen
43b2b107f1 wayland: Don't warn if we loose the compositor connection
And instead, exit cleanly. This avoids filling the logs with
these warnings from every single application that has a
connection to the compositor.
2016-11-30 13:46:34 -05:00
Matthias Clasen
c70ba3a4f0 x11: Don't warn if the display is closed
This causes a storm of warnings from all applications in the logs
whenever the display goes away, and is not useful.
2016-11-30 13:46:29 -05:00
Olivier Fourdan
57a14565c6 wayland: Check for subsurface looking up the toplevel
gdk_window_get_toplevel() walks up the windows tree looking for the
corresponding toplevel window, but needs to account for subsurfaces as
well on Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=775319
2016-11-30 10:06:40 +01:00
Matthias Clasen
197eaaacb7 gtk-demo: Add a demo for tabs
One of the least-appreciated features in pango.
It deserves a demo.
2016-11-29 16:39:21 -05:00
Matthias Clasen
f7fb610278 Don't leak a pixbuf reference in dnd
https://bugzilla.gnome.org/show_bug.cgi?id=775316
2016-11-29 14:45:41 -05:00
Matthias Clasen
17ec4f10e4 Fix reference handling in GtkScaleButton
We were leaking the adjustment, since we confuse ourselves
with a property whose initial value comes out of a template.
Stop doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=775212
2016-11-28 15:04:49 -05:00
Matthias Clasen
cf4fd0d3e3 Reduce a warning to a message
The warning interferes with having a testcase to check this behavior,
so reduce this to a message.
2016-11-28 14:43:07 -05:00
Andrew Chadwick
0b129f3534 win32 event: check for NULL display or dev mgr
The recent Wintab testing revealed an interesting edge case: we cannot
for certain say that windowing system messages will not be received
while the default display and its device manager are still being set up.
We've ruled out the Wintab case now, but cannot rule out some future bit
of runtime DLL code doing stuff at this critical time.

This commit detects and avoids a potential null pointer dereference in
the message handling code while detecting grabs. Grabs don't really
exist yet, if the default display and/or its device manager are not yet
globally known.

https://bugzilla.gnome.org/show_bug.cgi?id=774379
2016-11-28 15:05:13 +00:00
Anders Jonsson
f8d90378a4 Update Swedish translation 2016-11-28 14:05:07 +00:00
Sébastien Wilmet
2f940d91a0 docs: fix a parameter name of GtkEntry::populate-popup
Trivial commit.

The documentation block refers to @widget, not @popup. @widget is a
better name since the type is GtkWidget.
2016-11-26 12:35:14 +01:00
Sébastien Wilmet
ca75748223 docs: fix docs of functions to convert layout_index <-> text_index
Trivial commit.

The documentation was swapped. The documentation for the parameters and
the return values is good.
2016-11-26 12:34:48 +01:00
Cosimo Cecchi
5282991ab9 Adwaita: make rubberband selection work again for libgd apps
libgd views still use the old style class.
2016-11-25 18:53:21 +01:00
Matthias Clasen
6c0cd1a16d Make gtk-encode-symbolic-svg work for icons with dotted names
We were producing org.symbolic.png from org.gnome.Recipes-symbolic.svg,
which is not useful. Look for the last dot in the original name, to
produce the expected org.gnome.Recipes-symbolic.symbolic.png instead.
2016-11-25 08:57:50 -05:00
Olivier Fourdan
605303681b wayland: Place subsurfaces relative to their parent
Now that subsurfaces can be created as child of another GdkWindow (and
not just the root window), they must be placed according to the location
of their parent, i.e. the abs_x/abs_y must be updated and taken into
account when placing and moving subsurfaces under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=774917
2016-11-24 09:33:35 +01:00
Matthias Clasen
4cd8796c0e inspector: Respect text-scaling-factor value initially
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774893
2016-11-23 19:37:28 -05:00
Florian Müllner
cc6335d94d GtkLabelAccessible: Initialize link before setting parent
Since at-spi-atk commit 96621a5e95 fixed PropertyChange notifications
for AccessibleParent, setting the parent will result in a call to
ref_state_set() which assumes that the object is fully initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=774939
2016-11-23 19:02:40 -05:00
Christian Hergert
ecb38bc824 inspector: ensure controller is a GtkGesture
While GtkEventController implementations today are all GtkGesture, it is
possible to create a GtkEventController manually. This is an extrac check
to ensure we only add gestures to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=774760
2016-11-23 14:02:15 -08:00
Stas Solovey
dd3cf38c53 Update Russian translation 2016-11-23 20:42:59 +00:00
Matthias Clasen
43b9b7f4e6 menu: Don't leak check menu items
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774686
2016-11-23 14:50:16 -05:00
Matthias Clasen
7d695068e2 notebook: Don't leak arrow gadgets
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774743
2016-11-23 14:49:15 -05:00
Matthias Clasen
da9bd46aed text handle: Don't leak adjustments
This can happen if the weak pointer is triggered before the
adjustments are unset. Pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=774790
2016-11-23 13:58:00 -05:00
Balázs Meskó
6e856f6226 Update Hungarian translation 2016-11-22 13:41:01 +00:00
Andrew Chadwick
66a08bf3a6 wintab: init only after the display is assigned
Only attempt to initialize Wintab after the display manager announces
that the first default display has been set. Fixes a segfault during
initialization of specific tablet drivers' wintab32.dlls. Add assertions
and verbose comments explaining this nonsense because this stuff is a
pain to have to keep fixing.

https://bugzilla.gnome.org/show_bug.cgi?id=774379
2016-11-22 12:52:00 +01:00
Andrew Chadwick
dd6a00bb31 wintab tilt: Check return location for validity
https://bugzilla.gnome.org/show_bug.cgi?id=774265
2016-11-22 12:17:32 +01:00
Andrew Chadwick
61a57465ea win32: Fix tilt from Wintab devices
Move the orientation sanity-checks into the packet decode func.
Rationale: the packet handling func may otherwise read beyond the end of
device->last_axis_data.

Also expand them to cope with my test Huion's weird reporting.

Also correct the azimuth angle to align with GDK's presentation.

Most importantly, fix annoying comment typo.

https://bugzilla.gnome.org/show_bug.cgi?id=774265
2016-11-22 11:22:16 +01:00
Andrew Chadwick
f40191ff19 wintab: fix skipping of odd-numbered devices
Fix a regression introduced in 4ce6d10601
which causes devices with an odd-numbered zero-based index in the list
to be passed over incorrectly. This might present as yet another "device
does not send pressure" bug for ~50% of devices out there.

This commit also closes off another potential segfault for wintab_devices
lists which have an odd length.

https://bugzilla.gnome.org/show_bug.cgi?id=774699
2016-11-21 19:12:41 +01:00
Gustavo Noronha Silva
aa1307a787 Fix off by one in check for GtkRoundedBox containing a rectangle
When checking if a rectangle is contained by the rounded box, the code
will refuse a rectangle which is the exact size as the one backing the
rounded box, since it checks for greater or equal width and height.
Check for greater only instead.

https://bugzilla.gnome.org/show_bug.cgi?id=774114
2016-11-21 11:03:36 -02:00
Matthias Clasen
5301644a3f Document gtk_menu_place_on_monitor 2016-11-19 13:53:05 -05:00
Matthias Clasen
157b630d72 Add a since tag 2016-11-19 13:29:17 -05:00
Matthias Clasen
462a5df644 docs: Add gtk_menu_place_on_monitor 2016-11-19 12:52:26 -05:00
Baurzhan Muftakhidinov
4bc2904dae Update Kazakh translation 2016-11-19 12:15:59 +00:00
Matthias Clasen
4569bb372f 3.22.4 2016-11-18 13:55:21 -05:00
Timm Bäder
dc184902d7 filechooserwidget: Forward file filter to entry
And in the entry, apply the currently used filter as a second step to
the completion items.

https://bugzilla.gnome.org/show_bug.cgi?id=773007
2016-11-18 13:29:58 -05:00
Olivier Fourdan
0b46c5b176 gdkwindow: Allow native subsurface for all parents
Under Wayland, a subsurface can have another surface as parent, but
gdk would not allow native windows if the parent is not the root window.

Allow native subsurface for all parent under Wayland, not just for the
root window.

https://bugzilla.gnome.org/show_bug.cgi?id=774475
2016-11-18 13:26:29 -05:00
Carlos Garnacho
4805780016 wayland: Keep last scale factor on surfaces after it left all outputs
This can be triggered on workspace switches, and on hidpi results in
the scale factor being reset to 1 while the window is not in the
current workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=774476
2016-11-18 13:26:10 -05:00
Мирослав Николић
042e37e6cc Updated Serbian translation 2016-11-18 09:15:04 +01:00
Matthias Clasen
748a1450a8 placeview: Don't leak the file enumerator
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774634
2016-11-17 13:55:44 -05:00
Charles Monzat
8b334fef63 Update French translation 2016-11-17 18:47:41 +00:00
Matthias Clasen
595ef21feb docs: Fix print-related includes
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774614.
2016-11-17 09:35:04 -05:00
Matthias Clasen
71b859a9ce gtk-demo: Set local-only to FALSE for the file chooser
No good reason for that.
2016-11-17 08:52:28 -05:00
Michael Koloberdin
504beaddb1 gdk: Fix screen geometry detection for non-randr setups
https://bugzilla.gnome.org/show_bug.cgi?id=773601
2016-11-17 07:55:50 -05:00
Matthias Clasen
c5f6d61783 docs: Update an example
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774490
2016-11-17 06:24:32 -05:00
Caolán McNamara
dbcbaac982 spin entry should be a child of spin context
https://bugzilla.gnome.org/show_bug.cgi?id=774609
2016-11-17 06:10:27 -05:00
Rafael Fontenelle
0103bbf5eb Update Brazilian Portuguese translation 2016-11-17 04:21:21 +00:00
Piotr Drąg
24f5d99be9 Update Polish translation 2016-11-16 13:08:19 +01:00
Piotr Drąg
528b80a165 Update Polish translation 2016-11-16 11:43:23 +01:00
Chun-wei Fan
25fd5710f7 Visual Studio builds: Fix Broadway builds
After building GDK with broadway, we need to copy the GDK DLL from
[Release|Debug]_Broadway\bin to [Release|Debug]\bin, so that the
introspection builds can be done normally with CFG=[Release|Debug].  As we
renamed the projects, we needed to update the property sheets that does
the copying, which was accidently missed.  Fix that.
2016-11-16 11:50:32 +08:00
Marek Cernocky
13ccbd0111 Updated Czech translation 2016-11-15 14:39:14 +01:00
Matthias Clasen
7f7501b1e7 Allow replacing input file in gtk-builder-tool simplify 2016-11-15 06:14:59 -05:00
Matthias Clasen
9a257e1f6a entry: Avoid recursion in gtk_entry_ensure_layout
This was unintentional, and lead to a memory leak.
2016-11-14 15:18:25 -05:00
Lauri Kasanen
a28022e916 recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-14 14:27:03 -05:00
Matthias Clasen
14545342d5 appchooser: Plug a memory leak
We were not dropping the reference that the model gives us.

https://bugzilla.gnome.org/show_bug.cgi?id=774352
2016-11-14 14:21:17 -05:00
Matthias Clasen
cc0c286869 widget-factory: Better progressbar testing
Hook the two top progressbars up to the scale with marks.
Your turn, Lapo.
2016-11-14 08:48:24 -05:00
Olivier Fourdan
57f551a114 gtkstack: reorder size_allocate and move_window
Unlike other container widgets, GtkStack would allocate its children
prior to moving its windows, which might prevent further valid size
allocation signals to be emitted.

Re-order the size allocation of child widgets to be performed after
moving the GtkStack windows.

Thanks to Owen for spotting the real issue here.

https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-11-14 12:02:43 +01:00
Olivier Fourdan
f70039cb96 Revert "gdkwindow: configure native windows in move_native_children()"
This reverts commit 12579fe71b.
2016-11-14 12:02:40 +01:00
Olivier Fourdan
c1507cf680 Revert "gdk: Get rid of unused variables"
This reverts commit 6f7a6f769f.
2016-11-14 12:02:37 +01:00
Chun-wei Fan
a820acee00 Visual Studio builds: Fix .pc generation
We want to look for the gdk-pixbuf-2.0 package, and we should leave a space
between -ldwmapi and -lzlib1 when we enable Broadway.

Also copy the generated gdk-3.0.pc and gtk+-3.0.pc as gdk-win32-3.0.pc and
gtk+-win32-3.0.pc respectively, to be in-line with the autotools builds.
2016-11-14 16:27:21 +08:00
Chun-wei Fan
d3bdd384a1 gdkscreen-win32.c: Also define _WIN32_WINNT
As in the last commit on gdkdisplay-win32.c, we need to define that to be
0x0600 (Vista) or later so that the items needed in the Windows headers be
activated.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 21:03:46 +08:00
Chun-wei Fan
27b68ff193 gdkdisplay-win32.c: Define _WIN32_WINNT
... to be for Vista (0x0600) or later.  This is so that the necessary
items in the Windows headers be activated so that the code will build
properly on mingw-w64, and we already require Vista or later for GTK+.

Thanks Ting-Wei Lan for pointing this out.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 20:53:41 +08:00
Lauri Kasanen
bf560369f2 recent-manager: Add a limit to the list's size
This fixes a DOS where any app can cause all running gtk apps
to use arbitrary amounts of memory.

Originally reported against mate-panel, where running a big slideshow
in eye-of-mate caused increasing RAM usage in mate-panel.

v2: Hardcode the value
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-10 17:10:34 -05:00
Jan Alexander Steffens (heftig)
cb53562659 gdkscreen-x11: Fix screen and monitor size calculation
The monitors are already in scaled pixels, so scaling again when retrieving
the screen size is wrong.

With GDK_SCALE unset, the initial monitor sizes are unscaled, and when the
xsettings client sets a scale > 1, the monitor sizes should be updated.

The end result is that the monitor sizes start out wrong, and get
corrected on the first xrandr event, while the screen size starts out
right and becomes wrong after the event.

This patch fixes Firefox misplacing menus and popovers when the xrandr
configuration changes while it is running.

Fix for the X11 side of

https://bugzilla.gnome.org/show_bug.cgi?id=772202
2016-11-10 15:34:39 -05:00
Matthias Clasen
275bbbf88d places sidebar: Don't leak a reference
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185
2016-11-10 15:17:28 -05:00
Matthias Clasen
9e5510420c Fix a copy-paste error
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185#c3
2016-11-10 15:07:45 -05:00
Matthias Clasen
53474fa404 headerbar: Don't leak widgets
We were not properly freeing separators that we end up
not using.

https://bugzilla.gnome.org/show_bug.cgi?id=774066
2016-11-10 15:04:35 -05:00
Matthias Clasen
f8900e5ac4 spinbutton: Fix some gadget handling issues
We were not adding the down_button gadget to the parent,
and we were not unreffing the button gadgets.

https://bugzilla.gnome.org/show_bug.cgi?id=774046
2016-11-10 14:47:58 -05:00
Massimo Valentini
4657e21be8 GdkGLContext: chain finalize handler
https://bugzilla.gnome.org/show_bug.cgi?id=773979
2016-11-10 14:35:06 -05:00
Thibaut Girka
f9796b01ff Fix loading cached compose tables
https://bugzilla.gnome.org/show_bug.cgi?id=773916
2016-11-10 14:33:43 -05:00
Gustavo Noronha Silva
04f3940488 cssshadowvalue: scale the blur surface by the same factor as the target
Making sure the surfaces are using the same scale factor makes it more
likely a fast path will be used when pixman gets involved, as pointed
out by Benjamin Otte.

https://bugzilla.gnome.org/show_bug.cgi?id=772075
2016-11-10 16:30:36 -02:00
Carlos Garcia Campos
255225584e printing: Do not truncate job names in GtkPrintOperation
We are currently truncating job names to 255 bytes, because that's the
maximum allowed length of job-name attribute in CUPS. This is a CUPS
limitation that GtkPrintOperation shouldn't need to know, and it
shouldn't affect other backends, that might have other limitations or
even no limitation at all. This has another side effect, that what you
set as GtkPrintOperation:job-name could be different to what you get if
the property is truncated, this is not documented in
gtk_print_operation_set_job_name(). So, I think the job name should be
truncated by the CUPS backend, right before setting the job-name
attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=774097
2016-11-10 16:56:43 +01:00
Florian Müllner
0bccddb2ff wayland: Set startup ID from GApplication platform data
The GApplication platform data may contain a startup ID that on X11
is used to set the startup notification ID when activated. Do the
same on the wayland backend to make startup notifications work for
DBus-activated applications where the DESKTOP_STARTUP_ID environment
variable is not set.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-08 13:29:55 -05:00
Florian Müllner
75ee402c6a gdkdisplay-wayland: Add API to set startup notification ID
For wayland clients, the startup notification ID is currently only set
from the DESKTOP_STARTUP_ID environment variable. As that variable is
only set for clients launched via exec(), startup completion is not
indicated correctly for DBus-activated applications unless an explicit
ID is specified - usually that is not the case, as the default handling
uses gdk_notify_startup_complete().
To address this, we need API to set the startup notification ID from GTK
as we have on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-08 13:29:55 -05:00
hanniedu
305f473f73 Updated Dutch translation 3.22 2016-11-08 11:05:48 +01:00
Piotr Drąg
2bdfed2da2 Update POTFILES.skip 2016-11-08 10:08:31 +01:00
Benjamin Otte
dbc0337498 range: Don't leak pointers to discarded gadgets 2016-11-08 02:25:45 +01:00
Benjamin Otte
96e7fbde2e reftests: Add reftest for the last 2 fixes
Makes sure that the clipping we do when pushing a group is at the
correct place and in particular doesn't influence shadows.
2016-11-08 02:25:45 +01:00
Benjamin Otte
a68460847e render: Draw shadows outside of potential push_group() call
Before, the shadows were clipped.
2016-11-08 02:25:45 +01:00
Benjamin Otte
34d45def37 render: Clip the correct rectangle
We translated before.
2016-11-08 02:25:45 +01:00
Matthias Clasen
11a4dcba77 Forgotten NEWS edit 2016-11-07 11:51:26 -05:00
Matthias Clasen
99fed96b44 3.22.3 2016-11-07 11:24:43 -05:00
Matthias Clasen
a61d7f7acf Avoid deprecation warnings
The recent round of deprecation additions has caused some
warnings that we should avoid.
2016-11-07 11:24:43 -05:00
Chun-wei Fan
4add92a431 GDK-Win32: Enable HiDPI support for Windows
This enables HiDPI support for GTK+ on Windows, so that the
fonts and window look better on HiDPI displays.  Notes for the current
work:

-The DPI awareness enabling can be disabled if and only if an application
 manifest is not embedded in the app to enable DPI awareness AND a user
 compatibility setting is not set to limit DPI awareness for the app, via
 the envvar GDK_WIN32_DISABLE_HIDPI.  The app manifest/user setting for
 DPI awareness will always win against the envvar, and so the HiDPI items
 will be always setup in such scenarios, unless DPI awareness is disabled.

-Both automatic detection for the scaling factor and setting the scale
 factor using the GDK_SCALE envvar are supported, where the envvar takes
 precedence, which will therefore disable automatic scaling when
 resolution changes.

-I am unable to test the wintab items because I don't have such devices
 around.

https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-07 15:38:02 +08:00
Hannie Dumoleyn
a64a0bc617 Updated Dutch translation 3-22 2016-11-05 17:45:58 +01:00
Piotr Drąg
bd2d1ccc13 Update POTFILES.skip 2016-11-05 08:52:07 +01:00
Benjamin Otte
04db216026 gtk-demo: Add fishbowl demo 2016-11-05 03:38:46 +01:00
Benjamin Otte
03de0c3444 widget: Deprecate gtk_widget_is_composited()
Also GtkWidget::composited-changed is gone.
2016-11-05 03:38:13 +01:00
Georges Basile Stavracas Neto
b3e3946b2f levelbar: update css nodes even when no offset value is found
GtkLevelBar supports adding custom offsets as style classes, and they
are applied whenever the :value property matches. The current code,
however, only updates any CSS nodes when an offset is found, causing
it to not update when a discrete value changes but no custom offset
is added.

Fix that by always updating the CSS nodes.

https://bugzilla.gnome.org/show_bug.cgi?id=773799
2016-11-04 12:45:03 -04:00
Rui Matos
c5a9c0db80 gdkwindow-x11: Add support for gdk_window_fullscreen_on_monitor
This way we can recommend that applications use the
fullscreen_on_monitor() API on both X and Wayland otherwise they'd
have to keep a path for each backend to achieve this functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=773857
2016-11-04 12:12:06 -04:00
Lapo Calamandrei
a47a3fbd3b Adwaita: correctly style headerbars in a stack
corners are correctly rounded now. Stacked splitted headerbars are
not supported yet though.
2016-11-03 18:54:44 +01:00
Ernestas Kulik
39a8a6ef72 popover: pop down when pressing escape
Simply hiding the popover may introduce inconsistencies in application
behavior, since popping up/down is the usual use case.

https://bugzilla.gnome.org/show_bug.cgi?id=773885
2016-11-03 15:47:54 +02:00
Matthias Clasen
dbd5fb43ab Add a testcase for stacked headerbars
This currently has some theming issues.
This example is for Lapo to work those out.
2016-11-03 08:33:38 -04:00
Olivier Fourdan
209e01fd91 wayland: check valid pending cairo surface
gdk_wayland_window_attach_image() is normally called from
gdk_window_end_paint() to notify the compositor of newly staged drawing.

If any of the drawing code inadvertently dispatches the wayland event
loop (for instance with a gdk_flush() call), then it's possible that by
the time gdk_window_end_paint() is called, the staged drawing is already
destroyed.

This commit bypasses the attach_image call in scenarios where the staged
drawing is prematurely dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=773274
2016-11-03 08:49:39 +01:00
Chun-wei Fan
29b2828c9d Visual Studio projects: Fix RootNamespace
This is more of a cosmetic fix, but make things more consistent across the
board.
2016-11-02 10:37:07 +08:00
Juan Pablo Ugarte
5fa8def9df Use GLSL version 110 for OpenGL 2 shaders.
According to docs and Intel legacy drivers,
GLSL version 130 is for GL 3.0 not GL 2.0/2.1

Validated files with reference compiler from
https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
2016-11-01 11:58:16 -03:00
Juan Pablo Ugarte
28ce953caa gdk/Makefile.am: fixed glsl resources extra dist files.
Use the same wildcard partern used to generate gdk.gresource.xml to include files in EXTRA_DIST var.
2016-10-31 10:14:42 -03:00
Lapo Calamandrei
0ad5d51d8a Adwaita: no rounded corners for solid-csd. 2016-10-29 17:21:23 +02:00
Chun-wei Fan
b67a1c7f39 GDK-Win32: Improve GL on Windows
Update the GDKGL implementation:

-Allow legacy contexts to be created.
-Use finer-grained attributes to ask for a pixel format when possible,
 which also adds support for anti-aliasing

In fact the changes here are required for GTKGL to work properly on
Windows for 4.x.

Note that creation of gles contexts are not done here, as the system does
not support such contexts directly on Windows, but only through means such
as ANGLE, which is a totally different issue here.

https://bugzilla.gnome.org/show_bug.cgi?id=773528
2016-10-28 16:07:02 +08:00
Chun-wei Fan
45cf4c7d57 gtk/gtkmenu.c: Avoid compound literals
We only start requiring compound literals from GTK+-3.90, so fix this so
that pre-C99 compilers can build GTK+-3.22 properly.
2016-10-28 15:49:29 +08:00
Benjamin Otte
be1af1e01b visual: Deprecate querying APIs
They are going away in 4.0 and nobody should be using them anyway.
2016-10-28 06:04:58 +02:00
Мирослав Николић
eb43c3e6b6 Updated Serbian translation 2016-10-27 19:56:03 +02:00
Sébastien Wilmet
dd91ac7086 docs: consistent get/set function order for GtkScrolledWindow
Trivial commit.

For all the other GtkScrolledWindow functions, the order was get -> set.
Except for 3 functions, so fix that.
2016-10-27 12:33:12 +02:00
Chun-wei Fan
038766a82f MSVC builds: Simplify install process for MSVC 2010+
Use a for loop to copy the logo files.  Unfortunately the MSVC 2008
projects don't like this approach, seemingly.
2016-10-27 14:44:12 +08:00
Chun-wei Fan
271211da8c build/win32/vs10/gtk3-install.vcxproj: Fix project references
There is a typo for gtk-update-icon-cache, which may cause problems
when running the install project.  Fix this.
2016-10-27 12:30:04 +08:00
Matthias Clasen
c54f348edf color chooser: Fix a problem with show-editor=TRUE
For some reason we end up allocating the colorplane widget
before it is realized, and then never initialize the surface.

Fix this by explicitly doing it on realize.

https://bugzilla.gnome.org/show_bug.cgi?id=773474
2016-10-26 14:32:28 -04:00
Sébastien Wilmet
94c6d19415 docs: fix copy/paste errors in the docs of GtkScrolledWindow
Trivial commit.
2016-10-26 15:23:16 +02:00
Sébastien Wilmet
21d0de30ac docs: update section file for GtkScrolledWindow
Trivial commit.

- More logical ordering (re-group related things).
- Add missing functions: max_content_width/height.
2016-10-26 14:39:45 +02:00
Felix Riemann
27029a79fa GtkShortcutType: Fix typos in developer documentation
https://bugzilla.gnome.org/show_bug.cgi?id=773479
2016-10-25 20:10:24 +02:00
Matthias Clasen
f2bdf6e372 3.22.2 2016-10-23 23:09:16 -04:00
Emmanuele Bassi
a1115c05be gl: Set legacy bit depending on OpenGL version
GDK defaults to asking for an OpenGL 3.2 Core Profile, but if we get a
legacy profile from the underlying windowing system, the OpenGL version
will be fixed to 3.0. If that happens, we need to set the legacy bit on
the GdkGLContext, since that bit will be used to determine the version
and type of GLSL shaders that will be used by application and toolkit
code alike.

(cherry picked from commit 31c05771e9)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-10-23 21:28:54 +01:00
Emmanuele Bassi
4cdd4d03cc gl: Check whether use_es is positive
Now that the use_es field is an int with a possible negative value, we
cannot use it its truth value directly; we need to check if it's a
positive value, instead.

(cherry picked from commit 8e85f55240)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-10-23 21:28:45 +01:00
Mario Blättermann
ffb1ac56a8 Update German translation 2016-10-21 23:44:55 +00:00
Matthias Clasen
e51d73afa3 Emit ::style-set after setting priv->style
This was inadvertedly changed with an optimization a while ago,
and can lead to application crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=773029
2016-10-21 14:39:10 -04:00
Jonas Ådahl
3ad1677a3a GtkMenu: Try using gdk_window_move_to_rect() more often
With best-effort, try to use gdk_window_move_to_rect() more often, when
all pieces fit together. For the non-legacy paths to be triggered for
when gtk_menu_popup_for_device() or gtk_menu_popup() were used, the
following conditions must be met:

 1) There is no custom positioning function specified
 2) The menu is attached to a widget (using gtk_menu_attach_to_widget())
 3) There is a associated grab device

https://bugzilla.gnome.org/show_bug.cgi?id=772922
2016-10-21 11:55:39 -04:00
Pavel Grunt
2b527d6e97 overlay: Document availability of properties
Add missing "Since"

https://bugzilla.gnome.org/show_bug.cgi?id=773082
2016-10-21 11:53:36 -04:00
Robert Roth
6ee17810d1 Fix css documentation typo for color definition
'ligher' should be 'lighter', of course.

https://bugzilla.gnome.org/show_bug.cgi?id=773246
2016-10-21 11:44:21 -04:00
Emmanuele Bassi
803362bb5d gdk/gl: Allow autodetection for GL/GLES
If the GdkGLContext was not explicitly instructed to use or not GLES, we
can detect whether the underlying API is going to be desktop GL or GLES.

https://bugzilla.gnome.org/show_bug.cgi?id=773180
2016-10-21 11:41:43 -04:00
Adam Jackson
d40c6f180f gdk: Don't second-guess whether a context is GLES
We've already set ->use_es correctly at context creation time, all this
can possibly do is change our mind about what kind of GL we're using.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773180
2016-10-21 11:41:29 -04:00
Victor Toso
440ff48bba tests: fix clipboard test by loading correct icon
The icon name changed from "terminal" to "utilities-terminal" in
Adwaita-icon-theme.

Signed-off-by: Victor Toso <victortoso@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773113
2016-10-21 11:38:19 -04:00
Matthias Clasen
eaff061b48 docs: Expand icon-palette example
Add a warning color, and show that hex colors work here.
2016-10-21 11:08:51 -04:00
Matthias Clasen
cd495a26b7 Deprecate gdk_window_set_debug_updates
This is gone in GTK+ 4, so lets deprecate it.
2016-10-21 10:55:16 -04:00
Matthias Clasen
a372f554eb Deprecate GtkContainer::child
It is gone in GTK+ 4, so let it deprecate here.
2016-10-21 10:21:44 -04:00
Matthias Clasen
72baa37452 Deprecate the gdk_window_set_background* functions
These functions are gone in GTK+ 4, so deprecate them here.
2016-10-20 14:51:31 -04:00
Matthias Clasen
796107c833 Deprecate gtk_window_set_wmclass
This function was already documented as "don't use", and it is
removed in GTK+ 4, so deprecate it properly.
2016-10-20 14:26:43 -04:00
Matthias Clasen
b109d25e8b Some forgotten deprecation cleanup 2016-10-20 13:58:49 -04:00
Matthias Clasen
0ca9b468b8 Deprecate gtk_drag_dest_set_proxy 2016-10-20 13:48:05 -04:00
Matthias Clasen
d3ad642519 Deprecate more to-be-removed screen apis
These will be removed in GTK+ 4, therefore, we're deprecating
them now.
2016-10-20 13:44:23 -04:00
Matthias Clasen
61fc7ddd87 Deprecate to-be-removed screen API
GTK+ 4 is removing the monitor-related screen APIs. We should
deprecate them in 3.22 so people know to port away from them.
2016-10-20 12:06:42 -04:00
Jaime Velasco Juan
0d104b041a win32 theme: Fix tooltip borders
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
ebd2487df2 win32 theme: Fix combobox
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
ad258bc81c win32 theme: Fix column headers
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
d47d342012 win32 theme: Fix popup window decorations
Windows such as combobox's popup were using toplevel window's borders

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
c46c744529 gtkwin32theme: delete #if 0 code
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
49f2ed37cd win32 theme: Fix scale widget
It was invisible before.

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
424b59aec6 win32 theme: No need to create a DC for GetThemePartSize
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
db41f815c7 win32 theme: use TS_TRUE in GetThemePartSize
Several styles return a size of 0x0px when using TS_DRAW, as
we don't pass a RECT to draw into.

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
bece404043 win32 theme: Fix scrollbars
The fix is only partial, when both scrollbars are visible their ends
overlap.

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
91d4879f82 Fix CSS warnings in win32 theme
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
eda51b4ef5 Fix tiny fonts in win32 theme
broken since df08fc91... (css: always get default font size in pixels)

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Carlos Garnacho
2dfaae6737 wayland: Allow grabless xdg_popups
xdg_shell v6 allows grabless popups, whose behavior is not that
different from override redirect windows with no grab to take
keyboard input (and pointer events outside).

This means we can relax the requirement to have a grab before
creating an xdg_popup. The warning is still useful to have so
people stop relying on gdk_window_show();gdk_device_grab() being
an ok pattern to popup a window, it's been moved to wayland
implementation of gdk_device_grab() instead, so we warn if trying
to grab a GDK_WINDOW_TEMP window that's already visible.

https://bugzilla.gnome.org/show_bug.cgi?id=771694
2016-10-20 11:35:31 +02:00
Lapo Calamandrei
e75314ec17 Adwaita: make circular button border looking nice
the darker bottom border used on buttons looks bad on circular ones
so now a gradient clipped on the border-box and a transparent
border is used in that partcular case.
See https://bugzilla.gnome.org/show_bug.cgi?id=771205 for details.
2016-10-19 15:59:33 +02:00
Lapo Calamandrei
f3d78aff12 Adwaita: sass, make button mixin export a global $button_fill var
$button_fill contains the background-image property value of
buttons, having it readable outside the drawing mixin allows, for
example, stacking background images in an easier way.
2016-10-19 15:59:33 +02:00
Chun-wei Fan
d93f8b00ad Remove gtk3-install.props's during re-generation
This is to ensure the changes in the generated
build/win32/vs10/gtk3-install.props are applied in
build/win32/vs[11|12|14] as well.
2016-10-19 18:50:10 +08:00
Chun-wei Fan
b1bb8c2e85 build/: Force MSVC project file generation on Makefile.am changes
Make the Makefile.am targets for generating the Visual Studio projects re-generate the
project files and the header listings whenever the Makefile.am's that include
build/Makefile.msvcproj changes, so that whenever a source/header is added, they will
be reflected in the projects and in the property sheets that are used to copy the
headers.

Also ensure that these are applied to the vs11, vs12 and vs14 projects when this
happens, as they are copied and processed from the Visual Studio 2010 projects.
2016-10-19 18:49:14 +08:00
Lapo Calamandrei
38056d0f6e Adwaita: sass cleanup
aggregate circular button style to the main button structure.
2016-10-18 13:19:02 +02:00
Lapo Calamandrei
6660dc5186 widget-factory: use circular style class on the circular button...
...in place of the circular-button one, killing the custom style
shipped, realying on the theme style.
2016-10-18 13:19:02 +02:00
Kjartan Maraas
29e586fe2e Updated Norwegian bokmål translation from Kjartan Maraas. 2016-10-18 07:50:37 +02:00
Benjamin Otte
6f7a6f769f gdk: Get rid of unused variables 2016-10-17 15:43:03 +02:00
Aurimas Černius
bc99feffe2 Updated Lithuanian translation 2016-10-15 22:07:11 +03:00
Kjartan Maraas
00cf0587a9 Updated Norwegian bokmål translation. 2016-10-15 16:29:33 +02:00
Matthias Clasen
149351048e Avoid 0/FALSE confusion
Since this is supposedly exemplary code, lets get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=772683
2016-10-14 11:17:42 -04:00
Alan Jenkins
1e2e736d0d shortcutswindow: working version of set_section_name()
(testing before+after, it actually works now)

https://bugzilla.gnome.org/show_bug.cgi?id=772926
2016-10-14 10:58:17 -04:00
Christian Hergert
17bcd0d127 menusectionbox: add support for "text-direction" attribute
This allows the use of a "text-direction" hint set to one of "none", "rtl",
or "ltr" to enforce the text direction of a "horizontal-buttons"
display-hint.

This is useful when a menu has buttons that map to physical space in the
UI and therefore must match the application widgetry.

https://bugzilla.gnome.org/show_bug.cgi?id=772775
2016-10-14 10:44:57 -04:00
Alan Jenkins
45528cf5b5 scrolledwindow: fix leak of pan_gesture
https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:52:00 -04:00
Alan Jenkins
29fbeea84d headerbar: fix leak of label_sizing_box
Since the widget is not added to a container, we have the responsibility
to sink the initial floating reference, and ultimately to unref it.

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:55 -04:00
Alan Jenkins
3eb53e9e7c headerbar: fix leak of separator
https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:48 -04:00
Alan Jenkins
b3af460860 headerbar: fix leak of start_box/end_box
gtk_widget_destroy() removes widgets from their container.  However
_internal_ widgets must be unref'ed using gtk_widget_unparent() instead.
This is symmetric with the fact that these widgets were ref'ed by direct
call to gtk_widget_set_parent().  It's also the method that was used in
gtk_headerbar_destroy().

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:42 -04:00
Alan Jenkins
4100a848a7 shortcutsgroup: fix leak of title
like previous commit, albeit simpler this time

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:35 -04:00
Alan Jenkins
e2f5425a1d applicationwindow: fix leak of help_overlay
> Due to Gtk+ keeping a reference to the window internally,
> gtk_window_new() does not return a reference to the caller.
> To delete a GtkWindow, call gtk_widget_destroy().

Caller(s) aren't expecting a need to delete help_overlay themselves
once they've installed it.  (E.g. see gtk_application_window_added()).

I didn't notice any direct precedents, but there's a parallel in the
current implementation of gtk_container_destroy() which uses
gtk_widget_destroy() on any added widget.

This avoids leaking 100s of kB per window, when I tested nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:13 -04:00
Olivier Fourdan
12579fe71b gdkwindow: configure native windows in move_native_children()
ClutterEmbed on Wayland uses a subsurface and relocates it on configure
events, but when placed within a scrolled window, no configure event is
emitted and the ClutterEmbed subsurface remains static.

Emit a configure event for native windows in GdkWindow's internal
move_native_children() so that custom widgets relying on configure
events such as ClutterEmbed can relocate their stuff.

Similarly, when switching to/from normal/maximized/fullscreen states
which change the shadows' size and possibly shows/hides a header bar,
we need to emit a configure event even if the abs_x/abs_y haven't
changed to make sure the subsurface is size appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=771320
https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-10-13 08:46:03 +02:00
Matthias Clasen
dd9a9d9dcc Deprecate gtk_menu_popup and gtk_menu_popup_for_device
These functions don't work well on backends without global
coordinates (such as Wayland or Mir), and the gtk_menu_popup_at_
variants are better alternatives.

https://bugzilla.gnome.org/show_bug.cgi?id=772552
2016-10-12 13:50:55 -04:00
Piotr Drąg
0ecc4ac7de Update Polish translation 2016-10-12 19:49:23 +02:00
Lapo Calamandrei
c41294e2be Adwaita: dodge drop active style for window and decoration nodes
to hilight drop target there is a wildcard selector which turns
the border and shadow to green, this clearly shouldn't happen when
the whole window is a drop target.
2016-10-12 19:33:40 +02:00
Hannie Dumoleyn
9af1353e6d Updated Dutch translation gtk+-properties3.22 2016-10-12 17:00:55 +02:00
Hannie Dumoleyn
f60605e758 Updated Dutch translation 3.22 2016-10-12 16:36:51 +02:00
Tom Tryfonidis
e74dc54567 Update Greek translation 2016-10-11 11:05:21 +00:00
Christian Hergert
90ac584437 shortcuts: the accelerator should always be LTR
Even on RTL languages, we want the shortcut to be LTR so that we always
have <control> to the left of the accel keyval.

https://bugzilla.gnome.org/show_bug.cgi?id=772695
2016-10-10 15:13:48 -07:00
djb
bfc6287910 gtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible
...by putting it in a stack. The busy_spinner and eject_button are
mutually exclusive, but only the latter was coded to ensure that its
visibility did not cause the rest of the row to reflow. By putting both
widgets in a stack and setting child_visible on that, the row allocates
enough space to show one - or none - at once, avoiding any misalignment.

https://bugzilla.gnome.org/show_bug.cgi?id=772345

https://bugzilla.gnome.org/show_bug.cgi?id=772348
2016-10-10 15:14:49 -04:00
Adam Jackson
19aa3a4fca Use eglGetPlatformDisplay{,EXT} if available
Calling eglGetDisplay forces libEGL to guess what kind of pointer you
passed it. Different EGL libraries will do different things here, and in
particular glvnd will do something different than Mesa. Since we do have
an API that allows us to explicitly type the display, use it.

The explicit call to eglGetProcAddress is working around a bug in
libepoxy 1.3, which does not understand the EGL concept of client
extensions. Since it does not, the normal epoxy resolver for
eglGetPlatformDisplayEXT would not find any provider for that entry
point, and crash when you attempted to call it.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:38:28 -04:00
Adam Jackson
0757914aba Fix some EGLDisplay * abuse
EGLDisplays are already opaque pointers, and eglGetDisplay returns an
EGLDisplay not a pointer to one.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:37:39 -04:00
Ask Hjorth Larsen
e11df6cca0 Updated Danish translation 2016-10-09 22:05:52 +02:00
Rūdolfs Mazurs
8c0738113e Update Latvian translation 2016-10-09 19:33:18 +03:00
gogo
0a08a199d8 Update Croatian translation 2016-10-06 16:16:32 +00:00
gogo
051fddaa61 Update Croatian translation 2016-10-06 16:08:43 +00:00
Kalev Lember
154b2a124b Revert "Add GDK_AVAILABLE_IN_3_90"
Revert 3.90 macros on the 3.22 branch.

This reverts commit 13e00b70c0.
2016-10-06 16:42:22 +02:00
Milo Casagrande
1eed051c41 Updated Italian translation 2016-10-06 11:57:05 +00:00
Milo Casagrande
8d14c5c7cd Updated Italian translation 2016-10-06 11:53:32 +00:00
Matthias Clasen
17c08d062f entry: Fix a corner case of overwrite mode
We currently beep when a character is appended at the end in
overwrite mode. That is obviously not right. Patch based on
a patch by Ian MacDonald.

https://bugzilla.gnome.org/show_bug.cgi?id=772389
2016-10-05 12:23:18 -04:00
602 changed files with 175986 additions and 83550 deletions

614
NEWS
View File

@@ -1,3 +1,617 @@
Overview of Changes in GTK+ 3.22.24
===================================
* Bugs fixed:
Combobox: Don't try to remove grabs on NULL devices
Fix some issues with the new resizable tiling
Overview of Changes in GTK+ 3.22.23
===================================
* Bugs fixed:
783669 Allow resizing tiled windows
784562 "Printer Details" dialog has no title bar...
Overview of Changes in GTK+ 3.22.22
===================================
* Bugs fixed:
639931 gtk_application_add_window() docs should mention window destruction
644248 stylecontext: add a raised style class
775126 memory leak in gdk_wayland_window_ensure_cairo_surface
780758 flowbox: bind_model passes wrong reference to create_widget_func in bindings
781757 gdk_seat_grab() not working for touchscreen events
787021 GtkFlowBox: the orthogonal orientation always requests the most size it could...
787302 gtk+-3.22.20/gtk/gtkmountoperation-x11.c:669:sanity check after use ?
787303 gtk+-3.22.20/gtk/gtknotebook.c: 2 * redundant conditions ?
787444 The color-selection dialog which is opened by a GtkColorButton should not be...
787531 The tick button is not/barely visible on light colors with Dark theme
787600 PlacesSidebar/SidebarRow: CloudProvider singleton/accounts are never unrefd
787757 Focus outline easily disappears around color chooser swatches
* Translation updates:
Chinese (Taiwan)
Dutch
Greek
Persian
Polish
Russian
Swedish
Overview of Changes in GTK+ 3.22.21
===================================
* Bugs fixed:
738893 ComboBox in appears-as-list mode: Finishing scroll with mouse causes...
786613 Adwaita: provide a generic sidebar icon and label styling
787172 EmojiChooser: Improve selection of section buttons
787279 EmojiChooser: Hovered emoji become impossible to see in HighContrast...
787280 HighContrast: Fix regression in vertical separator in titlebar headerbar
787410 entry: fix memory leak
* Translation updates:
Basque
Catalan
Croatian
Czech
Danish
Finnish
German
Polish
Slovenian
Spanish
Swedish
Turkish
Overview of Changes in GTK+ 3.22.20
===================================
* Add input hints for Emoji, that let applications indicate whether
entries would benefit from Emoji support or not
* Add support for cloud services in GtkPlacesSidebar. This adds a new,
optional dependency on libcloudproviders
* Bugs fixed:
468868 Popup of "appears-as-list" ComboBox does not change screen with its top...
618160 Documentation for gtk_combo_box_get_active_iter is unclear
705640 GtkWindow incorrectly requires a default screen
729651 Crash in GtkFileChooserButton with appears-as-list
759725 Setting Container:border-width on TextView breaks gesture positions
766909 Tooltip of the eject button is a bit confusing - or just missing
774134 GtkExpander: input window of title extends over child, if :expanded is ...
775074 GtkScrolledWindow does not disconnect all GtkAdjustment signal handlers...
776937 GtkExpander is incorrectly hiding content.
780750 Shift + click in GtkEntry doesn't select
783649 negative content width warning in GtkLevelbar
785306 FileChooserNativeQuartz: two fixes
785736 textview: fix bug on DnD displaced limits of selection
786029 clicking on gtk-slider makes the parent disappear
786123 GtkPlacesSidebar: Add support for libcloudproviders
786209 X11: GtkPopover positioning doesn't "avoid" CSD window shadows
786492 Incorrect scaling factor with Vulkan on Wayland
786553 Wrong example number in Gtk Tutorial
786771 Critical about mismatched GdkDisplays when opening Inspector combobox
786841 Emoji categories are always in English
786885 Add explanatory tooltip to emoji icon
786932 Let the "type-func" override the object's "class" attribute when gettin...
786938 Emoji picker wrongly opens when clicking on primary icon too
786940 ::icon-pressed handler stays connected when setting :show-emoji-icon to...
786960 Emoji chooser: don't show 'insert Emoji' item in emoji chooser context ...
786964 Emoji Chooser: Can't scroll clicking on the scroll bar
786966 Emoji chooser: unnecessary spacing b/w some rows in search result
786986 text_window_to_widget_coords broken when Container:border-width > 0
787103 gtk3-widget-factory crashes on exit after inserting an emote on page3
787158 gtk_widget_get_preferred_width on GtkToolbar gives wrong minimum width
787195 gtk_toolbar_set_show_arrow does not show an arrow
786956 EmojiChooser: Fix theming on Adwaita:dark, HighContrast, etc
* Translation updates:
Brazilian Portuguese
Catalan
Chinese (Taiwan)
Croatian
Czech
Danish
Friulian
Galician
German
Hungarian
Indonesian
Italian
Kazakh
Latvian
Lithuanian
Korean
Polish
Serbian
Serbian Latin
Slovak
Slovenian
Swedish
Overview of Changes in GTK+ 3.22.19
===================================
* Add support for Emoji input, with an Emoji chooser
* Bug fixes:
773299 Ensure GTK+-4.x builds and works on Windows (MSVC in particular)
784016 Crash in gnome-terminal due to calling a GdkDisplayClass vfunc on a display...
784421 Tooltips: Fix docs/theming for custom tooltip windows
785999 Windows: Fix AeroSnap on HiDPI
786144 GtkInfoBar Example - Wrong at developer.gnome.org (looks like typo/copy/paste)
786209 X11: GtkPopover positioning doesn't "avoid" CSD window shadows
786287 configure.ac: Missing quote for AC_MSG_ERROR in AS_IF for WAYLAND_SCANNER
786400 "Art pen" named "Grip pen" in the Gnome Control Center
786469 gdkwindow: Avoid re-setting the opaque region if it doesn't change
786480 Button grabs unintendedly cause shortcut inhibition dialog
786594 Broken Ctrl+Tab behaviour inside text widget since 3.22.18
* Translation updates:
Brazilian Portuguese
Croatian
Czech
French
Friulian
Galician
German
Indonesian
Kazakh
Lithuanian
Nepali
Polish
Serbian
Slovak
Spanish
Turkish
Overview of Changes in GTK+ 3.22.18
===================================
* Support entering emoji by name, using Ctrl-Shift-E
* Wayland:
- Add support for the shortcut inhibitor protocol
- Support Wacome tablet wheel scrolling
* Bug fixes:
771959 gtk_init_with_args fails when no display is found / does not comply w...
776903 Label with hyperlinks cannot be opened with touch on wayland
776909 gtk_adjustment_clamp_page: Conditional jump or move depends on uninit...
777333 In a GNOME Wayland session, gnome-terminal windows cannot be moved ar...
777515 gtk3-icon-browser doesn't list document-edit-symbolic icon
778188 VTE crashes on multiple repeated BELL chars
780938 No icon tooltip shown in GtkEntry
781246 Return value of gtk_widget_get_parent_window should be marked (nullable)
782870 X11 Grabbing Broken with GtkScrolledWindow
783343 Wayland: RFC - add shortcut inhibitor support
783649 negative content width warning in GtkLevelbar
783716 Support wayland-tablet wheel events
783906 gtk_accelerator_get_label broken
784624 process-stop-symbolic hardcoded as app menu fallback
785255 Quitting world's simplest program containing a single GtkEntry causes...
785375 Cursors for Wacom tablets are not always updated correctly under Wayland
785423 Missing nullable annotation for gtk_bin_get_child
785672 Entry: Setting icon tooltip to empty disables tooltip on whole widget
* Translation updates:
Finnish
Slovenian
Overview of Changes in GTK+ 3.22.17
===================================
* Add native file chooser support for OS X
* Bug fixes:
766517 GtkAboutDialog should use https:// license URLs
781583 gtk_image_new_from_resource does not work
781935 Add nullable return annotation to gtk_notebook_get_tab_label
781936 Add nullable return annotation to gtk_text_mark_get_name
782040 Wacom pen calibration application responds to mouse input
782325 wayland: Add possibility to get the exported handle multiple times
784323 Quartz backend: gtk_clipboard_get_default not implemented
784723 macOS: native file chooser dialog
784888 gtkapplication: Mark gtk_application_get_active_window() as nullable
* Translation updates:
Friulian
Kazakh
Overview of Changes in GTK+ 3.22.16
===================================
* GtkEntryBuffer no longer emits changed events when input is truncated
* gtk3-icon-browser now offers to copy the icon name to the clipboard
* Bugs fixed:
745289 wayland: do not use g_error() on connection errors
759308 Instant apply in printing dialog (number of copies)
770513 MainToolbar in full-screen mode has rounded corners, which show video pixel...
778853 propagate-natural-width/height request too much with !overlay-scrolling && ...
779078 Adwaita: last treeview header button adds border on hover
781285 Key repeat cancel under Wayland should depend on which key is repeating
781945 SIGSEGV dragging window on Wayland when toplevel window set_transient_for i...
782117 If a window was initially shown undecorated and set_decorated(True) is call...
782283 Wayland: Crash when dismissing a menu when a tooltip is visible
782325 wayland: Add possibility to get the exported handle multiple times
783047 Many apps crash in gdk_event_source_prepare when logging out of GNOME
783347 gtkfilechoosernativewin32: Fix support for non-ASCII paths
783397 Remove unused code in gtktextdisplay.c
783587 Crash when NULL is passed to GtkActionHelper to unset action-name
* Translation updates
Czech
Lithuanian
Norwegian bokmål
Serbian
Spanish
Overview of Changes in GTK+ 3.22.15
===================================
* Revert an unexpected change in listbox behavior
* Improve the Adwaita style for tagged entries
Overview of Changes in GTK+ 3.22.14
===================================
* Bug fixes:
- Fix build without sassc
- Fix clipboard handling of UTF8 text
Overview of Changes in GTK+ 3.22.13
===================================
* Bug fixes:
358970 gtk_scale_set_digits does not cause value to be rounded if draw-value is false...
771269 Open in new tab / window doesn't work on unmounted file systems
773814 attempt to allocate widget with width -700975964 and height 400
778301 GtkTooltip doesn't clear source ID in all circumstances
778617 GtkListBox: placeholder is not removed properly
779570 popover: Add more padding between checkbox and label
780301 wayland: Fix harmless clang warnings
781118 gtk 3.22.12 quartz backend segfault
781162 Make GtkPlacesView monitor network
781195 Fix testsuite for GtkPlacesView
781214 define entry-tag in Adwaita.
781422 translate_wm_button_layout_to_gtk() is licensed under the GPL
781605 GtkVolumeButton limited to 10 values
781622 gtkplacesview.ui: Update helper label to include IPv6 addresses
781737 Drag icon is always postioned in the top left corner
781767 Wayland: increase key delivery verbosity
781814 Applications don't receive clipboard when data source mimetype is "text/plain;...
781992 GtkMenuButton with no popover retains prelight state when no longer selected
782109 wayland: memory leak when exporting handle
782180 commit "Improve GContentType" usage breaks apps on win32 (example: virt-viewer)
782202 linkbutton: Fix memory leak
* Translation updates:
Brazilian Portuguese
Croatian
German
Hungarian
Indonesian
Italian
Latvian
Polish
Russian
Serbian
Slovak
Swedish
Overview of Changes in GTK+ 3.22.12
===================================
* Bugs:
686838 gtk_enumerate_printers() hangs
734946 Implement GContentType on OSX
773228 third parameter of gtk_widget_intersect not listed as 'out'
776472 Crash in gnome-terminal due to gdk_window_process_all_updates calling...
778853 propagate-natural-width/height request too much with !overlay-scrolling...
779081 GtkTextView: expose API to get Pango line direction
779184 Gtk+4 (3.89.4) with Quartz backend: all apps segfault
780041 Optionally depend on sassc to generate the theme CSS
780234 gtk_print_job_set_page_ranges() has unclear ownership transfer
780734 flowbox: dont try to focus or draw NULL widgets
780735 flowbox: dont select when rubberbanding over nothing
780878 docs: Point links to correct versions
780994 Icons are blurry
* Translation updates:
Catalan
Greek
Hebrew
Indonesian
Norwegian bokmål
Polish
Russian
Overview of Changes in GTK+ 3.22.11
===================================
* Quartz:
- Fix build on < 10.12
* Cosmetic fixes
* Avoid a critical warning in the filechooser portal
Overview of Changes in GTK+ 3.22.10
===================================
* Theme: Improve styling for flow boxes
* Quartz:
- Support fullscreen CSD windows
- Implement backdrop
- Implement gdk_window_set_functions
* Bugs fixed:
778905 Frame: documented flat style class is not usable
779073 style flowbox tiles
779074 style selectionmode checkboxes for flowbox
779317 gtk_pad_controllerpad_set_action issue with incorrect assert
779374 Unprovoked key repeat in gnome-terminal after in 3.22.9
779383 quartz: Let CSD windows be fullscreen
779392 Implement backdrop for Quartz
* Translation updates:
Basque
Czech
Danish
Icelandic
Indonesian
Korean
Scottish Gaelic
Slovak
Overview of Changes in GTK+ 3.22.9
==================================
* Bugs fixed:
136059 Ctrl-navigation works in opposite direction in right-to-left text
776821 Scale factor not properly propagated upon reparent
778203 icon shown at top left corner when dnd begins
778328 Pressure sensitivity lost after removing pen from screen (Surface Book/MyPaint)
778534 Widget: Document signal mnemonic-activate
778678 gtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps
778726 Use gtk_show_uri_on_window()
778746 Rename popover is sometimes misplaced
778835 Wrong screen size returned when in HiDPI mode
778905 Frame: documented flat style class is not usable
779005 GtkFrame: Fix shadow after theme changes
136059 Ctrl-navigation works in opposite direction in right-to-left text
772505 Wayland: menu does not resize after disabling an action
774148 Gtk.Popover misplacement in Wayland
778019 Key repeat under wayland behaves differently, making keyboard navigation e.g. in
vim annoyingly unreliable
* Translation updates:
Brazilian Portuguese
Chinese
Chinese (Taiwan)
Galician
German
Hungarian
Italian
Lithuanian
Polish
Serbian
Spanish
Swedish
Overview of Changes in GTK+ 3.22.8
==================================
* Wayland:
- Avoid overlap between Alt and Meta
* Mir:
- Implement window properties
- Track window focus
- Connect to content-hub and use it for copy/paste
- Use modal hint
* Bugs fixed:
358970 gtk_scale_set_digits does not cause value to be rounded if draw-value...
765161 on win32 maximized window position wrong when windows toolbar is on l...
765410 Scrollbar does not update since 3.20
770112 The documented <alt>left shortcut doesnt work on Wayland
773686 Software when launched shows in dash with wrong icon, name and menu
775732 mir: clipboard support missing
775864 getting-started: typo tie->the
777527 GDK W32: Invisible drop-down menus in GTK apps when working via RDP
777547 Notebook arrow icon wrong color after closing final tab
* Translation updates:
Simplified Chinese
Overview of Changes in GTK+ 3.22.7
==================================
* Bugs fixed:
165385 Win32 keyboard handling still incomplete
769214 keyval field not filled correctly for Pause key
769835 On Wayland, application containing GtkGLArea stops responding if it's not...
774726 GtkTreeView dnd: gtk_drag_finish remove row when reorder sinse 3.20
775846 gdk/wayland: Add support for the gtk-enable-primary-paste gsetting
776031 W32: Winkey+down minimizes maximized window instead of restoring it
776225 [wayland] dropdown placed somewhere in the screen
776485 GDK W32: Impossible to restore maximized window via system menu
776807 GtkInspector doesn't show up when Gtk is initialized through option group
777031 win32 HiDPI assert
777176 [wayland] gedit killed by protocol error "Invalid anchor rectangle size"
* Translation updates:
Lithuanian
Overview of Changes in GTK+ 3.22.6
==================================
* Bugs fixed:
774534 776132 776187 776012 774784 776187 776306 775808 776524 776560
774534 input shape and opaque region not applied without begin_paint()/end_paint()
774784 Failed to get desktop session proxy is not an error!
775808 win32 maximized window is larger than the extended screen in dual monitor
776012 GtkFlowBox, GtkListBox: Don't emit signals etc. during destruction
776132 Mention the difference between gdk_window_create_similar_image_surface and...
776187 flowbox: Add gtk_flow_box_get_child_at_pos to gtk3
776306 flowbox: Sometimes emits child-activated during rubberband selection
776524 GtkAboutDialog: Fix formatting of example email address in html documentation
776560 icon-browser: window opens at very narrow size, only showing 1 column of icons
Fix GL checks to work better on OpenGL ES 2.0
Avoid a possible crash in ::activate-url handlers
scrolledwindow: Fix func summary being cut off in bindings using doxygen
* Translation updates:
German
Russian
Overview of Changes in GTK+ 3.22.5
==================================
* gtk3-demo now has an example for using PangoTabArray to create a multi-column layout
* Bug fixes:
771242 opening menu for certain types of GtkComboBox causes Gdk-CRITICAL assertion...
774114 Window shadows are repainted even if only the contents of the window change
774265 No tilt for wintab devices
774379 gdk: mingw64 builds segfault during initialization of Huion H610PRO wintab
774686 GtkMenu does not unref all GtkCheckMenuItem it creates
774695 GtkProgressbar needs full and empty classes
774699 list iteration regression causes odd-indexed devices to be ignored during l...
774743 GtkNotebook does not unref all GtkBuiltinIcon it creates
774760 inspector: ensure controller is a GtkGesture
774790 GtkTextHandle does not unref all GtkAdjustment it references
774893 Application font sizes scaling gets clamped to 1.00 when starting GtkInspector
774915 Destroying the parent of a subsurface causes _gdk_window_destroy_hierarchy:...
774917 [wayland] child subsurfaces need to be placed relative to their parent
774939 GtkLabelAccessible: Initialize link before setting parent
775212 GtkScaleButton does not unref all GtkAdjustment it references
775316 gtk_drag_source_set_icon_pixbuf references the pixbuf received once too much
775319 gdk_window_get_toplevel() fails to return the toplevel of a child subsurface
775525 gtk_flow_box_get_child_at_index shouldn't crash with an invalid index
* Translation updates:
Hungarian
Italian
Kazakh
Russian
Swedish
Overview of Changes in GTK+ 3.22.4
==================================
* Bug fixes:
767713 Fullscreen in wayland is buggy
768081 Enable HiDPI support for GDK-Win32
768531 wayland: Startup notification doesn't work on some apps (eg. gnome-terminal)...
772075 GTK+ uses a lot more CPU under Wayland than under X11
772202 Handling of scaled monitors is broken
773587 recent-manager: Add a limit to the list's size
773916 GtkComposeTable caches broken: using a same ~/.XCompose does not work twice...
773979 GdkGLContext does not chain finalize handler
774046 GtkSpinButton does not always unref priv->{up,down}_button
774066 GtkHeaderBar does not unref all GtkBox and GtkSeparator it creates
774097 GtkPrintOperation should not truncate job names
774185 GtkPlacesSidebar does not unref itsel as many times as it references
774352 GtkAppChooserWidget does not unref all GAppInfo it references
* Translation updates:
Czech
Dutch
Overview of Changes in GTK+ 3.22.3
==================================
* Deprecations have been added for APIs that will be removed
in GTK+ 4
* gtk-demo has gained a new demo for showing (and testing)
rendering preformance
* Windows:
- The GL support has been improved. Legacy contexts can now
be created, and anti-aliasing is possible
- Hi-DPI is now supported
* Bugs fixed:
768081 Enable HiDPI support for GDK-Win32
773274 [Wayland] Crash under gdk_wayland_window_attach_image()
773474 Color chooser dialog opened with show-editor=TRUE has black header bar
773479 Typo in GtkShortcutType developer docs
773528 Improve GL support on Windows
773799 GtkLevelBar doesn't update blocks on discrete mode
773857 gdkwindow-x11: Add support for gdk_window_fullscreen_on_monitor
773885 pop down GtkPopover on pressing escape
* Translation updates:
Serbian
Overview of Changes in GTK+ 3.22.2
==================================
* Several improvements to the win32 theme
* Deprecations have been added for APIs that will be removed
in GTK+ 4
* Bug fixes:
767713 Fullscreen in wayland is buggy
771320 Maps widget is displayed at wrong position inside gnome-contacts
772345 placesviewrow: busy_spinner when visible offsets the rest of the...
772389 Appending a character to a GtkEntry control in overwrite mode ri...
772415 Avoid calling eglGetDisplay
772552 Deprecate gtk_menu_popup
772683 Usage of FALSE instead of gint in glarea demo
772695 Show the keyboard shortcuts from left to right even in RTL
772775 menu bindings needs attribute to force LTR for horizontal-button...
772859 Fix memory leaks in implementations of common widgets
772922 GtkMenu: Try using gdk_window_move_to_rect() more often
772926 shortcutswindow: working version of set_section_name()
773029 style-set signal problem
773082 overlay: Document availability of properties
773113 tests: fix clipboard test by loading correct icon
773180 Don't second-guess whether our GDK GL context is GLES
773246 Typo in css color definitions documentation
* Translation updates:
Croatian
Danish
Dutch
German
Greek
Italian
Latvian
Lithuanian
Norwegian bokmal
Polish
Overview of Changes in GTK+ 3.22.1
==================================

View File

@@ -9,9 +9,17 @@
# Author: Fan, Chun-wei
# November 05, 2012
# MSVC_VER_LONG: Long Version of Visual Studio (2012, 2013, 14 and so on)
# MSVC_VER: Short Version of Visual Studio (11 for 2012, 12 for 2013, 14 for 2015 and so on)
# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on)
# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017)
# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET)
if MSVC_BASE_NO_TOOLSET_SET
MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0
endif
if MSVC_NO_TOOLSET_SET
MSVC_TOOLSET = $(MSVC_VER)0
endif
%.sln:
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
@@ -25,12 +33,12 @@
%.vcxproj:
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
sed 's/v100/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
sed 's/v100/v$(MSVC_VER)0/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
%.props:
%.props: $(top_builddir)/build/win32/vs10/Makefile
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \

View File

@@ -60,10 +60,19 @@ $(1).sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles.filters: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(top_builddir)/build/win32/vs9/$(1).vcproj:
$(top_builddir)/build/win32/vs9/$(1).vcproj: Makefile
-$(RM) $(top_builddir)/build/win32/vs9/$(1).vcproj
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs15/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs15/$(1).vcxproj.filters
for F in $(_proj_files); do \
case $$$$F in \
@@ -87,7 +96,7 @@ $(top_builddir)/build/win32/vs9/$(1).vcproj:
$(top_builddir)/build/win32/vs10/$(1).vs10.headers: $(top_builddir)/build/win32/vs9/$(1).headers
$(top_builddir)/build/win32/vs9/$(1).headers:
$(top_builddir)/build/win32/vs9/$(1).headers: Makefile
-$(RM) $(top_builddir)/build/win32/vs9/$(1).headers
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vs10.headers

View File

@@ -31,7 +31,8 @@ SUBDIRS = \
vs10 \
vs11 \
vs12 \
vs14
vs14 \
vs15
EXTRA_DIST += \
detectenv-msvc.mak \

View File

@@ -40,8 +40,10 @@ VSVER = 10
VSVER = 11
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
VSVER = 12
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 1910
VSVER = 14
!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 2000
VSVER = 15
!else
VSVER = 0
!endif

View File

@@ -29,9 +29,9 @@ setgirbuildenv:
!include introspection.body.mak
install-introspection: all
@-copy *.gir $(G_IR_INCLUDEDIR)
@-copy /b *.typelib $(G_IR_TYPELIBDIR)
install-introspection: all
@-copy *.gir "$(G_IR_INCLUDEDIR)"
@-copy /b *.typelib "$(G_IR_TYPELIBDIR)"
!else
all:

View File

@@ -30,7 +30,7 @@ def main(argv):
atk_min_ver = '2.15.1'
cairo_min_ver = '1.14.0'
gdk_pixbuf_min_ver = '2.30.0'
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi'
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi'
glib_min_ver = '2.45.8'
cairo_backends = 'cairo-win32'
@@ -41,14 +41,14 @@ def main(argv):
gdk_args = gdk_parser.parse_args()
if getattr(gdk_args, 'broadway', None) is 1:
# On Visual Studio, we link to zlib1.lib
broadway_extra_libs = '-lzlib1'
broadway_extra_libs = ' -lzlib1'
gdk_backends += ' broadway'
cairo_backends += ' cairo'
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
'@GDK_BACKENDS@': gdk_backends}
pkg_required_packages = 'gdk-pixbuf >= ' + gdk_pixbuf_min_ver + ' ' + \
pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver + ' ' + \
'cairo >= ' + cairo_min_ver + ' ' + \
'cairo-gobject >= ' + cairo_min_ver

View File

@@ -21,9 +21,15 @@ valid_actions = ['remove-prefix',
'replace-str',
'remove-str']
def open_file(filename, mode):
if sys.version_info[0] < 3:
return open(filename, mode=mode)
else:
return open(filename, mode=mode, encoding='utf-8')
def replace_multi(src, dest, replace_items):
with open(src, 'r') as s:
with open(dest, 'w') as d:
with open_file(src, 'r') as s:
with open_file(dest, 'w') as d:
for line in s:
replace_dict = dict((re.escape(key), value) \
for key, value in replace_items.items())

View File

@@ -62,6 +62,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filtersin \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
gtk3-build-defines.props \
gtk3-copy-gdk-broadway.props \
gtk3-gen-srcs.props \
@@ -74,6 +75,10 @@ DISTCLEANFILES = \
$(GENERATED_ITEMS)
gtk3-install.props: $(top_srcdir)/build/win32/vs10/gtk3-install.propsin $(MSVC10_HEADERS_LISTS)
-$(RM) $(top_builddir)/build/win32/vs11/gtk3-install.props
-$(RM) $(top_builddir)/build/win32/vs12/gtk3-install.props
-$(RM) $(top_builddir)/build/win32/vs14/gtk3-install.props
-$(RM) $(top_builddir)/build/win32/vs15/gtk3-install.props
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gtk3-install.propsin >$@
rm $(MSVC10_HEADERS_LISTS)

View File

@@ -24,8 +24,8 @@ You will also need a Python 2.6+/3.x interpretor installed on your system,
which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe)
either needs to be in your PATH before attempting the build of GTK+, or it
can be found in the path specified by PythonPath in gtk-version-paths.props.
If you happen to change the PythonPath setting in gtk-version-paths.props after
can be found in the path specified by PythonDir in gtk-version-paths.props.
If you happen to change the PythonDir setting in gtk-version-paths.props after
opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,
delete all the *.sdf, *.suo and *.user files before re-attempting the build.
@@ -81,6 +81,21 @@ built DLLs go into <root>\vs10\<PlatformName>\bin, built LIBs into
project files higher in the stack are supposed to look for them, not
from a specific GLib source tree.
There is now a "gtk3-introspect" project that is used to build the
introspection files. In order for this to work, check that the paths for
PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your
system. Note that it must be the same Python installation that was used to
build GObject-Introspection (G-I), and a complete G-I build/installation
needs to be found in <root>\vs10\<PlatformName>\, with the introspection files
for ATK, Pango and GDK-Pixbuf. Note also that this is not built by default,
so you will need to right-click on the project to build it, which will build
and "install" the other projects that are normally built, if those were not yet
built. The introspection files that are built will be "installed" to
<root>\vs10\<PlatformName>\share\gir-1.0 (the .gir file(s)) and
<root>\vs10\<PlatformName>\lib\girepository-1.0 (the .typelib files(s)) upon
successful build. for building this in a different configuration, therefore,
you will need to clean this project specifically and then rebuild.
Please note, as GTK+ uses the Adwaita theme for all platforms by default,
most icons used are not included with GTK+ (which *are* needed), so please see
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the

View File

@@ -30,6 +30,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-query-settings", "gtk-q
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcxproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcxproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -274,6 +276,14 @@ Global
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|x64.ActiveCfg = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<RootNamespace>gtkbuildertool</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9F22107A-3EF7-4B52-B269-747B65307F36}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<RootNamespace>gtkquerysettings</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<RootNamespace>gtkupdateiconcache</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@@ -14,6 +14,10 @@
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkIntrospectNMakeCmd>cd ..
set VCInstallDir=$(VCInstallDir)
nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstallRoot)</GtkIntrospectNMakeCmd>
<GtkIntrospectBuiltFiles>$(SolutionDir)\..\Gtk-3.0.gir;$(SolutionDir)\..\Gtk-3.0.typelib</GtkIntrospectBuiltFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3builddefinesprops</_PropertySheetDisplayName>
@@ -64,5 +68,11 @@
<BuildMacro Include="GtkAdditionalLibs">
<Value>$(GtkAdditionalLibs)</Value>
</BuildMacro>
<BuildMacro Include="GtkIntrospectNMakeCmd">
<Value>$(GtkIntrospectNMakeCmd)</Value>
</BuildMacro>
<BuildMacro Include="GtkIntrospectBuiltFiles">
<Value>$(GtkIntrospectBuiltFiles)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -25,7 +25,7 @@ if "$(Configuration)" == "Debug_Broadway" goto DoDebug
mkdir .\Release\$(Platform)\bin
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Release\$(Platform)\bin\

View File

@@ -39,10 +39,10 @@ echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
:DONE_GDKCONFIG_H
</GenGdkConfigHBroadway>
<GDbusCodeGenCmd>$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml</GDbusCodeGenCmd>
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk &amp; $(PythonDir)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk &amp; $(PythonDirX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
<GenerateGtkWin32Manifest>$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<GenerateGtkWin32Manifest>$(PythonDir)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
</PropertyGroup>
<PropertyGroup>

View File

@@ -92,7 +92,9 @@ copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-3.0.pc"
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
</GtkDoInstallBin>
<GtkDoInstall>
@@ -110,22 +112,14 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
#include "gailutil-3.vs10.headers"
mkdir $(CopyDir)\share\icons\hicolor\16x16\apps
copy ..\..\..\demos\gtk-demo\data\16x16\gtk3-demo.png $(CopyDir)\share\icons\hicolor\16x16\apps
mkdir $(CopyDir)\share\icons\hicolor\22x22\apps
copy ..\..\..\demos\gtk-demo\data\22x22\gtk3-demo.png $(CopyDir)\share\icons\hicolor\22x22\apps
mkdir $(CopyDir)\share\icons\hicolor\24x24\apps
copy ..\..\..\demos\gtk-demo\data\24x24\gtk3-demo.png $(CopyDir)\share\icons\hicolor\24x24\apps
mkdir $(CopyDir)\share\icons\hicolor\32x32\apps
copy ..\..\..\demos\gtk-demo\data\32x32\gtk3-demo.png $(CopyDir)\share\icons\hicolor\32x32\apps
mkdir $(CopyDir)\share\icons\hicolor\48x48\apps
copy ..\..\..\demos\gtk-demo\data\48x48\gtk3-demo.png $(CopyDir)\share\icons\hicolor\48x48\apps
mkdir $(CopyDir)\share\icons\hicolor\256x256\apps
copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\hicolor\256x256\apps
for &#37;&#37;s in (16 22 24 32 48 256) do ((mkdir $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps) &amp; (copy /b ..\..\..\demos\gtk-demo\data\&#37;&#37;sx&#37;&#37;s\gtk3-demo.png $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps))
mkdir $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
@@ -140,8 +134,8 @@ $(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\sch
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDirX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>

View File

@@ -249,7 +249,7 @@
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-udpate-icon-cache.vcxproj">
<ProjectReference Include="gtk-update-icon-cache.vcxproj">
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

View File

@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A8092C4E-0A21-4B1D-AC82-16764E418D1F}</ProjectGuid>
<RootNamespace>gtk3introspect</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="gtk3-install.vcxproj">
<Project>{23bbf35f-78af-4e8c-983f-7b90448cd7df}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -12,8 +12,14 @@
<GtkSeparateVSDllSuffix>-vs$(VSVer)</GtkSeparateVSDllSuffix>
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
<PythonPath>c:\python34</PythonPath>
<PythonPathX64>$(PythonPath).x64</PythonPathX64>
<PythonDir Condition="'$(VisualStudioVersion)' == '10.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '11.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '12.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '14.0'">c:\python36</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '15.0'">c:\python36</PythonDir>
<PythonDirX64>$(PythonDir).x64</PythonDirX64>
<IntrospectPythonParam>PYTHON=$(PythonDir)\python.exe</IntrospectPythonParam>
<IntrospectPythonParamX64>PYTHON=$(PythonDirX64)\python.exe</IntrospectPythonParamX64>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3versionpathsprops</_PropertySheetDisplayName>
@@ -52,11 +58,17 @@
<BuildMacro Include="GtkDllSuffix">
<Value>$(GtkDllSuffix)</Value>
</BuildMacro>
<BuildMacro Include="PythonPath">
<Value>$(PythonPath)</Value>
<BuildMacro Include="PythonDir">
<Value>$(PythonDir)</Value>
</BuildMacro>
<BuildMacro Include="PythonPathX64">
<Value>$(PythonPathX64)</Value>
<BuildMacro Include="PythonDirX64">
<Value>$(PythonDirX64)</Value>
</BuildMacro>
<BuildMacro Include="IntrospectPythonParam">
<Value>$(IntrospectPythonParam)</Value>
</BuildMacro>
<BuildMacro Include="IntrospectPythonParamX64">
<Value>$(IntrospectPythonParamX64)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -29,6 +29,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \

View File

@@ -29,6 +29,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \

View File

@@ -29,6 +29,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \

View File

@@ -0,0 +1,53 @@
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-query-settings.vcxproj \
gtk-query-settings.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
gtk3-demo-application.vcxproj.filters \
gtk3-icon-browser.vcxproj \
gtk3-icon-browser.vcxproj.filters \
gailutil-3.vcxproj \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \
gdk3-broadway.vcxproj.filters \
gtk3-build-defines.props \
gtk3-copy-gdk-broadway.props \
gtk3-gen-srcs.props \
gtk3-ignore-broadway.props \
gtk3-install.props \
gtk3-version-paths.props
DISTCLEANFILES = $(EXTRA_DIST)
MSVC_VER = 15
MSVC_VER_LONG = 15
MSVC_TOOLSET = 141
MSVC_FORMAT_VER = 12
include $(top_srcdir)/build/Makefile-newvs.am
-include $(top_srcdir)/git.mk

View File

@@ -36,6 +36,7 @@ EXTRA_DIST += \
gtk3-icon-browser.vcprojin \
gailutil-3.vcprojin \
gtk3-install.vcproj \
gtk3-introspect.vcproj \
broadwayd.vcprojin \
gdk3-broadway.vcprojin \
gtk3-build-defines.vsprops \

View File

@@ -23,8 +23,8 @@ You will also need a Python 2.6+/3.x interpretor installed on your system,
which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe)
either needs to be in your PATH before attempting the build of GTK+, or it
can be found in the path specified by PythonPath in gtk-version-paths.vsprops.
If you happen to change the PythonPath setting in gtk-version-paths.vsprops after
can be found in the path specified by PythonDir in gtk-version-paths.vsprops.
If you happen to change the PythonDir setting in gtk-version-paths.vsprops after
opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,
delete all the *.ncb, *.suo and *.user files before re-attempting the build.
@@ -80,6 +80,21 @@ built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into
project files higher in the stack are supposed to look for them, not
from a specific GLib source tree.
There is now a "gtk3-introspect" project that is used to build the
introspection files. In order for this to work, check that the paths for
PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your
system. Note that it must be the same Python installation that was used to
build GObject-Introspection (G-I), and a complete G-I build/installation
needs to be found in <root>\vs9\<PlatformName>\, with the introspection files
for ATK, Pango and GDK-Pixbuf. Note also that this is not built by default,
so you will need to right-click on the project to build it, which will build
and "install" the other projects that are normally built, if those were not yet
built. The introspection files that are built will be "installed" to
<root>\vs9\<PlatformName>\share\gir-1.0 (the .gir file(s)) and
<root>\vs9\<PlatformName>\lib\girepository-1.0 (the .typelib files(s)) upon
successful build. for building this in a different configuration, therefore,
you will need to clean this project specifically and then rebuild.
Please note, as GTK+ uses the Adwaita theme for all platforms by default,
most icons used are not included with GTK+ (which *are* needed), so please see
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the

View File

@@ -89,6 +89,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal
{9F22107A-3EF7-4B52-B269-747B65307F36} = {9F22107A-3EF7-4B52-B269-747B65307F36}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
ProjectSection(ProjectDependencies) = postProject
{23BBF35F-78AF-4E8C-983F-7B90448CD7DF} = {23BBF35F-78AF-4E8C-983F-7B90448CD7DF}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -325,6 +330,14 @@ Global
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|x64.ActiveCfg = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -59,4 +59,12 @@
Name="GtkAdditionalLibs"
Value="atk-1.0.lib pangowin32-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
/>
<UserMacro
Name="GtkIntrospectNMakeCmd"
Value="cd ..&#x0D;&#x0A;set VCInstallDir=$(VCInstallDir)&#x0D;&#x0A;nmake -f gtk-introspection-msvc.mak CFG=$(ConfigurationName) PREFIX=$(GlibEtcInstallRoot)"
/>
<UserMacro
Name="GtkIntrospectBuiltFiles"
Value="$(SolutionDir)\..\Gtk-3.0.gir;$(SolutionDir)\..\Gtk-3.0.typelib;$(SolutionDir)\..\GdkWin32-3.0.gir;$(SolutionDir)\..\GdkWin32-3.0.typelib;$(SolutionDir)\..\Gdk-3.0.gir;$(SolutionDir)\..\Gdk-3.0.typelib"
/>
</VisualStudioPropertySheet>

View File

@@ -17,7 +17,7 @@ if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; goto DoDebug&#
:DoRelease&#x0D;&#x0A;
mkdir .\Release\$(PlatformName)\bin&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
goto END&#x0D;&#x0A;

View File

@@ -60,11 +60,11 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;
/>
<UserMacro
Name="GenerateGtkDbusBuiltSources"
Value="cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
Value="cd ..\..\..\gtk &amp; $(PythonDir)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSourcesX64"
Value="cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
Value="cd ..\..\..\gtk &amp; $(PythonDirX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="CopyGtkWin32RC"
@@ -72,7 +72,7 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;
/>
<UserMacro
Name="GenerateGtkWin32Manifest"
Value="$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*"
Value="$(PythonDir)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*"
/>
<UserMacro
Name="CopyDemosH"

View File

@@ -92,7 +92,9 @@ copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
:DONE_BIN&#x0D;&#x0A;
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc&#x0D;&#x0A;
copy &quot;..\gtk+-3.0.pc&quot; $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
copy &quot;..\gtk+-3.0.pc&quot; &quot;$(CopyDir)\lib\pkgconfig\gtk+-win32-3.0.pc&quot;&#x0D;&#x0A;
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
"
/>
@@ -128,9 +130,10 @@ mkdir $(CopyDir)\share\icons\hicolor\256x256\apps&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\hicolor\256x256\apps\&#x0D;&#x0A;
mkdir $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
"
/>
@@ -154,10 +157,10 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
/>
<UserMacro
Name="GenerateGtkPC"
Value="$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
Value="$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
/>
<UserMacro
Name="GenerateGtkPCX64"
Value="$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
Value="$(PythonDirX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
/>
</VisualStudioPropertySheet>

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk3-introspect"
ProjectGUID="{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
</Configurations>
</VisualStudioProject>

View File

@@ -51,11 +51,19 @@
Value="$(GtkSeparateVSDllSuffix)"
/>
<UserMacro
Name="PythonPath"
Name="PythonDir"
Value="c:\python27"
/>
<UserMacro
Name="PythonPathX64"
Value="$(PythonPath).x64"
Name="PythonDirX64"
Value="$(PythonDir).x64"
/>
<UserMacro
Name="IntrospectPythonParam"
Value="PYTHON=$(PythonDir)\python.exe"
/>
<UserMacro
Name="IntrospectPythonParamX64"
Value="PYTHON=$(PythonDirX64)\python.exe"
/>
</VisualStudioPropertySheet>

View File

@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [22])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [1])
m4_define([gtk_micro_version], [24])
m4_define([gtk_interface_age], [24])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -60,10 +60,11 @@ m4_define([cairo_required_version], [1.14.0])
m4_define([gdk_pixbuf_required_version], [2.30.0])
m4_define([introspection_required_version], [1.39.0])
m4_define([wayland_required_version], [1.9.91])
m4_define([wayland_protocols_required_version], [1.7])
m4_define([wayland_protocols_required_version], [1.9])
m4_define([mirclient_required_version], [0.22.0])
m4_define([mircookie_required_version], [0.17.0])
m4_define([epoxy_required_version], [1.0])
m4_define([cloudproviders_required_version], [0.2.0])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
ATK_REQUIRED_VERSION=atk_required_version
@@ -81,7 +82,7 @@ AC_SUBST(INTROSPECTION_REQUIRED_VERSION)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
AM_INIT_AUTOMAKE([1.11 -Wall no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
AM_MAINTAINER_MODE([enable])
# Support silent build rules. Disable
@@ -346,6 +347,11 @@ AC_ARG_ENABLE(mir-backend,
[enable the Mir gdk backend])],
[backend_set=yes])
AC_ARG_ENABLE(cloudproviders,
[AS_HELP_STRING([--enable-cloudproviders],
[enable libcloudproviders integration])],
[cloudproviders_set=yes])
if test -z "$backend_set"; then
if test "$platform_win32" = yes; then
enable_win32_backend=yes
@@ -456,7 +462,7 @@ if test "$enable_wayland_backend" = "yes"; then
WAYLAND_PACKAGES="$WAYLAND_DEPENDENCIES"
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols]))
[AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])])
AC_SUBST([WAYLAND_SCANNER])
AM_CONDITIONAL(USE_WAYLAND, true)
@@ -464,7 +470,7 @@ else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
MIR_DEPENDENCIES="mirclient >= mirclient_required_version mircookie >= mircookie_required_version"
MIR_DEPENDENCIES="mirclient >= mirclient_required_version mircookie >= mircookie_required_version libcontent-hub-glib"
if test "$enable_mir_backend" = "maybe" ; then
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
@@ -1341,11 +1347,26 @@ else
LIBS="$gtk_save_LIBS"
fi
# Check for libcloudproviders
CLOUDPROVIDER_PACKAGES=""
if test "x$cloudproviders_set" = "xyes"; then
CLOUDPROVIDER_PACKAGES="cloudproviders >= cloudproviders_required_version"
if $PKG_CONFIG --exists $CLOUDPROVIDER_PACKAGES ; then
AC_DEFINE(HAVE_CLOUDPROVIDERS, [1],
[Define if libcloudproviders is available]
)
else
AC_MSG_ERROR([
*** libcloudproviders not found.])
fi
fi
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES"
PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
@@ -1815,6 +1836,14 @@ case "$host" in
esac
AC_SUBST(GDK_HIDDEN_VISIBILITY_CFLAGS)
##################################################
# Theming
##################################################
AC_PATH_PROG([SASSC], [sassc])
AC_ARG_VAR(SASSC)
AM_CONDITIONAL([REBUILD_SCSS], [test "x$SASSC" != x])
##################################################
# Output commands
##################################################
@@ -1885,6 +1914,13 @@ if test "x${enable_Bsymbolic}" = "xyes" ; then
fi
AC_SUBST(GTK_LINK_FLAGS)
dnl
dnl Check whether MSVC toolset is explicitly set
dnl
AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x])
AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x])
AC_CONFIG_FILES([
README
INSTALL
@@ -1947,6 +1983,7 @@ build/win32/vs10/gtk3-version-paths.props
build/win32/vs11/Makefile
build/win32/vs12/Makefile
build/win32/vs14/Makefile
build/win32/vs15/Makefile
gdk/Makefile
gdk/broadway/Makefile
gdk/x11/Makefile

View File

@@ -27,6 +27,7 @@ demos_base = \
event_axes.c \
expander.c \
filtermodel.c \
fishbowl.c \
foreigndrawing.c \
gestures.c \
glarea.c \
@@ -63,6 +64,7 @@ demos_base = \
spinbutton.c \
spinner.c \
stack.c \
tabs.c \
textmask.c \
textview.c \
textscroll.c \
@@ -136,6 +138,8 @@ nodist_gtk3_demo_SOURCES = demos.h
gtk3_demo_SOURCES = \
$(demos) \
gtkfishbowl.c \
gtkfishbowl.h \
demo_resources.c \
main.c
@@ -149,7 +153,7 @@ gtk3_demo_application_SOURCES = \
gtk3_demo_application_LDADD = $(LDADDS)
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(builddir)/demo.gresource.xml)
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/demo.gresource.xml)
demo_resources.c: demo.gresource.xml $(resource_files)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/demo.gresource.xml

View File

@@ -94,6 +94,11 @@
<file>zoom_in_cursor.png</file>
<file>zoom_out_cursor.png</file>
</gresource>
<gresource prefix="/fishbowl">
<file>fishbowl.ui</file>
<file>gtkfishbowl.c</file>
<file>gtkfishbowl.h</file>
</gresource>
<gresource prefix="/iconview">
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
@@ -150,6 +155,7 @@
<file>event_axes.c</file>
<file>expander.c</file>
<file>filtermodel.c</file>
<file>fishbowl.c</file>
<file>flowbox.c</file>
<file>foreigndrawing.c</file>
<file>font_features.c</file>
@@ -188,6 +194,7 @@
<file>stack.c</file>
<file>spinbutton.c</file>
<file>spinner.c</file>
<file>tabs.c</file>
<file>textview.c</file>
<file>textscroll.c</file>
<file>theming_style_classes.c</file>

178
demos/gtk-demo/fishbowl.c Normal file
View File

@@ -0,0 +1,178 @@
/* Benchmark/Fishbowl
*
* This demo models the fishbowl demos seen on the web in a GTK way.
* It's also a neat little tool to see how fast your computer (or
* your GTK version) is.
*/
#include <gtk/gtk.h>
#include "gtkfishbowl.h"
GtkWidget *allow_changes;
#define N_STATS 5
#define STATS_UPDATE_TIME G_USEC_PER_SEC
typedef struct _Stats Stats;
struct _Stats {
gint64 last_stats;
gint64 last_frame;
gint last_suggestion;
guint frame_counter_max;
guint stats_index;
guint frame_counter[N_STATS];
guint item_counter[N_STATS];
};
static Stats *
get_stats (GtkWidget *widget)
{
static GQuark stats_quark = 0;
Stats *stats;
if (G_UNLIKELY (stats_quark == 0))
stats_quark = g_quark_from_static_string ("stats");
stats = g_object_get_qdata (G_OBJECT (widget), stats_quark);
if (stats == NULL)
{
stats = g_new0 (Stats, 1);
g_object_set_qdata_full (G_OBJECT (widget), stats_quark, stats, g_free);
stats->last_frame = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
stats->last_stats = stats->last_frame;
}
return stats;
}
static void
do_stats (GtkWidget *widget,
GtkWidget *info_label,
gint *suggested_change)
{
Stats *stats;
gint64 frame_time;
stats = get_stats (widget);
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
if (stats->last_stats + STATS_UPDATE_TIME < frame_time)
{
char *new_label;
guint i, n_frames;
n_frames = 0;
for (i = 0; i < N_STATS; i++)
{
n_frames += stats->frame_counter[i];
}
new_label = g_strdup_printf ("icons - %.1f fps",
(double) G_USEC_PER_SEC * n_frames
/ (N_STATS * STATS_UPDATE_TIME));
gtk_label_set_label (GTK_LABEL (info_label), new_label);
g_free (new_label);
if (stats->frame_counter[stats->stats_index] >= 19 * stats->frame_counter_max / 20)
{
if (stats->last_suggestion > 0)
stats->last_suggestion *= 2;
else
stats->last_suggestion = 1;
}
else
{
if (stats->last_suggestion < 0)
stats->last_suggestion--;
else
stats->last_suggestion = -1;
stats->last_suggestion = MAX (stats->last_suggestion, 1 - (int) stats->item_counter[stats->stats_index]);
}
stats->stats_index = (stats->stats_index + 1) % N_STATS;
stats->frame_counter[stats->stats_index] = 0;
stats->item_counter[stats->stats_index] = stats->item_counter[(stats->stats_index + N_STATS - 1) % N_STATS];
stats->last_stats = frame_time;
if (suggested_change)
*suggested_change = stats->last_suggestion;
else
stats->last_suggestion = 0;
}
else
{
if (suggested_change)
*suggested_change = 0;
}
stats->last_frame = frame_time;
stats->frame_counter[stats->stats_index]++;
stats->frame_counter_max = MAX (stats->frame_counter_max, stats->frame_counter[stats->stats_index]);
}
static void
stats_update (GtkWidget *widget)
{
Stats *stats;
stats = get_stats (widget);
stats->item_counter[stats->stats_index] = gtk_fishbowl_get_count (GTK_FISHBOWL (widget));
}
static gboolean
move_fish (GtkWidget *bowl,
GdkFrameClock *frame_clock,
gpointer info_label)
{
gint suggested_change = 0;
do_stats (bowl,
info_label,
!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (allow_changes)) ? &suggested_change : NULL);
gtk_fishbowl_set_count (GTK_FISHBOWL (bowl),
gtk_fishbowl_get_count (GTK_FISHBOWL (bowl)) + suggested_change);
stats_update (bowl);
return G_SOURCE_CONTINUE;
}
GtkWidget *
do_fishbowl (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
if (!window)
{
GtkBuilder *builder;
GtkWidget *bowl, *info_label;
g_type_ensure (GTK_TYPE_FISHBOWL);
builder = gtk_builder_new_from_resource ("/fishbowl/fishbowl.ui");
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
info_label = GTK_WIDGET (gtk_builder_get_object (builder, "info_label"));
allow_changes = GTK_WIDGET (gtk_builder_get_object (builder, "changes_allow"));
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_widget_realize (window);
gtk_widget_add_tick_callback (bowl, move_fish, info_label, NULL);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
return window;
}

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.6 -->
<object class="GtkWindow" id="window">
<property name="title" translatable="yes">Fishbowl</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<child>
<object class="GtkLabel" id="info_label">
<property name="visible">True</property>
<property name="label">icons - 0 fps</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" bind-source="bowl" bind-property="count">0</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="changes_allow">
<property name="active">False</property>
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
<property name="relief">none</property>
<child>
<object class="GtkImage">
<property name="icon-name">changes-allow</property>
<property name="visible">True</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="changes_prevent">
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">True</property>
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">False</property>
<property name="relief">none</property>
<child>
<object class="GtkImage">
<property name="icon-name">changes-prevent</property>
<property name="visible">True</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkFishbowl" id="bowl">
<property name="visible">True</property>
<property name="animating">True</property>
</object>
</child>
</object>
</interface>

View File

@@ -836,7 +836,7 @@ draw_spinbutton (GtkWidget *widget,
/* This information is taken from the GtkSpinButton docs, see "CSS nodes" */
spin_context = get_style (NULL, "spinbutton.horizontal:focus");
entry_context = get_style (NULL, "entry:focus");
entry_context = get_style (spin_context, "entry:focus");
up_context = get_style (spin_context, "button.up:focus:active");
down_context = get_style (spin_context, "button.down:focus");

View File

@@ -13,6 +13,17 @@ static gdouble swipe_x = 0;
static gdouble swipe_y = 0;
static gboolean long_pressed = FALSE;
static gboolean
touchpad_swipe_gesture_begin (GtkGesture *gesture,
GdkEventSequence *sequence,
GtkWidget *widget)
{
/* Disallow touchscreen events here */
if (sequence != NULL)
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);
return sequence == NULL;
}
static void
swipe_gesture_swept (GtkGestureSwipe *gesture,
gdouble velocity_x,
@@ -161,6 +172,19 @@ do_gestures (GtkWidget *do_widget)
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* 3fg swipe for touchpads */
gesture = g_object_new (GTK_TYPE_GESTURE_SWIPE,
"widget", drawing_area,
"n-points", 3,
NULL);
g_signal_connect (gesture, "begin",
G_CALLBACK (touchpad_swipe_gesture_begin), drawing_area);
g_signal_connect (gesture, "swipe",
G_CALLBACK (swipe_gesture_swept), drawing_area);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Long press */
gesture = gtk_gesture_long_press_new (drawing_area);
g_signal_connect (gesture, "pressed",

View File

@@ -1,7 +1,7 @@
precision highp float;
precision mediump float;
void main() {
float lerpVal = gl_FragCoord.y / 500.0f;
float lerpVal = gl_FragCoord.y / 500.0;
gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
gl_FragColor = mix(vec4(1.0, 0.85, 0.35, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpVal);
}

View File

@@ -333,7 +333,7 @@ create_axis_slider (int axis)
GtkAdjustment *adj;
const char *text;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
switch (axis)
{

View File

@@ -0,0 +1,581 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkfishbowl.h"
#include "gtk/fallback-c89.c"
typedef struct _GtkFishbowlPrivate GtkFishbowlPrivate;
typedef struct _GtkFishbowlChild GtkFishbowlChild;
struct _GtkFishbowlPrivate
{
GList *children;
guint count;
gint64 last_frame_time;
guint tick_id;
};
struct _GtkFishbowlChild
{
GtkWidget *widget;
double x;
double y;
double dx;
double dy;
};
enum {
PROP_0,
PROP_ANIMATING,
PROP_COUNT,
NUM_PROPERTIES
};
static GParamSpec *props[NUM_PROPERTIES] = { NULL, };
G_DEFINE_TYPE_WITH_PRIVATE (GtkFishbowl, gtk_fishbowl, GTK_TYPE_CONTAINER)
static void
gtk_fishbowl_init (GtkFishbowl *fishbowl)
{
gtk_widget_set_has_window (GTK_WIDGET (fishbowl), FALSE);
}
/**
* gtk_fishbowl_new:
*
* Creates a new #GtkFishbowl.
*
* Returns: a new #GtkFishbowl.
*/
GtkWidget*
gtk_fishbowl_new (void)
{
return g_object_new (GTK_TYPE_FISHBOWL, NULL);
}
static void
gtk_widget_measure (GtkWidget *widget,
GtkOrientation orientation,
gint size,
gint *minimum,
gint *natural,
gint *minimum_baseline,
gint *natural_baseline)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (size >= -1);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
if (size < 0)
gtk_widget_get_preferred_width (widget, minimum, natural);
else
gtk_widget_get_preferred_width_for_height (widget, size, minimum, natural);
if (minimum_baseline)
*minimum_baseline = -1;
if (natural_baseline)
*natural_baseline = -1;
}
else
{
gtk_widget_get_preferred_height_and_baseline_for_width (widget,
size,
minimum,
natural,
minimum_baseline,
natural_baseline);
}
}
static void
gtk_fishbowl_measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *children;
gint child_min, child_nat;
*minimum = 0;
*natural = 0;
for (children = priv->children; children; children = children->next)
{
child = children->data;
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_measure (child->widget, orientation, -1, &child_min, &child_nat, NULL, NULL);
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
}
}
static void
gtk_fishbowl_get_preferred_width (GtkWidget *widget,
int *minimum,
int *natural)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_HORIZONTAL, -1, minimum, natural, NULL, NULL);
}
static void
gtk_fishbowl_get_preferred_height (GtkWidget *widget,
int *minimum,
int *natural)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_VERTICAL, -1, minimum, natural, NULL, NULL);
}
static void
gtk_fishbowl_get_preferred_width_for_height (GtkWidget *widget,
int for_size,
int *minimum,
int *natural)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_HORIZONTAL, for_size, minimum, natural, NULL, NULL);
}
static void
gtk_fishbowl_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_VERTICAL, for_size, minimum, natural, minimum_baseline, natural_baseline);
}
static void
gtk_fishbowl_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GtkAllocation child_allocation;
GtkRequisition child_requisition;
GList *children;
gtk_widget_set_allocation (widget, allocation);
for (children = priv->children; children; children = children->next)
{
child = children->data;
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_get_preferred_size (child->widget, &child_requisition, NULL);
child_allocation.x = allocation->x + round (child->x * (allocation->width - child_requisition.width));
child_allocation.y = allocation->y + round (child->y * (allocation->height - child_requisition.height));
child_allocation.width = child_requisition.width;
child_allocation.height = child_requisition.height;
gtk_widget_size_allocate (child->widget, &child_allocation);
}
}
static double
new_speed (void)
{
/* 5s to 50s to cross screen seems fair */
return g_random_double_range (0.02, 0.2);
}
static void
gtk_fishbowl_add (GtkContainer *container,
GtkWidget *widget)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child_info;
g_return_if_fail (GTK_IS_FISHBOWL (fishbowl));
g_return_if_fail (GTK_IS_WIDGET (widget));
child_info = g_new0 (GtkFishbowlChild, 1);
child_info->widget = widget;
child_info->x = 0;
child_info->y = 0;
child_info->dx = new_speed ();
child_info->dy = new_speed ();
gtk_widget_set_parent (widget, GTK_WIDGET (fishbowl));
priv->children = g_list_prepend (priv->children, child_info);
priv->count++;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_COUNT]);
}
static void
gtk_fishbowl_remove (GtkContainer *container,
GtkWidget *widget)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GtkWidget *widget_container = GTK_WIDGET (container);
GList *children;
for (children = priv->children; children; children = children->next)
{
child = children->data;
if (child->widget == widget)
{
gboolean was_visible = gtk_widget_get_visible (widget);
gtk_widget_unparent (widget);
priv->children = g_list_remove_link (priv->children, children);
g_list_free (children);
g_free (child);
if (was_visible && gtk_widget_get_visible (widget_container))
gtk_widget_queue_resize (widget_container);
priv->count--;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_COUNT]);
break;
}
}
}
static void
gtk_fishbowl_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *children;
if (!include_internals)
return;
children = priv->children;
while (children)
{
child = children->data;
children = children->next;
(* callback) (child->widget, callback_data);
}
}
static gboolean
gtk_fishbowl_draw (GtkWidget *widget,
cairo_t *cr)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *list;
for (list = priv->children;
list;
list = list->next)
{
child = list->data;
gtk_container_propagate_draw (GTK_CONTAINER (fishbowl),
child->widget,
cr);
}
return FALSE;
}
static void
gtk_fishbowl_dispose (GObject *object)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
gtk_fishbowl_set_animating (fishbowl, FALSE);
gtk_fishbowl_set_count (fishbowl, 0);
G_OBJECT_CLASS (gtk_fishbowl_parent_class)->dispose (object);
}
static void
gtk_fishbowl_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
switch (prop_id)
{
case PROP_ANIMATING:
gtk_fishbowl_set_animating (fishbowl, g_value_get_boolean (value));
break;
case PROP_COUNT:
gtk_fishbowl_set_count (fishbowl, g_value_get_uint (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_fishbowl_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
switch (prop_id)
{
case PROP_ANIMATING:
g_value_set_boolean (value, gtk_fishbowl_get_animating (fishbowl));
break;
case PROP_COUNT:
g_value_set_uint (value, gtk_fishbowl_get_count (fishbowl));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_fishbowl_class_init (GtkFishbowlClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
object_class->dispose = gtk_fishbowl_dispose;
object_class->set_property = gtk_fishbowl_set_property;
object_class->get_property = gtk_fishbowl_get_property;
widget_class->get_preferred_width = gtk_fishbowl_get_preferred_width;
widget_class->get_preferred_height = gtk_fishbowl_get_preferred_height;
widget_class->get_preferred_width_for_height = gtk_fishbowl_get_preferred_width_for_height;
widget_class->get_preferred_height_and_baseline_for_width = gtk_fishbowl_get_preferred_height_and_baseline_for_width;
widget_class->size_allocate = gtk_fishbowl_size_allocate;
widget_class->draw = gtk_fishbowl_draw;
container_class->add = gtk_fishbowl_add;
container_class->remove = gtk_fishbowl_remove;
container_class->forall = gtk_fishbowl_forall;
props[PROP_ANIMATING] =
g_param_spec_boolean ("animating",
"animating",
"Whether children are moving around",
FALSE,
G_PARAM_READWRITE);
props[PROP_COUNT] =
g_param_spec_uint ("count",
"Count",
"Number of widgets",
0, G_MAXUINT,
0,
G_PARAM_READABLE);
g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
}
guint
gtk_fishbowl_get_count (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->count;
}
char **icon_names = NULL;
gsize n_icon_names = 0;
static void
init_icon_names (GtkIconTheme *theme)
{
GPtrArray *icons;
GList *l, *icon_list;
if (icon_names)
return;
icon_list = gtk_icon_theme_list_icons (theme, NULL);
icons = g_ptr_array_new ();
for (l = icon_list; l; l = l->next)
{
if (g_str_has_suffix (l->data, "symbolic"))
continue;
g_ptr_array_add (icons, g_strdup (l->data));
}
n_icon_names = icons->len;
g_ptr_array_add (icons, NULL); /* NULL-terminate the array */
icon_names = (char **) g_ptr_array_free (icons, FALSE);
/* don't free strings, we assigned them to the array */
g_list_free_full (icon_list, g_free);
}
static const char *
get_random_icon_name (GtkIconTheme *theme)
{
init_icon_names (theme);
return icon_names[g_random_int_range(0, n_icon_names)];
}
void
gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
guint count)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
g_object_freeze_notify (G_OBJECT (fishbowl));
while (priv->count > count)
{
gtk_container_remove (GTK_CONTAINER (fishbowl),
((GtkFishbowlChild *) priv->children->data)->widget);
}
while (priv->count < count)
{
GtkWidget *new_widget;
new_widget = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()),
GTK_ICON_SIZE_DIALOG);
gtk_widget_show (new_widget);
gtk_container_add (GTK_CONTAINER (fishbowl), new_widget);
}
g_object_thaw_notify (G_OBJECT (fishbowl));
}
gboolean
gtk_fishbowl_get_animating (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->tick_id != 0;
}
static gboolean
gtk_fishbowl_tick (GtkWidget *widget,
GdkFrameClock *frame_clock,
gpointer unused)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *l;
gint64 frame_time, elapsed;
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
elapsed = frame_time - priv->last_frame_time;
priv->last_frame_time = frame_time;
/* last frame was 0, so we're just starting to animate */
if (elapsed == frame_time)
return G_SOURCE_CONTINUE;
for (l = priv->children; l; l = l->next)
{
child = l->data;
child->x += child->dx * ((double) elapsed / G_USEC_PER_SEC);
child->y += child->dy * ((double) elapsed / G_USEC_PER_SEC);
if (child->x <= 0)
{
child->x = 0;
child->dx = new_speed ();
}
else if (child->x >= 1)
{
child->x = 1;
child->dx = - new_speed ();
}
if (child->y <= 0)
{
child->y = 0;
child->dy = new_speed ();
}
else if (child->y >= 1)
{
child->y = 1;
child->dy = - new_speed ();
}
}
gtk_widget_queue_allocate (widget);
return G_SOURCE_CONTINUE;
}
void
gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
gboolean animating)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (gtk_fishbowl_get_animating (fishbowl) == animating)
return;
if (animating)
{
priv->tick_id = gtk_widget_add_tick_callback (GTK_WIDGET (fishbowl),
gtk_fishbowl_tick,
NULL,
NULL);
}
else
{
priv->last_frame_time = 0;
gtk_widget_remove_tick_callback (GTK_WIDGET (fishbowl), priv->tick_id);
priv->tick_id = 0;
}
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_ANIMATING]);
}

View File

@@ -0,0 +1,58 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_FISHBOWL_H__
#define __GTK_FISHBOWL_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GTK_TYPE_FISHBOWL (gtk_fishbowl_get_type ())
#define GTK_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FISHBOWL, GtkFishbowl))
#define GTK_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
#define GTK_IS_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FISHBOWL))
#define GTK_IS_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FISHBOWL))
#define GTK_FISHBOWL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
typedef struct _GtkFishbowl GtkFishbowl;
typedef struct _GtkFishbowlClass GtkFishbowlClass;
struct _GtkFishbowl
{
GtkContainer container;
};
struct _GtkFishbowlClass
{
GtkContainerClass parent_class;
};
GType gtk_fishbowl_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_fishbowl_new (void);
guint gtk_fishbowl_get_count (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
guint count);
gboolean gtk_fishbowl_get_animating (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
gboolean animating);
G_END_DECLS
#endif /* __GTK_FISHBOWL_H__ */

View File

@@ -1,7 +1,7 @@
/* Links
*
* GtkLabel can show hyperlinks. The default action is to call
* gtk_show_uri() on their URI, but it is possible to override
* gtk_show_uri_on_window() on their URI, but it is possible to override
* this with a custom handler.
*/

View File

@@ -53,6 +53,7 @@ do_pickers (GtkWidget *do_widget)
gtk_widget_set_hexpand (label, TRUE);
picker = gtk_file_chooser_button_new ("Pick a File",
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (picker), FALSE);
gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1);
gtk_grid_attach (GTK_GRID (table), picker, 1, 2, 1, 1);

63
demos/gtk-demo/tabs.c Normal file
View File

@@ -0,0 +1,63 @@
/* Text View/Tabs
*
* GtkTextView can position text at fixed positions, using tabs.
*/
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
GtkWidget *
do_tabs (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
if (!window)
{
GtkWidget *view;
GtkWidget *sw;
GtkTextBuffer *buffer;
PangoTabArray *tabs;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Tabs");
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 450, 450);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
view = gtk_text_view_new ();
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 20);
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 20);
tabs = pango_tab_array_new (3, TRUE);
pango_tab_array_set_tab (tabs, 0, PANGO_TAB_LEFT, 0);
pango_tab_array_set_tab (tabs, 1, PANGO_TAB_LEFT, 150);
pango_tab_array_set_tab (tabs, 2, PANGO_TAB_LEFT, 300);
gtk_text_view_set_tabs (GTK_TEXT_VIEW (view), tabs);
pango_tab_array_free (tabs);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_set_text (buffer, "one\ttwo\tthree\nfour\tfive\tsix\nseven\teight\tnine", -1);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (window), sw);
gtk_container_add (GTK_CONTAINER (sw), view);
gtk_widget_show_all (sw);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
return window;
}

View File

@@ -61,7 +61,7 @@
<property name="label" translatable="yes">Raised</property>
<property name="use_underline">1</property>
<property name="is_important">1</property>
<property name="icon_name">edit-find-symbolic</property>
<property name="icon_name">edit-find</property>
<style>
<class name="raised"/>
</style>
@@ -77,7 +77,7 @@
<property name="label" translatable="yes">Raised Active</property>
<property name="use_underline">1</property>
<property name="is_important">1</property>
<property name="icon_name">edit-find-symbolic</property>
<property name="icon_name">edit-find</property>
<property name="active">1</property>
<style>
<class name="raised"/>

View File

@@ -33,7 +33,8 @@ resources.c: iconbrowser.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourc
EXTRA_DIST = \
menus.ui \
iconbrowser.gresource.xml \
window.ui
window.ui \
icon.list
# ------------------- MSVC Build Items ----------------
MSVCPROJS = gtk3-icon-browser

View File

@@ -0,0 +1,517 @@
[volume]
Name=Volume
Description=Icons related to audio input and output volume
audio-volume-high=The icon used to indicate high audio volume
audio-volume-low=The icon used to indicate low audio volume
audio-volume-medium=The icon used to indicate medium audio volume
audio-volume-muted=The icon used to indicate the muted state for audio playback
microphone-sensitivity-high=The icon used to indicate high microphone sensitivity
microphone-sensitivity-low=The icon used to indicate low microphone sensitivity
microphone-sensitivity-medium=The icon used to indicate medium microphone sensitivity
microphone-sensitivity-muted=The icon used to indicate that a microphone is muted
[multimedia]
Name=Multimedia
Description=Icons related to playback of media
media-playlist-repeat=The icon for the repeat mode of a media player
media-playlist-repeat-song=The icon for repeating a song in a media player
media-playlist-shuffle=The icon for the shuffle mode of a media player
media-playlist-consecutive=The icon for consecutive mode of a media player
media-skip-backward=The icon for the skip backward action of a media player
media-seek-backward=The icon for the seek backward action of a media player
media-playback-start=The icon for the start playback action of a media player
media-seek-forward=The icon for the seek forward action of a media player
media-skip-forward=The icon for the skip forward action of a media player
media-playback-stop=The icon for the stop action of a media player
media-playback-pause=The icon for the pause action of a media player
media-eject=The icon for the eject action of a media player or file manager
media-record=The icon for the record action of a media application
media-view-subtitles=The icon used to show subtitles in a media player
[network]
Name=Network
Description=Icons related to network status");
network-transmit-receive=The icon used data is being both transmitted and received simultaneously, while the computing device is connected to a network
network-transmit=The icon used when data is being transmitted, while the computing device is connected to a network
network-receive=The icon used when data is being received, while the computing device is connected to a network
network-idle=The icon used when no data is being transmitted or received, while the computing device is connected to a network
network-error=The icon used when an error occurs trying to intialize the network connection of the computing device
network-offline=The icon used when the computing device is disconnected from the network
[weather]
Name=Weather
Description=Icons about weather conditions
weather-clear=The icon used while the weather for a region is “clear skies”
weather-clear-night=The icon used while the weather for a region is “clear skies” during the night
weather-few-clouds=The icon used while the weather for a region is “partly cloudy”
weather-few-clouds-night=The icon used while the weather for a region is “partly cloudy” during the night
weather-fog=The icon used while the weather for a region is “foggy”
weather-overcast=The icon used while the weather for a region is “overcast”
weather-severe-alert=The icon used while a sever weather alert is in effect for a region
weather-showers=The icon used while rain showers are occurring in a region
weather-showers-scattered=The icon used while scattered rain showers are occurring in a region
weather-snow=The icon used while snow showers are occurring in a region
weather-storm=The icon used while storms are occurring in a region
weather-windy=The icon used while the weather is windy
[navigation]
Name=Navigation
Description=Icons for navigation in the user interface of a program
go-first=The icon for the go to the first item in a list
go-previous=The icon for the go to the previous item in a list
go-next=The icon for the go to the next item in a list
go-last=The icon for the go to the last item in a list
go-bottom=The icon for the go to bottom of a list
go-down=The icon for the go down in a list
go-up=The icon for the go up in a list
go-top=The icon for the go to the top of a list
go-home=The icon for the go to home location
go-jump=The icon for the jump to action
[editing]
Name=Editing
Description=Icons related to editing a document
format-indent-less=The icon for the decrease indent formatting action
format-indent-more=The icon for the increase indent formatting action
format-justify-center=The icon for the center justification formatting action
format-justify-fill=The icon for the fill justification formatting action
format-justify-left=The icon for the left justification formatting action
format-justify-right=The icon for the right justification action
format-text-direction-ltr=The icon for the left-to-right text formatting action
format-text-direction-rtl=The icon for the right-to-left formatting action
format-text-bold=The icon for the bold text formatting action
format-text-italic=The icon for the italic text formatting action
format-text-underline=The icon for the underlined text formatting action
format-text-strikethrough=The icon for the strikethrough text formatting action
edit-clear=The icon for the clear action
edit-clear-all=
edit-copy=The icon for the copy action
edit-cut=The icon for the cut action
edit-delete=The icon for the delete action
edit-find-replace=The icon for the find and replace action
edit-paste=The icon for the paste action
edit-redo=The icon for the redo action
edit-select-all=The icon for the select all action
edit-select=
edit-undo=The icon for the undo action
error-correct=
document-properties=The icon for the action to view the properties of a document in an application
document-new=The icon used for the action to create a new document
document-open=The icon used for the action to open a document
document-open-recent=The icon used for the action to open a document that was recently opened
document-save=The icon for the save action. Should be an arrow pointing down and toward a hard disk
document-save-as=The icon for the save as action
document-send=The icon for the send action. Should be an arrow pointing up and away from a hard disk
document-page-setup=The icon for the page setup action of a document editor
document-edit=The icon for the action to edit a document
object-flip-horizontal=The icon for the action to flip an object horizontally
object-flip-vertical=The icon for the action to flip an object vertically
object-rotate-left=The icon for the rotate left action performed on an object
object-rotate-right=The icon for the rotate rigt action performed on an object
insert-image=The icon for the insert image action of an application
insert-link=The icon for the insert link action of an application
insert-object=The icon for the insert object action of an application
insert-text=The icon for the insert text action of an application
accessories-text-editor=The icon used for the desktop's text editing accessory program
[view]
Name=View Controls
Description=Icons for view controls in a user interface
view-list=The icon used for “List“ view mode
view-grid=The icon used for “Grid“ view mode (as opposed to “List“)
view-fullscreen=The icon used for the “Fullscreen” item in the application's “View” menu
view-restore=The icon used by an application for leaving the fullscreen view, and returning to a normal windowed view
zoom-fit-best=The icon used for the “Best Fit” item in the application's “View” menu
zoom-in=The icon used for the “Zoom in” item in the application's “View” menu
zoom-out=The icon used for the “Zoom Out” item in the application's “View” menu
zoom-original=The icon used for the “Original Size” item in the application's “View” menu
view-continuous=The icon used for a continuous view mode
view-paged=The icon used for a paged view mode (as opposed to continuous)
view-dual=The icon used for a side-by-side view of paginated content
view-wrapped=The icon used to indicate a wrap-around to the beginning
view-pin=The icon used for 'pin a view'
[calendar]
Name=Calendar, Tasks and Alarms
Description=Icons related to calendars, tasks and alarms
task-due=The icon used when a task is due soon
task-past-due=The icon used when a task that was due, has been left incomplete
appointment-soon=The icon used when an appointment will occur soon
appointment-missed=The icon used when an appointment was missed
alarm=The icon used for alarms when a task or appointment is due
[communication]
Name=Communication
Description=Icons related email, phone calls, IM and other forms of communication
mail-unread=The icon used for an electronic mail that is unread
mail-read=The icon used for an electronic mail that is read
mail-replied=The icon used for an electronic mail that has been replied to
mail-attachment=The icon used for an electronic mail that contains attachments
mail-mark-important=The icon for the mark as important action of an electronic mail application
mail-send=The icon for the send action of an electronic mail application
mail-send-receive=The icon for the send and receive action of an electronic mail application
call-start=The icon used for initiating or accepting a call
call-stop=The icon used for stopping a current call
call-missed=The icon used to show a missed call
user-available=The icon used when a user on a chat network is available to initiate a conversation with
user-offline=The icon used when a user on a chat network is not available
user-idle=The icon used when a user on a chat network has not been an active participant in any chats on the network, for an extended period of time
user-invisible=The icon used when a user is on a chat network, but is invisible to others
user-busy=The icon used when a user is on a chat network, and has marked himself as busy
user-away=The icon used when a user on a chat network is away from their keyboard and the chat program
user-status-pending=The icon used when the current user status on a chat network is not known
[devices]
Name=Devices and Media
Description=Icons for devices and media
audio-input-microphone=The icon used for the microphone audio input device
camera-web=The fallback icon for web cameras
camera-photo=The icon used for a digital still camera devices
input-keyboard=The icon used for the keyboard input device
printer=The icon used for a printer device
video-display=The icon used for the monitor that video gets displayed to
computer=The icon used for the computing device as a whole
media-optical=The icon used for physical optical media such as CD and DVD
phone=The icon used for phone devices which support connectivity to the PC, such as VoIP, cellular, or possibly landline phones
input-dialpad=The icon used for dialpad input devices
input-touchpad=The icon used for touchpad input devices
scanner=The icon used for a scanner device
audio-card=The icon used for the audio rendering device
input-gaming=The icon used for the gaming input device
input-mouse=The icon used for the mousing input device
multimedia-player=The icon used for generic multimedia playing devices
audio-headphones=The icon used for headphones
audio-headset=The icon used for headsets
display-projector=The icon used for projectors
media-removable=The icon used for generic removable media
printer-network=The icon used for printers which are connected via the network
audio-speakers=The icon used for speakers
camera-video=The fallback icon for video cameras
drive-optical=The icon used for optical media drives such as CD and DVD
drive-removable-media=The icon used for removable media drives
input-tablet=The icon used for graphics tablet input devices
network-wireless=The icon used for wireless network connections
network-wired=The icon used for wired network connections
media-floppy=The icon used for physical floppy disk media
media-flash=The fallback icon used for flash media, such as memory stick and SD
[contenttypes]
Name=Content Types
Description=Icons for different types of data, such as audio or image files
application-certificate=
application-rss+xml=
application-x-appliance=
audio-x-generic=The icon used for generic audio file types
folder=The standard folder icon used to represent directories on local filesystems, mail folders, and other hierarchical groups
text-x-generic=The icon used for generic text file types
video-x-generic=The icon used for generic video file types
x-office-calendar=The icon used for generic calendar file types
[emotes]
Name=Emotes
Description=Icons for emotions that are expressed through text chat applications such as :-) or :-P in IRC or instant messengers
face-angel=The icon used for the 0:-) emote
face-angry=The icon used for the X-( emote
face-cool=The icon used for the B-) emote
face-crying=The icon used for the :'( emote
face-devilish=The icon used for the >:-) emote
face-embarrassed=The icon used for the :-[ emote
face-kiss=The icon used for the :-* emote
face-laugh=The icon used for the :-)) emote
face-monkey=The icon used for the :-(|) emote
face-plain=The icon used for the :-| emote
face-raspberry=The icon used for the :-P emote
face-sad=The icon used for the :-( emote
face-shutmouth=The 'shut mouth' emote
face-sick=The icon used for the :-& emote
face-smile=The icon used for the :-) emote
face-smile-big=The icon used for the :-D emote
face-smirk=The icon used for the :-! emote
face-surprise=The icon used for the :-0 emote
face-tired=The icon used for the |-) emote
face-uncertain=The icon used for the :-/ emote
face-wink=The icon used for the ;-) emote
face-worried=The icon used for the :-S emote
face-yawn=
[general]
Name=General
Description=Generally useful icons that don't fit in a particular category
edit-find=The icon for generic search actions
content-loading=The icon used to indicate that content is loading
open-menu=The icon used for a menu button in the header bar
view-more=The icon used for a “View More“ action
tab-new=The icon used for a “New Tab“ action
bookmark-new=The icon used for creating a new bookmark
mark-location=The icon used to mark a location on a map
find-location=The icon used for a “Search location“ action
send-to=The icon used for a “Send to“ action
object-select=The icon used for generic selection actions
window-close=The icon used for actions that close a view, such as window or tab close button
view-refresh=The icon used for the “Refresh” item in the application's “View” menu
process-stop=The icon used for the “Stop” action in applications with actions that may take a while to process, such as web page loading in a browser
action-unavailable=The icon used to indicate that an action is currently unavailable, such as “Pause“ when no media is playing
document-print=The icon for the print action of an application
printer-printing=The icon used while a print job is successfully being spooled to a printing device
printer-warning=The icon used when a recoverable problem occurs while attempting to printing
printer-error=The icon used when an error occurs while attempting to print
dialog-information=The icon used when a dialog is opened to give information to the user that may be pertinent to the requested action
dialog-question=The icon used when a dialog is opened to ask a simple question of the user
dialog-warning=The icon used when a dialog is opened to warn the user of impending issues with the requested action
dialog-password=The icon used when a dialog requesting the authentication credentials for a user is opened
dialog-error=The icon used when a dialog is opened to explain an error condition to the user
list-add=The icon for the add to list action
list-remove=The icon for the remove from list action
non-starred=The icon used to indicate that an object is not 'starred'
semi-starred=The icon used to indicate that an object has is 'half-starred'
starred=The icon used to indicate that an object is 'starred'
star-new=The used for the “New Star“ action
security-low=The icon used to indicate that the security level of a connection is presumed to be insecure, either by using weak encryption, or by using a certificate that the could not be automatically verified, and which the user has not chosent to trust
security-medium=The icon used to indicate that the security level of a connection is presumed to be secure, using strong encryption, and a certificate that could not be automatically verified, but which the user has chosen to trust
security-high=The icon used to indicate that the security level of a connection is known to be secure, using strong encryption and a valid certificate
user-trash=The icon for the user's “Trash” place in the file system
user-trash-full=The icon for the user's “Trash” in the file system, when there are items in the “Trash” waiting for disposal or recovery
emblem-system=The icon used as an emblem for directories that contain system libraries, settings, and data
avatar-default=The generic avatar icon, which is used to represent a user that doesn't have a personalized avatar
emblem-synchronizing=The icon used as an emblem to indicate that a a synchronizing operation is in process
emblem-shared=The icon used as an emblem for files and directories that are shared to other users
folder-download=The icon representing the location in the file system where downloaded files are stored
help-browser=The icon used for the desktop's help browsing application
[other]
Name=Other
Description=Icons which have may be too specialized and not of general interest
changes-allow=
changes-prevent=
view-sort-ascending=The icon used for the “Sort Ascending” item in the application's “View” menu, or in a button for changing the sort method for a list
view-sort-descending=The icon used for the “Sort Descending” item in the application's “View” menu, or in a button for changing the sort method for a list
document-revert=The icon for the action of reverting to a previous version of a document
address-book-new=The icon used for the action to create a new address book
application-exit=The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit
appointment-new=The icon used for the action to create a new appointment in a calendaring application
contact-new=The icon used for the action to create a new contact in an address book application
document-print-preview=The icon for the print preview action of an application
folder-new=The icon for creating a new folder
help-about=The icon for the About item in the Help menu
help-contents=The icon for Contents item in the Help menu
help-faq=The icon for the FAQ item in the Help menu
list-remove-all=
mail-forward=The icon for the forward action of an electronic mail application
mail-mark-junk=The icon for the mark as junk action of an electronic mail application
mail-mark-notjunk=The icon for the mark as not junk action of an electronic mail application
mail-mark-read=The icon for the mark as read action of an electronic mail application
mail-mark-unread=The icon for the mark as unread action of an electronic mail application
mail-message-new=The icon for the compose new mail action of an electronic mail application
mail-reply-all=The icon for the reply to all action of an electronic mail application
mail-reply-sender=The icon for the reply to sender action of an electronic mail application
pan-down=
pan-end=
pan-start=
pan-up=
system-lock-screen=The icon used for the “Lock Screen” item in the desktop's panel application
system-log-out=The icon used for the “Log Out” item in the desktop's panel application
system-run=The icon used for the “Run Application...” item in the desktop's panel application
system-search=The icon used for the “Search” item in the desktop's panel application
system-reboot=The icon used for the “Reboot” item in the desktop's panel application
system-shutdown=The icon used for the “Shutdown” item in the desktop's panel application
tools-check-spelling=The icon used for the “Check Spelling” item in the application's “Tools” menu
window-maximize=
window-minimize=
window-restore=
window-new=The icon used for the “New Window” item in the application's “Windows” menu
accessories-calculator=The icon used for the desktop's calculator accessory program
accessories-character-map=The icon used for the desktop's international and extended text character accessory program
accessories-dictionary=The icon used for the desktop's dictionary accessory program
multimedia-volume-control=The icon used for the desktop's hardware volume control application
preferences-desktop-accessibility=The icon used for the desktop's accessibility preferences
preferences-desktop-display=
preferences-desktop-font=The icon used for the desktop's font preferences
preferences-desktop-keyboard=The icon used for the desktop's keyboard preferences
preferences-desktop-keyboard-shortcuts=
preferences-desktop-locale=The icon used for the desktop's locale preferences
preferences-desktop-remote-desktop=
preferences-desktop-multimedia=The icon used for the desktop's multimedia preferences
preferences-desktop-screensaver=The icon used for the desktop's screen saving preferences
preferences-desktop-theme=The icon used for the desktop's theme preferences
preferences-desktop-wallpaper=The icon used for the desktop's wallpaper preferences
preferences-system-privacy=
preferences-system-windows=
system-file-manager=The icon used for the desktop's file management application
system-software-install=The icon used for the desktop's software installer application
system-software-update=The icon used for the desktop's software updating application
system-users=
user-info=
utilities-system-monitor=The icon used for the desktop's system resource monitor application
utilities-terminal=The icon used for the desktop's terminal emulation application.
application-x-addon=
application-x-executable=The icon used for executable file types
font-x-generic=The icon used for generic font file types
image-x-generic=The icon used for generic image file types
package-x-generic=The icon used for generic package file types
text-html=The icon used for HTML text file types
text-x-generic-template=The icon used for generic text templates
text-x-preview=
text-x-script=The icon used for script file types, such as shell scripts
x-office-address-book=The icon used for generic address book file types
x-office-document=The icon used for generic document and letter file types
x-office-document-template=
x-office-presentation=The icon used for generic presentation file types
x-office-presentation-template=
x-office-spreadsheet=The icon used for generic spreadsheet file types
x-office-spreadsheet-template=
x-package-repository=
applications-accessories=The icon for the “Accessories” sub-menu of the Programs menu
applications-development=The icon for the “Programming” sub-menu of the Programs menu
applications-engineering=The icon for the “Engineering” sub-menu of the Programs menu
applications-games=The icon for the “Games” sub-menu of the Programs menu
applications-graphics=The icon for the “Graphics” sub-menu of the Programs menu
applications-internet=The icon for the “Internet” sub-menu of the Programs menu
applications-multimedia=The icon for the “Multimedia” sub-menu of the Programs menu
applications-office=The icon for the “Office” sub-menu of the Programs menu
applications-other=The icon for the “Other” sub-menu of the Programs menu
applications-science=The icon for the “Science” sub-menu of the Programs menu
applications-system=The icon for the “System Tools” sub-menu of the Programs menu
applications-utilities=The icon for the “Utilities” sub-menu of the Programs menu
preferences-desktop=The icon for the “Desktop Preferences” category
preferences-desktop-peripherals=The icon for the “Peripherals” sub-category of the “Desktop Preferences” category
preferences-desktop-personal=The icon for the “Personal” sub-category of the “Desktop Preferences” category
preferences-other=The icon for the “Other” preferences category
preferences-system=The icon for the “System Preferences” category
preferences-system-network=The icon for the “Network” sub-category of the “System Preferences” category
system-help=The icon for the “Help” system category
battery=The icon used for the system battery device
computer-apple-ipad=
colorimeter-colorhug=
drive-harddisk=The icon used for hard disk drives
drive-harddisk-ieee1394=
drive-harddisk-system=
drive-multidisk=
media-optical-bd=
media-optical-cd-audio=
media-optical-dvd=
media-tape=The icon used for generic physical tape media
media-zip=
modem=The icon used for modem devices
multimedia-player-apple-ipod-touch=
network-vpn=
pda=This is the fallback icon for Personal Digial Assistant devices. Primary use of this icon is for PDA devices connected to the PC. Connection medium is not an important aspect of the icon. The metaphor for this fallback icon should be a generic PDA device icon
phone-apple-iphone=
uninterruptible-power-supply=
emblem-default=The icon used as an emblem to specify the default selection of a printer for example
emblem-documents=The icon used as an emblem for the directory where a user's documents are stored
emblem-downloads=The icon used as an emblem for the directory where a user's downloads from the internet are stored
emblem-favorite=The icon used as an emblem for files and directories that the user marks as favorites
emblem-generic=
emblem-important=The icon used as an emblem for files and directories that are marked as important by the user
emblem-mail=The icon used as an emblem to specify the directory where the user's electronic mail is stored
emblem-new=
emblem-ok=
emblem-package=
emblem-photos=The icon used as an emblem to specify the directory where the user stores photographs
emblem-readonly=The icon used as an emblem for files and directories which can not be written to by the user
emblem-symbolic-link=The icon used as an emblem for files and direcotires that are links to other files or directories on the filesystem
emblem-synchronized=The icon used as an emblem for files or directories that are configured to be synchronized to another device
emblem-unreadable=The icon used as an emblem for files and directories that are inaccessible.
emblem-urgent=
emblem-videos=
emblem-web=
folder-documents=
folder-download=
folder-music=
folder-pictures=
folder-documents=
folder-publicshare=
folder-remote=The icon used for normal directories on a remote filesystem
folder-saved-search=
folder-templates=
folder-videos=
network-server=The icon used for individual host machines under the “Network Servers” place in the file manager
network-workgroup=The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network
start-here=The icon used by the desktop's main menu for accessing places, applications, and other features
user-bookmarks=The icon for the user's special “Bookmarks” place
user-desktop=The icon for the special “Desktop” directory of the user
user-home=The icon for the special “Home” directory of the user
airplane-mode=
battery-caution-charging=
battery-caution=The icon used when the battery is below 40%
battery-empty-charging=
battery-empty=
battery-full-charged=
battery-full-charging=
battery-full=
battery-good-charging=
battery-good=
battery-low-charging=
battery-low=The icon used when the battery is below 20%
battery-missing=
bluetooth-active=
bluetooth-disabled=
channel-insecure=
channel-secure=
computer-fail=
display-brightness=
keyboard-brightness=
folder-drag-accept=The icon used for a folder while an object is being dragged onto it, that is of a type that the directory can contain
folder-open=The icon used for folders, while their contents are being displayed within the same window. This icon would normally be shown in a tree or list view, next to the main view of a folder's contents
folder-visiting=The icon used for folders, while their contents are being displayed in another window. This icon would typically be used when using multiple windows to navigate the hierarchy, such as in Nautilus's spatial mode
image-loading=The icon used when another image is being loaded, such as thumnails for larger images in the file manager
image-missing=The icon used when another image could not be loaded
mail-signed=The icon used for an electronic mail that contains a signature
mail-signed-verified=The icon used for an electronic mail that contains a signature which has also been verified by the security system
network-cellular-3g=
network-cellular-4g=
network-cellular-edge=
network-cellular-gprs=
network-cellular-umts=
network-cellular-acquiring=
network-cellular-connected=
network-cellular-no-route=
network-cellular-offline=
network-cellular-signal-excellent=
network-cellular-signal-good=
network-cellular-signal-ok=
network-cellular-signal-weak=
network-cellular-signal-none=
network-vpn-acquiring=
network-vpn=
network-wired-acquiring=
network-wired-disconnected=
network-wired-no-route=
network-wired-offline=
network-wireless-acquiring=
network-wireless-connected=
network-wireless-encrypted=
network-wireless-hotspot=
network-wireless-no-route=
network-wireless-offline=
network-wireless-signal-excellent=
network-wireless-signal-good=
network-wireless-signal-ok=
network-wireless-signal-weak=
network-wireless-signal-none=
rotation-allowed=
rotation-locked=
software-update-available=The icon used when an update is available for software installed on the computing device, through the system software update program
software-update-urgent=The icon used when an urgent update is available through the system software update program
sync-error=The icon used when an error occurs while attempting to synchronize data from the computing device, to another device
sync-synchronizing=The icon used while data is successfully synchronizing to another device
touchpad-disabled=
trophy-bronze=
trophy-silver=
trophy-gold=
night-light=
daytime-sunrise=
daytime-sunset=

View File

@@ -3,5 +3,6 @@
<gresource prefix="/org/gtk/iconbrowser/gtk">
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">menus.ui</file>
<file>icon.list</file>
</gresource>
</gresources>

View File

@@ -6,11 +6,22 @@
typedef struct
{
const gchar *id;
const gchar *name;
const gchar *description;
gchar *id;
gchar *name;
gchar *description;
} Context;
static void
context_free (gpointer data)
{
Context *context = data;
g_free (context->id);
g_free (context->name);
g_free (context->description);
g_free (context);
}
struct _IconBrowserWindow
{
GtkApplicationWindow parent;
@@ -154,6 +165,7 @@ add_icon (IconBrowserWindow *win,
g_free (symbolic_name);
symbolic_name = NULL;
}
gtk_list_store_insert_with_values (win->store, NULL, -1,
ICON_STORE_NAME_COLUMN, regular_name,
ICON_STORE_SYMBOLIC_NAME_COLUMN, symbolic_name,
@@ -172,11 +184,11 @@ add_context (IconBrowserWindow *win,
GtkWidget *row;
c = g_new (Context, 1);
c->id = id;
c->name = name;
c->description = description;
c->id = g_strdup (id);
c->name = g_strdup (name);
c->description = g_strdup (description);
g_hash_table_insert (win->contexts, (gpointer)id, c);
g_hash_table_insert (win->contexts, c->id, c);
row = gtk_label_new (name);
g_object_set_data (G_OBJECT (row), "context", c);
@@ -213,475 +225,50 @@ selected_context_changed (GtkListBox *list, IconBrowserWindow *win)
static void
populate (IconBrowserWindow *win)
{
add_context (win, "volume", "Volume", "Icons related to audio input and output volume");
add_icon (win, "audio-volume-high", "The icon used to indicate high audio volume", "volume");
add_icon (win, "audio-volume-low", "The icon used to indicate low audio volume", "volume");
add_icon (win, "audio-volume-medium", "The icon used to indicate medium audio volume", "volume");
add_icon (win, "audio-volume-muted", "The icon used to indicate the muted state for audio playback", "volume");
add_icon (win, "microphone-sensitivity-high", "The icon used to indicate high microphone sensitivity", "volume");
add_icon (win, "microphone-sensitivity-low", "The icon used to indicate low microphone sensitivity", "volume");
add_icon (win, "microphone-sensitivity-medium", "The icon used to indicate medium microphone sensitivity", "volume");
add_icon (win, "microphone-sensitivity-muted", "The icon used to indicate that a microphone is muted", "volume");
GFile *file;
GKeyFile *kf;
char *data;
gsize length;
char **groups;
int i;
add_context (win, "multimedia", "Multimedia", "Icons related to playback of media");
add_icon (win, "media-playlist-repeat", "The icon for the repeat mode of a media player", "multimedia");
add_icon (win, "media-playlist-repeat-song", "The icon for repeating a song in a media player", "multimedia");
add_icon (win, "media-playlist-shuffle", "The icon for the shuffle mode of a media player", "multimedia");
add_icon (win, "media-playlist-consecutive", "The icon for consecutive mode of a media player", "multimedia");
add_icon (win, "media-skip-backward", "The icon for the skip backward action of a media player", "multimedia");
add_icon (win, "media-seek-backward", "The icon for the seek backward action of a media player", "multimedia");
add_icon (win, "media-playback-start", "The icon for the start playback action of a media player", "multimedia");
add_icon (win, "media-seek-forward", "The icon for the seek forward action of a media player", "multimedia");
add_icon (win, "media-skip-forward", "The icon for the skip forward action of a media player", "multimedia");
add_icon (win, "media-playback-stop", "The icon for the stop action of a media player", "multimedia");
add_icon (win, "media-playback-pause", "The icon for the pause action of a media player", "multimedia");
add_icon (win, "media-eject", "The icon for the eject action of a media player or file manager", "multimedia");
add_icon (win, "media-record", "The icon for the record action of a media application", "multimedia");
add_icon (win, "media-view-subtitles", "The icon used to show subtitles in a media player", "multimedia");
file = g_file_new_for_uri ("resource:/org/gtk/iconbrowser/gtk/icon.list");
g_file_load_contents (file, NULL, &data, &length, NULL, NULL);
add_context (win, "network", "Network", "Icons related to network status");
add_icon (win, "network-transmit-receive", "The icon used data is being both transmitted and received simultaneously, while the computing device is connected to a network", "network");
add_icon (win, "network-transmit", "The icon used when data is being transmitted, while the computing device is connected to a network", "network");
add_icon (win, "network-receive", "The icon used when data is being received, while the computing device is connected to a network", "network");
add_icon (win, "network-idle", "The icon used when no data is being transmitted or received, while the computing device is connected to a network", "network");
add_icon (win, "network-error", "The icon used when an error occurs trying to intialize the network connection of the computing device", "network");
add_icon (win, "network-offline", "The icon used when the computing device is disconnected from the network", "network");
kf = g_key_file_new ();
g_key_file_load_from_data (kf, data, length, G_KEY_FILE_NONE, NULL);
add_context (win, "weather", "Weather", "Icons about weather conditions");
add_icon (win, "weather-clear", "The icon used while the weather for a region is “clear skies”", "weather");
add_icon (win, "weather-clear-night", "The icon used while the weather for a region is “clear skies” during the night", "weather");
add_icon (win, "weather-few-clouds", "The icon used while the weather for a region is “partly cloudy”", "weather");
add_icon (win, "weather-few-clouds-night", "The icon used while the weather for a region is “partly cloudy” during the night", "weather");
add_icon (win, "weather-fog", "The icon used while the weather for a region is “foggy”", "weather");
add_icon (win, "weather-overcast", "The icon used while the weather for a region is “overcast”", "weather");
add_icon (win, "weather-severe-alert", "The icon used while a sever weather alert is in effect for a region", "weather");
add_icon (win, "weather-showers", "The icon used while rain showers are occurring in a region", "weather");
add_icon (win, "weather-showers-scattered", "The icon used while scattered rain showers are occurring in a region", "weather");
add_icon (win, "weather-snow", "The icon used while snow showers are occurring in a region", "weather");
add_icon (win, "weather-storm", "The icon used while storms are occurring in a region", "weather");
groups = g_key_file_get_groups (kf, &length);
for (i = 0; i < length; i++)
{
const char *context;
const char *name;
const char *description;
char **keys;
gsize len;
int j;
add_context (win, "navigation", "Navigation", "Icons for navigation in the user interface of a program");
add_icon (win, "go-first", "The icon for the go to the first item in a list", "navigation");
add_icon (win, "go-previous", "The icon for the go to the previous item in a list", "navigation");
add_icon (win, "go-next", "The icon for the go to the next item in a list", "navigation");
add_icon (win, "go-last", "The icon for the go to the last item in a list", "navigation");
add_icon (win, "go-bottom", "The icon for the go to bottom of a list", "navigation");
add_icon (win, "go-down", "The icon for the go down in a list", "navigation");
add_icon (win, "go-up", "The icon for the go up in a list", "navigation");
add_icon (win, "go-top", "The icon for the go to the top of a list", "navigation");
add_icon (win, "go-home", "The icon for the go to home location", "navigation");
add_icon (win, "go-jump", "The icon for the jump to action", "navigation");
context = groups[i];
name = g_key_file_get_string (kf, context, "Name", NULL);
description = g_key_file_get_string (kf, context, "Description", NULL);
add_context (win, context, name, description);
add_context (win, "editing", "Editing", "Icons related to editing a document");
add_icon (win, "format-indent-less", "The icon for the decrease indent formatting action", "editing");
add_icon (win, "format-indent-more", "The icon for the increase indent formatting action", "editing");
add_icon (win, "format-justify-center", "The icon for the center justification formatting action", "editing");
add_icon (win, "format-justify-fill", "The icon for the fill justification formatting action", "editing");
add_icon (win, "format-justify-left", "The icon for the left justification formatting action", "editing");
add_icon (win, "format-justify-right", "The icon for the right justification action", "editing");
add_icon (win, "format-text-direction-ltr", "The icon for the left-to-right text formatting action", "editing");
add_icon (win, "format-text-direction-rtl", "The icon for the right-to-left formatting action", "editing");
add_icon (win, "format-text-bold", "The icon for the bold text formatting action", "editing");
add_icon (win, "format-text-italic", "The icon for the italic text formatting action", "editing");
add_icon (win, "format-text-underline", "The icon for the underlined text formatting action", "editing");
add_icon (win, "format-text-strikethrough", "The icon for the strikethrough text formatting action", "editing");
add_icon (win, "edit-clear", "The icon for the clear action", "editing");
add_icon (win, "edit-clear-all", "", "editing");
add_icon (win, "edit-copy", "The icon for the copy action", "editing");
add_icon (win, "edit-cut", "The icon for the cut action", "editing");
add_icon (win, "edit-delete", "The icon for the delete action", "editing");
add_icon (win, "edit-find-replace", "The icon for the find and replace action", "editing");
add_icon (win, "edit-paste", "The icon for the paste action", "editing");
add_icon (win, "edit-redo", "The icon for the redo action", "editing");
add_icon (win, "edit-select-all", "The icon for the select all action", "editing");
add_icon (win, "edit-select", "", "editing");
add_icon (win, "edit-undo", "The icon for the undo action", "editing");
add_icon (win, "document-properties", "The icon for the action to view the properties of a document in an application", "editing");
add_icon (win, "document-new", "The icon used for the action to create a new document", "editing");
add_icon (win, "document-open", "The icon used for the action to open a document", "editing");
add_icon (win, "document-open-recent", "The icon used for the action to open a document that was recently opened", "editing");
add_icon (win, "document-save", "The icon for the save action. Should be an arrow pointing down and toward a hard disk", "editing");
add_icon (win, "document-save-as", "The icon for the save as action", "editing");
add_icon (win, "document-send", "The icon for the send action. Should be an arrow pointing up and away from a hard disk", "editing");
add_icon (win, "document-page-setup", "The icon for the page setup action of a document editor", "editing");
add_icon (win, "changes-allow", "", "other");
add_icon (win, "changes-prevent", "", "other");
add_icon (win, "object-flip-horizontal", "The icon for the action to flip an object horizontally", "editing");
add_icon (win, "object-flip-vertical", "The icon for the action to flip an object vertically", "editing");
add_icon (win, "object-rotate-left", "The icon for the rotate left action performed on an object", "editing");
add_icon (win, "object-rotate-right", "The icon for the rotate rigt action performed on an object", "editing");
add_icon (win, "insert-image", "The icon for the insert image action of an application", "editing");
add_icon (win, "insert-link", "The icon for the insert link action of an application", "editing");
add_icon (win, "insert-object", "The icon for the insert object action of an application", "editing");
add_icon (win, "insert-text", "The icon for the insert text action of an application", "editing");
add_icon (win, "accessories-text-editor", "The icon used for the desktop's text editing accessory program", "editing");
keys = g_key_file_get_keys (kf, context, &len, NULL);
for (j = 0; j < len; j++)
{
const char *key = keys[j];
const char *value;
add_context (win, "view", "View Controls", "Icons for view controls in a user interface");
add_icon (win, "view-list", "The icon used for “List“ view mode", "view");
add_icon (win, "view-grid", "The icon used for “Grid“ view mode (as opposed to “List“)", "view");
add_icon (win, "view-fullscreen", "The icon used for the “Fullscreen” item in the application's “View” menu", "view");
add_icon (win, "view-restore", "The icon used by an application for leaving the fullscreen view, and returning to a normal windowed view", "view");
add_icon (win, "zoom-fit-best", "The icon used for the “Best Fit” item in the application's “View” menu", "view");
add_icon (win, "zoom-in", "The icon used for the “Zoom in” item in the application's “View” menu", "view");
add_icon (win, "zoom-out", "The icon used for the “Zoom Out” item in the application's “View” menu ", "view");
add_icon (win, "zoom-original", "The icon used for the “Original Size” item in the application's “View” menu", "view");
add_icon (win, "view-continuous", "The icon used for a continuous view mode", "view");
add_icon (win, "view-paged", "The icon used for a paged view mode (as opposed to continuous)", "view");
add_icon (win, "view-dual", "The icon used for a side-by-side view of paginated content", "view");
add_icon (win, "view-wrapped", "The icon used to indicate a wrap-around to the beginning", "view");
if (strcmp (key, "Name") == 0 || strcmp (key, "Description") == 0)
continue;
add_context (win, "calendar", "Calendar, Tasks and Alarms", "Icons related to calendars, tasks and alarms");
add_icon (win, "task-due", "The icon used when a task is due soon", "calendar");
add_icon (win, "task-past-due", "The icon used when a task that was due, has been left incomplete", "calendar");
add_icon (win, "appointment-soon", "The icon used when an appointment will occur soon", "calendar");
add_icon (win, "appointment-missed", "The icon used when an appointment was missed", "calendar");
add_icon (win, "alarm", "The icon used for alarms when a task or appointment is due", "calendar");
value = g_key_file_get_string (kf, context, key, NULL);
add_context (win, "communication", "Communication", "Icons related email, phone calls, IM and other forms of communication");
add_icon (win, "mail-unread", "The icon used for an electronic mail that is unread", "communication");
add_icon (win, "mail-read", "The icon used for an electronic mail that is read", "communication");
add_icon (win, "mail-replied", "The icon used for an electronic mail that has been replied to", "communication");
add_icon (win, "mail-attachment", "The icon used for an electronic mail that contains attachments", "communication");
add_icon (win, "mail-mark-important", "The icon for the mark as important action of an electronic mail application", "communication");
add_icon (win, "mail-send", "The icon for the send action of an electronic mail application", "communication");
add_icon (win, "mail-send-receive", "The icon for the send and receive action of an electronic mail application", "communication");
add_icon (win, "call-start", "The icon used for initiating or accepting a call", "communication");
add_icon (win, "call-stop", "The icon used for stopping a current call", "communication");
add_icon (win, "call-missed", "The icon used to show a missed call", "communication");
add_icon (win, "user-available", "The icon used when a user on a chat network is available to initiate a conversation with", "communication");
add_icon (win, "user-offline", "The icon used when a user on a chat network is not available", "communication");
add_icon (win, "user-idle", "The icon used when a user on a chat network has not been an active participant in any chats on the network, for an extended period of time", "communication");
add_icon (win, "user-invisible", "The icon used when a user is on a chat network, but is invisible to others", "communication");
add_icon (win, "user-busy", "The icon used when a user is on a chat network, and has marked himself as busy", "communication");
add_icon (win, "user-away", "The icon used when a user on a chat network is away from their keyboard and the chat program", "communication");
add_icon (win, "user-status-pending", "The icon used when the current user status on a chat network is not known", "communication");
add_context (win, "devices", "Devices and Media", "Icons for devices and media");
add_icon (win, "audio-input-microphone", "The icon used for the microphone audio input device", "devices");
add_icon (win, "camera-web", "The fallback icon for web cameras", "devices");
add_icon (win, "camera-photo", "The icon used for a digital still camera devices", "devices");
add_icon (win, "input-keyboard", "The icon used for the keyboard input device", "devices");
add_icon (win, "printer", "The icon used for a printer device", "devices");
add_icon (win, "video-display", "The icon used for the monitor that video gets displayed to", "devices");
add_icon (win, "computer", "The icon used for the computing device as a whole", "devices");
add_icon (win, "media-optical", "The icon used for physical optical media such as CD and DVD", "devices");
add_icon (win, "phone", "The icon used for phone devices which support connectivity to the PC, such as VoIP, cellular, or possibly landline phones", "devices");
add_icon (win, "input-dialpad", "The icon used for dialpad input devices", "devices");
add_icon (win, "input-touchpad", "The icon used for touchpad input devices", "devices");
add_icon (win, "scanner", "The icon used for a scanner device", "devices");
add_icon (win, "audio-card", "The icon used for the audio rendering device", "devices");
add_icon (win, "input-gaming", "The icon used for the gaming input device", "devices");
add_icon (win, "input-mouse", "The icon used for the mousing input device", "devices");
add_icon (win, "multimedia-player", "The icon used for generic multimedia playing devices", "devices");
add_icon (win, "audio-headphones", "The icon used for headphones", "devices");
add_icon (win, "audio-headset", "The icon used for headsets", "devices");
add_icon (win, "display-projector", "The icon used for projectors", "devices");
add_icon (win, "media-removable", "The icon used for generic removable media", "devices");
add_icon (win, "printer-network", "The icon used for printers which are connected via the network", "devices");
add_icon (win, "audio-speakers", "The icon used for speakers", "devices");
add_icon (win, "camera-video", "The fallback icon for video cameras", "devices");
add_icon (win, "drive-optical", "The icon used for optical media drives such as CD and DVD", "devices");
add_icon (win, "drive-removable-media", "The icon used for removable media drives", "devices");
add_icon (win, "input-tablet", "The icon used for graphics tablet input devices", "devices");
add_icon (win, "network-wireless", "The icon used for wireless network connections", "devices");
add_icon (win, "network-wired", "The icon used for wired network connections", "devices");
add_icon (win, "media-floppy", "The icon used for physical floppy disk media", "devices");
add_icon (win, "media-flash", "The fallback icon used for flash media, such as memory stick and SD", "devices");
add_context (win, "contenttypes", "Content Types", "Icons for different types of data, such as audio or image files");
add_icon (win, "application-certificate", "", "contenttypes");
add_icon (win, "application-rss+xml", "", "contenttypes");
add_icon (win, "application-x-appliance", "", "contenttypes");
add_icon (win, "audio-x-generic", "The icon used for generic audio file types", "contenttypes");
add_icon (win, "folder", "The standard folder icon used to represent directories on local filesystems, mail folders, and other hierarchical groups", "contenttypes");
add_icon (win, "text-x-generic", "The icon used for generic text file types", "contenttypes");
add_icon (win, "video-x-generic", "The icon used for generic video file types", "contenttypes");
add_icon (win, "x-office-calendar", "The icon used for generic calendar file types", "contenttypes");
add_context (win, "emotes", "Emotes", "Icons for emotions that are expressed through text chat applications such as :-) or :-P in IRC or instant messengers");
add_icon (win, "face-angel", "The icon used for the 0:-) emote", "emotes");
add_icon (win, "face-angry", "The icon used for the X-( emote", "emotes");
add_icon (win, "face-cool", "The icon used for the B-) emote", "emotes");
add_icon (win, "face-crying", "The icon used for the :'( emote", "emotes");
add_icon (win, "face-devilish", "The icon used for the >:-) emote", "emotes");
add_icon (win, "face-embarrassed", "The icon used for the :-[ emote", "emotes");
add_icon (win, "face-kiss", "The icon used for the :-* emote", "emotes");
add_icon (win, "face-laugh", "The icon used for the :-)) emote", "emotes");
add_icon (win, "face-monkey", "The icon used for the :-(|) emote", "emotes");
add_icon (win, "face-plain", "The icon used for the :-| emote", "emotes");
add_icon (win, "face-raspberry", "The icon used for the :-P emote", "emotes");
add_icon (win, "face-sad", "The icon used for the :-( emote", "emotes");
add_icon (win, "face-shutmouth", "The 'shut mouth' emote", "emotes");
add_icon (win, "face-sick", "The icon used for the :-& emote", "emotes");
add_icon (win, "face-smile", "The icon used for the :-) emote", "emotes");
add_icon (win, "face-smile-big", "The icon used for the :-D emote", "emotes");
add_icon (win, "face-smirk", "The icon used for the :-! emote", "emotes");
add_icon (win, "face-surprise", "The icon used for the :-0 emote", "emotes");
add_icon (win, "face-tired", "The icon used for the |-) emote", "emotes");
add_icon (win, "face-uncertain", "The icon used for the :-/ emote", "emotes");
add_icon (win, "face-wink", "The icon used for the ;-) emote", "emotes");
add_icon (win, "face-worried", "The icon used for the :-S emote", "emotes");
add_icon (win, "face-yawn", "", "emotes");
add_context (win, "general", "General", "Generally useful icons that don't fit in a particular category");
add_icon (win, "edit-find", "The icon for generic search actions", "general");
add_icon (win, "content-loading", "The icon used to indicate that content is loading", "general");
add_icon (win, "open-menu", "The icon used for a menu button in the header bar", "general");
add_icon (win, "view-more", "The icon used for a “View More“ action", "general");
add_icon (win, "tab-new", "The icon used for a “New Tab“ action", "general");
add_icon (win, "bookmark-new", "The icon used for creating a new bookmark", "general");
add_icon (win, "mark-location", "The icon used to mark a location on a map", "general");
add_icon (win, "find-location", "The icon used for a “Search location“ action", "general");
add_icon (win, "send-to", "The icon used for a “Send to“ action", "general");
add_icon (win, "object-select", "The icon used for generic selection actions", "general");
add_icon (win, "window-close", "The icon used for actions that close a view, such as window or tab close button", "general");
add_icon (win, "view-refresh", "The icon used for the “Refresh” item in the application's “View” menu", "general");
add_icon (win, "process-stop", "The icon used for the “Stop” action in applications with actions that may take a while to process, such as web page loading in a browser", "general");
add_icon (win, "action-unavailable", "The icon used to indicate that an action is currently unavailable, such as “Pause“ when no media is playing", "general");
add_icon (win, "document-print", "The icon for the print action of an application", "general");
add_icon (win, "printer-printing", "The icon used while a print job is successfully being spooled to a printing device", "general");
add_icon (win, "printer-warning", "The icon used when a recoverable problem occurs while attempting to printing", "general");
add_icon (win, "printer-error", "The icon used when an error occurs while attempting to print", "general");
add_icon (win, "dialog-information", "The icon used when a dialog is opened to give information to the user that may be pertinent to the requested action", "general");
add_icon (win, "dialog-question", "The icon used when a dialog is opened to ask a simple question of the user", "general");
add_icon (win, "dialog-warning", "The icon used when a dialog is opened to warn the user of impending issues with the requested action", "general");
add_icon (win, "dialog-password", "The icon used when a dialog requesting the authentication credentials for a user is opened", "general");
add_icon (win, "dialog-error", "The icon used when a dialog is opened to explain an error condition to the user", "general");
add_icon (win, "list-add", "The icon for the add to list action", "general");
add_icon (win, "list-remove", "The icon for the remove from list action", "general");
add_icon (win, "non-starred", "The icon used to indicate that an object is not 'starred'", "general");
add_icon (win, "semi-starred", "The icon used to indicate that an object has is 'half-starred'", "general");
add_icon (win, "starred", "The icon used to indicate that an object is 'starred'", "general");
add_icon (win, "star-new", "The used for the “New Star“ action", "general");
add_icon (win, "security-low", "The icon used to indicate that the security level of a connection is presumed to be insecure, either by using weak encryption, or by using a certificate that the could not be automatically verified, and which the user has not chosent to trust", "general");
add_icon (win, "security-medium", "The icon used to indicate that the security level of a connection is presumed to be secure, using strong encryption, and a certificate that could not be automatically verified, but which the user has chosen to trust", "general");
add_icon (win, "security-high", "The icon used to indicate that the security level of a connection is known to be secure, using strong encryption and a valid certificate", "general");
add_icon (win, "user-trash", "The icon for the user's “Trash” place in the file system", "other");
add_icon (win, "user-trash-full", "The icon for the user's “Trash” in the file system, when there are items in the “Trash” waiting for disposal or recovery", "general");
add_icon (win, "emblem-system", "The icon used as an emblem for directories that contain system libraries, settings, and data", "general");
add_icon (win, "avatar-default", "The generic avatar icon, which is used to represent a user that doesn't have a personalized avatar", "general");
add_icon (win, "emblem-synchronizing", "The icon used as an emblem to indicate that a a synchronizing operation is in process", "general");
add_icon (win, "emblem-shared", "The icon used as an emblem for files and directories that are shared to other users", "general");
add_icon (win, "folder-download", "The icon representing the location in the file system where downloaded files are stored", "general");
add_icon (win, "help-browser", "The icon used for the desktop's help browsing application", "general");
add_context (win, "other", "Other", "Icons which have may be too specialized and not of general interest");
add_icon (win, "view-sort-ascending", "The icon used for the “Sort Ascending” item in the application's “View” menu, or in a button for changing the sort method for a list", "other");
add_icon (win, "view-sort-descending", "The icon used for the “Sort Descending” item in the application's “View” menu, or in a button for changing the sort method for a list", "other");
add_icon (win, "document-revert", "The icon for the action of reverting to a previous version of a document", "other");
add_icon (win, "address-book-new", "The icon used for the action to create a new address book", "other");
add_icon (win, "application-exit", "The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit", "other");
add_icon (win, "appointment-new", "The icon used for the action to create a new appointment in a calendaring application", "other");
add_icon (win, "contact-new", "The icon used for the action to create a new contact in an address book application", "other");
add_icon (win, "document-print-preview", "The icon for the print preview action of an application", "other");
add_icon (win, "folder-new", "The icon for creating a new folder", "other");
add_icon (win, "help-about", "The icon for the About item in the Help menu", "other");
add_icon (win, "help-contents", "The icon for Contents item in the Help menu", "other");
add_icon (win, "help-faq", "The icon for the FAQ item in the Help menu", "other");
add_icon (win, "list-remove-all", "", "other");
add_icon (win, "mail-forward", "The icon for the forward action of an electronic mail application", "other");
add_icon (win, "mail-mark-junk", "The icon for the mark as junk action of an electronic mail application", "other");
add_icon (win, "mail-mark-notjunk", "The icon for the mark as not junk action of an electronic mail application", "other");
add_icon (win, "mail-mark-read", "The icon for the mark as read action of an electronic mail application", "other");
add_icon (win, "mail-mark-unread", "The icon for the mark as unread action of an electronic mail application", "other");
add_icon (win, "mail-message-new", "The icon for the compose new mail action of an electronic mail application", "other");
add_icon (win, "mail-reply-all", "The icon for the reply to all action of an electronic mail application", "other");
add_icon (win, "mail-reply-sender", "The icon for the reply to sender action of an electronic mail application", "other");
add_icon (win, "pan-down", "", "other");
add_icon (win, "pan-end", "", "other");
add_icon (win, "pan-start", "", "other");
add_icon (win, "pan-up", "", "other");
add_icon (win, "system-lock-screen", "The icon used for the “Lock Screen” item in the desktop's panel application", "other");
add_icon (win, "system-log-out", "The icon used for the “Log Out” item in the desktop's panel application", "other");
add_icon (win, "system-run", "The icon used for the “Run Application...” item in the desktop's panel application", "other");
add_icon (win, "system-search", "The icon used for the “Search” item in the desktop's panel application", "other");
add_icon (win, "system-reboot", "The icon used for the “Reboot” item in the desktop's panel application", "other");
add_icon (win, "system-shutdown", "The icon used for the “Shutdown” item in the desktop's panel application", "other");
add_icon (win, "tools-check-spelling", "The icon used for the “Check Spelling” item in the application's “Tools” menu", "other");
add_icon (win, "window-maximize", "", "other");
add_icon (win, "window-minimize", "", "other");
add_icon (win, "window-restore", "", "other");
add_icon (win, "window-new", "The icon used for the “New Window” item in the application's “Windows” menu", "other");
add_icon (win, "accessories-calculator", "The icon used for the desktop's calculator accessory program", "other");
add_icon (win, "accessories-character-map", "The icon used for the desktop's international and extended text character accessory program", "other");
add_icon (win, "accessories-dictionary", "The icon used for the desktop's dictionary accessory program", "other");
add_icon (win, "multimedia-volume-control", "The icon used for the desktop's hardware volume control application", "other");
add_icon (win, "preferences-desktop-accessibility", "The icon used for the desktop's accessibility preferences", "other");
add_icon (win, "preferences-desktop-display", "", "other");
add_icon (win, "preferences-desktop-font", "The icon used for the desktop's font preferences", "other");
add_icon (win, "preferences-desktop-keyboard", "The icon used for the desktop's keyboard preferences", "other");
add_icon (win, "preferences-desktop-keyboard-shortcuts", "", "other");
add_icon (win, "preferences-desktop-locale", "The icon used for the desktop's locale preferences", "other");
add_icon (win, "preferences-desktop-remote-desktop", "", "other");
add_icon (win, "preferences-desktop-multimedia", "The icon used for the desktop's multimedia preferences", "other");
add_icon (win, "preferences-desktop-screensaver", "The icon used for the desktop's screen saving preferences", "other");
add_icon (win, "preferences-desktop-theme", "The icon used for the desktop's theme preferences", "other");
add_icon (win, "preferences-desktop-wallpaper", "The icon used for the desktop's wallpaper preferences", "other");
add_icon (win, "preferences-system-privacy", "", "other");
add_icon (win, "preferences-system-windows", "", "other");
add_icon (win, "system-file-manager", "The icon used for the desktop's file management application", "other");
add_icon (win, "system-software-install", "The icon used for the desktop's software installer application", "other");
add_icon (win, "system-software-update", "The icon used for the desktop's software updating application", "other");
add_icon (win, "system-users", "", "other");
add_icon (win, "user-info", "", "other");
add_icon (win, "utilities-system-monitor", "The icon used for the desktop's system resource monitor application", "other");
add_icon (win, "utilities-terminal", "The icon used for the desktop's terminal emulation application. ", "other");
add_icon (win, "application-x-addon", "", "other");
add_icon (win, "application-x-executable", "The icon used for executable file types", "other");
add_icon (win, "font-x-generic", "The icon used for generic font file types", "other");
add_icon (win, "image-x-generic", "The icon used for generic image file types", "other");
add_icon (win, "package-x-generic", "The icon used for generic package file types", "other");
add_icon (win, "text-html", "The icon used for HTML text file types", "other");
add_icon (win, "text-x-generic-template", "The icon used for generic text templates", "other");
add_icon (win, "text-x-preview", "", "other");
add_icon (win, "text-x-script", "The icon used for script file types, such as shell scripts", "other");
add_icon (win, "x-office-address-book", "The icon used for generic address book file types", "other");
add_icon (win, "x-office-document", "The icon used for generic document and letter file types", "other");
add_icon (win, "x-office-document-template", "", "other");
add_icon (win, "x-office-presentation", "The icon used for generic presentation file types", "other");
add_icon (win, "x-office-presentation-template", "", "other");
add_icon (win, "x-office-spreadsheet", "The icon used for generic spreadsheet file types", "other");
add_icon (win, "x-office-spreadsheet-template", "", "other");
add_icon (win, "x-package-repository", "", "other");
add_icon (win, "applications-accessories", "The icon for the “Accessories” sub-menu of the Programs menu", "other");
add_icon (win, "applications-development", "The icon for the “Programming” sub-menu of the Programs menu", "other");
add_icon (win, "applications-engineering", "The icon for the “Engineering” sub-menu of the Programs menu", "other");
add_icon (win, "applications-games", "The icon for the “Games” sub-menu of the Programs menu", "other");
add_icon (win, "applications-graphics", "The icon for the “Graphics” sub-menu of the Programs menu", "other");
add_icon (win, "applications-internet", "The icon for the “Internet” sub-menu of the Programs menu", "other");
add_icon (win, "applications-multimedia", "The icon for the “Multimedia” sub-menu of the Programs menu", "other");
add_icon (win, "applications-office", "The icon for the “Office” sub-menu of the Programs menu", "other");
add_icon (win, "applications-other", "The icon for the “Other” sub-menu of the Programs menu", "other");
add_icon (win, "applications-science", "The icon for the “Science” sub-menu of the Programs menu", "other");
add_icon (win, "applications-system", "The icon for the “System Tools” sub-menu of the Programs menu", "other");
add_icon (win, "applications-utilities", "The icon for the “Utilities” sub-menu of the Programs menu", "other");
add_icon (win, "preferences-desktop", "The icon for the “Desktop Preferences” category", "other");
add_icon (win, "preferences-desktop-peripherals", "The icon for the “Peripherals” sub-category of the “Desktop Preferences” category", "other");
add_icon (win, "preferences-desktop-personal", "The icon for the “Personal” sub-category of the “Desktop Preferences” category", "other");
add_icon (win, "preferences-other", "The icon for the “Other” preferences category", "other");
add_icon (win, "preferences-system", "The icon for the “System Preferences” category", "other");
add_icon (win, "preferences-system-network", "The icon for the “Network” sub-category of the “System Preferences” category", "other");
add_icon (win, "system-help", "The icon for the “Help” system category", "other");
add_icon (win, "battery", "The icon used for the system battery device", "other");
add_icon (win, "computer-apple-ipad", "", "other");
add_icon (win, "colorimeter-colorhug", "", "other");
add_icon (win, "drive-harddisk", "The icon used for hard disk drives", "other");
add_icon (win, "drive-harddisk-ieee1394", "", "other");
add_icon (win, "drive-harddisk-system", "", "other");
add_icon (win, "drive-multidisk", "", "other");
add_icon (win, "media-optical-bd", "", "other");
add_icon (win, "media-optical-cd-audio", "", "other");
add_icon (win, "media-optical-dvd", "", "other");
add_icon (win, "media-tape", "The icon used for generic physical tape media", "other");
add_icon (win, "media-zip", "", "other");
add_icon (win, "modem", "The icon used for modem devices", "other");
add_icon (win, "multimedia-player-apple-ipod-touch", "", "other");
add_icon (win, "network-vpn", "", "other");
add_icon (win, "pda", "This is the fallback icon for Personal Digial Assistant devices. Primary use of this icon is for PDA devices connected to the PC. Connection medium is not an important aspect of the icon. The metaphor for this fallback icon should be a generic PDA device icon", "other");
add_icon (win, "phone-apple-iphone", "", "other");
add_icon (win, "uninterruptible-power-supply", "", "other");
add_icon (win, "emblem-default", "The icon used as an emblem to specify the default selection of a printer for example", "other");
add_icon (win, "emblem-documents", "The icon used as an emblem for the directory where a user's documents are stored", "other");
add_icon (win, "emblem-downloads", "The icon used as an emblem for the directory where a user's downloads from the internet are stored", "other");
add_icon (win, "emblem-favorite", "The icon used as an emblem for files and directories that the user marks as favorites", "other");
add_icon (win, "emblem-generic", "", "other");
add_icon (win, "emblem-important", "The icon used as an emblem for files and directories that are marked as important by the user", "other");
add_icon (win, "emblem-mail", "The icon used as an emblem to specify the directory where the user's electronic mail is stored", "other");
add_icon (win, "emblem-new", "", "other");
add_icon (win, "emblem-ok", "", "other");
add_icon (win, "emblem-package", "", "other");
add_icon (win, "emblem-photos", "The icon used as an emblem to specify the directory where the user stores photographs", "other");
add_icon (win, "emblem-readonly", "The icon used as an emblem for files and directories which can not be written to by the user", "other");
add_icon (win, "emblem-symbolic-link", "The icon used as an emblem for files and direcotires that are links to other files or directories on the filesystem", "other");
add_icon (win, "emblem-synchronized", "The icon used as an emblem for files or directories that are configured to be synchronized to another device", "other");
add_icon (win, "emblem-unreadable", "The icon used as an emblem for files and directories that are inaccessible. ", "other");
add_icon (win, "emblem-urgent", "", "other");
add_icon (win, "emblem-videos", "", "other");
add_icon (win, "emblem-web", "", "other");
add_icon (win, "folder-documents", "", "other");
add_icon (win, "folder-download", "", "other");
add_icon (win, "folder-music", "", "other");
add_icon (win, "folder-pictures", "", "other");
add_icon (win, "folder-documents", "", "other");
add_icon (win, "folder-publicshare", "", "other");
add_icon (win, "folder-remote", "The icon used for normal directories on a remote filesystem", "other");
add_icon (win, "folder-saved-search", "", "other");
add_icon (win, "folder-templates", "", "other");
add_icon (win, "folder-videos", "", "other");
add_icon (win, "network-server", "The icon used for individual host machines under the “Network Servers” place in the file manager", "other");
add_icon (win, "network-workgroup", "The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network", "other");
add_icon (win, "start-here", "The icon used by the desktop's main menu for accessing places, applications, and other features", "other");
add_icon (win, "user-bookmarks", "The icon for the user's special “Bookmarks” place", "other");
add_icon (win, "user-desktop", "The icon for the special “Desktop” directory of the user", "other");
add_icon (win, "user-home", "The icon for the special “Home” directory of the user", "other");
add_icon (win, "airplane-mode", "", "other");
add_icon (win, "battery-caution-charging", "", "other");
add_icon (win, "battery-caution", "The icon used when the battery is below 40%", "other");
add_icon (win, "battery-empty-charging", "", "other");
add_icon (win, "battery-empty", "", "other");
add_icon (win, "battery-full-charged", "", "other");
add_icon (win, "battery-full-charging", "", "other");
add_icon (win, "battery-full", "", "other");
add_icon (win, "battery-good-charging", "", "other");
add_icon (win, "battery-good", "", "other");
add_icon (win, "battery-low-charging", "", "other");
add_icon (win, "battery-low", "The icon used when the battery is below 20%", "other");
add_icon (win, "battery-missing", "", "other");
add_icon (win, "bluetooth-active", "", "other");
add_icon (win, "bluetooth-disabled", "", "other");
add_icon (win, "channel-insecure", "", "other");
add_icon (win, "channel-secure", "", "other");
add_icon (win, "computer-fail", "", "other");
add_icon (win, "display-brightness", "", "other");
add_icon (win, "keyboard-brightness", "", "other");
add_icon (win, "folder-drag-accept", "The icon used for a folder while an object is being dragged onto it, that is of a type that the directory can contain", "other");
add_icon (win, "folder-open", "The icon used for folders, while their contents are being displayed within the same window. This icon would normally be shown in a tree or list view, next to the main view of a folder's contents", "other");
add_icon (win, "folder-visiting", "The icon used for folders, while their contents are being displayed in another window. This icon would typically be used when using multiple windows to navigate the hierarchy, such as in Nautilus's spatial mode", "other");
add_icon (win, "image-loading", "The icon used when another image is being loaded, such as thumnails for larger images in the file manager", "other");
add_icon (win, "image-missing", "The icon used when another image could not be loaded", "other");
add_icon (win, "mail-signed", "The icon used for an electronic mail that contains a signature", "other");
add_icon (win, "mail-signed-verified", "The icon used for an electronic mail that contains a signature which has also been verified by the security system", "other");
add_icon (win, "network-cellular-3g", "", "other");
add_icon (win, "network-cellular-4g", "", "other");
add_icon (win, "network-cellular-edge", "", "other");
add_icon (win, "network-cellular-gprs", "", "other");
add_icon (win, "network-cellular-umts", "", "other");
add_icon (win, "network-cellular-acquiring", "", "other");
add_icon (win, "network-cellular-connected", "", "other");
add_icon (win, "network-cellular-no-route", "", "other");
add_icon (win, "network-cellular-offline", "", "other");
add_icon (win, "network-cellular-signal-excellent", "", "other");
add_icon (win, "network-cellular-signal-good", "", "other");
add_icon (win, "network-cellular-signal-ok", "", "other");
add_icon (win, "network-cellular-signal-weak", "", "other");
add_icon (win, "network-cellular-signal-none", "", "other");
add_icon (win, "network-vpn-acquiring", "", "other");
add_icon (win, "network-vpn", "", "other");
add_icon (win, "network-wired-acquiring", "", "other");
add_icon (win, "network-wired-disconnected", "", "other");
add_icon (win, "network-wired-no-route", "", "other");
add_icon (win, "network-wired-offline", "", "other");
add_icon (win, "network-wireless-acquiring", "", "other");
add_icon (win, "network-wireless-connected", "", "other");
add_icon (win, "network-wireless-encrypted", "", "other");
add_icon (win, "network-wireless-hotspot", "", "other");
add_icon (win, "network-wireless-no-route", "", "other");
add_icon (win, "network-wireless-offline", "", "other");
add_icon (win, "network-wireless-signal-excellent", "", "other");
add_icon (win, "network-wireless-signal-good", "", "other");
add_icon (win, "network-wireless-signal-ok", "", "other");
add_icon (win, "network-wireless-signal-weak", "", "other");
add_icon (win, "network-wireless-signal-none", "", "other");
add_icon (win, "rotation-allowed", "", "other");
add_icon (win, "rotation-locked", "", "other");
add_icon (win, "software-update-available", "The icon used when an update is available for software installed on the computing device, through the system software update program", "other");
add_icon (win, "software-update-urgent", "The icon used when an urgent update is available through the system software update program", "other");
add_icon (win, "sync-error", "The icon used when an error occurs while attempting to synchronize data from the computing device, to another device", "other");
add_icon (win, "sync-synchronizing", "The icon used while data is successfully synchronizing to another device", "other");
add_icon (win, "touchpad-disabled", "", "other");
add_icon (win, "trophy-bronze", "", "other");
add_icon (win, "trophy-silver", "", "other");
add_icon (win, "trophy-gold", "", "other");
add_icon (win, key, value, context);
}
g_strfreev (keys);
}
g_strfreev (groups);
}
static gboolean
@@ -694,6 +281,16 @@ key_press_event_cb (GtkWidget *widget,
return gtk_search_bar_handle_event (GTK_SEARCH_BAR (win->searchbar), event);
}
static void
copy_to_clipboard (GtkButton *button,
IconBrowserWindow *win)
{
GtkClipboard *clipboard;
clipboard = gtk_clipboard_get_default (gdk_display_get_default ());
gtk_clipboard_set_text (clipboard, gtk_window_get_title (GTK_WINDOW (win->details)), -1);
}
static gboolean
icon_visible_func (GtkTreeModel *model,
GtkTreeIter *iter,
@@ -748,7 +345,7 @@ symbolic_toggled (GtkToggleButton *toggle, IconBrowserWindow *win)
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->cell, "icon-name", column, NULL);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->text_cell, "text", column, NULL);
gtk_tree_model_filter_refilter (win->filter_model);
gtk_widget_queue_draw (win->list);
}
@@ -821,7 +418,7 @@ icon_browser_window_init (IconBrowserWindow *win)
setup_image_dnd (win->image4);
setup_image_dnd (win->image5);
win->contexts = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
win->contexts = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, context_free);
gtk_tree_model_filter_set_visible_func (win->filter_model, icon_visible_func, win, NULL);
gtk_window_set_transient_for (GTK_WINDOW (win->details), GTK_WINDOW (win));
@@ -866,6 +463,7 @@ icon_browser_window_class_init (IconBrowserWindowClass *class)
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), selected_context_changed);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), symbolic_toggled);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), key_press_event_cb);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), copy_to_clipboard);
}
IconBrowserWindow *

View File

@@ -8,8 +8,8 @@
</object>
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
<property name="title" translatable="yes">Icon Browser</property>
<property name="default-width">600</property>
<property name="default-height">800</property>
<property name="default-width">1024</property>
<property name="default-height">768</property>
<signal name="key-press-event" handler="key_press_event_cb"/>
<child type="titlebar">
<object class="GtkHeaderBar" id="header">
@@ -109,7 +109,7 @@
<object class="GtkCellRendererPixbuf" id="cell">
<property name="xpad">10</property>
<property name="ypad">10</property>
<property name="stock-size">5</property>
<property name="stock-size">6</property>
<property name="follow-state">True</property>
</object>
</child>
@@ -320,6 +320,21 @@
<property name="width">5</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="label" translatable="yes">Copy to Clipboard</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin">20</property>
<signal name="clicked" handler="copy_to_clipboard"/>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
<property name="width">5</property>
</packing>
</child>
</object>
</child>
</object>

View File

@@ -1637,6 +1637,16 @@ scale_format_value (GtkScale *scale, gdouble value)
return g_strdup_printf ("%0.*f", 1, value);
}
static void
adjustment3_value_changed (GtkAdjustment *adj, GtkProgressBar *pbar)
{
double fraction;
fraction = gtk_adjustment_get_value (adj) / (gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj));
gtk_progress_bar_set_fraction (pbar, fraction);
}
static void
activate (GApplication *app)
{
@@ -1910,6 +1920,12 @@ activate (GApplication *app)
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
g_object_set_data (G_OBJECT (widget), "decrease_button", widget2);
adj = (GtkAdjustment *)gtk_builder_get_object (builder, "adjustment3");
widget = (GtkWidget *)gtk_builder_get_object (builder, "progressbar1");
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "progressbar2");
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget);
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget2);
gtk_widget_show_all (GTK_WIDGET (window));
g_object_unref (builder);

View File

@@ -1,9 +1,26 @@
.circular-button {
border-radius: 20px;
-gtk-outline-radius: 20px;
}
.small-button {
padding: 0;
outline-width: 0;
}
frame.border-inset > border {
border-style: inset;
}
frame.border-outset > border {
border-style: outset;
}
frame.border-groove > border {
border-style: groove;
}
frame.border-ridge > border {
border-style: ridge;
}
/* These effects use 2 lines, so show them */
frame.border-groove > border,
frame.border-ridge > border {
border-width: 2px;
}

View File

@@ -103,8 +103,9 @@
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
<property name="lower">0</property>
<property name="upper">4</property>
<property name="value">1</property>
<property name="value">2</property>
<property name="step_increment">1</property>
<property name="page_increment">1</property>
</object>
@@ -495,6 +496,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="invisible_char">•</property>
<property name="placeholder-text" translatable="yes">Click icon to change mode</property>
<property name="secondary_icon_name">view-refresh-symbolic</property>
<property name="secondary_icon_tooltip_text">Change mode</property>
<signal name="icon-release" handler="on_entry_icon_release" swapped="no"/>
</object>
<packing>
@@ -1299,11 +1301,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">1</property>
<property name="shadow_type">in</property>
<style>
<class name="border-inset"/>
</style>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">1</property>
<property name="label" translatable="yes">&lt;b&gt;In&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;Inset&lt;/b&gt;</property>
<property name="use_markup">1</property>
</object>
</child>
@@ -1315,11 +1319,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">1</property>
<property name="shadow_type">out</property>
<style>
<class name="border-outset"/>
</style>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">1</property>
<property name="label" translatable="yes">&lt;b&gt;Out&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;Outset&lt;/b&gt;</property>
<property name="use_markup">1</property>
</object>
</child>
@@ -1332,10 +1338,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">1</property>
<style>
<class name="border-groove"/>
</style>
<child type="label">
<object class="GtkLabel" id="label17">
<property name="visible">1</property>
<property name="label" translatable="yes">&lt;b&gt;Etched in&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;Groove&lt;/b&gt;</property>
<property name="use_markup">1</property>
</object>
</child>
@@ -1348,11 +1357,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<child>
<object class="GtkFrame" id="frame4">
<property name="visible">1</property>
<property name="shadow_type">etched-out</property>
<style>
<class name="border-ridge"/>
</style>
<child type="label">
<object class="GtkLabel" id="label18">
<property name="visible">1</property>
<property name="label" translatable="yes">&lt;b&gt;Etched out&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;Ridge&lt;/b&gt;</property>
<property name="use_markup">1</property>
</object>
</child>
@@ -3107,7 +3118,7 @@ microphone-sensitivity-medium-symbolic</property>
<property name="visible">1</property>
<style>
<class name="image-button"/>
<class name="circular-button"/>
<class name="circular"/>
</style>
<child>
<object class="GtkImage">
@@ -3723,6 +3734,7 @@ microphone-sensitivity-medium-symbolic</property>
<object class="GtkEntry">
<property name="visible">1</property>
<property name="can_focus">1</property>
<property name="show_emoji_icon">1</property>
<property name="placeholder_text" translatable="yes">Age…</property>
</object>
<packing>
@@ -3749,6 +3761,7 @@ microphone-sensitivity-medium-symbolic</property>
<property name="visible">1</property>
<property name="valign">center</property>
<property name="popover">notebook_info_popover</property>
<property name="relief">none</property>
<child>
<object class="GtkImage">
<property name="visible">1</property>
@@ -3759,7 +3772,6 @@ microphone-sensitivity-medium-symbolic</property>
<style>
<class name="image-button"/>
<class name="circular"/>
<class name="flat"/>
</style>
</object>
</child>

View File

@@ -10,9 +10,9 @@
<releaseinfo>
This document is for the GDK 3 library, version &version;
The latest versions can be found online at
<ulink role="online-location" url="http://developer.gnome.org/gdk3/">http://developer.gnome.org/gdk3/</ulink>.
<ulink role="online-location" url="https://developer.gnome.org/gdk3/">https://developer.gnome.org/gdk3/</ulink>.
If you are looking for the older GDK 2 series of libraries,
see <ulink role="online-location" url="http://developer.gnome.org/gdk2/">http://developer.gnome.org/gdk2/</ulink>.
see <ulink role="online-location" url="https://developer.gnome.org/gdk2/">https://developer.gnome.org/gdk2/</ulink>.
</releaseinfo>
</bookinfo>

View File

@@ -278,8 +278,6 @@ GTKDOC_LIBS = \
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--output-format=xml --name-space=gtk
MKHTML_OPTIONS="--path=\"$(abs_srcdir):$(top_srcdir)/examples\""
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
broadway.xml \

View File

@@ -140,7 +140,7 @@ How to compile GTK+ itself
<listitem>
<para>
<ulink
url="http://pkg-config.freedesktop.org">pkg-config</ulink>
url="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</ulink>
is a tool for tracking the compilation flags needed for
libraries that are used by the GTK+ libraries. (For each
library, a small <literal>.pc</literal> text file is installed
@@ -153,7 +153,7 @@ How to compile GTK+ itself
The GTK+ makefiles will mostly work with different versions
of <command>make</command>, however, there tends to be
a few incompatibilities, so the GTK+ team recommends
installing <ulink url="http://www.gnu.org/software/make">GNU
installing <ulink url="https://www.gnu.org/software/make">GNU
make</ulink> if you don't already have it on your system
and using it. (It may be called <command>gmake</command>
rather than <command>make</command>.)
@@ -171,24 +171,24 @@ How to compile GTK+ itself
The GLib library provides core non-graphical functionality
such as high level data types, Unicode manipulation, and
an object and type system to C programs. It is available
from the <ulink url="http://ftp.gtk.org/pub/glib/">GTK+
from the <ulink url="https://ftp.gtk.org/pub/glib/">GTK+
FTP site</ulink> or
<ulink url="http://download.gnome.org/sources/glib/">here</ulink>.
<ulink url="https://download.gnome.org/sources/glib/">here</ulink>.
</para>
</listitem>
<listitem>
<para>
The <ulink url="http://git.gnome.org/browse/gdk-pixbuf/">GdkPixbuf library</ulink>
The <ulink url="https://git.gnome.org/browse/gdk-pixbuf/">GdkPixbuf library</ulink>
provides facilities for loading images in a variety of file formats.
It is available
<ulink url="http://download.gnome.org/sources/gdk-pixbuf/">here</ulink>.
<ulink url="https://download.gnome.org/sources/gdk-pixbuf/">here</ulink>.
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.pango.org">Pango</ulink> is a library
for internationalized text handling. It is available
<ulink url="http://download.gnome.org/sources/pango/">here</ulink>.
<ulink url="https://download.gnome.org/sources/pango/">here</ulink>.
</para>
</listitem>
<listitem>
@@ -197,7 +197,7 @@ How to compile GTK+ itself
interfaces allowing accessibility technologies such as
screen readers to interact with a graphical user interface.
It is available
<ulink url="http://download.gnome.org/sources/atk/">here</ulink>.
<ulink url="https://download.gnome.org/sources/atk/">here</ulink>.
</para>
</listitem>
<listitem>
@@ -205,7 +205,7 @@ How to compile GTK+ itself
<ulink url="https://wiki.gnome.org/Projects/GObjectIntrospection">Gobject Introspection</ulink>
is a framework for making introspection data available to
language bindings. It is available
<ulink url="http://download.gnome.org/sources/gobject-introspection/">here</ulink>.
<ulink url="https://download.gnome.org/sources/gobject-introspection/">here</ulink>.
</para>
</listitem>
</itemizedlist>
@@ -213,7 +213,7 @@ How to compile GTK+ itself
<title>External dependencies</title>
<listitem>
<para>
The <ulink url="http://www.gnu.org/software/libiconv/">GNU
The <ulink url="https://www.gnu.org/software/libiconv/">GNU
libiconv library</ulink> is needed to build GLib if your
system doesn't have the <function>iconv()</function>
function for doing conversion between character
@@ -224,7 +224,7 @@ How to compile GTK+ itself
<listitem>
<para>
The libintl library from the <ulink
url="http://www.gnu.org/software/gettext/">GNU gettext
url="https://www.gnu.org/software/gettext/">GNU gettext
package</ulink> is needed if your system doesn't have the
<function>gettext()</function> functionality for handling
message translation databases.
@@ -241,14 +241,14 @@ How to compile GTK+ itself
</listitem>
<listitem>
<para>
The <ulink url="http://www.fontconfig.org">fontconfig</ulink>
The <ulink url="https://www.freedesktop.org/wiki/Software/fontconfig/">fontconfig</ulink>
library provides Pango with a standard way of locating
fonts and matching them against font names.
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.cairographics.org">Cairo</ulink>
<ulink url="https://www.cairographics.org">Cairo</ulink>
is a graphics library that supports vector graphics and image
compositing. Both Pango and GTK+ use cairo for all of their
drawing.
@@ -263,13 +263,13 @@ How to compile GTK+ itself
</listitem>
<listitem>
<para>
The <ulink url="http://wayland.freedesktop.org">Wayland</ulink> libraries
The <ulink url="https://wayland.freedesktop.org">Wayland</ulink> libraries
are needed to build GTK+ with the Wayland backend.
</para>
</listitem>
<listitem>
<para>
The <ulink url="http://www.freedesktop.org/wiki/Software/shared-mime-info">shared-mime-info</ulink>
The <ulink url="https://www.freedesktop.org/wiki/Software/shared-mime-info">shared-mime-info</ulink>
package is not a hard dependency of GTK+, but it contains definitions
for mime types that are used by GIO and, indirectly, by GTK+.
gdk-pixbuf will use GIO for mime type detection if possible. For this

View File

@@ -46,7 +46,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<para>
We loosely follow the CSS
<ulink url="http://www.w3.org/TR/css-values/#value-defs">value definition</ulink>
<ulink url="https://www.w3.org/TR/css-values/#value-defs">value definition</ulink>
specification in the formatting of syntax productions.
<simplelist>
<member>Nonterminals are enclosed in angle backets (〈〉), all other strings that are not listed here are literals</member>
@@ -123,7 +123,7 @@ scale[.fine-tune]
<programlisting><![CDATA[
button, entry {
color: #ff00ea;
font: Comic Sans 12
font: 12px "Comic Sans"
}
]]></programlisting>
</example>
@@ -154,7 +154,7 @@ button, entry {
<para>
To learn more about the @import rule, you can read the
<ulink url="http://www.w3.org/TR/css3-cascade/#at-import">Cascading</ulink>
<ulink url="https://www.w3.org/TR/css3-cascade/#at-import">Cascading</ulink>
module of the CSS specification.
</para>
@@ -216,7 +216,7 @@ notebook > entry {
<title>Theme any widget within a GtkBox</title>
<programlisting><![CDATA[
box * {
font: Sans 20
font: 20px Sans
}
]]></programlisting>
</example>
@@ -225,7 +225,7 @@ box * {
<title>Theme a label named title-label</title>
<programlisting><![CDATA[
label#title-label {
font: Sans 15
font: 15px Sans
}
]]></programlisting>
</example>
@@ -360,85 +360,85 @@ checkbutton:indeterminate {
<row>
<entry>*</entry>
<entry>any node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#universal-selector">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#universal-selector">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E</entry>
<entry>any node with name E</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#type-selectors">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#type-selectors">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E.class</entry>
<entry>any E node with the given style class</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#class-html">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#class-html">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E#id</entry>
<entry>any E node with the given ID</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#id-selectors">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#id-selectors">CSS</ulink></entry>
<entry>GTK+ uses the widget name as ID</entry>
</row>
<row>
<entry>E:nthchild(〈nthchild〉)</entry>
<entry>any E node which is the n-th child of its parent node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:nthlastchild(〈nthchild〉)</entry>
<entry>any E node which is the n-th child of its parent node, counting from the end</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:firstchild</entry>
<entry>any E node which is the first child of its parent node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:lastchild</entry>
<entry>any E node which is the last child of its parent node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:onlychild</entry>
<entry>any E node which is the only child of its parent node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry>Equivalent to E:first-child:last-child</entry>
</row>
<row>
<entry>E:link, E:visited</entry>
<entry>any E node which represents a hyperlink, not yet visited (:link) or already visited (:visited)</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#link">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#link">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_LINK and GTK_STATE_FLAGS_VISITED</entry>
</row>
<row>
<entry>E:active, E:hover, E:focus</entry>
<entry>any E node which is part of a widget with the corresponding state</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#useraction-pseudos">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_ACTIVE, GTK_STATE_FLAG_PRELIGHT and GTK_STATE_FLAGS_FOCUSED; GTK+ also allows E:prelight and E:focused</entry>
</row>
<row>
<entry>E:disabled</entry>
<entry>any E node which is part of a widget with is disabled</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
<entry>any E node which is part of a widget which is disabled</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_INSENSITIVE; GTK+ also allows E:insensitive</entry>
</row>
<row>
<entry>E:checked</entry>
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is checked</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_CHECKED</entry>
</row>
<row>
<entry>E:indeterminate</entry>
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is in an inconsistent state</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#indeterminate">CSS3</ulink>,
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#indeterminate">CSS3</ulink>,
<ulink url="https://drafts.csswg.org/selectors/#indeterminate">CSS4</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_INCONSISTENT; GTK+ also allows E:inconsistent</entry>
</row>
@@ -451,7 +451,7 @@ checkbutton:indeterminate {
<row>
<entry>E:not(〈selector〉)</entry>
<entry>any E node which does not match the simple selector 〈selector〉</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#negation">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#negation">CSS</ulink></entry>
<entry></entry>
</row>
<row>
@@ -469,25 +469,25 @@ checkbutton:indeterminate {
<row>
<entry>E F</entry>
<entry>any F node which is a descendent of an E node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#descendent-combinators">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#descendent-combinators">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E > F</entry>
<entry>any F node which is a child of an E node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#child-combinators">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#child-combinators">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E ~ F</entry>
<entry>any F node which is preceded by an E node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#general-sibling-combinators">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#general-sibling-combinators">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E + F</entry>
<entry>any F node which is immediately preceded by an E node</entry>
<entry><ulink url="http://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators">CSS</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators">CSS</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -499,7 +499,7 @@ checkbutton:indeterminate {
<para>
To learn more about selectors in CSS, read the
<ulink url="http://www.w3.org/TR/css3-selectors/">Selectors</ulink>
<ulink url="https://www.w3.org/TR/css3-selectors/">Selectors</ulink>
module of the CSS specification.
</para>
@@ -532,7 +532,7 @@ checkbutton:indeterminate {
<para>
For a list of valid color names and for more background on colors in
CSS, see the <ulink url="http://www.w3.org/TR/css3-color/#svg-color">Color</ulink>
CSS, see the <ulink url="https://www.w3.org/TR/css3-color/#svg-color">Color</ulink>
module of the CSS specification.
</para>
@@ -582,12 +582,21 @@ background-color: @bg_color;
</example>
<para>
GTK+ also allows to form color expressions, which can be nested and
provide a rich language to define colors which are derived from a
set of base colors.
GTK+ also supports color expressions, which allow colors to be transformed
to new ones and can be nested, providing a rich language to define colors.
Color expressions resemble functions, taking 1 or more colors and in some
cases a number as arguments.
</para>
<para>
shade() leaves the color unchanged when the number is 1 and transforms it
to black or white as the number approaches 0 or 2 respectively. For mix(),
0 or 1 return the unaltered 1st or 2nd color respectively; numbers between
0 and 1 return blends of the two; and numbers below 0 or above 1 intensify
the RGB components of the 1st or 2nd color respectively. alpha() takes a
number from 0 to 1 and applies that as the opacity of the supplied color.
</para>
<literallayout><code>〈color expression〉 = ligher(〈color〉) | darker(〈color〉) | shade(〈number〉,〈color〉) | alpha(〈number〉,〈color〉) | mix(〈number〉,〈color〉,〈color〉)</code>
<literallayout><code>〈color expression〉 = lighter(〈color〉) | darker(〈color〉) | shade(〈color〉,〈number〉) | alpha(〈color〉,〈number〉) | mix(〈color〉,〈color〉,〈number〉)</code>
</literallayout>
<para>
@@ -645,7 +654,7 @@ button {
<para>
A crossfade lets you specify an image as an intermediate between two
images. Crossfades are specified in the draft of the level 4
<ulink url="http://www.w3.org/TR/css4-images">Image</ulink>
<ulink url="https://www.w3.org/TR/css4-images">Image</ulink>
module of the CSS specification.
</para>
@@ -726,7 +735,7 @@ label {
To learn more about gradients in CSS, including details of how color stops
are placed on the gradient line and keywords for specifying radial sizes,
you can read the
<ulink url="http://www.w3.org/TR/css3-images/#gradients">Image</ulink>
<ulink url="https://www.w3.org/TR/css3-images/#gradients">Image</ulink>
module of the CSS specification.
</para>
@@ -824,7 +833,7 @@ label {
<programlisting><![CDATA[
spinner {
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
-gtk-icon-palette: success blue, error magenta;
-gtk-icon-palette: success blue, warning #fc3, error magenta;
}
arrow.fancy {
-gtk-icon-source: -gtk-icontheme('pan-down');

View File

@@ -94,7 +94,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
The calc() notation adds considerable expressive power. There are limits
on what types can be combined in such an expression (e.g. it does not make
sense to add a number and a time). For the full details, see the
<ulink url="http://www.w3.org/TR/css3-values/#calc-notation">CSS3 Values and
<ulink url="https://www.w3.org/TR/css3-values/#calc-notation">CSS3 Values and
Units</ulink> spec.
</para>
@@ -108,7 +108,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<term>4 values: </term><listitem>top right bottom left</listitem>
</varlistentry>
<varlistentry>
<term>3 values: </term><listitem>top horizontal left</listitem>
<term>3 values: </term><listitem>top horizontal bottom</listitem>
</varlistentry>
<varlistentry>
<term>2 values: </term><listitem>vertical horizontal</listitem>
@@ -134,8 +134,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>rgba(1,1,1,1)</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-color">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-color/#foreground">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-color">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-color/#foreground">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -144,7 +144,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>1</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-color/#opacity">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-color/#opacity">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -172,8 +172,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>gtk-font-name setting</entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-family">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-fonts/#font-family-prop">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-family">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-fonts/#font-family-prop">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -182,8 +182,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>gtk-font-name setting</entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-size-props">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-fonts/#font-size-prop">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-size-props">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-fonts/#font-size-prop">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -192,8 +192,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>normal</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-style">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-fonts/#font-style-prop">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-style">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-fonts/#font-style-prop">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -202,8 +202,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>normal</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-variant">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-fonts/#descdef-font-variant">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-variant">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-fonts/#descdef-font-variant">CSS3</ulink></entry>
<entry>only CSS2 values supported</entry>
</row>
<row>
@@ -212,8 +212,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>normal</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-weight">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-fonts/#font-weight-prop">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#propdef-font-weight">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-fonts/#font-weight-prop">CSS3</ulink></entry>
<entry>normal is synonymous with 400, bold with 700</entry>
</row>
<row>
@@ -222,7 +222,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>normal</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-fonts/#font-stretch-prop">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-fonts/#font-stretch-prop">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -245,8 +245,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>font</entry>
<entry><code>[ 〈font-style〉 || 〈font-variant〉 || 〈font-weight〉 || 〈font-stretch〉 ]? 〈font-size〉 〈font-family〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-shorthand">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-fonts/#font-prop">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-shorthand">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-fonts/#font-prop">CSS3</ulink></entry>
<entry>CSS allows line-height, etc</entry>
</row>
</tbody>
@@ -278,7 +278,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>currentColor</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-ui/#caret-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-ui/#caret-color">CSS3</ulink></entry>
<entry>CSS allows an auto value</entry>
</row>
<row>
@@ -314,7 +314,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-text/#letter-spacing">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-text/#letter-spacing">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -323,8 +323,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#propdef-text-decoration">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-line-property">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#propdef-text-decoration">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-line-property">CSS3</ulink></entry>
<entry>CSS allows overline</entry>
</row>
<row>
@@ -333,7 +333,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>currentColor</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-color-property">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-color-property">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -342,7 +342,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>solid</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-style-property">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-style-property">CSS3</ulink></entry>
<entry>CSS allows dashed and dotted</entry>
</row>
<row>
@@ -351,7 +351,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-shadow-property">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-shadow-property">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -365,7 +365,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>textdecoration</entry>
<entry><code>〈text-decoration-line〉 || 〈text-decoration-style〉 || 〈text-decoration-color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/css-text-decor-3/#text-decoration-property">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-property">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -482,7 +482,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
icons. The recognized names for colors in symbolic icons are error,
warning and success. The default palette maps these three names to
symbolic colors with the names @error_color, @warning_color and
@error_color.
@success_color respectively.
</para>
<table pgwide="1">
@@ -500,8 +500,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-width">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#min-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-width">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#min-width">CSS3</ulink></entry>
<entry>CSS allows percentages</entry>
</row>
<row>
@@ -510,8 +510,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-height">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#min-height">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-min-height">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#min-height">CSS3</ulink></entry>
<entry>CSS allows percentages</entry>
</row>
<row>
@@ -520,8 +520,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-top">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#margin-top">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-top">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#margin-top">CSS3</ulink></entry>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
@@ -530,8 +530,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-right">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#margin-right">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-right">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#margin-right">CSS3</ulink></entry>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
@@ -540,8 +540,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-bottom">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#margin-bottom">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-bottom">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#margin-bottom">CSS3</ulink></entry>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
@@ -550,8 +550,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-left">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#margin-left">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin-left">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#margin-left">CSS3</ulink></entry>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
@@ -560,8 +560,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-top">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#padding-top">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-top">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#padding-top">CSS3</ulink></entry>
<entry>CSS allows percentages</entry>
</row>
<row>
@@ -570,8 +570,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-right">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#padding-right">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-right">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#padding-right">CSS3</ulink></entry>
<entry>CSS allows percentages</entry>
</row>
<row>
@@ -580,8 +580,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-bottom">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#padding-bottom">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-bottom">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#padding-bottom">CSS3</ulink></entry>
<entry>CSS allows percentages</entry>
</row>
<row>
@@ -590,8 +590,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-left">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#padding-left">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding-left">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#padding-left">CSS3</ulink></entry>
<entry>CSS allows percentages</entry>
</row>
</tbody>
@@ -605,16 +605,16 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>margin</entry>
<entry><code>〈length〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#margin">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#margin">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>padding</entry>
<entry><code>〈length〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-box/#padding">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-box/#padding">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
</tbody>
@@ -636,8 +636,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-width">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-width">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry>CSS allows other values</entry>
</row>
<row>
@@ -646,8 +646,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
<ulink url="http://www.w3.org/css3-background/#the-border-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
<ulink url="https://www.w3.org/css3-background/#the-border-width">CSS3</ulink></entry>
<entry>CSS allows other values</entry>
</row>
<row>
@@ -656,8 +656,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-width">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-width">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry>CSS allows other values</entry>
</row>
<row>
@@ -666,8 +666,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry>CSS allows other values</entry>
</row>
<row>
@@ -676,8 +676,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-style">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-style">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -686,8 +686,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-style">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-style">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -696,8 +696,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-style">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-style">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -706,8 +706,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-style">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-style">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -716,8 +716,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-right-radius">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-right-radius">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -726,8 +726,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-right-radius">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-right-radius">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -736,8 +736,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-left-radius">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-left-radius">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -746,8 +746,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-left-radius">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-left-radius">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-radius">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -756,8 +756,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>currentColor</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-color">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top-color">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -766,8 +766,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>currentColor</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-color">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-color">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -776,8 +776,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>currentColor</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-color">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom-color">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -786,8 +786,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>currentColor</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-color">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-color">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-color">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -796,7 +796,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#the-border-image-source">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#the-border-image-source">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -805,7 +805,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>stretch</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR//css3-background/#the-border-image-repeat">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR//css3-background/#the-border-image-repeat">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -814,7 +814,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>100%</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR//css3-background/#the-border-image-slice">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR//css3-background/#the-border-image-slice">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
@@ -823,7 +823,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>1</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR//css3-background/#the-border-image-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR//css3-background/#the-border-image-width">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
@@ -838,77 +838,77 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>borderwidth</entry>
<entry><code>〈length〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-width">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-width">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>borderstyle</entry>
<entry><code>〈border style〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-style">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-style">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-style">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>bordercolor</entry>
<entry><code>〈color〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#border-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-color">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>bordertop</entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#border-top">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-top">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderleft</entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#border-left">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-left">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderbottom</entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#border-bottom">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-bottom">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderright</entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#border-right">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-right">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>border</entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#border">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderradius</entry>
<entry><code>[ 〈length〉 | 〈percentage〉 ]{1,4} [ / [ 〈length〉 | 〈percentage> ]{1,4} ]?</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#border-radius">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-radius">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderimage</entry>
<entry><code>〈border-image-source〉 || 〈border-image-slice〉 [ / 〈border-image-width〉 | / 〈border-image-width〉? / 〈border-image-outset〉 ]? || 〈border-image-repeat〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#border-image">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-image">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -934,8 +934,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-style">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-ui/#outline-style">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-style">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-ui/#outline-style">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -944,8 +944,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-width">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-ui/#outline-width">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-width">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-ui/#outline-width">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -954,8 +954,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>currentColor</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-color">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-ui/#outline-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline-color">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-ui/#outline-color">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -964,7 +964,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-ui/#outline-offset">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-ui/#outline-offset">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1014,8 +1014,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>outline</entry>
<entry><code>〈outline-color〉 || 〈outline-style〉 || 〈outline-width〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-ui/#propdef-outline">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-ui/#propdef-outline">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1048,8 +1048,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>rgba(0,0,0,0)</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-color">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#background-color">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-color">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#background-color">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1058,7 +1058,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>border-box</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#background-clip">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#background-clip">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1067,7 +1067,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>padding-box</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#background-origin">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#background-origin">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1076,7 +1076,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>auto</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#background-size">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#background-size">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1085,8 +1085,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-position">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#background-position">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-position">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#background-position">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1095,8 +1095,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>repeat</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-repeat">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#background-repeat">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-repeat">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#background-repeat">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1105,8 +1105,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-image">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#background-image">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-image">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#background-image">CSS3</ulink></entry>
<entry>not supported: urls without quotes, CSS radial gradients, colors in crossfades</entry>
</row>
<row>
@@ -1124,7 +1124,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-background/#box-shadow">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#box-shadow">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -1138,8 +1138,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><para>background</para></entry>
<entry><code>[ 〈bg-layer〉 , ]* 〈final-bg-layer〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#background">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#background">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -1181,7 +1181,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>all</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-property">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-property">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1190,7 +1190,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0s</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-duration">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-duration">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1199,7 +1199,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>ease</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-timing-function">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-timing-function">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1208,7 +1208,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0s</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition-delay">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition-delay">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -1222,7 +1222,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>transition</entry>
<entry><code>〈single-transition〉 [ , 〈single-transition〉 ]*</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/css3-transitions/#transition">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -1250,7 +1250,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-name">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-name">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1259,7 +1259,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0s</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-duration">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-duration">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1268,7 +1268,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>ease</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-timing-function">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-timing-function">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1277,7 +1277,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>1</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-iteration-count">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-iteration-count">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1286,7 +1286,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>normal</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-direction">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-direction">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1295,7 +1295,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>running</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-play-state">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-play-state">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1304,7 +1304,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>0s</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-delay">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-delay">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
@@ -1313,7 +1313,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation-fill-mode">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation-fill-mode">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>
@@ -1327,7 +1327,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>animation</entry>
<entry><code>〈singleanimation〉 [ , 〈singleanimation〉]*</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="http://www.w3.org/TR/css3-animations/#animation">CSS3</ulink></entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation">CSS3</ulink></entry>
<entry></entry>
</row>
</tbody>

View File

@@ -256,7 +256,7 @@
<example>
<title>Packing buttons with GtkBuilder</title>
<para>Create a new file with the following content named example-4.c.</para>
<para>Create a new file with the following content named example-3.c.</para>
<programlisting><xi:include href="../../../../examples/builder.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
<para>Create a new file with the following content named builder.ui.</para>
<programlisting><xi:include href="../../../../examples/builder.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
@@ -264,7 +264,7 @@
<para>
You can compile the program above with GCC using:
<literallayout>
<literal>gcc `pkg-config --cflags gtk+-3.0` -o example-4 example-4.c `pkg-config --libs gtk+-3.0`</literal>
<literal>gcc `pkg-config --cflags gtk+-3.0` -o example-3 example-3.c `pkg-config --libs gtk+-3.0`</literal>
</literallayout>
</para>
@@ -1051,7 +1051,7 @@ example_app_window_init (ExampleAppWindow *win)
<para>The contents of a widget often need to be partially or fully redrawn,
e.g. when another window is moved and uncovers part of the widget, or
when tie window containing it is resized. It is also possible to explicitly
when the window containing it is resized. It is also possible to explicitly
cause part or all of the widget to be redrawn, by calling
gtk_widget_queue_draw() or its variants. GTK+ takes care of most of the
details by providing a ready-to-use cairo context to the ::draw signal
@@ -1072,13 +1072,13 @@ example_app_window_init (ExampleAppWindow *win)
<example id="gtk-getting-started-drawing">
<title>Drawing in response to input</title>
<para>Create a new file with the following content named example-3.c.</para>
<para>Create a new file with the following content named example-4.c.</para>
<programlisting><xi:include href="../../../../examples/drawing.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
</example>
<para>
You can compile the program above with GCC using:
<literallayout>
<literal>gcc `pkg-config --cflags gtk+-3.0` -o example-3 example-3.c `pkg-config --libs gtk+-3.0`</literal>
<literal>gcc `pkg-config --cflags gtk+-3.0` -o example-4 example-4.c `pkg-config --libs gtk+-3.0`</literal>
</literallayout>
</para>
</section>

View File

@@ -57,7 +57,8 @@
<varlistentry>
<term><option>simplify</option></term>
<listitem><para>Simplifies the .ui file by removing properties that
are set to their default values and write the resulting XML to stdout.</para></listitem>
are set to their default values and write the resulting XML to stdout,
or back to the input file.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>enumerate</option></term>
@@ -71,6 +72,16 @@
</variablelist>
</refsect1>
<refsect1><title>Simplify Options</title>
<para>The <option>simplify</option> command accepts the following options:</para>
<variablelist>
<varlistentry>
<term><option>--replace</option></term>
<listitem><para>Write the content back to the .ui file instead of stdout.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1><title>Preview Options</title>
<para>The <option>preview</option> command accepts the following options:</para>
<variablelist>

View File

@@ -12,9 +12,9 @@
<releaseinfo>
This document is for the GTK+ 3 library, version &version;.
The latest versions can be found online at
<ulink role="online-location" url="http://developer.gnome.org/gtk3/">http://developer.gnome.org/gtk3/</ulink>.
<ulink role="online-location" url="https://developer.gnome.org/gtk3/">https://developer.gnome.org/gtk3/</ulink>.
If you are looking for the older GTK+ 2 series of libraries,
see <ulink role="online-location" url="http://developer.gnome.org/gtk2/">http://developer.gnome.org/gtk2/</ulink>.
see <ulink role="online-location" url="https://developer.gnome.org/gtk2/">https://developer.gnome.org/gtk2/</ulink>.
</releaseinfo>
</bookinfo>

View File

@@ -2259,6 +2259,7 @@ gtk_menu_set_title
gtk_menu_get_title
gtk_menu_set_monitor
gtk_menu_get_monitor
gtk_menu_place_on_monitor
gtk_menu_get_tearoff_state
gtk_menu_set_reserve_toggle_size
gtk_menu_get_reserve_toggle_size
@@ -3214,35 +3215,39 @@ GtkScrolledWindow
GtkScrolledWindowClass
gtk_scrolled_window_new
gtk_scrolled_window_get_hadjustment
gtk_scrolled_window_set_hadjustment
gtk_scrolled_window_get_vadjustment
gtk_scrolled_window_set_vadjustment
gtk_scrolled_window_get_hscrollbar
gtk_scrolled_window_get_vscrollbar
GtkPolicyType
gtk_scrolled_window_get_policy
gtk_scrolled_window_set_policy
gtk_scrolled_window_add_with_viewport
GtkCornerType
gtk_scrolled_window_get_placement
gtk_scrolled_window_set_placement
gtk_scrolled_window_unset_placement
gtk_scrolled_window_set_shadow_type
gtk_scrolled_window_set_hadjustment
gtk_scrolled_window_set_vadjustment
gtk_scrolled_window_get_placement
gtk_scrolled_window_get_policy
gtk_scrolled_window_get_shadow_type
gtk_scrolled_window_set_shadow_type
gtk_scrolled_window_get_kinetic_scrolling
gtk_scrolled_window_set_kinetic_scrolling
gtk_scrolled_window_get_capture_button_press
gtk_scrolled_window_set_capture_button_press
gtk_scrolled_window_get_overlay_scrolling
gtk_scrolled_window_set_overlay_scrolling
gtk_scrolled_window_get_min_content_width
gtk_scrolled_window_set_min_content_width
gtk_scrolled_window_get_min_content_height
gtk_scrolled_window_set_min_content_height
gtk_scrolled_window_set_kinetic_scrolling
gtk_scrolled_window_get_kinetic_scrolling
gtk_scrolled_window_set_capture_button_press
gtk_scrolled_window_get_capture_button_press
gtk_scrolled_window_set_overlay_scrolling
gtk_scrolled_window_get_overlay_scrolling
gtk_scrolled_window_set_propagate_natural_width
gtk_scrolled_window_get_max_content_width
gtk_scrolled_window_set_max_content_width
gtk_scrolled_window_get_max_content_height
gtk_scrolled_window_set_max_content_height
gtk_scrolled_window_get_propagate_natural_width
gtk_scrolled_window_set_propagate_natural_height
gtk_scrolled_window_set_propagate_natural_width
gtk_scrolled_window_get_propagate_natural_height
gtk_scrolled_window_set_propagate_natural_height
<SUBSECTION Standard>
GTK_SCROLLED_WINDOW
@@ -7077,7 +7082,7 @@ GtkPrintOperationPrivate
<SECTION>
<INCLUDE>gtk/gtkprintunixdialog.h</INCLUDE>
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkprintunixdialog</FILE>
<TITLE>GtkPrintUnixDialog</TITLE>
GtkPrintUnixDialog
@@ -7424,7 +7429,7 @@ gtk_print_context_get_type
<SECTION>
<INCLUDE>gtk/gtkprintjob.h</INCLUDE>
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkprintjob</FILE>
<TITLE>GtkPrintJob</TITLE>
GtkPrintJob
@@ -7434,6 +7439,7 @@ gtk_print_job_get_settings
gtk_print_job_get_printer
gtk_print_job_get_title
gtk_print_job_get_status
gtk_print_job_set_source_fd
gtk_print_job_set_source_file
gtk_print_job_get_surface
gtk_print_job_send
@@ -7475,7 +7481,7 @@ gtk_print_job_get_type
<SECTION>
<INCLUDE>gtk/gtkpagesetupunixdialog.h</INCLUDE>
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkpagesetupunixdialog</FILE>
<TITLE>GtkPageSetupUnixDialog</TITLE>
GtkPageSetupUnixDialog
@@ -7533,7 +7539,7 @@ gtk_mount_operation_get_parent
gtk_mount_operation_set_screen
gtk_mount_operation_get_screen
gtk_show_uri
gtk_show_uri_on_parent
gtk_show_uri_on_window
<SUBSECTION Standard>
GTK_IS_MOUNT_OPERATION
GTK_IS_MOUNT_OPERATION_CLASS
@@ -8093,6 +8099,7 @@ GtkFlowBox
gtk_flow_box_new
gtk_flow_box_insert
gtk_flow_box_get_child_at_index
gtk_flow_box_get_child_at_pos
gtk_flow_box_set_hadjustment
gtk_flow_box_set_vadjustment

View File

@@ -184,8 +184,9 @@
<listitem>If you are opening a document or URI by launching a command
like <literal>firefox http://my-favourite-website.com</literal> or
<literal>gnome-open ghelp:epiphany</literal>, it is best to just use
gtk_show_uri(); as an added benefit, your application will henceforth
respect the users preference for what application to use.</listitem>
gtk_show_uri_on_window(); as an added benefit, your application will
henceforth respect the users preference for what application to use and
correctly open links in sandboxed applications.</listitem>
<listitem>If you are launching a regular, installed application that
has a desktop file, it is best to use GIOs #GAppInfo with a suitable
launch context.

View File

@@ -415,7 +415,7 @@
<para>
It is worth mentioning that the new file format does not support
custom keybindings nor stock icon mappings as the RC format did.
stock icon mappings as the RC format did.
</para>
</section>

View File

@@ -35,11 +35,11 @@ How do I get started with GTK+?
</para></question>
<answer><para>
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers some
<ulink url="http://www.gtk.org/documentation.php">tutorials</ulink> and other
The GTK+ <ulink url="https://www.gtk.org">website</ulink> offers some
<ulink url="https://www.gtk.org/documentation.php">tutorials</ulink> and other
documentation (most of it about GTK+ 2.x, but mostly still applicable).
More documentation ranging from whitepapers to online books can be found at
the <ulink url="http://developer.gnome.org">GNOME developer's site</ulink>.
the <ulink url="https://developer.gnome.org">GNOME developer's site</ulink>.
After studying these materials you should be well prepared to come back to
this reference manual for details.
</para></answer>
@@ -77,7 +77,7 @@ specific widgets and functions.
<para>
If you have a question not covered in the manual, feel free to
ask on the mailing lists and please <ulink
url="http://bugzilla.gnome.org">file a bug report</ulink> against the
url="https://bugzilla.gnome.org">file a bug report</ulink> against the
documentation.
</para>
@@ -106,7 +106,7 @@ For strings returned from functions, they will be declared "const"
if they should not be freed. Non-const strings should be
freed with g_free(). Arrays follow the same rule. If you find an
undocumented exception to the rules, please report a bug to <ulink
url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.
url="https://bugzilla.gnome.org">https://bugzilla.gnome.org</ulink>.
</para>
</answer>
@@ -180,7 +180,7 @@ How do I internationalize a GTK+ program?
<answer>
<para>
Most people use <ulink url="http://www.gnu.org/software/gettext/">GNU
Most people use <ulink url="https://www.gnu.org/software/gettext/">GNU
gettext</ulink>, already required in order to install GLib. On a UNIX
or Linux system with gettext installed, type <literal>info gettext</literal>
to read the documentation.
@@ -281,7 +281,7 @@ zero-terminated strings.
</para></listitem>
</itemizedlist>
More information about Unicode and UTF-8 can be found in the
<ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode
<ulink url="https://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode
FAQ for Unix/Linux</ulink>.
GLib provides functions for converting strings between UTF-8 and other
encodings, see g_locale_to_utf8() and g_convert().
@@ -376,7 +376,7 @@ How do I use GTK+ with C++?
There are two ways to approach this. The GTK+ header files use the subset
of C that's also valid C++, so you can simply use the normal GTK+ API
in a C++ program. Alternatively, you can use a "C++ binding"
such as <ulink url="http://gtkmm.sourceforge.net/">gtkmm</ulink>
such as <ulink url="https://www.gtkmm.org/">gtkmm</ulink>
which provides a native C++ API.
</para>
<para>
@@ -415,9 +415,9 @@ How do I use GTK+ with other non-C languages?
<answer>
<para>
See the <ulink url="http://www.gtk.org/language-bindings.php">list of language
See the <ulink url="https://www.gtk.org/language-bindings.php">list of language
bindings</ulink> on <ulink
url="http://www.gtk.org">http://www.gtk.org</ulink>.
url="https://www.gtk.org">https://www.gtk.org</ulink>.
</para>
</answer>
@@ -473,8 +473,8 @@ To draw a piece of text, use a Pango layout and pango_cairo_show_layout().
<para>
See also the
<ulink url="http://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html">Cairo Rendering</ulink>
section of <ulink url="http://developer.gnome.org/pango/stable/">Pango manual</ulink>.
<ulink url="https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html">Cairo Rendering</ulink>
section of <ulink url="https://developer.gnome.org/pango/stable/">Pango manual</ulink>.
</para>
</answer>
@@ -505,8 +505,8 @@ pango_layout_get_pixel_size(), using code like the following:
<para>
See also the
<ulink url="http://developer.gnome.org/pango/stable/pango-Layout-Objects.html">Layout Objects</ulink>
section of <ulink url="http://developer.gnome.org/pango/stable/">Pango manual</ulink>.
<ulink url="https://developer.gnome.org/pango/stable/pango-Layout-Objects.html">Layout Objects</ulink>
section of <ulink url="https://developer.gnome.org/pango/stable/">Pango manual</ulink>.
</para>
</answer>
</qandaentry>

View File

@@ -22,7 +22,7 @@ Getting help with GTK+
<para>
If you encounter a bug, misfeature, or missing feature in GTK+, please
file a bug report on
<ulink url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.
<ulink url="https://bugzilla.gnome.org">https://bugzilla.gnome.org</ulink>.
We'd also appreciate reports of incomplete or misleading information in
the GTK+ documentation; file those against the "docs" component of the "gtk+"
product in Bugzilla.
@@ -72,7 +72,7 @@ There are several mailing lists dedicated to GTK+ and related
libraries. Discussion of GLib, Pango, and ATK in addition to GTK+
proper is welcome on these lists. You can subscribe or view the
archives of these lists on
<ulink url="http://mail.gnome.org">http://mail.gnome.org</ulink>.
<ulink url="https://mail.gnome.org">http://mail.gnome.org</ulink>.
If you aren't subscribed to the list, any message you post to
the list will be held for manual moderation, which might take
some days to happen.

View File

@@ -522,15 +522,30 @@ nevertheless.
</para>
</formalpara>
<formalpara>
<title><envar>GTK_CSD</envar></title>
<para>
The default value of this environment variable is 1. If changed to 0, this
disables the default use of client-side decorations on GTK+ windows, thus
making the window manager responsible for drawing the decorations of
windows that do not have a custom titlebar widget.
</para>
<para>
CSD is always used for windows with a custom titlebar widget set, as the WM
should not draw another titlebar or other decorations around the custom one.
</para>
</formalpara>
<formalpara>
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
<para>
GTK+ uses these environment variables to locate icon themes
and MIME information. For more information, see
<ulink url="http://freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</ulink>,
the <ulink url="http://freedesktop.org/Standards/shared-mime-info-spec">Shared MIME-info Database</ulink>
and the <ulink url="http://freedesktop.org/Standards/basedir-spec">Base Directory Specification</ulink>.
<ulink url="https://freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</ulink>,
the <ulink url="https://freedesktop.org/Standards/shared-mime-info-spec">Shared MIME-info Database</ulink>
and the <ulink url="https://freedesktop.org/Standards/basedir-spec">Base Directory Specification</ulink>.
</para>
</formalpara>
@@ -539,7 +554,7 @@ nevertheless.
<para>
GTK+ uses this environment variable to provide startup notification
according to the <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup Notification Spec</ulink>.
according to the <ulink url="https://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup Notification Spec</ulink>.
Following the specification, GTK+ unsets this variable after reading
it (to keep it from leaking to child processes). So, if you need its
value for your own purposes, you have to read it before calling

View File

@@ -148,13 +148,10 @@ displays after the widget is created with gtk_text_view_set_buffer().
<para>
There are two ways to affect text attributes in #GtkTextView.
You can change the default attributes for a given #GtkTextView, and you can
apply tags that change the attributes for a region of text. For text features
that come from the theme &mdash; such as font and foreground color &mdash; use
standard #GtkWidget functions such as gtk_widget_modify_font() or
gtk_widget_override_color(). For other attributes there are dedicated methods on
#GtkTextView such as gtk_text_view_set_tabs().
The way to affect text attributes in #GtkTextView is to
apply tags that change the attributes for a region of text.
For text features that come from the theme &mdash; such as font and
foreground color &mdash; use CSS to override their default values.
<informalexample><programlisting>
GtkWidget *view;
@@ -163,6 +160,8 @@ gtk_widget_override_color(). For other attributes there are dedicated methods on
PangoFontDescription *font_desc;
GdkRGBA rgba;
GtkTextTag *tag;
GtkCssProvider *provider;
GtkStyleContext *context;
view = gtk_text_view_new (<!-- -->);
@@ -170,14 +169,19 @@ gtk_widget_override_color(). For other attributes there are dedicated methods on
gtk_text_buffer_set_text (buffer, "Hello, this is some text", -1);
/* Change default font throughout the widget */
font_desc = pango_font_description_from_string ("Serif 15");
gtk_widget_modify_font (view, font_desc);
pango_font_description_free (font_desc);
/* Change default color throughout the widget */
gdk_rgba_parse ("green", &amp;rgba);
gtk_widget_override_color (view, GTK_STATE_FLAG_NORMAL, &amp;rgba);
/* Change default font and color throughout the widget */
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider,
"textview {"
" font: 15 serif;"
" color: green;"
"}",
-1,
NULL);
context = gtk_widget_get_style_context (view);
gtk_style_context_add_provider (context,
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
/* Change left margin throughout the widget */
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);

View File

@@ -32,7 +32,7 @@ options or environment variables.
<para>
For up-to-date information about the current status of this backend, see
the <ulink url="http://wayland.freedesktop.org/gtk.html">project page</ulink>.
the <ulink url="https://wiki.gnome.org/Initiatives/Wayland/GTK%2B">project page</ulink>.
</para>
</refsect1>

View File

@@ -28,7 +28,8 @@ noinst_PROGRAMS = \
grid-packing \
drawing \
builder \
search-bar
search-bar \
listbox-dnd
EXTRA_DIST = builder.ui

View File

@@ -125,8 +125,6 @@ close_window (void)
{
if (surface)
cairo_surface_destroy (surface);
gtk_main_quit ();
}
static void

155
examples/listbox-dnd.c Normal file
View File

@@ -0,0 +1,155 @@
#include <gtk/gtk.h>
static GtkTargetEntry entries[] = {
{ "GTK_LIST_BOX_ROW", GTK_TARGET_SAME_APP, 0 }
};
static void
drag_begin (GtkWidget *widget,
GdkDragContext *context,
gpointer data)
{
GtkWidget *row;
GtkAllocation alloc;
cairo_surface_t *surface;
cairo_t *cr;
int x, y;
row = gtk_widget_get_ancestor (widget, GTK_TYPE_LIST_BOX_ROW);
gtk_widget_get_allocation (row, &alloc);
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, alloc.width, alloc.height);
cr = cairo_create (surface);
gtk_style_context_add_class (gtk_widget_get_style_context (row), "drag-icon");
gtk_widget_draw (row, cr);
gtk_style_context_remove_class (gtk_widget_get_style_context (row), "drag-icon");
gtk_widget_translate_coordinates (widget, row, 0, 0, &x, &y);
cairo_surface_set_device_offset (surface, -x, -y);
gtk_drag_set_icon_surface (context, surface);
cairo_destroy (cr);
cairo_surface_destroy (surface);
}
void
drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
guint time,
gpointer data)
{
gtk_selection_data_set (selection_data,
gdk_atom_intern_static_string ("GTK_LIST_BOX_ROW"),
32,
(const guchar *)&widget,
sizeof (gpointer));
}
static void
drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection_data,
guint info,
guint32 time,
gpointer data)
{
GtkWidget *target;
GtkWidget *row;
GtkWidget *source;
int pos;
target = widget;
pos = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (target));
row = (gpointer)* (gpointer*)gtk_selection_data_get_data (selection_data);
source = gtk_widget_get_ancestor (row, GTK_TYPE_LIST_BOX_ROW);
if (source == target)
return;
g_object_ref (source);
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (source)), source);
gtk_list_box_insert (GTK_LIST_BOX (gtk_widget_get_parent (target)), source, pos);
g_object_unref (source);
}
static GtkWidget *
create_row (const gchar *text)
{
GtkWidget *row, *handle, *box, *label, *image;
row = gtk_list_box_row_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
g_object_set (box, "margin-start", 10, "margin-end", 10, NULL);
gtk_container_add (GTK_CONTAINER (row), box);
handle = gtk_event_box_new ();
image = gtk_image_new_from_icon_name ("open-menu-symbolic", 1);
gtk_container_add (GTK_CONTAINER (handle), image);
gtk_container_add (GTK_CONTAINER (box), handle);
label = gtk_label_new (text);
gtk_container_add_with_properties (GTK_CONTAINER (box), label, "expand", TRUE, NULL);
gtk_drag_source_set (handle, GDK_BUTTON1_MASK, entries, 1, GDK_ACTION_MOVE);
g_signal_connect (handle, "drag-begin", G_CALLBACK (drag_begin), NULL);
g_signal_connect (handle, "drag-data-get", G_CALLBACK (drag_data_get), NULL);
gtk_drag_dest_set (row, GTK_DEST_DEFAULT_ALL, entries, 1, GDK_ACTION_MOVE);
g_signal_connect (row, "drag-data-received", G_CALLBACK (drag_data_received), NULL);
return row;
}
static const char *css =
".drag-icon { "
" background: white; "
" border: 1px solid black; "
"}";
int
main (int argc, char *argv[])
{
GtkWidget *window, *list, *sw, *row;
gint i;
gchar *text;
GtkCssProvider *provider;
gtk_init (NULL, NULL);
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider, css, -1, NULL);
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), -1, 300);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_hexpand (sw, TRUE);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
gtk_container_add (GTK_CONTAINER (window), sw);
list = gtk_list_box_new ();
gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_NONE);
gtk_container_add (GTK_CONTAINER (sw), list);
for (i = 0; i < 20; i++)
{
text = g_strdup_printf ("Row %d", i);
row = create_row (text);
gtk_list_box_insert (GTK_LIST_BOX (list), row, -1);
}
gtk_widget_show_all (window);
gtk_main ();
return 0;
}

View File

@@ -440,12 +440,17 @@ gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template
# Marshaller generation
#
gdkmarshalers.h: gdkmarshalers.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_gdk_marshal \
--header \
$(srcdir)/gdkmarshalers.list > gdkmarshalers-h.tmp \
&& mv gdkmarshalers-h.tmp gdkmarshalers.h \
|| ( rm -f gdkmarshalers-h.tmp && exit 1)
gdkmarshalers.c: gdkmarshalers.list
$(AM_V_GEN) (echo "#include \"gdkmarshalers.h\""; \
$(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_gdk_marshal \
--body \
$(srcdir)/gdkmarshalers.list > gdkmarshalers-c.tmp \
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )
@@ -459,29 +464,20 @@ stamp-gc-h: $(top_builddir)/config.status
#
# Resources
#
glsl_sources := $(wildcard $(srcdir)/resources/glsl/*.glsl)
gdk.gresource.xml: Makefile.am
$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
echo "<gresources>" >> $@; \
echo " <gresource prefix='/org/gtk/libgdk'>" >> $@; \
for f in $(srcdir)/resources/glsl/*.glsl; do \
for f in $(glsl_sources); do \
n=`basename $$f`; \
echo " <file alias='glsl/$$n'>resources/glsl/$$n</file>" >> $@; \
done; \
echo " </gresource>" >> $@; \
echo "</gresources>" >> $@;
glsl_sources = \
resources/glsl/gl3-texture-2d.fs.glsl \
resources/glsl/gl3-texture-2d.vs.glsl \
resources/glsl/gl3-texture-rect.fs.glsl \
resources/glsl/gl3-texture-rect.vs.glsl \
resources/glsl/gl2-texture-2d.fs.glsl \
resources/glsl/gl2-texture-2d.fs.glsl \
resources/glsl/gl2-texture-rect.vs.glsl \
resources/glsl/gl2-texture-rect.vs.glsl \
resources/glsl/gles2-texture.fs.glsl \
resources/glsl/gles2-texture.vs.glsl
EXTRA_DIST += $(glsl_sources)
CLEANFILES += gdk.gresource.xml

View File

@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DG_LOG_USE_STRUCTURED=1 \
-DGDK_COMPILATION \
-DGDK_DISABLE_DEPRECATION_WARNINGS \
-I$(top_srcdir) \
-I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \

View File

@@ -17,6 +17,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <float.h>
#ifndef HAVE_DECL_ISNAN

View File

@@ -162,8 +162,10 @@ gdk_app_launch_context_get_display (GAppLaunchContext *context,
GdkAppLaunchContext *ctx = GDK_APP_LAUNCH_CONTEXT (context);
GdkDisplay *display;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (ctx->screen)
return gdk_screen_make_display_name (ctx->screen);
G_GNUC_END_IGNORE_DEPRECATIONS
if (ctx->display)
display = ctx->display;

View File

@@ -1708,6 +1708,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
device_width = axis_info_x->max_value - axis_info_x->min_value;
device_height = axis_info_y->max_value - axis_info_y->min_value;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (device_width > 0)
x_min = axis_info_x->min_value;
else
@@ -1723,6 +1724,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
device_height = gdk_screen_get_height (gdk_window_get_screen (window));
y_min = 0;
}
G_GNUC_END_IGNORE_DEPRECATIONS
window_width = gdk_window_get_width (window);
window_height = gdk_window_get_height (window);
@@ -1805,6 +1807,7 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
axis_width = axis_info.max_value - axis_info.min_value;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (axis_info.use == GDK_AXIS_X)
{
if (axis_width > 0)
@@ -1823,6 +1826,7 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
offset = - window_root_y - window->abs_y;
}
G_GNUC_END_IGNORE_DEPRECATIONS
if (axis_value)
*axis_value = offset + scale * (value - axis_info.min_value);

View File

@@ -2301,41 +2301,38 @@ void
gdk_error_trap_push (void)
{
GdkDisplayManager *manager;
GdkDisplayClass *class;
GdkGlobalErrorTrap *trap;
GSList *displays;
GSList *l;
manager = gdk_display_manager_get ();
class = GDK_DISPLAY_GET_CLASS (gdk_display_manager_get_default_display (manager));
displays = gdk_display_manager_list_displays (manager);
if (class->push_error_trap == NULL)
return;
trap = g_slice_new0 (GdkGlobalErrorTrap);
for (l = displays; l != NULL; l = l->next)
{
GdkDisplay *display = l->data;
GdkDisplayClass *class = GDK_DISPLAY_GET_CLASS (display);
trap = g_slice_new (GdkGlobalErrorTrap);
trap->displays = gdk_display_manager_list_displays (manager);
g_slist_foreach (trap->displays, (GFunc) g_object_ref, NULL);
for (l = trap->displays; l != NULL; l = l->next)
class->push_error_trap (l->data);
if (class->push_error_trap != NULL)
{
class->push_error_trap (display);
trap->displays = g_slist_prepend (trap->displays, g_object_ref (display));
}
}
g_queue_push_head (&gdk_error_traps, trap);
g_slist_free (displays);
}
static gint
gdk_error_trap_pop_internal (gboolean need_code)
{
GdkDisplayManager *manager;
GdkDisplayClass *class;
GdkGlobalErrorTrap *trap;
gint result;
GSList *l;
manager = gdk_display_manager_get ();
class = GDK_DISPLAY_GET_CLASS (gdk_display_manager_get_default_display (manager));
if (class->pop_error_trap == NULL)
return 0;
trap = g_queue_pop_head (&gdk_error_traps);
g_return_val_if_fail (trap != NULL, 0);
@@ -2343,9 +2340,9 @@ gdk_error_trap_pop_internal (gboolean need_code)
result = 0;
for (l = trap->displays; l != NULL; l = l->next)
{
gint code = 0;
code = class->pop_error_trap (l->data, !need_code);
GdkDisplay *display = l->data;
GdkDisplayClass *class = GDK_DISPLAY_GET_CLASS (display);
gint code = class->pop_error_trap (display, !need_code);
/* we use the error on the last display listed, why not. */
if (code != 0)
@@ -2553,12 +2550,14 @@ get_fallback_monitor (GdkDisplay *display)
}
screen = gdk_display_get_default_screen (display);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdk_monitor_set_size (monitor,
gdk_screen_get_width (screen),
gdk_screen_get_height (screen));
gdk_monitor_set_physical_size (monitor,
gdk_screen_get_width_mm (screen),
gdk_screen_get_height_mm (screen));
G_GNUC_END_IGNORE_DEPRECATIONS
return monitor;
}

View File

@@ -273,12 +273,12 @@ static GdkBackend gdk_backends[] = {
#ifdef GDK_WINDOWING_WAYLAND
{ "wayland", _gdk_wayland_display_open },
#endif
#ifdef GDK_WINDOWING_MIR
{ "mir", _gdk_mir_display_open },
#endif
#ifdef GDK_WINDOWING_X11
{ "x11", _gdk_x11_display_open },
#endif
#ifdef GDK_WINDOWING_MIR
{ "mir", _gdk_mir_display_open },
#endif
#ifdef GDK_WINDOWING_BROADWAY
{ "broadway", _gdk_broadway_display_open },
#endif

View File

@@ -520,21 +520,38 @@ typedef enum
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
* @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
* @GDK_WINDOW_STATE_TILED: the window is in a tiled state, Since 3.10
* @GDK_WINDOW_STATE_TILED: the window is in a tiled state, Since 3.10. Since 3.22.23, this
* is deprecated in favor of per-edge information.
* @GDK_WINDOW_STATE_TOP_TILED: whether the top edge is tiled, Since 3.22.23
* @GDK_WINDOW_STATE_TOP_RESIZABLE: whether the top edge is resizable, Since 3.22.23
* @GDK_WINDOW_STATE_RIGHT_TILED: whether the right edge is tiled, Since 3.22.23
* @GDK_WINDOW_STATE_RIGHT_RESIZABLE: whether the right edge is resizable, Since 3.22.23
* @GDK_WINDOW_STATE_BOTTOM_TILED: whether the bottom edge is tiled, Since 3.22.23
* @GDK_WINDOW_STATE_BOTTOM_RESIZABLE: whether the bottom edge is resizable, Since 3.22.23
* @GDK_WINDOW_STATE_LEFT_TILED: whether the left edge is tiled, Since 3.22.23
* @GDK_WINDOW_STATE_LEFT_RESIZABLE: whether the left edge is resizable, Since 3.22.23
*
* Specifies the state of a toplevel window.
*/
typedef enum
{
GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
GDK_WINDOW_STATE_ICONIFIED = 1 << 1,
GDK_WINDOW_STATE_MAXIMIZED = 1 << 2,
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6,
GDK_WINDOW_STATE_FOCUSED = 1 << 7,
GDK_WINDOW_STATE_TILED = 1 << 8
GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
GDK_WINDOW_STATE_ICONIFIED = 1 << 1,
GDK_WINDOW_STATE_MAXIMIZED = 1 << 2,
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6,
GDK_WINDOW_STATE_FOCUSED = 1 << 7,
GDK_WINDOW_STATE_TILED = 1 << 8,
GDK_WINDOW_STATE_TOP_TILED = 1 << 9,
GDK_WINDOW_STATE_TOP_RESIZABLE = 1 << 10,
GDK_WINDOW_STATE_RIGHT_TILED = 1 << 11,
GDK_WINDOW_STATE_RIGHT_RESIZABLE = 1 << 12,
GDK_WINDOW_STATE_BOTTOM_TILED = 1 << 13,
GDK_WINDOW_STATE_BOTTOM_RESIZABLE = 1 << 14,
GDK_WINDOW_STATE_LEFT_TILED = 1 << 15,
GDK_WINDOW_STATE_LEFT_RESIZABLE = 1 << 16
} GdkWindowState;
/**

View File

@@ -409,6 +409,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
alpha_size == 0 &&
direct_window != NULL &&
direct_window->current_paint.use_gl &&
gdk_gl_context_has_framebuffer_blit (paint_context) &&
trivial_transform &&
clip_region != NULL)
{

View File

@@ -105,7 +105,8 @@ typedef struct {
guint debug_enabled : 1;
guint forward_compatible : 1;
guint is_legacy : 1;
guint use_es : 1;
int use_es;
GdkGLContextPaintData *paint_data;
} GdkGLContextPrivate;
@@ -153,6 +154,7 @@ gdk_gl_context_finalize (GObject *gobject)
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
g_clear_pointer (&priv->paint_data, g_free);
G_OBJECT_CLASS (gdk_gl_context_parent_class)->finalize (gobject);
}
static void
@@ -362,6 +364,9 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
static void
gdk_gl_context_init (GdkGLContext *self)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
priv->use_es = -1;
}
/*< private >
@@ -572,7 +577,7 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
/* Enforce a minimum context version number of 3.2 */
version = (major * 100) + minor;
if (priv->use_es || (_gdk_gl_flags & GDK_GL_GLES) != 0)
if (priv->use_es > 0 || (_gdk_gl_flags & GDK_GL_GLES) != 0)
min_ver = 200;
else
min_ver = 302;
@@ -608,7 +613,7 @@ gdk_gl_context_get_required_version (GdkGLContext *context,
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
if (priv->use_es || (_gdk_gl_flags & GDK_GL_GLES) != 0)
if (priv->use_es > 0 || (_gdk_gl_flags & GDK_GL_GLES) != 0)
{
default_major = 2;
default_minor = 0;
@@ -683,13 +688,18 @@ gdk_gl_context_set_is_legacy (GdkGLContext *context,
/**
* gdk_gl_context_set_use_es:
* @context: a #GdkGLContext:
* @use_es: whether the context should use OpenGL ES instead of OpenGL
* @use_es: whether the context should use OpenGL ES instead of OpenGL,
* or -1 to allow auto-detection
*
* Requests that GDK create a OpenGL ES context instead of an OpenGL one,
* if the platform and windowing system allows it.
*
* The @context must not have been realized.
*
* By default, GDK will attempt to automatically detect whether the
* underlying GL implementation is OpenGL or OpenGL ES once the @context
* is realized.
*
* You should check the return value of gdk_gl_context_get_use_es() after
* calling gdk_gl_context_realize() to decide whether to use the OpenGL or
* OpenGL ES API, extensions, or shaders.
@@ -698,14 +708,15 @@ gdk_gl_context_set_is_legacy (GdkGLContext *context,
*/
void
gdk_gl_context_set_use_es (GdkGLContext *context,
gboolean use_es)
int use_es)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
g_return_if_fail (!priv->realized);
priv->use_es = !!use_es;
if (priv->use_es != use_es)
priv->use_es = use_es;
}
/**
@@ -725,7 +736,10 @@ gdk_gl_context_get_use_es (GdkGLContext *context)
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
return priv->use_es;
if (!priv->realized)
return FALSE;
return priv->use_es > 0;
}
/**
@@ -769,9 +783,11 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
if (priv->extensions_checked)
return;
priv->use_es = !epoxy_is_desktop_gl ();
priv->gl_version = epoxy_gl_version ();
if (priv->use_es < 0)
priv->use_es = !epoxy_is_desktop_gl ();
if (priv->use_es)
{
has_npot = priv->gl_version >= 20;
@@ -796,6 +812,10 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
priv->has_gl_framebuffer_blit = epoxy_has_gl_extension ("GL_EXT_framebuffer_blit");
priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator");
priv->has_unpack_subimage = TRUE;
/* We asked for a core profile, but we didn't get one, so we're in legacy mode */
if (priv->gl_version < 32)
priv->is_legacy = TRUE;
}
if (!priv->use_es && G_UNLIKELY (_gdk_gl_flags & GDK_GL_TEXTURE_RECTANGLE))
@@ -808,7 +828,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
g_warning ("GL implementation doesn't support any form of non-power-of-two textures");
GDK_NOTE (OPENGL,
g_message ("%s version: %d.%d\n"
g_message ("%s version: %d.%d (%s)\n"
"* GLSL version: %s\n"
"* Extensions checked:\n"
" - GL_ARB_texture_non_power_of_two: %s\n"
" - GL_ARB_texture_rectangle: %s\n"
@@ -817,6 +838,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
"* Using texture rectangle: %s",
priv->use_es ? "OpenGL ES" : "OpenGL",
priv->gl_version / 10, priv->gl_version % 10,
priv->is_legacy ? "legacy" : "core",
glGetString (GL_SHADING_LANGUAGE_VERSION),
has_npot ? "yes" : "no",
has_texture_rectangle ? "yes" : "no",
priv->has_gl_framebuffer_blit ? "yes" : "no",

View File

@@ -75,7 +75,7 @@ GDK_AVAILABLE_IN_3_16
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
GDK_AVAILABLE_IN_3_22
void gdk_gl_context_set_use_es (GdkGLContext *context,
gboolean use_es);
int use_es);
GDK_AVAILABLE_IN_3_22
gboolean gdk_gl_context_get_use_es (GdkGLContext *context);

View File

@@ -386,6 +386,8 @@ struct _GdkWindow
GdkWindowInvalidateHandlerFunc invalidate_handler;
GdkDrawingContext *drawing_context;
cairo_region_t *opaque_region;
};
#define GDK_WINDOW_TYPE(d) ((((GdkWindow *)(d)))->window_type)

View File

@@ -104,14 +104,14 @@ GDK_DEPRECATED_IN_3_0_FOR(gdk_display_device_is_grabbed)
gboolean gdk_pointer_is_grabbed (void);
#endif /* GDK_MULTIDEVICE_SAFE */
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_width (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_height (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_width_mm (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_height_mm (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL

View File

@@ -150,7 +150,7 @@ parse_rgb_value (const gchar *str,
*
* Where “r”, “g”, “b” and “a” are respectively the red, green, blue and
* alpha color values. In the last two cases, r g and b are either integers
* in the range 0 to 255 or precentage values in the range 0% to 100%, and
* in the range 0 to 255 or percentage values in the range 0% to 100%, and
* a is a floating point value in the range 0 to 1.
*
* Returns: %TRUE if the parsing succeeded

View File

@@ -222,6 +222,8 @@ get_monitor_num (GdkMonitor *monitor)
* a monitor close to (@x,@y) if the point is not in any monitor.
*
* Since: 2.2
*
* Deprecated: 3.22: Use gdk_display_get_monitor_at_point() instead
**/
gint
gdk_screen_get_monitor_at_point (GdkScreen *screen,
@@ -251,6 +253,8 @@ gdk_screen_get_monitor_at_point (GdkScreen *screen,
* close to @window.
*
* Since: 2.2
*
* Deprecated: 3.22: Use gdk_display_get_monitor_at_window() instead
**/
gint
gdk_screen_get_monitor_at_window (GdkScreen *screen,
@@ -275,11 +279,15 @@ gdk_screen_get_monitor_at_window (GdkScreen *screen,
* gdk_screen_get_monitor_scale_factor()).
*
* Returns: the width of the default screen in pixels.
*
* Deprecated: 3.22: Use per-monitor information
**/
gint
gdk_screen_width (void)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gdk_screen_get_width (gdk_screen_get_default ());
G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
@@ -290,11 +298,15 @@ gdk_screen_width (void)
* gdk_screen_get_monitor_scale_factor()).
*
* Returns: the height of the default screen in pixels.
*
* Deprecated: 3.22: Use per-monitor information
**/
gint
gdk_screen_height (void)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gdk_screen_get_height (gdk_screen_get_default ());
G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
@@ -305,11 +317,15 @@ gdk_screen_height (void)
*
* Returns: the width of the default screen in millimeters,
* though it is not always correct.
*
* Deprecated: 3.22: Use per-monitor information
**/
gint
gdk_screen_width_mm (void)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gdk_screen_get_width_mm (gdk_screen_get_default ());
G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
@@ -320,11 +336,15 @@ gdk_screen_width_mm (void)
*
* Returns: the height of the default screen in millimeters,
* though it is not always correct.
*
* Deprecated: 3.22: Use per-monitor information
**/
gint
gdk_screen_height_mm (void)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gdk_screen_get_height_mm (gdk_screen_get_default ());
G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
@@ -529,6 +549,8 @@ gdk_screen_get_display (GdkScreen *screen)
* Returns: the width of @screen in pixels.
*
* Since: 2.2
*
* Deprecated: 3.22: Use per-monitor information instead
**/
gint
gdk_screen_get_width (GdkScreen *screen)
@@ -549,6 +571,8 @@ gdk_screen_get_width (GdkScreen *screen)
* Returns: the height of @screen in pixels.
*
* Since: 2.2
*
* Deprecated: 3.22: Use per-monitor information instead
**/
gint
gdk_screen_get_height (GdkScreen *screen)
@@ -571,6 +595,8 @@ gdk_screen_get_height (GdkScreen *screen)
* Returns: the width of @screen in millimeters.
*
* Since: 2.2
*
* Deprecated: 3.22: Use per-monitor information instead
**/
gint
gdk_screen_get_width_mm (GdkScreen *screen)
@@ -592,6 +618,8 @@ gdk_screen_get_width_mm (GdkScreen *screen)
*
* Returns: the heigth of @screen in millimeters.
*
* Deprecated: 3.22: Use per-monitor information instead
*
* Since: 2.2
**/
gint
@@ -612,6 +640,8 @@ gdk_screen_get_height_mm (GdkScreen *screen)
* Returns: the index
*
* Since: 2.2
*
* Deprecated: 3.22
**/
gint
gdk_screen_get_number (GdkScreen *screen)
@@ -658,6 +688,8 @@ get_monitor (GdkScreen *screen,
* Returns: number of monitors which @screen consists of
*
* Since: 2.2
*
* Deprecated: 3.22: Use gdk_display_get_n_monitors() instead
*/
gint
gdk_screen_get_n_monitors (GdkScreen *screen)
@@ -686,6 +718,8 @@ gdk_screen_get_n_monitors (GdkScreen *screen)
* Returns: An integer index for the primary monitor, or 0 if none is configured.
*
* Since: 2.20
*
* Deprecated: 3.22: Use gdk_display_get_primary_monitor() instead
*/
gint
gdk_screen_get_primary_monitor (GdkScreen *screen)
@@ -713,6 +747,8 @@ gdk_screen_get_primary_monitor (GdkScreen *screen)
* Returns: the width of the monitor, or -1 if not available
*
* Since: 2.14
*
* Deprecated: 3.22: Use gdk_monitor_get_width_mm() instead
*/
gint
gdk_screen_get_monitor_width_mm (GdkScreen *screen,
@@ -739,6 +775,8 @@ gdk_screen_get_monitor_width_mm (GdkScreen *screen,
* Returns: the height of the monitor, or -1 if not available
*
* Since: 2.14
*
* Deprecated: 3.22: Use gdk_monitor_get_height_mm() instead
*/
gint
gdk_screen_get_monitor_height_mm (GdkScreen *screen,
@@ -768,6 +806,8 @@ gdk_screen_get_monitor_height_mm (GdkScreen *screen,
* of the monitor, or %NULL if the name cannot be determined
*
* Since: 2.14
*
* Deprecated: 3.22: Use gdk_monitor_get_model() instead
*/
gchar *
gdk_screen_get_monitor_plug_name (GdkScreen *screen,
@@ -803,6 +843,8 @@ gdk_screen_get_monitor_plug_name (GdkScreen *screen,
* gdk_screen_get_width() and gdk_screen_get_height().
*
* Since: 2.2
*
* Deprecated: 3.22: Use gdk_monitor_get_geometry() instead
*/
void
gdk_screen_get_monitor_geometry (GdkScreen *screen,
@@ -844,6 +886,8 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
* @screen, use gdk_screen_get_n_monitors().
*
* Since: 3.4
*
* Deprecated: 3.22: Use gdk_monitor_get_workarea() instead
*/
void
gdk_screen_get_monitor_workarea (GdkScreen *screen,
@@ -972,6 +1016,8 @@ gdk_screen_is_composited (GdkScreen *screen)
* Returns: a newly allocated string, free with g_free()
*
* Since: 2.2
*
* Deprecated: 3.22
**/
gchar *
gdk_screen_make_display_name (GdkScreen *screen)
@@ -1004,6 +1050,8 @@ gdk_screen_make_display_name (GdkScreen *screen)
* or %NULL.
*
* Since: 2.10
*
* Deprecated: 3.22
**/
GdkWindow *
gdk_screen_get_active_window (GdkScreen *screen)
@@ -1088,8 +1136,11 @@ gdk_screen_get_setting (GdkScreen *screen,
* particular monitor, but most of the time youre drawing to a window
* where it is better to use gdk_window_get_scale_factor() instead.
*
* Since: 3.10
* Returns: the scale factor
*
* Since: 3.10
*
* Deprecated: 3.22: Use gdk_monitor_get_scale_factor() instead
*/
gint
gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
@@ -1099,7 +1150,9 @@ gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
g_return_val_if_fail (GDK_IS_SCREEN (screen), 1);
g_return_val_if_fail (monitor_num >= 0, 1);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_return_val_if_fail (monitor_num < gdk_screen_get_n_monitors (screen), 1);
G_GNUC_END_IGNORE_DEPRECATIONS
monitor = get_monitor (screen, monitor_num);

View File

@@ -52,54 +52,54 @@ GDK_AVAILABLE_IN_ALL
GdkWindow * gdk_screen_get_root_window (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GdkDisplay * gdk_screen_get_display (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_get_number (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_get_width (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_get_height (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_get_width_mm (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_screen_get_height_mm (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GList * gdk_screen_list_visuals (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GList * gdk_screen_get_toplevel_windows (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gchar * gdk_screen_make_display_name (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_n_monitors)
gint gdk_screen_get_n_monitors (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_primary_monitor)
gint gdk_screen_get_primary_monitor (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_geometry)
void gdk_screen_get_monitor_geometry (GdkScreen *screen,
gint monitor_num,
GdkRectangle *dest);
GDK_AVAILABLE_IN_3_4
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_workarea)
void gdk_screen_get_monitor_workarea (GdkScreen *screen,
gint monitor_num,
GdkRectangle *dest);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_monitor_at_point)
gint gdk_screen_get_monitor_at_point (GdkScreen *screen,
gint x,
gint y);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_get_monitor_at_window)
gint gdk_screen_get_monitor_at_window (GdkScreen *screen,
GdkWindow *window);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_width_mm)
gint gdk_screen_get_monitor_width_mm (GdkScreen *screen,
gint monitor_num);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_height_mm)
gint gdk_screen_get_monitor_height_mm (GdkScreen *screen,
gint monitor_num);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_model)
gchar * gdk_screen_get_monitor_plug_name (GdkScreen *screen,
gint monitor_num);
GDK_AVAILABLE_IN_3_10
GDK_DEPRECATED_IN_3_22_FOR(gdk_monitor_get_scale_factor)
gint gdk_screen_get_monitor_scale_factor (GdkScreen *screen,
gint monitor_num);
@@ -123,7 +123,7 @@ void gdk_screen_set_resolution (GdkScreen *screen,
GDK_AVAILABLE_IN_ALL
gdouble gdk_screen_get_resolution (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
GdkWindow *gdk_screen_get_active_window (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GList *gdk_screen_get_window_stack (GdkScreen *screen);

View File

@@ -132,9 +132,22 @@ gdk_seat_default_grab (GdkSeat *seat,
if (capabilities & GDK_SEAT_CAPABILITY_ALL_POINTING)
{
/* ALL_POINTING spans 3 capabilities; get the mask for the ones we have */
GdkEventMask pointer_evmask = 0;
/* We let tablet styli take over the pointer cursor */
if (capabilities & (GDK_SEAT_CAPABILITY_POINTER |
GDK_SEAT_CAPABILITY_TABLET_STYLUS))
{
pointer_evmask |= POINTER_EVENTS;
}
if (capabilities & GDK_SEAT_CAPABILITY_TOUCH)
pointer_evmask |= TOUCH_EVENTS;
status = gdk_device_grab (priv->master_pointer, window,
GDK_OWNERSHIP_NONE, owner_events,
POINTER_EVENTS, cursor,
pointer_evmask, cursor,
evtime);
}

View File

@@ -172,16 +172,6 @@
*/
#define GDK_VERSION_3_22 (G_ENCODE_VERSION (3, 22))
/**
* GDK_VERSION_3_90:
*
* A macro that evaluates to the 3.90 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.90
*/
#define GDK_VERSION_3_90 (G_ENCODE_VERSION (3, 90))
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
*/
@@ -422,11 +412,5 @@
# define GDK_AVAILABLE_IN_3_22 _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_90
# define GDK_AVAILABLE_IN_3_90 GDK_UNAVAILABLE(3, 90)
#else
# define GDK_AVAILABLE_IN_3_90 _GDK_EXTERN
#endif
#endif /* __GDK_VERSION_MACROS_H__ */

View File

@@ -88,6 +88,8 @@ gdk_visual_class_init (GdkVisualClass *visual_class)
*
* Returns: (transfer container) (element-type GdkVisual):
* a list of visuals; the list must be freed, but not its contents
*
* Deprecated: 3.22: Use gdk_screen_list_visuals (gdk_screen_get_default ()).
*/
GList*
gdk_list_visuals (void)
@@ -103,6 +105,8 @@ gdk_list_visuals (void)
* The return value should not be freed.
*
* Returns: (transfer none): system visual
*
* Deprecated: 3.22: Use gdk_screen_get_system_visual (gdk_screen_get_default ()).
*/
GdkVisual*
gdk_visual_get_system (void)
@@ -118,6 +122,9 @@ gdk_visual_get_system (void)
* per pixel.
*
* Returns: best available depth
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
gint
gdk_visual_get_best_depth (void)
@@ -133,6 +140,9 @@ gdk_visual_get_best_depth (void)
* Return the best available visual type for the default GDK screen.
*
* Returns: best visual type
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
GdkVisualType
gdk_visual_get_best_type (void)
@@ -149,6 +159,9 @@ gdk_visual_get_best_type (void)
* GDK screen. The return value should not be freed.
*
* Returns: (transfer none): best visual
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
GdkVisual*
gdk_visual_get_best (void)
@@ -168,6 +181,9 @@ gdk_visual_get_best (void)
* not be freed. %NULL may be returned if no visual supports @depth.
*
* Returns: (transfer none): best visual for the given depth
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
GdkVisual*
gdk_visual_get_best_with_depth (gint depth)
@@ -187,6 +203,9 @@ gdk_visual_get_best_with_depth (gint depth)
* @visual_type.
*
* Returns: (transfer none): best visual of the given type
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
GdkVisual*
gdk_visual_get_best_with_type (GdkVisualType visual_type)
@@ -207,6 +226,9 @@ gdk_visual_get_best_with_type (GdkVisualType visual_type)
*
* Returns: (nullable) (transfer none): best visual with both @depth
* and @visual_type, or %NULL if none
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
GdkVisual*
gdk_visual_get_best_with_both (gint depth,
@@ -229,6 +251,9 @@ gdk_visual_get_best_with_both (gint depth,
* visual, removing duplicates.
*
* The array returned by this function should not be freed.
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
void
gdk_query_depths (gint **depths,
@@ -251,6 +276,9 @@ gdk_query_depths (gint **depths,
* visual, removing duplicates.
*
* The array returned by this function should not be freed.
*
* Deprecated: 3.22: Visual selection should be done using
* gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()
*/
void
gdk_query_visual_types (GdkVisualType **visual_types,

View File

@@ -82,30 +82,30 @@ typedef enum
GDK_AVAILABLE_IN_ALL
GType gdk_visual_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
gint gdk_visual_get_best_depth (void);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
GdkVisualType gdk_visual_get_best_type (void);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_get_system_visual)
GdkVisual* gdk_visual_get_system (void);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
GdkVisual* gdk_visual_get_best (void);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
GdkVisual* gdk_visual_get_best_with_depth (gint depth);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
GdkVisual* gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
void gdk_query_depths (gint **depths,
gint *count);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
void gdk_query_visual_types (GdkVisualType **visual_types,
gint *count);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_list_visuals)
GList* gdk_list_visuals (void);
GDK_AVAILABLE_IN_ALL

View File

@@ -588,6 +588,9 @@ gdk_window_finalize (GObject *object)
if (window->devices_inside)
g_list_free (window->devices_inside);
if (window->opaque_region)
cairo_region_destroy (window->opaque_region);
G_OBJECT_CLASS (gdk_window_parent_class)->finalize (object);
}
@@ -637,6 +640,12 @@ gdk_window_is_offscreen (GdkWindow *window)
return window->window_type == GDK_WINDOW_OFFSCREEN;
}
static gboolean
gdk_window_is_subsurface (GdkWindow *window)
{
return window->window_type == GDK_WINDOW_SUBSURFACE;
}
static GdkWindow *
gdk_window_get_impl_window (GdkWindow *window)
{
@@ -973,9 +982,12 @@ recompute_visible_regions_internal (GdkWindow *private,
old_abs_y = private->abs_y;
/* Update absolute position */
if (gdk_window_has_impl (private))
if ((gdk_window_has_impl (private) &&
private->window_type != GDK_WINDOW_SUBSURFACE) ||
(gdk_window_is_toplevel (private) &&
private->window_type == GDK_WINDOW_SUBSURFACE))
{
/* Native window starts here */
/* Native windows and toplevel subsurfaces start here */
private->abs_x = 0;
private->abs_y = 0;
}
@@ -1461,6 +1473,11 @@ gdk_window_new (GdkWindow *parent,
if (window->parent->window_type == GDK_WINDOW_ROOT)
native = TRUE; /* Always use native windows for toplevels */
#ifdef GDK_WINDOWING_WAYLAND
if (window->window_type == GDK_WINDOW_SUBSURFACE)
native = TRUE; /* Always use native windows for subsurfaces as well */
#endif
if (gdk_window_is_offscreen (window))
{
_gdk_offscreen_window_new (window, attributes, attributes_mask);
@@ -2022,6 +2039,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
case GDK_WINDOW_TEMP:
case GDK_WINDOW_FOREIGN:
case GDK_WINDOW_OFFSCREEN:
case GDK_WINDOW_SUBSURFACE:
if (window->window_type == GDK_WINDOW_FOREIGN && !foreign_destroy)
{
/* Logically, it probably makes more sense to send
@@ -2420,6 +2438,8 @@ gdk_window_get_effective_parent (GdkWindow *window)
if (gdk_window_is_offscreen (window))
return gdk_offscreen_window_get_embedder (window);
else if (gdk_window_is_subsurface (window))
return window->transient_for;
else
return window->parent;
}
@@ -2446,7 +2466,8 @@ gdk_window_get_toplevel (GdkWindow *window)
{
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
while (window->window_type == GDK_WINDOW_CHILD)
while (window->window_type == GDK_WINDOW_CHILD ||
window->window_type == GDK_WINDOW_SUBSURFACE)
{
if (gdk_window_is_toplevel (window))
break;
@@ -3491,7 +3512,9 @@ gdk_window_clear_backing_region (GdkWindow *window)
for (bg_window = window; bg_window; bg_window = bg_window->parent)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
pattern = gdk_window_get_background_pattern (bg_window);
G_GNUC_END_IGNORE_DEPRECATIONS
if (pattern)
break;
@@ -4004,12 +4027,10 @@ static void
before_process_all_updates (void)
{
GSList *displays, *l;
GdkDisplayClass *display_class;
displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
display_class = GDK_DISPLAY_GET_CLASS (displays->data);
for (l = displays; l; l = l->next)
display_class->before_process_all_updates (l->data);
GDK_DISPLAY_GET_CLASS (l->data)->before_process_all_updates (l->data);
g_slist_free (displays);
}
@@ -4018,12 +4039,10 @@ static void
after_process_all_updates (void)
{
GSList *displays, *l;
GdkDisplayClass *display_class;
displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
display_class = GDK_DISPLAY_GET_CLASS (displays->data);
for (l = displays; l; l = l->next)
display_class->after_process_all_updates (l->data);
GDK_DISPLAY_GET_CLASS (l->data)->after_process_all_updates (l->data);
g_slist_free (displays);
}
@@ -4044,6 +4063,7 @@ after_process_all_updates (void)
* Calls gdk_window_process_updates() for all windows (see #GdkWindow)
* in the application.
*
* Deprecated: 3.22
**/
void
gdk_window_process_all_updates (void)
@@ -4191,6 +4211,7 @@ gdk_window_process_updates_with_mode (GdkWindow *window,
* case, where GDK delivers them in an idle handler). Occasionally
* this is useful to produce nicer scrolling behavior, for example.
*
* Deprecated: 3.22
**/
void
gdk_window_process_updates (GdkWindow *window,
@@ -4792,7 +4813,8 @@ gdk_window_thaw_toplevel_updates (GdkWindow *window)
* yourself, though you might want to use this function to enable
* updates sometime after application startup time.
*
**/
* Deprecated: 3.22
*/
void
gdk_window_set_debug_updates (gboolean setting)
{
@@ -6341,9 +6363,7 @@ gdk_window_move_region (GdkWindow *window,
* gtk_style_context_set_background() — if you're implementing a
* custom widget.
*
* See also gdk_window_set_background_pattern().
*
* Deprecated: 3.4: Use gdk_window_set_background_rgba() instead.
* Deprecated: 3.4: Don't use this function
*/
void
gdk_window_set_background (GdkWindow *window,
@@ -6357,7 +6377,9 @@ gdk_window_set_background (GdkWindow *window,
color->green / 65535.,
color->blue / 65535.);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdk_window_set_background_pattern (window, pattern);
G_GNUC_END_IGNORE_DEPRECATIONS
cairo_pattern_destroy (pattern);
}
@@ -6370,6 +6392,8 @@ gdk_window_set_background (GdkWindow *window,
* Sets the background color of @window.
*
* See also gdk_window_set_background_pattern().
*
* Deprecated: 3.22: Don't use this function
**/
void
gdk_window_set_background_rgba (GdkWindow *window,
@@ -6398,7 +6422,9 @@ gdk_window_set_background_rgba (GdkWindow *window,
pattern = cairo_pattern_create_rgba (rgba->red, rgba->green,
rgba->blue, rgba->alpha);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gdk_window_set_background_pattern (window, pattern);
G_GNUC_END_IGNORE_DEPRECATIONS
cairo_pattern_destroy (pattern);
}
@@ -6416,6 +6442,8 @@ gdk_window_set_background_rgba (GdkWindow *window,
*
* The windowing system will normally fill a window with its background
* when the window is obscured then exposed.
*
* Deprecated: 3.22: Don't use this function
*/
void
gdk_window_set_background_pattern (GdkWindow *window,
@@ -6453,6 +6481,8 @@ gdk_window_set_background_pattern (GdkWindow *window,
* background or %NULL to use the parents background.
*
* Since: 2.22
*
* Deprecated: 3.22: Don't use this function
**/
cairo_pattern_t *
gdk_window_get_background_pattern (GdkWindow *window)
@@ -6556,8 +6586,18 @@ gdk_window_set_cursor (GdkWindow *window,
for (s = seats; s; s = s->next)
{
GList *devices, *d;
device = gdk_seat_get_pointer (s->data);
gdk_window_set_cursor_internal (window, device, window->cursor);
devices = gdk_seat_get_slaves (s->data, GDK_SEAT_CAPABILITY_TABLET_STYLUS);
for (d = devices; d; d = d->next)
{
device = gdk_device_get_associated_device (d->data);
gdk_window_set_cursor_internal (window, device, window->cursor);
}
g_list_free (devices);
}
g_list_free (seats);
@@ -10166,6 +10206,10 @@ gdk_window_create_similar_surface (GdkWindow * window,
* scale);
* ]|
*
* Note that unlike cairo_surface_create_similar_image(), the new
* surface's device scale is set to @scale, or to the scale factor of
* @window if @scale is 0.
*
* Returns: a pointer to the newly allocated surface. The caller
* owns the surface and should call cairo_surface_destroy() when done
* with it.
@@ -10832,10 +10876,10 @@ void
gdk_window_fullscreen_on_monitor (GdkWindow *window,
gint monitor)
{
GdkScreen *screen = gdk_window_get_screen (window);
GdkDisplay *display = gdk_window_get_display (window);
g_return_if_fail (monitor >= 0);
g_return_if_fail (monitor < gdk_screen_get_n_monitors (screen));
g_return_if_fail (monitor < gdk_display_get_n_monitors (display));
if (GDK_WINDOW_IMPL_GET_CLASS (window->impl)->fullscreen_on_monitor != NULL)
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->fullscreen_on_monitor (window, monitor);
@@ -11838,6 +11882,14 @@ gdk_window_set_opaque_region (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (!GDK_WINDOW_DESTROYED (window));
if (cairo_region_equal (window->opaque_region, region))
return;
g_clear_pointer (&window->opaque_region, cairo_region_destroy);
if (region != NULL)
window->opaque_region = cairo_region_reference (region);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
if (impl_class->set_opaque_region)

View File

@@ -771,16 +771,16 @@ void gdk_window_set_startup_id (GdkWindow *window,
GDK_AVAILABLE_IN_ALL
void gdk_window_set_transient_for (GdkWindow *window,
GdkWindow *parent);
GDK_DEPRECATED_IN_3_4_FOR(gdk_window_set_background_rgba)
GDK_DEPRECATED_IN_3_4
void gdk_window_set_background (GdkWindow *window,
const GdkColor *color);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
void gdk_window_set_background_rgba (GdkWindow *window,
const GdkRGBA *rgba);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
void gdk_window_set_background_pattern (GdkWindow *window,
cairo_pattern_t *pattern);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
@@ -1054,14 +1054,14 @@ void gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window);
GDK_DEPRECATED_IN_3_16
void gdk_window_thaw_toplevel_updates_libgtk_only (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
void gdk_window_process_all_updates (void);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
void gdk_window_process_updates (GdkWindow *window,
gboolean update_children);
/* Enable/disable flicker, so you can tell if your code is inefficient. */
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22
void gdk_window_set_debug_updates (gboolean setting);
GDK_AVAILABLE_IN_ALL

View File

@@ -17,6 +17,8 @@
#include "gdkmir-private.h"
#include <mir_toolkit/events/window_placement.h>
static void
_gdk_mir_print_modifiers (unsigned int modifiers)
{
@@ -127,6 +129,7 @@ _gdk_mir_print_touch_event (const MirInputEvent *event)
}
switch (mir_touch_event_tooltype (touch_event, i))
{
default:
case mir_touch_tooltype_unknown:
g_printerr (" ? ");
break;
@@ -200,30 +203,45 @@ _gdk_mir_print_motion_event (const MirInputEvent *event)
}
static void
_gdk_mir_print_surface_event (const MirSurfaceEvent *event)
_gdk_mir_print_input_event (const MirInputEvent *event)
{
g_printerr ("SURFACE\n");
g_printerr ("INPUT\n");
}
static void
_gdk_mir_print_window_event (const MirWindowEvent *event)
{
g_printerr ("WINDOW\n");
g_printerr (" Attribute ");
switch (mir_surface_event_get_attribute (event))
switch (mir_window_event_get_attribute (event))
{
case mir_surface_attrib_type:
case mir_window_attrib_type:
g_printerr ("type");
break;
case mir_surface_attrib_state:
case mir_window_attrib_state:
g_printerr ("state");
break;
case mir_surface_attrib_swapinterval:
case mir_window_attrib_swapinterval:
g_printerr ("swapinterval");
break;
case mir_surface_attrib_focus:
case mir_window_attrib_focus:
g_printerr ("focus");
break;
case mir_window_attrib_dpi:
g_printerr ("dpi");
break;
case mir_window_attrib_visibility:
g_printerr ("visibility");
break;
case mir_window_attrib_preferred_orientation:
g_printerr ("preferred_orientation");
break;
default:
g_printerr ("%u", mir_surface_event_get_attribute (event));
g_printerr ("%u", mir_window_event_get_attribute (event));
break;
}
g_printerr ("\n");
g_printerr (" Value %i\n", mir_surface_event_get_attribute_value (event));
g_printerr (" Value %i\n", mir_window_event_get_attribute_value (event));
}
static void
@@ -233,12 +251,237 @@ _gdk_mir_print_resize_event (const MirResizeEvent *event)
g_printerr (" Size (%i, %i)\n", mir_resize_event_get_width (event), mir_resize_event_get_height (event));
}
static void
_gdk_mir_print_prompt_session_state_change_event (const MirPromptSessionEvent *event)
{
g_printerr ("PROMPT_SESSION_STATE_CHANGE\n");
g_printerr (" State ");
switch (mir_prompt_session_event_get_state (event))
{
case mir_prompt_session_state_stopped:
g_printerr ("stopped");
break;
case mir_prompt_session_state_started:
g_printerr ("started");
break;
case mir_prompt_session_state_suspended:
g_printerr ("suspended");
break;
default:
g_printerr ("%u", mir_prompt_session_event_get_state (event));
break;
}
g_printerr ("\n");
}
static void
_gdk_mir_print_orientation_event (const MirOrientationEvent *event)
{
g_printerr ("ORIENTATION\n");
g_printerr (" Direction ");
switch (mir_orientation_event_get_direction (event))
{
case mir_orientation_normal:
g_printerr ("normal");
break;
case mir_orientation_left:
g_printerr ("left");
break;
case mir_orientation_inverted:
g_printerr ("inverted");
break;
case mir_orientation_right:
g_printerr ("right");
break;
default:
g_printerr ("%u", mir_orientation_event_get_direction (event));
break;
}
g_printerr ("\n");
}
static void
_gdk_mir_print_close_event (void)
{
g_printerr ("CLOSED\n");
}
static void
_gdk_mir_print_keymap_event (const MirKeymapEvent *event)
{
g_printerr ("KEYMAP\n");
}
static void
_gdk_mir_print_window_output_event (const MirWindowOutputEvent *event)
{
g_printerr ("WINDOW_OUTPUT\n");
g_printerr (" DPI %d\n", mir_window_output_event_get_dpi (event));
g_printerr (" Form Factor ");
switch (mir_window_output_event_get_form_factor (event))
{
case mir_form_factor_unknown:
g_printerr ("unknown");
break;
case mir_form_factor_phone:
g_printerr ("phone");
break;
case mir_form_factor_tablet:
g_printerr ("tablet");
break;
case mir_form_factor_monitor:
g_printerr ("monitor");
break;
case mir_form_factor_tv:
g_printerr ("tv");
break;
case mir_form_factor_projector:
g_printerr ("projector");
break;
default:
g_printerr ("%u", mir_window_output_event_get_form_factor (event));
break;
}
g_printerr ("\n");
g_printerr (" Scale %f\n", mir_window_output_event_get_scale (event));
g_printerr (" Refresh Rate %lf\n", mir_window_output_event_get_refresh_rate (event));
g_printerr (" Output ID %u\n", mir_window_output_event_get_output_id (event));
}
static void
_gdk_mir_print_input_device_state_event (const MirInputDeviceStateEvent *event)
{
MirPointerButtons buttons;
MirInputEventModifiers modifiers;
gint i;
gint j;
g_printerr ("INPUT_DEVICE_STATE\n");
g_printerr (" Pointer Buttons\n");
buttons = mir_input_device_state_event_pointer_buttons (event);
if (buttons == 0)
g_printerr (" none\n");
else
{
if (buttons & mir_pointer_button_primary)
g_printerr (" primary\n");
if (buttons & mir_pointer_button_secondary)
g_printerr (" secondary\n");
if (buttons & mir_pointer_button_tertiary)
g_printerr (" tertiary\n");
if (buttons & mir_pointer_button_back)
g_printerr (" back\n");
if (buttons & mir_pointer_button_forward)
g_printerr (" forward\n");
if (buttons & mir_pointer_button_side)
g_printerr (" side\n");
if (buttons & mir_pointer_button_extra)
g_printerr (" extra\n");
if (buttons & mir_pointer_button_task)
g_printerr (" task\n");
}
g_printerr (" Pointer Axis\n");
g_printerr (" X %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_x));
g_printerr (" Y %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_y));
g_printerr (" V Scroll %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_vscroll));
g_printerr (" H Scroll %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_hscroll));
g_printerr (" Relative X %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_relative_x));
g_printerr (" Relative Y %f\n", mir_input_device_state_event_pointer_axis (event, mir_pointer_axis_relative_y));
g_printerr (" Time %ld\n", mir_input_device_state_event_time (event));
g_printerr (" Event Modifiers\n");
modifiers = mir_input_device_state_event_modifiers (event);
if (modifiers & mir_input_event_modifier_none)
g_printerr (" none\n");
if (modifiers & mir_input_event_modifier_alt)
g_printerr (" alt\n");
if (modifiers & mir_input_event_modifier_alt_left)
g_printerr (" alt_left\n");
if (modifiers & mir_input_event_modifier_alt_right)
g_printerr (" alt_right\n");
if (modifiers & mir_input_event_modifier_shift)
g_printerr (" shift\n");
if (modifiers & mir_input_event_modifier_shift_left)
g_printerr (" shift_left\n");
if (modifiers & mir_input_event_modifier_shift_right)
g_printerr (" shift_right\n");
if (modifiers & mir_input_event_modifier_sym)
g_printerr (" sym\n");
if (modifiers & mir_input_event_modifier_function)
g_printerr (" function\n");
if (modifiers & mir_input_event_modifier_ctrl)
g_printerr (" ctrl\n");
if (modifiers & mir_input_event_modifier_ctrl_left)
g_printerr (" ctrl_left\n");
if (modifiers & mir_input_event_modifier_ctrl_right)
g_printerr (" ctrl_right\n");
if (modifiers & mir_input_event_modifier_meta)
g_printerr (" meta\n");
if (modifiers & mir_input_event_modifier_meta_left)
g_printerr (" meta_left\n");
if (modifiers & mir_input_event_modifier_meta_right)
g_printerr (" meta_right\n");
if (modifiers & mir_input_event_modifier_caps_lock)
g_printerr (" caps_lock\n");
if (modifiers & mir_input_event_modifier_num_lock)
g_printerr (" num_lock\n");
if (modifiers & mir_input_event_modifier_scroll_lock)
g_printerr (" scroll_lock\n");
for (i = 0; i < mir_input_device_state_event_device_count (event); i++)
{
g_printerr (" Device %ld\n", mir_input_device_state_event_device_id (event, i));
for (j = 0; j < mir_input_device_state_event_device_pressed_keys_count (event, i); j++)
g_printerr (" Pressed %u\n", mir_input_device_state_event_device_pressed_keys_for_index (event, i, j));
g_printerr (" Pointer Buttons\n");
buttons = mir_input_device_state_event_device_pointer_buttons (event, i);
if (buttons == 0)
g_printerr (" none\n");
else
{
if (buttons & mir_pointer_button_primary)
g_printerr (" primary\n");
if (buttons & mir_pointer_button_secondary)
g_printerr (" secondary\n");
if (buttons & mir_pointer_button_tertiary)
g_printerr (" tertiary\n");
if (buttons & mir_pointer_button_back)
g_printerr (" back\n");
if (buttons & mir_pointer_button_forward)
g_printerr (" forward\n");
if (buttons & mir_pointer_button_side)
g_printerr (" side\n");
if (buttons & mir_pointer_button_extra)
g_printerr (" extra\n");
if (buttons & mir_pointer_button_task)
g_printerr (" task\n");
}
}
}
static void
_gdk_mir_print_window_placement_event (const MirWindowPlacementEvent *event)
{
MirRectangle rect = mir_window_placement_get_relative_position (event);
g_printerr ("WINDOW_PLACEMENT\n");
g_printerr (" X %d\n", rect.left);
g_printerr (" Y %d\n", rect.top);
g_printerr (" Width %u\n", rect.width);
g_printerr (" Height %u\n", rect.height);
}
void
_gdk_mir_print_event (const MirEvent *event)
{
@@ -260,6 +503,9 @@ _gdk_mir_print_event (const MirEvent *event)
case mir_input_event_type_pointer:
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
break;
default:
_gdk_mir_print_input_event (mir_event_get_input_event (event));
break;
}
break;
case mir_event_type_key:
@@ -268,15 +514,33 @@ _gdk_mir_print_event (const MirEvent *event)
case mir_event_type_motion:
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
break;
case mir_event_type_surface:
_gdk_mir_print_surface_event (mir_event_get_surface_event (event));
case mir_event_type_window:
_gdk_mir_print_window_event (mir_event_get_window_event (event));
break;
case mir_event_type_resize:
_gdk_mir_print_resize_event (mir_event_get_resize_event (event));
break;
case mir_event_type_close_surface:
case mir_event_type_prompt_session_state_change:
_gdk_mir_print_prompt_session_state_change_event (mir_event_get_prompt_session_event (event));
break;
case mir_event_type_orientation:
_gdk_mir_print_orientation_event (mir_event_get_orientation_event (event));
break;
case mir_event_type_close_window:
_gdk_mir_print_close_event ();
break;
case mir_event_type_keymap:
_gdk_mir_print_keymap_event (mir_event_get_keymap_event (event));
break;
case mir_event_type_window_output:
_gdk_mir_print_window_output_event (mir_event_get_window_output_event (event));
break;
case mir_event_type_input_device_state:
_gdk_mir_print_input_device_state_event (mir_event_get_input_device_state_event (event));
break;
case mir_event_type_window_placement:
_gdk_mir_print_window_placement_event (mir_event_get_window_placement_event (event));
break;
default:
g_printerr ("EVENT %u\n", mir_event_get_type (event));
break;

View File

@@ -83,13 +83,17 @@ GdkCursor *_gdk_mir_cursor_new_for_name (GdkDisplay *display, const gchar *name)
const gchar *_gdk_mir_cursor_get_name (GdkCursor *cursor);
MirWindow *_gdk_mir_window_get_mir_window (GdkWindow *window);
GdkWindowImpl *_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window, GdkWindowAttr *attributes, gint attributes_mask);
void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state);
void _gdk_mir_window_impl_set_window_state (GdkMirWindowImpl *impl, MirWindowState state);
void _gdk_mir_window_impl_set_surface_type (GdkMirWindowImpl *impl, MirSurfaceType type);
void _gdk_mir_window_impl_set_window_type (GdkMirWindowImpl *impl, MirWindowType type);
void _gdk_mir_window_set_surface_output (GdkWindow *window, gdouble scale);
void _gdk_mir_window_set_scale (GdkWindow *window, gdouble scale);
void _gdk_mir_window_set_final_rect (GdkWindow *window, MirRectangle rect);
void _gdk_mir_window_impl_set_cursor_state (GdkMirWindowImpl *impl, gdouble x, gdouble y, gboolean cursor_inside, guint button_state);
@@ -107,6 +111,15 @@ void _gdk_mir_event_source_queue (GdkMirWindowReference *window_ref, const MirEv
MirPixelFormat _gdk_mir_display_get_pixel_format (GdkDisplay *display, MirBufferUsage usage);
void _gdk_mir_display_focus_window (GdkDisplay *display, GdkWindow *window);
void _gdk_mir_display_unfocus_window (GdkDisplay *display, GdkWindow *window);
void _gdk_mir_display_create_paste (GdkDisplay *display,
const gchar * const *paste_formats,
gconstpointer paste_data,
gsize paste_size);
gboolean _gdk_mir_display_init_egl_display (GdkDisplay *display);
EGLDisplay _gdk_mir_display_get_egl_display (GdkDisplay *display);

Some files were not shown because too many files have changed in this diff Show More