Compare commits

...

1505 Commits

Author SHA1 Message Date
Matthias Clasen
2e7ac262be 3.22.30 2018-04-16 14:06:02 -04:00
Aron Xu
cb71d083ab po: fix zh_CN translation 2018-04-14 13:10:27 +08:00
Benjamin Otte
b47bdda271 widget: Add a frameclock_connected boolean
... and use it to not connect anything to the frameclock if it isn't
set.

This gets around the problem that the frame clock is disconnected before
GtkWidgetClass.unrealize() is called but the widget is still marked as
realized and the frame clock is available during the vfunc, which makes
calls like gtk_widget_queue_resize() reconnect to the frame clock.

Closes #168
2018-04-11 18:11:39 +02:00
Benjamin Otte
9e926f9a28 examples: Check for error when loading file
People playing with those examples tend to mess up things, so it's
really really unhelpful if we don't do error checking.
2018-04-11 03:11:22 +02:00
Benjamin Otte
5a0759bc1b colorutils: Remove unused macro 2018-04-11 03:11:22 +02:00
Benjamin Otte
d92df4ff2c Merge branch 'gtk-3-22' into 'gtk-3-22'
wayland: Fix setting geometry hints

See merge request GNOME/gtk!98
2018-04-09 20:17:00 +00:00
Emmanuele Bassi
22fd5b5766 docs: Link to GResource
Since we're referring to GLib's functionality, might as well save some
time to the reader, and link to the GResource API reference page.
2018-04-09 20:10:47 +01:00
Emmanuele Bassi
b685eb1779 docs: Fix the Git links for the example apps
The links to the repository's web UI still refer to the old
git.gnome.org cgit UI, and to the master branch; we should be using
GitLab and the gtk-3-22 branch instead.
2018-04-09 20:05:57 +01:00
Daniel Boles
5ee381a596 AccelGroup: Remove @See_also of deleted function
gtk_item_factory_new() is not a thing that exists.

Also, maybe the lack of space after the colon was what stopped the link
from rendering.
2018-04-09 19:43:45 +01:00
Sébastien Villemot
59136773b8 gdk_x11_display_get_monitor: fix monitor number test logic
When asked for a nonexistent (positive) monitor number,
gdk_x11_display_get_monitor would (at best) return an uninitialized pointer,
instead of returning NULL.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/107
2018-04-09 18:27:44 +01:00
Daniel Boles
7a75b89efe testmodelbutton: Test :centered, :icon, :inverted
Test more stuff.
2018-04-08 18:49:26 +01:00
Daniel Boles
b2caaaa3f9 Revert "ModelButton: Properly update indicator on set_role"
This reverts commit ba307aa35e.

This is not needed; see the previous commit for the explanation.

https://gitlab.gnome.org/GNOME/gtk/issues/163#note_94842
2018-04-08 18:49:22 +01:00
Daniel Boles
b7e5a2dd10 testmodelbutton: Fix wrongly overridding MB child
I was setting a GtkButton:label, which resulted in the ModelButton's own
custom children getting lost. That doesn't make for a useful test...

https://gitlab.gnome.org/GNOME/gtk/issues/163#note_94842
2018-04-08 18:49:19 +01:00
Daniel Boles
e52aa73b36 ModelButton: Use WARN_INVALID_PROPERTY, not assert
Do the same thing we do everywhere else for invalid properties.
2018-04-08 18:39:53 +01:00
Daniel Boles
2d415d9354 ModelButton: Fix type Wether => Whether 2018-04-08 17:13:33 +01:00
Daniel Boles
e6e306ae8e testmodelbutton: Add explanatory comments to CSS
and load at an earlier, more sensible place, before creating any widgets
2018-04-08 16:07:35 +01:00
Mohammed Sadiq
79d8c9dff0 listbox: Fix signal name in documentation 2018-04-08 13:46:33 +01:00
Daniel Boles
ba307aa35e ModelButton: Properly update indicator on set_role
Redrawing is insufficient: when :role changes to/from NORMAL, the
indicator gadget reallocates, but we didn't reflect that in the widget.

https://gitlab.gnome.org/GNOME/gtk/issues/163
2018-04-08 13:16:30 +01:00
Daniel Boles
fa520c5769 ModelButton: Protect against nonsensical gbooleans
the same way we do normally.
2018-04-08 13:16:30 +01:00
Daniel Boles
e193cd1cf1 tests/testmodelbutton: Add this
and test whether :action-name, :role, and CSS nodes work as expected

https://gitlab.gnome.org/GNOME/gtk/issues/163
2018-04-08 13:16:30 +01:00
Rūdolfs Mazurs
1bf354aec8 Update Latvian translation 2018-04-07 16:02:54 +00:00
Benjamin Otte
b0b2992165 Merge branch 'textview-delete' into 'gtk-3-22'
gtktextviewaccessible: update cursor position after text suppression

See merge request GNOME/gtk!101
2018-04-04 18:19:05 +00:00
Benjamin Otte
48e40762c7 Merge branch 'text-changed-delete' into 'gtk-3-22'
gtkentryaccessible: Fix text-changed::delete length

See merge request GNOME/gtk!99
2018-04-04 18:17:26 +00:00
Samuel Thibault
fa6994d033 gtktextviewaccessible: update cursor position after text suppression
delete_range_cb is set to be called before the text suppression done by
the gtktextlayout (otherwise it does not work properly). But at that
point the cursor position is not yet up to date.  We thus need to move
the accessibility cursor notification to after the actual text
suppression, by using another callback.

This fixes cursor position in brltty screen reading.
2018-04-04 18:22:16 +02:00
Samuel Thibault
209f908a03 gtkentryaccessible: Fix text-changed::delete length
The second parameter of the text-changed::delete event is to be the length,
not the end position.  This fixes spurious text removals in brltty
screen reading.
2018-04-04 17:56:38 +02:00
Jan Alexander Steffens (heftig)
8e74e515c7 wayland: Fix setting geometry hints
The stable xdg_shell port (5c8bb51a) introduced an error in
gdk_wayland_window_set_geometry_hints which would set the minimum size
to the maximum size, if provided.

This resulted in various wxWidgets apps (FileZilla, Audacity, Veracrypt)
crashing because they attempted to allocate a ginormous surface.

Fixes #157.
2018-04-04 14:38:45 +02:00
Daniel Boles
46dac1aba4 GLArea: Remove wrong transfer annotation on new()
Like other widgets, this returns a floating reference, so
(transfer full) is wrong. Just omit the annotation as others do,
thus implying (transfer none).

Close https://gitlab.gnome.org/GNOME/gtk/issues/156
2018-04-04 12:04:35 +01:00
Matthias Clasen
4b95d74068 wayland: Don't emit signals if nothing changed
We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.

https://gitlab.gnome.org/GNOME/gtk/issues/132
https://gitlab.gnome.org/GNOME/gtk/merge_requests/83#note_93411
2018-04-04 09:39:31 +01:00
Robert Antoni Buj Gelonch
34bcc71f4e Update Catalan translation 2018-04-03 17:56:01 +00:00
Carlos Garnacho
7751001ff1 Merge branch 'gtk-3-22' into 'gtk-3-22'
Fix imwayland crashes

See merge request GNOME/gtk!89
2018-04-03 16:42:41 +00:00
Daniel Boles
e42d8598ca ProgressBar: Drop leftover "superimposed" mention
This was missed from the commit that dropped other mentions to the
previous ability to superimpose text.

https://bugzilla.gnome.org/show_bug.cgi?id=748784
2018-03-31 12:27:21 +01:00
Nelson Benítez León
7a11fcf054 appchooserwidget: search text using g_str_match_string()
so we match on diacritics (eg. accented letters) and also
search on text tokens. As a plus we also reduce code size.

https://bugzilla.gnome.org/show_bug.cgi?id=745128
2018-03-31 13:32:42 +05:00
Daniel Boles
154fa9817d themes: Make disabled Expander arrow look disabled
If GtkExpander:sensitive was FALSE, the arrow still got the normal fg
colour, which made it look clickable, in contrast to the adjacent label.
Fix this by adding selectors to catch the applicable :disabled states.

Note: Needing these may indicate an oops in generic styles elsewhere,
but I couldn’t see any, so let’s just get it looking right for now.

https://gitlab.gnome.org/GNOME/gtk/issues/146
2018-03-29 21:00:00 +01:00
Daniel Boles
6e8cc589f2 emojichooser.ui: Reuse headings as button tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=792632
2018-03-29 18:42:39 +01:00
Tomasz Miąsko
56d44fd10c Widget: Fix doc of default ::keynav-failed handler
https://bugzilla.gnome.org/show_bug.cgi?id=793089
2018-03-29 18:29:51 +01:00
Daniel Boles
0102e0f914 HighContrast: Honour .monospace set by GtkTextView
Copy the line that sets a monospace family from Adwaita (same place too)

noticed at https://gitlab.gnome.org/GNOME/gtk/issues/141#note_91610
2018-03-29 18:16:57 +01:00
Nathan Follens
f12b44d697 Update Dutch translation 2018-03-29 13:02:08 +00:00
Марко Костић
b5e959b6ff Update Serbian translation 2018-03-28 20:50:42 +00:00
Lionel Landwerlin
314531640f imwayland: destroy objects only if it matches our manager object
Should fix one of the crash from #129.
2018-03-28 12:11:10 +01:00
Emmanuele Bassi
a0f273465e Merge branch 'wip/smcv/ac-path-tool-2' into 'gtk-3-22'
m4macros: Use PKG_PROG_PKG_CONFIG

See merge request GNOME/gtk!81
2018-03-26 10:45:36 +00:00
Milo Casagrande
3dbeab2b4a Update Italian translation 2018-03-26 10:34:48 +00:00
Cheng-Chia Tseng
f38d8f8c1b Update Chinese (Taiwan) translation 2018-03-26 09:20:17 +00:00
Simon McVittie
a36c564b54 m4macros: Use PKG_PROG_PKG_CONFIG
Signed-off-by: Simon McVittie <smcv@debian.org>
2018-03-26 09:31:31 +01:00
Simon McVittie
323d86b6e4 m4macros: Fix underquoting in AC_PATH_TOOL
While these lines are being changed anyway, they might as well be
more correct.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-03-26 08:58:57 +01:00
Helmut Grohne
3a7fbb3b30 AM_PATH_GTK_3_0: Use AC_PATH_TOOL to find pkg-config
AM_PATH_GTK_3_0 uses AC_PATH_PROG for finding pkg-config. Unfortunately,
that will find the build architecture pkg-config which in turn will miss
the host architecture gtk+3.0. What must be used here is the host
architecture pkg-config and that is found with AC_PATH_TOOL.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894069
Reviewed-by: Simon McVittie <smcv@debian.org>
Fixes: #133
2018-03-26 08:58:40 +01:00
Matthias Clasen
a09df57a5f Merge branch 'gtk-3-22-bz773274' into 'gtk-3-22'
wayland: Don't paint if the window is unmapped

See merge request GNOME/gtk!31
2018-03-25 20:47:02 +00:00
Dz Chen
b0f8426c29 Update zh_CN po and po-properties translations 2018-03-24 00:03:55 +08:00
Daniel Boles
dbaaa701ad HighContrast: Regenerate CSS missing from !50
https://gitlab.gnome.org/GNOME/gtk/merge_requests/50 forgot this.
2018-03-22 21:01:08 +00:00
Nikita Churaev
ef3fe9ead3 theme: Be more selective when adding margins to toolbar items
Only add margins to direct children of toolbar items, this fixes the
gaps between linked buttons inside custom toolbar items.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/66
2018-03-22 20:59:15 +00:00
Matej Urbančič
6551ddd8e0 Updated Slovenian translation ... 2018-03-21 16:01:46 +01:00
Matej Urbančič
332d41792d Updated Slovenian translation ... 2018-03-21 15:58:15 +01:00
Charles Monzat
240cb0bb5a Update French translation 2018-03-21 08:45:43 +00:00
Matthias Clasen
5c8bb51a58 Merge branch 'wip/xdg-shell-gtk-3-22' into 'gtk-3-22'
xdg shell (stable; gtk 3 22)

See merge request GNOME/gtk!36
2018-03-20 16:28:00 +00:00
Cheng-Chia Tseng
68fce76faf Update Chinese (Taiwan) translation 2018-03-20 15:53:58 +00:00
Matthias Clasen
b88bffac23 Merge branch 'wip/carlosg/fix-issue-114' into 'gtk-3-22'
Fix issue #114

See merge request GNOME/gtk!73
2018-03-20 15:31:49 +00:00
Carlos Garnacho
4f78abddfc imwayland: Avoid TOGGLE_INPUT_PANEL requests if there's no focus
Fixes two things: 1) As GTK+ can be coerced into using the wayland IM
module despite the compositor not implementing the interface, all paths
not checking for global state before sending requests are prone to
crashes, this one fell hit this pitfall.

And 2) ensures the tap gesture only triggers TOGGLE_INPUT_PANEL if the
widget IM is focused. This is a possibility on eg. WebKit pages, where
its IM is only focused as long as a form element in the page is focused.
Tapping elsewhere shouldn't toggle the OSK.

https://gitlab.gnome.org/GNOME/gtk/issues/114

Closes: #114
2018-03-20 15:56:53 +01:00
Peter Bloomfield
6e2d14037c gtkimmodule: make match_backend() query
…the wayland registry.

Wnen _gtk_im_module_get_default_context_id calls
match_backend (context_id) and the default GdkDisplay
is wayland, match_backend() should return TRUE only if
gdk_wayland_display_query_registry (display, "gtk_text_input_manager")
returns TRUE.
2018-03-20 15:56:53 +01:00
Benjamin Otte
9781ffae51 Merge branch 'style-context-null-widget-guard' into 'gtk-3-22'
gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places

See merge request GNOME/gtk!70
2018-03-20 14:55:57 +00:00
Christoph Reiter
d65a4c2e0a gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places
When the widget gets finalized it clears the widgetnode and gtk_css_widget_node_get_widget
returns NULL. Guard against gtk_css_widget_node_get_widget() returning NULL like in other
places.

See https://gitlab.gnome.org/GNOME/pygobject/issues/28#note_82862
2018-03-19 18:21:25 +01:00
Daniel Boles
92bef46b4c gdkrgba: Add a missing apostrophe in a doc comment 2018-03-19 15:13:04 +00:00
Daniel Boles
f4bb394d60 _common.scss: Use : for properties in new comments
This is cosmetic and unlikely to have confused anyone, but still
2018-03-19 14:27:28 +00:00
Daniel Boles
e0befe02fa Merge branch 'searchbar-double-border-fix' into 'gtk-3-22'
Fix the double border in windows with a search bar.

See merge request GNOME/gtk!50
2018-03-19 14:26:11 +00:00
Руслан Ижбулатов
3e68abddbc Merge branch 'lrn/issue-82_3-22' into gtk-3-22 2018-03-19 09:40:58 +00:00
Chun-wei Fan
84ff404a17 Visual Studio builds: Fix .pc generation
Since the Cairo build files for Visual Studio does not really generate
the pkg-config files for us, and we stopped making makeshift ones in
gobject-introspection, stop making the .pc files we generate here refer
to the Cairo .pc's, and instead make them link directly to
cairo-gobject.lib and cairo.lib.
2018-03-19 16:53:57 +08:00
Milo Casagrande
9604eb5c53 Update Italian translation 2018-03-17 14:51:14 +00:00
Dušan Kazik
9c8e53b968 Update Slovak translation 2018-03-17 14:36:47 +00:00
Timm Bäder
eb01ba8573 widget: Only print allocation warnings with --enable-debug
i.e. if G_ENABLE_CONSISTENCY_CHECKS is defined. This makes sense,
considering that this warning is about consistency of internal widget
state.
2018-03-17 13:15:33 +01:00
Daniel Boles
7fd9f2d31e Notebook: Don’t show raw underline/markup in popup
If @menu_label == NULL, we create a default page->menu_label. This took
@tab_label.get_label() and passed that to page->menu_label.set_text().
This is wrong because we set the plain text of the menu_label from the
rich text of @tab_label. So, if @tab_label used mnemonics or markup, our
menu_label got the raw underline or markup tags shown in it as raw text.

As we call set_text() on the menu Label, the fix is to be symmetric: use
@tab_label’s get_text() as source, as that strips underlines and markup.

It’s not worth making the default Label ‘inherit’ :use-underline/markup;
that’s a slippery slope, and users wanting such things can just create a
fully fledged GtkLabel to pass as @menu_label to suppress the default.

https://bugzilla.gnome.org/show_bug.cgi?id=705509
2018-03-16 22:32:50 +00:00
Olivier Fourdan
3bd7b379c8 wayland: Drop cairo surfaces when withdrawing
If a window is unmapped by the client while gdk is processing updates,
(for example Firefox un-mapping its window on Expose events), the
windowing backend resources might be lost (for example with Wayland)
which can cause a crash in end_paint().

Make sure we drop the cairo surfaces as well when hiding the surface,
that will avoid the crash in gdk_window_impl_wayland_end_paint() when
trying to attach the staging cairo surface to a released wl_surface,
these will be recreated when needed when the surface becomes visible
again and there is no need to keep such buffers around for a surface
which is not visible anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=793062
2018-03-16 16:01:21 +01:00
Jonas Ådahl
0454a1cace wayland: Minor whitespace cleanups
Broke up a long line, added an empty one, and indented another one.

https://bugzilla.gnome.org/show_bug.cgi?id=791939
2018-03-16 17:44:48 +08:00
Jonas Ådahl
a46bc8b5a3 wayland: Add support for xdg-shell stable
This commit adds support the stable version of the xdg-shell protocol.
Support for the last version of the unstable series is left intact, but
will not receive new features.

The stable version is prioritized above the older version.

https://bugzilla.gnome.org/show_bug.cgi?id=791939
2018-03-16 17:44:48 +08:00
Timm Bäder
5d27915aa4 demo: Add widgetbowl demo
Backported from gtk4.
2018-03-15 21:04:45 +01:00
Matthias Clasen
cac2845bd6 Merge branch 'wip/filechooser-non-default-display-gtk3' into 'gtk-3-22'
Fix filechooser dialog using non default display (gtk3)

See merge request GNOME/gtk!59
2018-03-15 17:47:15 +00:00
Kukuh Syafaat
3ee7604d6e Update Indonesian translation 2018-03-15 14:08:17 +00:00
Balázs Úr
0fa391cc24 Update Hungarian translation 2018-03-15 13:39:01 +00:00
Daniel Boles
0a0323813e SpinButton: Redraw +/- buttons after :wrap changes
Otherwise, the + or - button might change sensitivity based on whether
it can be used to wrap, but without ensuring we update its state, the
ability to :wrap isn't reflected until something else triggers a draw.

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:48 +00:00
Daniel Boles
fcfabb2fd3 testspinbutton: Add button to toggle wrap on Spins
I found myself wanting to test this for something else, so let's test
it. It revealed a bug immediately!

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:08 +00:00
Daniel Boles
bb16f1a0ff testspinbutton: Orient box orthogonally to Spins
This makes better use of space.
2018-03-14 23:00:59 +00:00
Emin Tufan Çetin
c179d5eb6e Update Turkish translation 2018-03-14 19:57:40 +00:00
Jonas Ådahl
ba83a2c46b entrycompletion: Realize popup after setting screen
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.

To avoid this issue, realize the popup after the screen has been
properly set up.

Fixes #83 in gtk3
2018-03-14 11:57:00 +08:00
Christoph Reiter
fc9a71abae Merge branch 'gtk-3-22' into 'gtk-3-22'
Add proper annotation for gdk_frame_clock_get_refresh_info

See merge request GNOME/gtk!54
2018-03-13 20:31:30 +00:00
Christoph Reiter
600003e83f run-docker.sh: Disable SELinux for the container
On Fedora and similar SELinux by default prevents containers accessing
mounted host directories. This script is just used for testing,
so disable it.
2018-03-13 21:19:30 +01:00
Nathan Follens
b485cf91b5 Update Dutch translation 2018-03-13 19:29:02 +00:00
Руслан Ижбулатов
577f1a992e GDK W32: send a DELETE selection when using LOCAL selection protocol
This was not needed before, but now it seems to be necessary for
some reason. The code is just an adjusted copy of the appropriate
piece of the OLE2 protocol code, sending GDK_SELECTION_REQUEST.

The rest is just fixing the fallout, allowing LOCAL protocol to pass
the functions it wasn't supposed to pass before.

Closes #82
2018-03-13 18:21:50 +00:00
Emin Tufan Çetin
a2efd3f3dc Update Turkish translation 2018-03-13 17:17:01 +00:00
Tim Sabsch
98afaed718 Update German translation 2018-03-13 15:03:39 +00:00
Rafael Fontenelle
491e696226 Update Brazilian Portuguese translation 2018-03-13 10:37:16 +00:00
Matthias Clasen
9f6deab88c 3.22.29 2018-03-12 22:22:05 -04:00
Daniel Boles
0f3396d742 FileChooserWidget: Fix leaks in .get_subtitle()
Now that subtitle's default value "Searching" for OPERATION_MODE_SEARCH
is duplicated as it should be, we cannot reassign other strings to it
anymore, as that resulted in the original dupe of "Searching" leaking.

Fix this by only assigning the dup'd "Searching" after trying to get
more specific values, not before. We therefore need to set it to NULL
during its declaration, and that means we needn't in the final else.
2018-03-13 00:19:51 +00:00
Daniel Boles
9d8fadee97 FileChooserWidget: Avoid crash freeing static str
Having a FileChooserDialog in location-entry mode then pressing
<primary>f to move to search mode would crash with an invalid free().

In that case, FileChooserWidget.get_subtitle() returned a static string
straight from gettext. This crashed when the GBinding from :subtitle to
FileChooserDialog’s HeaderBar:subtitle shortly tried to free the string.

Fix by duplicating the string before returning it, like all other paths.

https://bugzilla.gnome.org/show_bug.cgi?id=791004
2018-03-12 23:06:21 +00:00
Stas Solovey
0e01668683 Update Russian translation 2018-03-12 21:08:05 +00:00
Aurimas Černius
bcd920c288 Updated Lithuanian translation 2018-03-12 23:01:22 +02:00
gogo
6c4261338a Update Croatian translation 2018-03-12 20:57:04 +00:00
Anders Jonsson
a2f81d83bb Update Swedish translation 2018-03-12 20:43:21 +00:00
Daniel Boles
cbb22b2916 testinfobar: Test more properties, response signal
Also test :message-type, :show-close-button, and ::response.
2018-03-12 19:00:20 +00:00
Marek Černocký
41f6c469e3 Updated Czech translation 2018-03-12 19:51:52 +01:00
Mart Raudsepp
e4e2b7687d Update Estonian translation 2018-03-12 16:27:50 +00:00
Daniel Boles
f08eeecae6 ListBox: Avoid ::row-activated/Row::activate ambig
…uity, by adding a doc comment to Row::activate explaining what it does
and why it is probably not what the user reading that is looking for.

https://bugzilla.gnome.org/show_bug.cgi?id=794008
2018-03-12 16:12:13 +00:00
Daniel Boles
f7a47a632c InfoBar: Be most specific in new Since annotations 2018-03-12 16:12:13 +00:00
Piotr Drąg
1122508e1c Update Polish translation 2018-03-12 16:42:03 +01:00
Daniel Boles
6b4d95e86d testinfobar: Add simple test of :visible/:revealed
This exists merely to prove that, having added :revealed, show() and
hide() now work reliably, as does set_revealed() for the animated case.

https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:30:49 +00:00
Timm Bäder
e9d84e2653 infobar: Add :revealed property
https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:17:24 +00:00
Timm Bäder
45aa018839 infobar: Keep GParamSpecs around
So we can use them in notify_by_pspec

https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:17:18 +00:00
Sander Sweers
f0bea1ab1d Add proper annotation for gdk_frame_clock_get_refresh_info
See https://gitlab.gnome.org/GNOME/gtk/issues/77
2018-03-12 16:06:46 +01:00
Timm Bäder
04ff9b58f1 emojichooser: Only measure reference emoji once
Doing that once for every emoji is pretty slow and unnecessary as the
width does not change.
2018-03-12 14:40:02 +00:00
Alexandre Franke
72ed0c9539 Update French translation 2018-03-10 22:06:23 +00:00
Nikita Churaev
4e2f59ad23 Tidy up the search bar double border fix
Match "box" instead of "*", as already done for the search bar GTK4 and
for the action box in GTK3. Also clarify which widget property is
causing the margin which needs to be undone.
2018-03-09 22:13:01 +03:00
Pavel Roskin
cc967849f7 x11: Avoid a division by zero
This is similar to f44baf51d9 but for RandR 1.3 servers like
x11rdp and Windows Exceed which don't return a refresh rate. Avoid a
crash when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=775546
2018-03-08 16:00:40 +01:00
Ask Hjorth Larsen
add3592809 Updated Danish translation 2018-03-08 12:23:42 +01:00
Nikita Churaev
b202c44fd8 Fix double borders in windows with a search bar in HighContrast 2018-03-08 00:57:59 +03:00
Ask Hjorth Larsen
8c09b3994a Updated Danish translation of gtk-properties 2018-03-07 22:37:47 +01:00
Ask Hjorth Larsen
b9b2f7711b Updated Danish translation of gtk 2018-03-07 22:37:45 +01:00
Nikita Churaev
d465d790f0 Fix the double border in windows with a search bar.
Includes applications like GNOME Software and GNOME Documents. The
search bar is a composite widget with a revealer inside it, and when the
content of the revealer is hidden, the border lingers. Changed the CSS
to add style to the content of the revealer instead of the search bar
widget itself.
2018-03-07 08:54:11 +03:00
Timm Bäder
46828f8e0a expander: fix sizes in resize_toplevel
We can't use gtk_widget_get_allocation for either non-anchored widgets
(which happens with the child widget when the expander is unexpanded)
nor toplevel windows since that will include the window decorations.

Fixes #70 in gtk3
2018-03-06 18:11:34 +01:00
Christoph Reiter
23b91856e1 Merge branch '63-regression-3-22-26-3-22-27-hidpi-checkboxes-and-radiobuttons-pixmaps-are-not-scaled' into 'gtk-3-22'
Resolve "[ Regression 3.22.26 -> 3.22.27 ] [HIDPI] Checkboxes and radiobuttons pixmaps are not scaled"

See merge request GNOME/gtk!47
2018-03-05 19:58:04 +00:00
Juan Pablo Ugarte
e36b629c36 GtkCssImageSurface: set device scale for cache surface
Closes #63
2018-03-05 14:47:00 -03:00
Stas Solovey
fa47667df9 Update Russian translation 2018-03-05 16:25:05 +00:00
Rūdolfs Mazurs
bb498ba554 Update Latvian translation 2018-03-04 19:22:05 +00:00
Christoph Reiter
5fc27126f5 Merge branch 'phase-field' into 'gtk-3-22'
Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe.

See merge request GNOME/gtk!45
2018-03-04 19:21:26 +00:00
Rūdolfs Mazurs
cccb66afb4 Update Latvian translation 2018-03-04 19:19:38 +00:00
Tomasz Miąsko
5d258bf314 Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe.
When using type annotations, the ABI of type being annotated and a new
type introduced from annotation should match.

In case of enumerations, the most common ABI, and probably the only one
currently used in practice with gtk, corresponds to -fno-short-enums
compiler option. It uses int as the underlying type of enum, bumping it
up to unsigned int, long int or unsigned long int, in that order, when
necessary.

Thus, when annotating a field of integer type with an enum type, it is
never correct to annotate field smaller than int, because it changes the
ABI from perspective on introspection.

The gint8 phase field in GdkEventTouchpadSwipe and GdkEventTouchpadPinch
structures have been previously annotated in such a way, and this change
removes this annotation to restore ABI compatibility.

Size of structures before (which does not match C):

```
>>> Gdk.EventTouchpadPinch.__info__.get_size()
104
>>> Gdk.EventTouchpadSwipe.__info__.get_size()
88
```

Size of structures after (which does match C):

```
>>> Gdk.EventTouchpadPinch.__info__.get_size()
96
>>> Gdk.EventTouchpadSwipe.__info__.get_size()
80
```

Fixes issue #57.
2018-03-04 17:55:44 +01:00
Christoph Reiter
464888a2da Merge branch 'c-includes' into 'gtk-3-22'
Include C headers in introspection file.

See merge request GNOME/gtk!44
2018-03-04 15:03:24 +00:00
Tomasz Miąsko
91498c7db3 Include C headers in introspection file.
Include gtk/gtk.h and gtk/gtk-a11y.h unconditionally,
and gtk/gtkx.h when building with X11. Ensures that
introspection data contains complete set required
headers, which is useful when generating C code based
on introspection data.

Diff for generated gir (when using X11):

```diff
   <include name="xlib" version="2.0"/>
   <package name="gtk+-3.0"/>
+  <c:include name="gtk/gtk-a11y.h"/>
+  <c:include name="gtk/gtk.h"/>
+  <c:include name="gtk/gtkx.h"/>
   <namespace name="Gtk"
              version="3.0"
```

Fixes issue #56.
2018-03-04 15:36:24 +01:00
Christoph Reiter
119d8f996f Merge branch 'gitlab-ci-gtk-3-22' into 'gtk-3-22'
Add gitlab-ci support using a prebuilt docker image

See merge request GNOME/gtk!18
2018-03-04 11:54:24 +00:00
Christoph Reiter
81c4fa5d50 Add gitlab-ci support using a prebuilt docker image
This uses autotools and just calls make
2018-03-04 10:52:49 +01:00
Christoph Reiter
5ca21f6dbb Merge branch 'include-gtkstackaccessible-gtk-3-22' into 'gtk-3-22'
a11y: Include gtkstackaccessible.h in gtk-a11y.h

See merge request GNOME/gtk!42
2018-03-04 09:40:57 +00:00
Kristjan SCHMIDT
7a15bf56a0 Update Esperanto translation 2018-03-03 20:07:27 +00:00
Tomasz Miąsko
3000384b90 a11y: Include gtkstackaccessible.h in gtk-a11y.h 2018-03-03 20:11:14 +01:00
Jordi Mas
fd71badf16 Fix to Catalan translation 2018-03-03 18:12:43 +01:00
Marek Černocký
ead2c3f38f Updated Czech translation 2018-03-03 06:53:53 +01:00
Bruce Cowan
3059df0d4d Update British English translation 2018-03-02 22:09:11 +00:00
Timm Bäder
f0d5b9561b Revert "file chooser: Allow activating without double-click"
This reverts commit fb0a13b7f0.

It's already reverted in master via
c8a6a1138b, so let's not leave subtle
behavior changes that would make a gtk3->gtk4 migration. And just like
the commit message of the revert already mentions: it didn't really make
anybody happy anyway.
2018-03-01 19:47:11 +01:00
Timm Bäder
b13362b369 separatormenuitem: Don't create label widget in get_label
Calling gtk_menu_item_get_label on a GtkSeparatorMenuItem would
otherwise create a GtkLabel child, increasing the vertical size request
to that of the child label.
2018-03-01 19:33:25 +01:00
Christoph Reiter
b68256f7a1 Merge branch 'quartz-missing-config-include' into 'gtk-3-22'
macos: Fix missing gdk symbol exports for gtk dnd

See merge request GNOME/gtk!38
2018-03-01 13:46:36 +00:00
Christoph Reiter
342aee304a macos: export gdk_quartz_drag_source_context()
It's used in the gtk dnd code but not exported in gdk.
Append a "_libgtk_only" suffix as with other internal exports and
export the symbol.

See #32
2018-03-01 14:35:05 +01:00
Kukuh Syafaat
abc171c93a Update Indonesian translation 2018-03-01 09:46:57 +00:00
Christoph Reiter
5c0d242ea3 macos: Fix gdk_quartz_drag_context_get_dragging_info_libgtk_only symbol export
The header got included without config.h being included first which resulted in the
wrong _GDK_EXTERN macro being used. As a result some symbols weren't exported
and starting a DnD action would crash in the linker.

This patch adds config.h includes in all places where clang complained about
_GDK_EXTERN redefinitions.

See #32 for more info.
2018-02-27 19:53:43 +01:00
Dušan Kazik
d76c7c82fc Update Slovak translation 2018-02-26 11:17:48 +00:00
Milo Casagrande
5d3ccfe21e Update Italian translation 2018-02-26 08:02:38 +00:00
Sveinn í Felli
44e7df2a14 Update Icelandic translation 2018-02-26 07:51:26 +00:00
Christoph Reiter
9f84e9a2c5 Merge branch 'quartz-symbol-not-found-gtk3' into 'gtk-3-22'
gdkquartz.h: export pasteboard functions

See merge request GNOME/gtk!20
2018-02-25 21:29:03 +00:00
Kristjan SCHMIDT
9112ca7f88 Update Esperanto translation 2018-02-25 18:15:28 +00:00
Furkan Ahmet Kara
4c43e8468a Update Turkish translation 2018-02-25 15:51:20 +00:00
Changwoo Ryu
d41dfcab35 Update Korean translation 2018-02-25 14:49:53 +00:00
Changwoo Ryu
80458ff586 Update Korean translation 2018-02-25 14:48:59 +00:00
Baurzhan Muftakhidinov
4fe6cba27a Update Kazakh translation 2018-02-24 15:14:20 +00:00
Balázs Úr
5b328804ec Update Hungarian translation 2018-02-23 22:17:48 +00:00
GNOME Translation Robot
f3f75f62e8 Update Scottish Gaelic translation 2018-02-23 17:34:56 +00:00
GNOME Translation Robot
68eb897900 Update Scottish Gaelic translation 2018-02-23 17:25:08 +00:00
Fabio Tomat
5cd21e5579 Update Friulian translation 2018-02-23 08:56:19 +00:00
Fran Dieguez
bc3a939f90 Update Galician translation 2018-02-23 00:26:32 +00:00
GNOME Translation Robot
2246a1e3c9 Update Dutch translation 2018-02-22 19:56:58 +00:00
Daniel Mustieles
af9f458bc9 Updated Spanish translation 2018-02-22 11:23:24 +01:00
Милош Поповић
e3fb265b90 Update Serbian Latin translation 2018-02-22 10:16:15 +00:00
Марко Костић
57f6f8307d Update Serbian translation 2018-02-22 10:09:01 +00:00
Милош Поповић
ab628e365d Update Serbian Latin translation 2018-02-21 14:35:57 +00:00
Марко Костић
4107e670d0 Update Serbian translation 2018-02-21 14:33:06 +00:00
Fabio Tomat
57a4558691 Update Friulian translation 2018-02-21 09:28:45 +00:00
Charles Monzat
796245ca30 Update French translation 2018-02-19 21:28:35 +00:00
Matthias Clasen
146b1e0d42 Merge branch 'test-fix-a11y-schema' into 'gtk-3-22'
testsuite/a11y: Fix missing glib schemas

See merge request GNOME/gtk!16
2018-02-19 18:23:11 +00:00
Matthias Clasen
c96be5a00b Merge branch 'gtk-3-22' into 'gtk-3-22'
gtkprintbackendcups.c: fix \n at end of a debugging note

See merge request GNOME/gtk!24
2018-02-19 17:57:04 +00:00
Matthias Clasen
92711d7f79 Merge branch 'gtk-debug-flags-with-open-display' into 'gtk-3-22'
gtk_init: Fix debug flags handling when a display is already open

See merge request GNOME/gtk!26
2018-02-19 17:55:12 +00:00
Aurimas Černius
8f82b06676 Updated Lithuanian translation 2018-02-18 21:43:14 +02:00
Mario Blättermann
2946ca859c Update German translation 2018-02-18 12:48:31 +00:00
Christoph Reiter
49e3c10575 Merge branch 'gtk-3-22' into 'gtk-3-22'
Fix annotation for gtk_tree_view_is_blank_at_pos()

See merge request GNOME/gtk!12
2018-02-18 10:45:52 +00:00
Christoph Reiter
8e540f2f62 gtk_init: Fix debug flags handling when a display is already open
In PyGObject gdk_init() is called before gtk_init() and thus there is
already a default display open when gtk_init() is called.
The code assigning the display to the debug_flags struct gets only
called when the default display changes, which never happens
when there already is one. As a result GTK_DEBUG=interactive
doesn't do anyting with Python apps.

This makes it call the change callback in case a display is already
there.

See https://gitlab.gnome.org/GNOME/pygobject/issues/166
2018-02-18 10:34:52 +01:00
John Lindgren
5aa939dc93 Fix incorrect optimization in find_builtin_icon().
When we found an icon with exactly the requested size, we'd stop
searching immediately (good), but we'd neglect to set the returned
min_difference to 0 (bad).  This caused theme_lookup_icon() to
prefer other, potentially much worse, matches over the exact one.
2018-02-17 22:03:27 -05:00
Emmanuele Bassi
bd13a5a5ce docs: Add proper deprecation text for GtkStatusIcon
We link to the HowDoI for GNotification in the class description, but we
should be more verbose in the deprecation notices for each function of
the GtkStatusIcon class.

https://bugzilla.gnome.org/show_bug.cgi?id=743975
2018-02-17 17:30:54 -05:00
Ivan Zakharyaschev
d2a4febfa7 gtkprintbackendcups.c: fix \n at end of a debugging note
(cherry picked from commit 7461ceebe3)
2018-02-17 21:25:41 +03:00
Piotr Drąg
688426f57f Update Polish translation 2018-02-17 17:18:59 +01:00
gogo
9bf8449a2e Update Croatian translation 2018-02-16 23:01:50 +00:00
gogo
b6343a1f4d Update Croatian translation 2018-02-16 22:57:44 +00:00
Rafael Fontenelle
c830834170 Update Brazilian Portuguese translation 2018-02-16 16:20:06 +00:00
Tom Schoonjans
2760b020a8 gdkquartz.h: export pasteboard functions 2018-02-16 12:44:18 +00:00
Piotr Drąg
ff40208857 Update Polish translation 2018-02-15 17:12:30 +01:00
Christoph Reiter
c60ea284c5 testsuite/a11y: Fix missing glib schemas
The a11y tests complain that org.gtk.Settings schemas are missing
and fail. This copies the code to build and include the schemas from
the reftests testsuite.
2018-02-15 12:30:57 +01:00
Anders Jonsson
238239c00d Update Swedish translation 2018-02-15 09:47:55 +00:00
Carlos Soriano
fb79115314 gtkplacessidebar: Rename favorites to starred
To have more consistency in the name. The same was done in Nautilus in
commit 27b039b37c.
2018-02-15 10:16:10 +01:00
Piotr Drąg
8cc04e8337 Update POTFILES.in 2018-02-15 04:31:13 +01:00
Matthias Clasen
9f142161e4 Merge branch 'wip/carlosg/imwayland-3-22' into 'gtk-3-22'
modules: Add wayland IM implementation

See merge request GNOME/gtk!5
2018-02-15 03:03:02 +00:00
Matthias Clasen
463ee95136 3.22.28 2018-02-14 12:48:01 -05:00
Carlos Garnacho
e8bffe0c56 modules: Add wayland IM implementation
This IM context implementation goes through the gtk-text-input protocol,
leaving up to the compositor the actual interaction with IM engines. If
the protocol is not offered by the compositor, GTK+ will fallback to the
IMs as specified through GtkSettings.
2018-02-14 14:58:06 +01:00
Carlos Garnacho
3146f29d3a gdk/wayland: Add GdkDisplay call to query available globals
The internal known_globals hashtable is used to carry accounting for
interfaces that depend on others (as ordering is not guaranteed), extend
its usage so it also keeps track of unimplemented interfaces (here at
least).

The API call will then use this to allow querying the globals offered by
the compositor, it will be useful to determine whether we can use
text-input protocols or should fallback to other IMs.
2018-02-14 14:58:06 +01:00
Daniel van Vugt
c6901a8b95 Fix irregular gdk_frame_clock_get_frame_time
This fixes stuttering in animations that rely on the regularity of
gdk_frame_clock_get_frame_time.

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

BEFORE
gdkgears:
58 FPS and visibly stuttering
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +17278μs, gdk_frame_clock_get_frame_time +17278μs
"paint" g_get_monotonic_time +17449μs, gdk_frame_clock_get_frame_time +17426μs
"paint" g_get_monotonic_time +17620μs, gdk_frame_clock_get_frame_time +17600μs

AFTER
gdkgears:
60 FPS and smoother
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +18228μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +15010μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +17134μs, gdk_frame_clock_get_frame_time +16680μs
2018-02-14 08:02:52 -05:00
Gniourf
3274f3a6cc Fix annotation for gtk_tree_view_is_blank_at_pos()
The annotation (allow-none) is wrong. Since
gtk_tree_view_is_blank_at_pos() also calls
gtk_tree_view_get_path_at_pos(), the same fields should have the same
annotations.
2018-02-14 13:51:22 +01:00
Emmanuele Bassi
f82a6421f4 Add missing private header to the build
Closes: #26

        https://bugzilla.gnome.org/show_bug.cgi?id=793442
2018-02-14 10:36:24 +00:00
Mart Raudsepp
97f3a4397a Update Estonian translation 2018-02-13 22:20:41 +00:00
Matthias Clasen
7ea53087ca 3.22.27 2018-02-13 16:30:44 -05:00
Mart Raudsepp
af2d039717 Update Estonian translation 2018-02-13 20:14:22 +00:00
Matthias Clasen
af8b247b45 Merge branch 'gtk-3-22' into 'gtk-3-22'
calendar: Use the new "%OB" format if supported

See merge request GNOME/gtk!2
2018-02-13 13:27:05 +00:00
Rafal Luzynski
cbf118c285 calendar: Use the new "%OB" format if supported
Due to the recent changes introduced in glibc 2.27 "%OB" is the
correct format to obtain a month name as used in the calendar
header.  The same rule has been working in BSD family (including
OS X) since 1990s.  This simple hack checks whether "%OB" is supported
at runtime and uses it if it is, falls back to the old "%B" otherwise.

Closes: #9
2018-02-12 22:09:28 +01:00
Benjamin Otte
4b1c02560f x11: Don't call XInput API for core events
Fixes emacs crashing with XMing.

https://bugzilla.redhat.com/show_bug.cgi?id=1483942
2018-02-12 21:11:58 +01:00
Mart Raudsepp
8dc234717e Update Estonian translation 2018-02-12 00:38:59 +00:00
Efstathios Iosifidis
79995748e0 Update Greek translation 2018-02-11 23:38:57 +00:00
Emmanuele Bassi
12913d1a35 docs: Use the appropriate deprecation for properties
The GtkFontButton:font-name property has been deprecated, but it's using
a non-standard annotation in its documentation.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi
ade22d00f2 gtk: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi
c03ce68c38 Do not use deprecated error trap API
Use the X11-specific API instead.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
4e5ef1a377 toolbar: Use gdk_display_flush()
Instead of the deprecated gdk_flush().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
81c0e7af0e selection: Disable deprecation warnings
We are using a lot of deprecated API, and we know it.

Since the selection code is going to be replaced in GTK 4.0, there's no
real point in keeping the warnings enabled in 3.22.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
3067fb8c24 placessidebar: Move declaration inside conditional block
The `sidebar` variable is only used by the conditional block for
libcloudprovider.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
382d6c1bcb Ignore deprecations for gdk_flush()
When terminating the main loop, we're really trying to flush all
GdkDisplay connections, so it's actually a legitimate internal use
case.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
299a91bd46 docs: Properly deprecate gdk_keymap_get_default()
We're using a compiler annotation, but there's no deprecation notice in
the gtk-doc stanza.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
9c6ae95ece accelgroup: Do not use deprecated API
Use gdk_keymap_get_for_display() with the default display, instead of
the deprecated gdk_keymap_get_default().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
855e4cb88e deprecated: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
c229716796 a11y: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
80e5f28ca0 Remove stray format character
We are not using any string in the debug message.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
2de14479b2 broadway: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
d219bd4d5a x11: Balance an error trap
We are pushing an error trap, and never popping it from the stack.
2018-02-11 23:28:50 +00:00
Alban Browaeys
255e2dd704 Fix overzalous method annotations for drag and drop
Functional revert of commit 9c4892f291.

Fixes introspection scanner warnings like:

  Warning: Gtk: gtk_drag_finish: Methods must belong to the same
  namespace as the class they belong to

That is, the gtk_drag_* functions cannot be methods as they have a
"GdkDragContext" as the instance parameter, and that is not a valid
type for the Gtk namespace.

This is not an introspected ABI change, as the generated introspection
data ignores the annotation.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692152
2018-02-11 23:28:50 +00:00
Anders Jonsson
10d2e44ae2 Update Swedish translation 2018-02-11 19:17:29 +00:00
Piotr Drąg
25afe278e3 Update Polish translation 2018-02-11 16:25:35 +01:00
Emmanuele Bassi
4f962c6dbf Add AGPL3-only licence to GtkAboutDialog
https://bugzilla.gnome.org/show_bug.cgi?id=792793
2018-02-11 14:22:09 +00:00
Fabio Tomat
6e4c6ce6c3 Update Friulian translation 2018-02-11 09:43:48 +00:00
Fabio Tomat
7130656d37 Update Friulian translation 2018-02-11 08:29:56 +00:00
Fran Dieguez
5c85f2cccc Update Galician translation 2018-02-10 18:43:45 +00:00
Fran Dieguez
0e5964ce27 Update Galician translation 2018-02-10 18:41:38 +00:00
Cheng-Chia Tseng
ff43627167 Update Chinese (Taiwan) translation 2018-02-10 07:08:45 +00:00
Cheng-Chia Tseng
6c36eaea98 Update Chinese (Taiwan) translation 2018-02-10 06:54:24 +00:00
Carlos Garnacho
cacd8e6254 Merge branch 'wip/carlosg/fix-issue-1' into 'gtk-3-22'
wayland: Improve EOF detection when reading selections

See merge request GNOME/gtk!1
2018-02-09 10:23:31 +00:00
Carlos Garnacho
08f60dbcf6 wayland: Improve EOF detection when reading selections
g_input_stream_read_bytes() roughly provides the same guarantees
than g_input_stream_read() wrt the number of bytes being possibly
read (i.e. it being a best effort, but no real guarantees).

Instead, rely on the 0-len read that we'd get at the end of the
transfer.

Fixes clipboard/DnD transfers possibly being cut short, resulting
on "Broken pipe" errors on the other side.

https://gitlab.gnome.org/GNOME/gtk/issues/1

Closes: #1
2018-02-08 16:29:18 +01:00
Benjamin Otte
63f534f4b3 cssprovider: Only free bytes when they exist 2018-02-05 18:58:54 +01:00
Benjamin Otte
6ff326a82f css: Add a workaround for gtk_widget_override_font()
The problem here is that the CSS machinery expects font sizes to be in
pixels, but gtk_widget_override_font() provides a value in point and the
CSS machinery has no ability to query the DPI and convert.

This patch changes the dconversion DPI we use from a hardcoded 96 to the
default screen's DPI, which should work better than before.
This will of course not listen to changes in the default screen's DPI,
but that shouldn't be a problem.

People who want to workaround this should use gtk_widget_override_font()
with a font that has an absolute size set via
pango_font_description_set_absolute_size (size * PANGO_SCALE *
                                          gdk_screen_get_resolution (screen));

https://bugzilla.gnome.org/show_bug.cgi?id=774248
2018-02-05 18:49:10 +01:00
Jiri Grönroos
8af082f3c7 Update Finnish translation 2018-02-04 09:14:54 +00:00
Jordi Mas
07324131b3 Update Catalan translation 2018-02-03 21:31:58 +01:00
Jordi Mas
67274f7d9d Update Catalan translation 2018-02-03 21:31:08 +01:00
Matthias Clasen
9b69fe7a7e iconview: Fix a problem with the previous change
After commit ffef28a7e8,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.
2018-01-31 18:37:19 +01:00
Jason Gerecke
c94993e29b wayland: Add support for BTN_STYLUS3
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
2018-01-30 21:32:24 +01:00
Kalev Lember
60750b3ffd tests: Don't add testswitch twice in Makefile.am 2018-01-27 14:49:34 +01:00
Timm Bäder
136b88534c menu: Guard against NULL toplevel
This can happen, as indicated by GtkMenu explicitly connecting to
::destroy of its toplevel window. Do the same thing in GtkComboBox.
2018-01-26 11:37:31 +01:00
Pieter Schalk Schoeman
4c8f7c4aca Update Afrikaans translation 2018-01-24 11:40:40 +00:00
Pieter Schalk Schoeman
0cbf45a663 Update Afrikaans translation 2018-01-24 11:36:50 +00:00
Daniel Boles
b8e2430486 Widget: Don’t call reset() on NULL EventController
GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
_gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
our EventControllerData but does not delete said ECData from our GList.

Subsequently, if that same Widget gets unparent()ed, that method calls
unset_state_flags(), which leads to doing reset_controllers() if we are
insensitive. Now, unlike most most other loops over the GList of ECData,
reset_controllers() does not skip nodes whose pointer-to-Controller is
NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.

This surfaced in a gtkmm program. The Gesture is destroyed before the
Widget. The Widget then gets dispose()d, which calls unparent()… boom.
I didn’t find an MCVE yet but would hope this logic is correct anyway:

The simplest fix is to make the loop in gtk_widget_reset_controllers()
skip GList nodes with a NULL Controller pointer, like most other such
loops, so we avoid passing the NULL to gtk_event_controller_reset().

In other, live cases, _gtk_widget_run_controllers() loops over the GList
and removes/frees nodes having NULL Controllers, so that should suffice.
But this clearly was not getting a chance to happen in the failing case.

https://bugzilla.gnome.org/show_bug.cgi?id=792624
2018-01-22 19:09:50 +00:00
GNOME Translation Robot
814c55d473 Update Esperanto translation 2018-01-22 18:34:48 +00:00
Juan Pablo Ugarte
beed1f660e GtkGestureMultiPress: check event state before emiting released signal
Fix bug 771986 "Inconsistent 'row-activated' signal emission before \
drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"
2018-01-22 15:42:54 +01:00
Balázs Úr
e6be9a2a4d Update Hungarian translation 2018-01-21 22:53:01 +00:00
Balázs Úr
51220e3a31 Update Hungarian translation 2018-01-21 22:49:00 +00:00
Matthias Clasen
5ab5a5166e iconview: Fix updates with filter models
Filter models rely on views taking a ref on every node
they care about. GtkIconView was not doing that. Amazingly,
this has never shown up in a bug so far, until I spotted
the fallout in gnome-font-viewer.
2018-01-19 16:06:01 +01:00
Matthias Clasen
5b19d6b1b8 Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 16:05:51 +01:00
Matthias Clasen
ef72f3cbce font chooser: Fix property notification
We must notify the font and font-desc properties when the
list selection changes, and return NULL values for them
when there is no selection in the list.
2018-01-18 19:58:27 -05:00
Matthias Clasen
5f675181ce font chooser dialog: Improve sensitivity handling
Enable the select button when a font is selected, as it should be.
2018-01-18 19:48:12 -05:00
Matthias Clasen
e10f616065 font chooser: Small revision of the UI
Show only the font names in the list, in their own
font, in order to make the list less noisy.
2018-01-18 19:36:56 -05:00
Chris Lamb
6b85162f43 gtk/queryimmodules.c: Make the output deterministic.
Whilst working on the Reproducible Builds effort [0], we noticed that
queryimmodules generates non-reproducible output as it iterates over the
filesystem without sorting.

Patch attached.

 [0] https://reproducible-builds.org/

Signed-off-by: Chris Lamb <lamby@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=786528
2018-01-16 22:39:03 -05:00
Matthias Clasen
53bc2566b3 tree model sort: Fix set_sort_column
We were failing to change the sort order for the
default sort column in some cases. Fix that, and
add a testcase for this issue.

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

Add a testcase for the previous fix
2018-01-16 18:19:10 -05:00
Matthias Clasen
e1aeb73a62 tree model sort: Fix initial default sort func
gtk_tree_sortable_has_default_sort_func should return
FALSE initially.
2018-01-16 18:19:01 -05:00
Piotr Drąg
bb844e44b6 Update Polish translation 2018-01-15 22:16:51 +01:00
Matthias Clasen
9e3b814580 emoji: Skip overly wide fallback rendering
Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.
2018-01-15 08:21:52 -05:00
Daniel Boles
bcd3c42b92 GdkMonitor: Fix link to nonexistent Display method
There is no gdk_display_get_monitors(). Instead, we have to use
gdk_display_get_n_monitors() and gdk_display_get_monitor(int).
2018-01-13 20:03:37 +00:00
Daniel Boles
b5e4a9d716 HeaderBar: Explain use in conjunction w/ GtkWindow
After hinting how good GtkHeaderBar is for GtkWindow, let’s link to
the latter and indicate how users can make the two work together.
2018-01-12 23:12:19 +00:00
Daniel Boles
fe220402cb Window: Mention GtkHeaderBar in set_titlebar() doc
This is the typical thing passed here and what most users want, so we
should mention it here, rather than requiring users to figure it out.
2018-01-12 23:12:19 +00:00
Daniel Boles
e75d91e7b1 Window: Clarify resize() doc about titlebar widget
Clarify the reference to HeaderBar, as it applies to any custom title
widget; HeaderBar is only the most common one used. Also, fix a typo.
2018-01-12 23:03:44 +00:00
Ting-Wei Lan
b68e55ecce wayland: Use portable sed syntax in gdk/wayland/Makefile.am
Replace non-portable \<, \>, \+ with \(, \), \{, \} to avoid build
failure on systems not using GNU sed.

https://bugzilla.gnome.org/show_bug.cgi?id=792279
2018-01-10 00:45:07 +08:00
Juan Pablo Ugarte
2a8e1745cf GtkCssImageSurface: add cache for the last drawn size.
Keep a copy of the scaled image to speed up rendering multiple times
the image at the same size.
2018-01-09 11:29:10 -03:00
Daniel Boles
8ed4b48b4c Adwaita: Fix typo lenght => length in SASS 2018-01-09 09:49:24 +00:00
Sveinn í Felli
d96a7c9e87 Update Icelandic translation 2018-01-08 17:47:11 +00:00
Sveinn í Felli
856486fea8 Update Icelandic translation 2018-01-08 17:39:46 +00:00
Daniel Boles
a9499dbe48 ScrolledWindow: add() before remove() in snippet
We can't remove() a child widget that wasn't already add()ed, of course.
2018-01-07 16:47:41 +00:00
Matthias Clasen
081488f8f2 file button: Don't leak rows
The file chooser button manually manages the memory of
data in its model, so it needs to explicitly free the
rows.
2018-01-07 16:38:42 +00:00
Matthias Clasen
7de01b31ef Remove a dead macro
GCs have been dead for a long time.
2018-01-07 16:38:42 +00:00
Timm Bäder
d15fbee353 Make a few more code samples compile 2018-01-07 16:38:42 +00:00
Timm Bäder
fda98ba562 entry: Remove some questionable code examples 2018-01-07 16:38:41 +00:00
Timm Bäder
c006c2fdbc widget: Make all code snippets compile 2018-01-07 16:38:41 +00:00
Timm Bäder
6e197ffac9 liststore: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
e00de3814e searchbar: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
a443b525c3 menuitem: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
456ca1062b expander: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
e5240de5bc treeviewcolumn: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
a65ae5fb40 notebook: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
af1d5362ab scrolledwindow: Fix code sample compilation 2018-01-07 16:38:41 +00:00
Matthias Clasen
9cf48ec3f8 Drop an unused enum value
We haven't had a GtkWindow::frame-event since the
linux-fb backends demise.
2018-01-07 16:38:41 +00:00
Rico Tzschichholz
6f26d0dc0c filechooser: Add missing array annotations to add_choice() 2018-01-06 09:40:39 +01:00
Rico Tzschichholz
43433f3ccd iconview: Prevent ownership transfer of cell out-param in get_item_at_pos() 2018-01-06 09:40:26 +01:00
Arnaud Bonatti
01c349995c Add test for GtkActionable GtkListBoxRow.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Arnaud Bonatti
cb935d947c Make GtkListBoxRow GtkActionable.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Ting-Wei Lan
31f7b55306 configure: Don't declare functions in AC_TRY_COMPILE and AC_LANG_PROGRAM
Both AC_TRY_COMPILE and AC_LANG_PROGRAM put code passed to their second
arguments to the body of the main function. This means that we cannot
and should not declare functions there, or we end up checking whether
the compiler support nested functions instead of whether a compiler or
linker flag is supported.

GCC supports nested functions and tests succeed. Clang doesn't support
nested functions, so tests fail and -fvisibility=hidden won't be used.
This means that functions which are not intended to be used by other
programs, such as gtk_menu_tracker*, gtk_action_observ*,
gtk_menu_muxer_*, become global symbols with default visibility.

GNOME Shell has a private library libgnome-shell-menu.so, which also has
symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* that are
intended to be used by GNOME Shell itself. When GNOME Shell still used
Autotools build system, the executable gnome-shell explicitly linked to
libgnome-shell-menu.so, so the linker loaded libgnome-shell-menu.so
before libgtk-3.so.0 and GNOME Shell used correct symbols from its
private library.

However, after GNOME Shell switched to Meson build system, gnome-shell
executable no longer lists libgnome-shell-menu.so as its dependency.
Even if we adds it to the build file, it won't be listed in DT_NEEDED of
gnome-shell because Meson uses -Wl,--as-needed by default. This causes
the runtime linker to load libgtk-3.so.0 before libgnome-shell-menu.so
and symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* are
bound to libgtk-3.so.0 instead of libgnome-shell-menu.so. GNOME Shell
hangs when opening more than one window because it uses functions from
the wrong library.

This problem is already fixed in OpenBSD ports. The article describing
it can be found on OpenBSD Journal with this link:
https://undeadly.org/cgi?action=article;sid=20170930133438

https://bugzilla.gnome.org/show_bug.cgi?id=791943
2018-01-03 02:19:18 +08:00
Arnaud Rebillout
1e7982212f gtk: remove non-breaking space, probably there by mistake
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:42:18 +00:00
Arnaud Rebillout
9b2e487a7f css docs: fix some formatting inconsistencies along the way
Mostly spaces.

Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:42:09 +00:00
Arnaud Rebillout
4a371de393 css docs: remove useless <para>
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:28 +00:00
Arnaud Rebillout
084db132e9 css docs: swap border-width and border-left shorthands, to keep going clockwise
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:18 +00:00
Arnaud Rebillout
489d0db6d1 css docs: Fix refentry and refname
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:09 +00:00
Arnaud Rebillout
352f678ac1 css docs: Ensure the first column does not break for every table
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:01 +00:00
Arnaud Rebillout
ce79fac68d css docs: Get rid of non-breaking hyphens
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:32:50 +00:00
Arnaud Rebillout
ceec7e9cb8 css docs: Get rid of non-breaking spaces
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:28:37 +00:00
Arnaud Rebillout
46b38c00ad css docs: Fix some angle brackets for percentage
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:28:31 +00:00
Timm Bäder
ad536f333b window: Avoid redundantly getting the GDK window
meta-pick of commit c1573a1fda: the
variable gdk_window is used in a check, but we may as well use it again
to avoid calling _gtk_widget_get_window() again unnecessarily.
2018-01-02 15:26:46 +00:00
Daniel Boles
bdb3a4d505 themes: Regenerate CSS to reflect recent commits 2018-01-01 19:52:47 +00:00
Daniel Boles
7dfb99c2ca HighContrast: Avoid expander↔combobox interference
as per commit b4b9aa1e5f
2018-01-01 19:46:58 +00:00
Arnaud Rebillout
53eb42338a css docs: Fix duplicate border‑right‑width
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-01 18:55:13 +00:00
Matthias Clasen
b4b9aa1e5f Adwaita: Avoid expander<>combobox interference
Putting a combobox in an expander was causing the combo arrow
to go sideways. Increase the specificity with which we address
the expander arrow to avoid that.
2018-01-01 18:48:08 +00:00
Matej Urbančič
5fef3ff971 Slovenian update ... 2017-12-31 12:28:54 +01:00
Matej Urbančič
308796628a Slovenian update ... 2017-12-31 12:28:23 +01:00
Matthias Clasen
bd9ed01839 fontchooser: Add global keynav
Starting to type should focus the search entry and start
a search.
2017-12-27 17:32:16 -05:00
Matthias Clasen
176c1046cb Add some deprecation annotations
These functions have been removed in master, and their
replacements are already available here.
2017-12-25 23:00:30 -05:00
Matthias Clasen
6fa63bd92c font button: Some followup cleanups
Don't refer to the font-name property in docs either, and
don't use deprecated API internally.
2017-12-21 11:42:23 -05:00
Matthias Clasen
87e1615610 font button: Deprecate the font-name property
It has long been redundant with the GtkFontChooser::font
property.
2017-12-21 11:13:08 -05:00
Matthias Clasen
ed0600e8c0 tests: Stop using gtk_font_button_get_font_name
We can instead use the GtkFontChooser::font property.
2017-12-21 11:13:08 -05:00
Daniel Boles
0e338d31a4 Range: Fix inverted vert scrolling on vert Ranges…
The change in the previous patch should only be applied when the Range
is oriented horizontally.

https://bugzilla.gnome.org/show_bug.cgi?id=737175
2017-12-19 21:18:41 +00:00
Daniel Boles
4d18a346c1 Range: Fix inverted vert scrolling on horiz Ranges
Users expect, & previous patches have tried to assure, that scrolling up
over a horizontal Range will cause the value to increase & vice-versa.
But the path using directions was still negating the delta & decreasing
the value on scrolling up. This could be seen on Win32 or X without XI2.

So, only negate the delta when scrolling down (or left), not up, so that
scrolling up (or right) will make the value increase for any event type.

https://bugzilla.gnome.org/show_bug.cgi?id=737175#c5
2017-12-19 18:40:51 +00:00
Matthias Clasen
09c94c27e1 font chooser: Stop listening to style-updated
The only time a style-updated indicates we need
to reload fonts is when it is synthesized by GtkSettings
in response to a fontconfig timestamp change, but
we are listening to those already, anyway.
2017-12-19 12:13:32 -05:00
Matthias Clasen
5f022cbc12 Avoid calling unsetenv too late
Stash the DESKTOP_AUTOSTART_ID env var in a constructor,
before any threads have been created.

https://bugzilla.gnome.org/show_bug.cgi?id=790963
2017-12-17 17:33:02 -05:00
Matthias Clasen
a41e0ce4a4 wayland: Handle scale 3 for cursors
This is just a bandaid solution to make scale 3 work.
If people seriously want to go for scales larger than
that, we need a better solution.
2017-12-17 17:17:12 -05:00
Matthias Clasen
b49502c167 inspector: Allow to bump scale to 3
Might as well allow this, for 'large scale testing'.
2017-12-17 17:17:02 -05:00
Matthias Clasen
0eaa76a032 cups: Warn only once if colord is not available
No need to keep complaining about this.

https://bugzilla.gnome.org/show_bug.cgi?id=791650
2017-12-17 17:11:27 -05:00
Matthias Clasen
32332b3a03 Revert "css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP"
This reverts commit 492469a94a.

People have been reporting missing invalidations with this change.
2017-12-17 11:20:50 -05:00
Matthias Clasen
f44af2e6ae Revert "css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()"
This reverts commit 7e253f4bd3.
2017-12-17 11:20:15 -05:00
Matthias Clasen
7d23b33ac5 Don't place dnd cursor in placeholder text
That is just misleading - the entire placeholder text is going
to be replaced by the drop.
2017-12-17 10:54:21 -05:00
Matthias Clasen
11bfce3f36 listbox: Fix a crash during keynav
The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=791549
2017-12-15 18:46:21 -05:00
Matthias Clasen
e834a2b089 x11: Avoid crash in fallback move emulation
Quietly do nothing when there is already an ongoing operation.
This matches the behavior of the ewmh code, and is much nicer
than a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=789054
2017-12-15 16:17:27 -05:00
Juan Pablo Ugarte
7e253f4bd3 css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()
https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-14 16:40:40 -05:00
Chun-wei Fan
c9a54ba1c2 gdk/win32/gdkselection-win32.c: Fix build without G_ENABLE_DEBUG
_gdk_win32_data_to_string() is only available when G_ENABLE_DEBUG is
defined, so as in gdkproperty-win32.c, use GDK_NOTE on the parts where
we assemble and output the debug messages.
2017-12-15 01:11:17 +08:00
Stas Solovey
4e0adbc8dc Update Russian translation 2017-12-14 10:05:27 +00:00
Stas Solovey
d69f998c26 Update Russian translation 2017-12-14 09:58:07 +00:00
Matthias Clasen
05e4e7fe87 placesview: Make middle click work
This does not cost us much, and improves consistency.
2017-12-12 13:57:06 -05:00
Matthias Clasen
c4ff07025b link button: Set a drag icon
It is a bit odd to drag nothing around, so set an icon.
2017-12-10 13:58:27 -05:00
Colomban Wendling
75768a4d00 Fix updating the widget accessible description when using its tooltip
We need to notify ATK the description changed when the tooltip text associated
with the widget changes and gtk_widget_accessible_get_description() would use
it as the description.

https://bugzilla.gnome.org/show_bug.cgi?id=779009
2017-12-09 21:28:47 -05:00
Timm Bäder
492469a94a css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP
It was used to mark css properties that affect widgets with text, but it
caused unnecessary invalidations. E.g. 'color' was marked as
AFFECTS_TEXT but changing just the color of a label should not
automatically queue a resize, which is what the code in
gtk_widget_real_style_updated does.

Replace this flag with GTK_CSS_AFFECTS_TEXT_SIZE and
GTK_CSS_AFFECTS_TEXT_CLIP, which GtkWidget can use only if the widget
actually has text.

https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-09 20:16:02 -05:00
Marco Trevisan (Treviño)
ecc9946566 cssshadowvalue: don't apply the y_scale offset twice to the shadow
As per commit 942e904 this changed causing a regression that
seems to be visible only when scale > 2.

https://bugzilla.gnome.org/show_bug.cgi?id=791363
2017-12-09 20:13:20 -05:00
Jonas Ådahl
25dc32c1a1 wayland: Destroy the xdg_imported after the wl_surface
This way the window manager can handle destruction while having the
transient-for relationship still valid.

https://bugzilla.gnome.org/show_bug.cgi?id=791062
2017-12-07 22:13:40 -05:00
Jonas Ådahl
dee5142c91 wayland: Maybe postpone xdg-foreign state setup until mapping
In order to map a window with the correct initial parent-child
relationship when a modal dialog is set up to be a child of an imported
foreign window, the relationship must be set up before the window is
mapped.

In order to do this, if a window is not yet mapped, postpone the
relationship setup until when the window is eventually mapped.

https://bugzilla.gnome.org/show_bug.cgi?id=791062
2017-12-07 22:13:39 -05:00
Colin Leroy
279b81d202 placesview: Present FUSE-reachable network shares in Other Locations
The documentation about gtk_file_chooser_set_local_only() states
that "non-native files may still be available using the native
filesystem via a userspace filesystem (FUSE)."
The code that made this possible in GTK+2 was missing from GTK+3 and
that represented a regression for Linux users in numerous applications
(Firefox, Thunderbird, Chromium, ...)

https://bugzilla.gnome.org/show_bug.cgi?id=787128
2017-12-07 21:41:44 -05:00
Christian Hergert
86dd1e37a7 autocleanups: allow g_autoptr() usage with GtkTreePath
As the summary says, this allows using g_autoptr(GtkTreePath). This is
useful for API that uses out parameters for GtkTreePath that need to be
freed.

https://bugzilla.gnome.org/show_bug.cgi?id=791234
2017-12-04 19:34:05 -08:00
Руслан Ижбулатов
6d0b0cb99b GDK W32: Plug a resource leak
Ensure that surfaces allocated in the impl are destroyed in finalize()

https://bugzilla.gnome.org/show_bug.cgi?id=787089
2017-12-03 03:14:28 +00:00
Piotr Drąg
4c2f3e3105 Update Polish translation 2017-12-02 18:40:28 +01:00
Carlos Garnacho
3c40b217b9 gdk: Always emit motion after enter
After a pointer emulating GDK_TOUCH_END event triggering a fake leave
notify with GDK_CROSSING_TOUCH_END mode, pointer_under_window will be
unset, which will make the next motion/touch_update event to trigger
an enter notify event again.

Up till there, that's fine, however the motion event is just consumed
in favor of the just synthesized enter notify event. This is unexpected
to clients like spice-gtk that will only update coordinates from motion
events, sending both enter and motion is more consistent with X11 and
will make them happy.

https://bugzilla.gnome.org/show_bug.cgi?id=791039
2017-11-30 19:26:48 +01:00
Carlos Garnacho
e7e047fc3f gdk/wayland: Restrict shortcut inhibition to keyboard grabs on toplevels
It is unlikely that popup windows will contain anything that requires this
(popup menus being more interested in redirecting keyboard focus to
themselves). OTOH popup implementations that just grab the keyboard are
commonplace enough, it makes sense not to trigger inhibition for these.

https://bugzilla.gnome.org/show_bug.cgi?id=789268
2017-11-30 18:54:47 +01:00
Руслан Ижбулатов
8df7f88b66 GDK W32: Remove an unnecessary type check
No idea why it's here, the hash table can store any kind of data,
there's no reason why it wouldn't be able to store an old X string type.
Might be a holdout from the old days, when strings were handled in
a special way (stored directly in the clipboard?).

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:28 +00:00
Руслан Ижбулатов
c329940cf1 GDK W32: Make sure drag source window is not NULL
This prevents GTK from throwing a bunch of warnings when it tries
to get drag source window -> screen of that window -> ipc widget for that screen,
and then tries to attach a signal handler to that widget.

Specifically, this happens when we get a DnD move from another
application.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:28 +00:00
Руслан Ижбулатов
3fd23fcfd1 GDK W32: Special handling for DELETE requests
1) Ensure that any DELETE requests from the target are sent to GDK, even if
   both the source and the target are in the same process and it
   is therefore possible to use a shortcut and call the handler directly
   in GTK layer
2) Ensure that target GDK doesn't do anything when GTK asks it to send
   a DELETE request, just report back immediately (the code up the stack
   does not check for successfullness when request is DELETE, so not giving
   it any data is OK).

The source code already synthesizes a DELETE request, so that side is
also taken care of.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:27 +00:00
Руслан Ижбулатов
56074fbf3c GDK W32: Preserve the target value for change_property()
We need to know the target atom value to know when we need to
do something with side-effects (since side-effects are expressed via
special target values). Previously, the code side-stepped that by looking
at the data type (which was rather unique for the one side-effect
target that we supported, signalled by the TARGETS target),
but for the DELETE target that seems to be no longer an option, hence the new
field to carry this information past the convert_selection() routine.

This prevents GDK from throwing a warning when trying to convert
a DELETE target, which has no format or data objects set.

The side-effects for the DELETE target happen earlier, in GTK layer.
By the point it gets to change_property(), it's a no-op.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:26 +00:00
Kukuh Syafaat
6ab1ab9f46 Update Indonesian translation 2017-11-29 12:05:29 +00:00
Kukuh Syafaat
706c80be51 Update Indonesian translation 2017-11-29 12:04:08 +00:00
Christophe Fergeau
7d18f2fd3c wayland: Fix indentation of previous commit 2017-11-29 12:15:48 +01:00
Christophe Fergeau
8af29e3756 wayland: emit GDK_SELECTION_CLEAR on owner changes
The wayland backend currently never emits GDK_SELECTION_CLEAR events.
GtkClipboard uses this signal in order to clear the clipboard owner when
the selection is set to something outside the application.
This commit ensures the wayland backend emits GDK_SELECTION_CLEAR before
setting the clipboard owner to NULL, as this means we lost the
selection.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:21:32 +01:00
Christophe Fergeau
beb2caacb9 wayland: Remove unused data structure
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:21:32 +01:00
Matthias Clasen
91ef88f77f Improve the docs
Document that gtk_application_is_inhibited can't
be guaranteed to work.
2017-11-28 22:56:11 -05:00
Милош Поповић
9ce824d360 Update Serbian translation 2017-11-27 10:29:15 +00:00
Милош Поповић
8397f22762 Update Serbian translation 2017-11-27 10:02:46 +00:00
Alex Ivanov
2b6f3f7867 wayland: Don't provide gsetting if dconf is not available
This makes gtk+ fall back to reading ~/.config/gtk-3.0/settings.ini
on systems with Wayland, but without dconf (do those exist?).

https://bugzilla.gnome.org/show_bug.cgi?id=790201
2017-11-26 19:32:52 -05:00
Jan Alexander Steffens (heftig)
b0fb67eabc entry: Undo ABI breakage from addition of insert_emoji
https://bugzilla.gnome.org/show_bug.cgi?id=790862
2017-11-26 18:24:51 -05:00
Muhammet Kara
03f2eaf23a Update Turkish translation 2017-11-26 18:59:26 +00:00
Yosef Or Boczko
f95cecba2d Updated Hebrew translation 2017-11-26 18:31:59 +02:00
Yosef Or Boczko
f3328330b6 Updated Hebrew translation 2017-11-26 18:28:07 +02:00
Aurimas Černius
3a1a7135a2 Updated Lithuanian translation 2017-11-25 21:33:28 +02:00
Руслан Ижбулатов
c6c13bd66b Fix a nefarious typo 2017-11-25 17:04:48 +00:00
Руслан Ижбулатов
934ac3f6ef GDK W32: Ensure that selection request is processed
To do that, run the message loop for one second or until the side-effect
of running the selection request handler is achieved (as opposed to
running it until the event is no longer queued).

The disavantage of this method is that if the event handling is
somehow missed (due to a variety of reasons - after all, it's not
a straight path from an event being queued to property_change()
being called), this will loop for one second. Since we do process
events during that time, this will not hang the application, but
might still restrict some of the functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:43 +00:00
Руслан Ижбулатов
7b6efc29cc GDK W32: Refuse to release mouse grab while in DnD mode
Handle WM_CANCELMODE and do nothing in response to it when DnD is
active. Otherwise pass it to DefWindowProc, which will call ReleaseCapture()
on our behalf.
This prevents us from losing mouse capture when alt-tabbing during DnD
(this includes the feature of Windows Explorer where dragging stuff over
a window button in the taskbar causes that window to receive focus, i.e.
keyboardless alt-tabbing).

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:42 +00:00
Руслан Ижбулатов
0ee453a45b GDK W32: Update layered windows on opacity changes
Without this patch layered windows are only updated when they are moved
by the user or then their contents changes. This patch adds opacity
changes to the list of things that make GDK update a window. Without this
windows that don't redraw and are not moved by the used (DnD drag indicator
windows, for example) don't change their opacity.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:41 +00:00
Руслан Ижбулатов
8caba9536c W32: Massive W32 DnD fix
Massive changes to OLE2 DnD protocol, which was completely broken before:
* Keep GdkDragContext and OLE2 objects separate (don't ref/unref them
  together, don't necessarily create them together).
* Keep IDataObject formats in the object itself, not in a global variable.
* Fix getdata() to look up the request target in its format list, not in the
  global hash table
* Create target GdkDragContext on each drag_enter, destroy it on drag_leave,
  whereas IDropTarget is created when a window becomes a drag destination
  and is re-used indefinitely.
* Query the source IDataObject for its supported types, cache them in the
  target (!) context. This is how GTK+ works, honestly.
* Remember current_src_object when we initiate a drag, to be able
  to detect later on that the data object is ours and use a
  shortcut when querying targets
* Make sure GDK_DRAG_MOTION is only sent when something changes
* Support GTK drag cursors
* Ensure that exotic GTK clipboard formats are registered
  (but try to avoid registering formats that can't be used between applications).
* Don't enumerate internal formats
* Ensure that DnD indicator window can't accept drags or receive any kind of input
  (use WS_EX_TRANSPARENT).
* Remove unneeded indentation in _gdk_win32_dnd_do_dragdrop()
* Fix indentation in gdk_win32_drag_context_drop_finish()
* Remove obsolete comments in _gdk_win32_window_register_dnd()
* Check for DnD in progress when processing WM_KILLFOCUS, don't emit a grab
  break event in such cases (this allows alt-tabbing while DnD is in progress,
  though there may be lingering issues with focus after dropping...)
* Support Shell ID List -> text/uri-list conversion, now it's possible
  to drop files (dragged from Explorer) on GTK+ applications
* Explicitly use RegisterClipboardFormatA() when we know that the string
  is not in unicode. Otherwise explicitly use RegisterClipboardFormatW()
  with a UTF8->UTF16 converted string
* Fix _gdk_win32_display_get_selection_owner() to correctly bail
  when selection owner HWND is NULL (looking up GdkWindow for NULL
  HWND always succeeds and returns the root window - not the intended
  effect)
* More logging
* Send DROP_FINISHED event after DnD loop ends
* Send STATUS event on feedback
* Move GetKeyboardState() and related code into _gdk_win32_window_drag_begin(),
  so that it's closer to the point where last_pt and start_pt are set
* Use & 0x80 to check for the key being pressed. Windows will set low-order bit
  to 1 for all mouse buttons to indicate that they are toggled, so simply
  checking for the value not being 0 is not enough anymore.
  This is probably a new thing in modern W32 that didn't exist before
  (OLE2 DnD code is old).
* Fixed (hopefully) and simplified HiDPI parts of the code.

Also adds managed DnD implementation for W32 GDK backend (for both
OLE2 and LOCAL protocols). Mostly a copy of the X11 backend code, but
there are some minor differences:
* doesn't use drag_window field in GdkDragContext,
  uses the one in GdkWin32DragContext exclusively
* subtracts hotspot offset from the window coordinates when showing
  the dragback animation
* tries to consistently support scaling and caches the scale
  in the context
* Some keynav code is removed (places where grabbing/ungrabbing should
  happen is marked with TODOs), and the rest is probably inert.

Also significantly changes the way selection (and clipboard) is handled
(as MSDN rightly notes, the handling for DnD and Clipboard
 formats is virtually the same, so it makes sense to handle
 both with the same code):
* Don't spam GDK_OWNER_CHANGE, send them only when owner
  actually changes
* Open clipboard when our process becomes the clipboard owner
  (we are doing it anyway, to empty the clipboard and *become* the owner),
  and then don't close it until a scheduled selection request event
  (with TARGETS target) is received. Process that event by announcing
  all of our supported formats (by that time add_targets() should have
  been called up the stack, thus the formats are known; just in case,
  add_targets() will also schedule a selection request, if one isn't
  scheduled already, so that late-coming formats can still be announced).
* Allow clipboard opening for selection_convert() to be delayed if it
  fails initially.
* The last two points above should fix all the bugs about GTK+ rising
  too much ruckus over OpenClipboard() failures, as owner change
  *is allowed* to fail (though not all callers currently handle
  that case), and selection_convert() is asynchronous to begin with.
  Still, this is somewhat risky, as there's a possibility that the
  code will work in unexpected ways and the clipboard will remain open.
  There's now logging to track the clipboard being opened and closed,
  and a number of failsafes that try to ensure that it isn't kept open
  for no reason.
* Added copious notes on the way clipboard works on X11, Windows and GDK-W32,
  also removed old comments in DnD implementation, replaced some of them
  with the new ones
* A lot of crufty module-global variables are stuffed into a singleton
  object, GdkWin32Selection. It's technically possible to make it a
  sub-object of the Display object (the way Wayland backend does),
  but since Display object on W32 is a singleton anyway... why bother?
* Fixed the send_change_events() a bit (was slightly broken in one of the
  previous iterations)
* Ensure that there's no confusion between selection conversion (an artifact
  term from X11) and selection transmutation (changing the data to be W32-compatible)
* Put all the transmutation code and format-target-matching code into gdkselection-win32.c,
  now this code isn't spread across multiple files.
* Consequently, moved some code away from gdkproperty-win32.c and gdkdnd-win32.c
* Extensive format transmutation checks for OLE2 DnD and clipboard.
  We now keep track of which format mappings are for transmutations,
  and which aren't (for example, when formats are passed as-is, or when
  a registered name is just an alias)
* Put transmutation code into separate functions

* Ensure that drop target keeps a format->target map for supported formats,
  this is useful when selection_convert() is called, as it only receives a
  single target and no hints on the format from which the data should
  be transmuted into this target.
* Add clear_targets() on W32, to de called by GTK
* Use g_set_object() instead of g_ref_object() where it is allowed.
* Fix indentation (and convert tabs to spaces), remove unused variables

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:40 +00:00
Руслан Ижбулатов
41026987be GDK W32: Don't leak the atom name string
https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:39 +00:00
Руслан Ижбулатов
022cf4252f GDK W32: Fix a typo in OLE2 DnD code
https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:38 +00:00
Руслан Ижбулатов
2cc7a9c034 Only register application/x-rootwindow-drop on X11
application/x-rootwindow-drop is not useful anywhere else,
so put it under #ifdef GDK_WINDOWING_X11

On W32 this prevents toplevels from automatically becoming valid
drop targets with a useless drop type.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:37 +00:00
Руслан Ижбулатов
87103b9a14 GDK W32: More flexible modal operation mode
Instead of using a boolean to indicate a modal operation being in progress,
use a set of flags, and allow these to be set and unset independently.

Specifically, this allows WM_CAPTURECHANGED handler to only act when a drag-move or
drag-resize modal operation is in progress, and ignore DND (which can also cause
WM_CAPTURECHANGED to be posted). This avoids a crash due to assertion failure when
OLE2 DND code tries to end a modal operation that was already ended by the WM_CAPTURECHANGED
handler.

https://bugzilla.gnome.org/show_bug.cgi?id=786121
2017-11-25 15:44:36 +00:00
Daniel Boles
87673af98c Be more specific in ::insert-emoji Since tag
I had been unsure whether to include the minor version, but
:show-emoji-icon already did, so do the same here to match.
2017-11-23 17:17:47 +00:00
Руслан Ижбулатов
30ddb3e1a4 GDK W32: fix monitor pruning code
Decrement the counter for each removed element, otherwise we skip
one element every time we remove one. Also, no need for continue here.
2017-11-23 07:15:28 +00:00
Daniel Boles
2c9072314a Add Since to ::insert-emoji, and some trivialities
Document when these keybinding signals were added.
2017-11-22 22:35:25 +00:00
Matthias Clasen
f922aee5e2 text view: Support the Emoji chooser
Similar to GtkEntry, add an "Insert Emoji" context
menu item, and add the same keybindings. We don't
add the icon here, since it is not clear where it
would go.

https://bugzilla.gnome.org/show_bug.cgi?id=790029
2017-11-22 22:20:34 +00:00
Matthias Clasen
bd56e0d918 Fix indentation mishap 2017-11-22 22:20:28 +00:00
Daniel Boles
42c3b91fa7 SpinButton: Explain meaning of nullable Adjustment
configure() marked the @adj argument as (allow-none) but did not explain
what passing NULL would do. Fix that, and move it to (nullable) as well.
2017-11-22 20:58:00 +00:00
Daniel Boles
c490ac4ed8 doc: Replace uses of #NULL with %NULL 2017-11-22 20:58:00 +00:00
Daniel Boles
f1b812731d CellRendererPixbuf: Improve property docs
Add Since annotations for the stock-* properties.
Add a doc comment for :stock-size in order to link to GtkIconSize.
Document :stock-detail as deprecated. It does nothing & is gone in GTK+4
2017-11-22 20:48:02 +00:00
Daniel Boles
260a6aaa71 doc: TextLayout: Add missing (out) annotations
and move from (allow-none) to (optional)
2017-11-22 20:48:02 +00:00
Matthias Clasen
55e8736613 emoji chooser: break out a helper function
This is just a small cleanup.
2017-11-22 19:11:31 +00:00
Matthias Clasen
d3eacaf840 entry: Add a key binding for the emoji chooser
Make Ctrl-. and Ctrl-; bring up the emoji chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=789160
2017-11-22 19:11:31 +00:00
Matthias Clasen
6b126a70e2 emoji chooser: Make menu key work as expected
Whenever we have a right-click action, we should make
the menu key work as a keyboard-accessible alternative.
2017-11-22 19:11:31 +00:00
Matthias Clasen
f301b7874e emoji chooser: handle right-click
Whereever we handle long-press for touch, it makes sense to handle
right-click as a faster alternative for mouse-based interaction.

This commit makes right-click work to bring up the variation
selector for Emojis.
2017-11-22 19:11:31 +00:00
Matthias Clasen
19670f9fe6 Trivial cleanup
Better to use G_SOURCE_REMOVE than FALSE, for clarity.
2017-11-22 19:11:31 +00:00
Matthias Clasen
65457e6d12 emoji chooser: Don't leak gestures
We were not freeing these gestures as we should.
2017-11-22 19:11:31 +00:00
Benjamin Otte
f8cb3fc3a8 emojichooser: animate the adjustment
... instead of doing a dance with the scrolled window to get it to scroll
the adjustment.
2017-11-22 19:11:31 +00:00
Bastien Nocera
38e68815c6 frame-clock: Fix typo in API documentation 2017-11-22 15:25:55 +01:00
Daniel Mustieles
4de0e4b1ed Update Spanish translation 2017-11-20 08:39:00 +00:00
Daniel Mustieles
29d2a45641 Update Spanish translation 2017-11-20 08:38:35 +00:00
Muhammet Kara
29a590014d Update Turkish translation 2017-11-19 20:13:03 +00:00
Milo Casagrande
6675451cea Update Italian translation 2017-11-17 13:33:01 +00:00
Milo Casagrande
47435d0e6b Update Italian translation 2017-11-17 10:51:13 +00:00
Milo Casagrande
2157b69f1f Update Italian translation 2017-11-17 10:49:34 +00:00
Matthias Clasen
4ffdf917bb icontheme: Add a trailing / when enumerating resources
This avoids extra string copies in GResource.
2017-11-16 08:44:36 -05:00
Matthias Clasen
e3f84e9bf4 application: Append a / to the icon resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-16 08:24:55 -05:00
Matthias Clasen
20c2d6c992 icontheme: Append a / to the resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-16 08:24:41 -05:00
Benjamin Otte
4c44ffda17 gdk: Fix GDK_ALL_EVENTS_MASK
This mask was forgotten to update when the last 2 event masks were
added, probably because it looks like it's already maxed.
2017-11-13 23:42:51 +01:00
Carlos Soriano
7e49a02acf gtkplacessidebar: Fix new tab/window handling for cloud accounts
It wasn't taking into account whether the sidebar had support for them
or not, resulting in a file chooser with open in new tab/window menu
items when it's not supported.

To fix it, do as with the other menus and check for the availability of
new tab/window flags.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 15:38:26 +01:00
Carlos Soriano
e672c02441 gtkplacessidebar: Adapt to libcloudproviders 0.2.0
And a few improvements on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 15:38:26 +01:00
Christian Hergert
b654130bd7 css: avoid copying resource data
To avoid copying data from gresources to the heap, we can use
the newly added gtk_file_load_bytes(). That function will check
for resource:// URIs and access their internal data directly.

Other URI schemes will read the contents into memory and return
a GBytes as normal.

https://bugzilla.gnome.org/show_bug.cgi?id=790270
2017-11-12 20:04:06 -08:00
Christian Hergert
d46c072c4d utils: add gtk_file_load_bytes() helper
This helper will load GBytes for a GFile, but try to reuse the
embedded data for a gresource to reduce the chances of copying
data to the heap.

https://bugzilla.gnome.org/show_bug.cgi?id=790270
2017-11-12 20:04:06 -08:00
Benjamin Otte
15acb4c340 a11y: Handle a treeview with no columns
Code was spewing criticals to stderr because of nonexisting columns. So
check that there's actually an existing column first.
2017-11-13 03:55:03 +01:00
Benjamin Otte
efaa6524ac progresstracker: Don't hand out NaN
When the duration is set to 0, clamp it to 1us. This way we're almost
correct: We should really instantly finish, but we don't. But we do
respect the delay.

Doing this properly would require some refactoring of how the progress
tracker actually maintains progress, and this is just a quick fix.
2017-11-12 06:30:57 +01:00
Fabio Tomat
b2877605cf Update Friulian translation 2017-11-10 15:48:06 +00:00
Kjartan Maraas
a4e1d01649 Updated Norwegian bokmål translation. 2017-11-09 20:09:40 +01:00
Daniel Boles
e09c103187 Window: Document get_icon() return as nullable 2017-11-09 09:44:49 +00:00
Daniel Boles
5835cb2bc2 CssProvider: Use consistent theme name placeholder
commit 475d916eb9 added various paths that
use theme-name for this, but the existing path already used THEME, with
a subsequent description referring to the latter. So use that everywhere
2017-11-08 09:23:11 +00:00
Matthias Clasen
77a4e2ec37 3.22.26 2017-11-07 14:52:24 -05:00
Dušan Kazik
4ac7db34f7 Update Slovak translation 2017-11-07 18:24:11 +00:00
Dušan Kazik
8e84eff355 Update Slovak translation 2017-11-07 18:21:41 +00:00
Marek Cernocky
d42559bf2f Updated Czech translation 2017-11-06 21:03:47 +01:00
Rafael Fontenelle
4bc58f03b6 Update Brazilian Portuguese translation 2017-11-06 18:19:31 +00:00
Rafael Fontenelle
0ba60b7703 Update Brazilian Portuguese translation 2017-11-06 17:53:03 +00:00
Hannie Dumoleyn
5a86b78493 Update Dutch translation 2017-11-06 16:20:55 +00:00
Hannie Dumoleyn
01b29a16ff Update Dutch translation 2017-11-06 16:17:20 +00:00
Mario Blättermann
ab4cc2540b Update German translation 2017-11-06 08:35:14 +00:00
Mario Blättermann
4c5279c956 Update German translation 2017-11-06 08:32:35 +00:00
Kjartan Maraas
a12ae1411a Updated Norwegian bokmål translation. 2017-11-06 09:09:53 +01:00
Anders Jonsson
e57891fd6b Update Swedish translation 2017-11-05 21:23:19 +00:00
Anders Jonsson
bb1e8e47f5 Update Swedish translation 2017-11-05 21:19:06 +00:00
Piotr Drąg
14cda4839a Update Polish translation 2017-11-05 21:47:10 +01:00
Piotr Drąg
f7f4ecf006 placessidebar: correct quotation marks in a new string 2017-11-05 21:16:59 +01:00
Alexandru Pandelea
7f6365cf9f placessidebar: add starred location item
Add an item for showing all files marked as favorite. This item will
open all files that have the nao:predefined-tag-favorite tag

https://bugzilla.gnome.org/show_bug.cgi?id=785176
2017-11-05 20:17:22 +01:00
Chun-wei Fan
d38a148f0e gdk/win32: Fix Win32 GL Context switching
Since on Windows we need to use a good amount of temporary GL contexts,
we need to switch back to the original GL contexts we were using when
we are done with the temporary GL contexts, otherwise multi-GL windows
will cause confusions causing display artifacts and crashes.

Also, use the GdkWin32GLContext::gl_hdc consistently throughout
the code and remove the GdkWin32Display::gl_hdc as Lukas K pointed out
that GdkWin32Display::gl_hdc becomes out-of-date and so the HDC that the
GL context is bound to becomes incorrect in sceanarios using multiple
windows with GtkGLArea/GdkGLArea items (which would cause the artifacts in
programs that use multiple windows with GtkGLArea/GdkGLArea items, and it
turns out that GdkWin32Display::gl_hdc is actually not necessary to help
keep track of the HDCs we use for our GL contexts.

Partly based on patch from Lukas K <lu@0x83.eu>

https://bugzilla.gnome.org/show_bug.cgi?id=789213
2017-11-04 10:39:58 +08:00
Khaled Hosny
46459f66f9 Update Arabic translation 2017-11-03 11:46:43 +02:00
Daniel Boles
40302a5268 Adwaita: Fix Entry:has-frame if backdrop/disabled
by explicitly including these in the selector removing the border, to
avoid other rules on these pseudoclasses overriding the .flat class.

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:35 +00:00
Daniel Boles
a03a3c3af9 HighContrast: Fix GtkEntry:has-frame not working
• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
• Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:34 +00:00
Daniel Boles
55210ae464 Inspector: better default split of CSS nodes/props
Move the default pos of the Paned handle to 400px from the left, i.e.
50% of the default width of the window. The previous position at 300px
from left meant the node treeview was too narrow & could easily result
in the (useful) State column not being visible in the case of many
apps. The properties pane doesn't need to be as big as it was anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=788898
2017-11-01 19:57:34 +00:00
Julian Sparber
f3408d89d5 AboutDialog: Fix accepting GTK_LICENSE_AGPL_3_0
Add the new GTK_LICENSE_AGPL_3_0 to the allowed enum range checked in
gtk_about_dialog_set_license_type(), so this value is not rejected.

https://bugzilla.gnome.org/show_bug.cgi?id=789678
2017-10-31 18:57:02 +00:00
Julian Sparber
a0327e521e icon-browser: Centre Copy button in dialog again
This patch moves the "Copy to Clipboard" button into the same container
as the description label, to centre the button regardless of the number
of icons shown in the grid.

https://bugzilla.gnome.org/show_bug.cgi?id=789134
2017-10-31 18:33:18 +00:00
Daniel Boles
58c0418418 gdkmonitor: Fix typo 2017-10-31 18:27:34 +00:00
Daniel Boles
2b509a34d4 SpinButton: Fix typo 2017-10-31 18:26:50 +00:00
Lukas K
5b8a3bac70 make GDK_DEBUG=opengl work on win32 2017-10-30 14:40:23 +08:00
Chun-wei Fan
c255ba68fc input/IME: Defer the emit of the "commit" signal
On Windows, when IME is used, each keystroke results in the
WM_IME_COMPOSITION event being sent first.  This means that in our case
when one decides on to accept the input that is in the preedit buffer,
we first get from Windows the WM_IME_COMPOSITION event
(where we emit the commit signal), followed by the WM_IME_ENDCOMPOSITION
event (where we emit the pair of preedit-changed and preedit-end
signals).

Since commit f11f989 (GtkEntry: Remove recompute idle), we do the input
recomputation directly, this will cause a pair of "Pango-WARNING:
Assertion failed: (index >= 0 && index <= layout->length)" being shown,
as gtkentry.c's priv->preedit_length and priv->preedit_cursor was unable
to be reset to 0 in time as a result of the recomputation triggered by
the commit being done before the reset of priv->preedit_length and
priv->preedit_cursor (which are no longer valid as we essentially say
that we are done with the preedit buffer).

As we could only acquire the final string that was entered in this
preedit session when we handle the WM_IME_COMPOSITION event, fix this by
saving up the final string we acquire from Windows IME in UTF-8 when we
handle the WM_IME_COMPOSITION event from Windows, and emit the commit
signal with that string after we emit the preedit-changed and
preedit-end signals when we handle the WM_IME_ENDCOMPOSITION event from
Windows, which comes afterwards.

Also fix the formatting of the code around the parts of the files that
was changed.

https://bugzilla.gnome.org/show_bug.cgi?id=787142
2017-10-30 14:33:23 +08:00
Simon McVittie
72a45366e2 wayland: Distribute protocol/server-decoration.xml in tarballs
Otherwise, builds that include the Wayland backend fail.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=789630
Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>
2017-10-30 02:16:21 +00:00
Matthias Clasen
6c39e2f2f1 3.22.25 2017-10-29 08:48:00 -04:00
Matthias Clasen
74720117c9 Revert "gdkscreen-x11: Enable RandR on VirtualBox"
This reverts commit f2ba6ca473.

This change was causing problems with several X servers,
see https://bugzilla.gnome.org/show_bug.cgi?id=780101
2017-10-28 10:29:12 -04:00
Andrea Azzarone
81d1aaa062 widget: Typecheck before deref in translate_coords
https://bugzilla.gnome.org/show_bug.cgi?id=771279
2017-10-27 21:01:52 -05:00
Federico Mena Quintero
3509918e39 GtkPathBar: Centralize handling of outstanding cancellables
The path bar would crash if we disposed it before all pending I/O
operations had finished.  Now we remember all the outstanding
operations directly in the GtkPathBarPrivate, and deal with them
consistently.
2017-10-27 17:07:30 -05:00
Matthias Clasen
268d150d0f GdkMonitor: Use 1 as scale fallback value
The same value we use in gtk_widget_get_scale_factor.
2017-10-27 16:12:28 -04:00
Olivier Fourdan
8ef20c0e2f wayland: scale down reported monitor geometry
According to the documentation, gdk_monitor_get_geometry() reports the
monitor geometry in ”application pixels”, not in ”device pixels”,
meaning that the actual device resolution needs to be scaled down by the
scale factor of the output.

x11 backend does that downscaling, whereas Wayland backend did not,
causing a discrepancy depending on the backend used.

https://bugzilla.gnome.org/show_bug.cgi?id=783995
2017-10-27 16:11:03 -04:00
Simon McVittie
72045a1a2d GtkWindow: Set tiled class on windows that have any tiled edge
This has no practical effect on Adwaita, but might fix some
third-party themes that were broken by GTK+ 3.22.23.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2017-10-27 10:58:35 -02:00
Simon McVittie
8ad40a49ee GtkHeaderBar: Reconsider buttons if any tiling state changes
Looking at the 1-bit "tiled or not?" state is not necessarily
enough.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2017-10-27 10:58:35 -02:00
Simon McVittie
465ef50554 Set GDK_WINDOW_STATE_TILED if any edge is tiled
This state flag is used in several places in GTK+, for example to
ignore RESIZE_INC hints if tiled. Setting it is also necessary for
backwards compatibility with applications that changed their behaviour
when tiled, such as GNOME Terminal and its MATE fork.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2017-10-27 10:58:35 -02:00
Drew DeVault
f2adaba237 Wayland: Implement KDE's SSD protocol
If the compositor prefers server-side decorations and the client doesn't
customize the title bar, we disable client-side decorations and let the
compositor know. Otherwise, we continue to use client-side decorations.

Signed-off-by: Drew DeVault <sir@cmpwn.com>

https://bugzilla.gnome.org/show_bug.cgi?id=781909
2017-10-26 16:34:42 -04:00
Olivier Fourdan
30e7215406 wayland: Do not constrain saved window size
Under Wayland, an xdg_surface.configure with size 0x0 means it's up to
the client to set its size.

When transitioning from maximized state to un-maximized, the Wayland
compositor will send such an 0x0 configure so that the client can
restore its original size.

However, the original size was already constrained, so re-applying
size constrains can lead to a smaller size when using size increments.

Avoid this caveat by not applying size constrains when we are restoring
the original size.

https://bugzilla.gnome.org/show_bug.cgi?id=777072
2017-10-26 15:51:01 -04:00
Florian Müllner
5ad9ecaff0 appchooserwidget: Don't limit application list unconditionally
As documented, GtkAppChooser is "typically [used] for the purpose of
opening a file". However given that applications that support neither
opening files nor URLs are filtered out, the chooser is not actual
useful for any other (atypical) usage. Change that by only applying
the filtering if a content-type was set, and use the full unfiltered
list otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=789327
2017-10-26 06:18:32 -04:00
Christian Persch
5ee34ec72a actionable: Allow all detailed action name formats
Use g_action_parse_detailed_name() to enable use of this API
for actions with non-string parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=788841
2017-10-26 06:17:28 -04:00
Matthias Clasen
fc741adbbb wayland: Don't spew warnings for blank cursors
We were unnecessarily spewing warnings when blank cursors
were getting a new scale set. Standardize on "none" as the
name for blank cursors, and avoid the warning.

https://bugzilla.gnome.org/show_bug.cgi?id=775217
2017-10-26 00:32:07 -04:00
Andrea Azzarone
1c3aff5101 gdk: Clear GL context when window is withdrawn
Some clients (e.g. gnome-online-accounts) quickly unmap and map
a window. With some backends the backend surface will be replaced
causing the application to crash because the GL context is still
using the old surface. Clearing the GL context when a window is
withdrawn fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=789141
2017-10-25 09:34:47 -04:00
Chun-wei Fan
9c1a0b80ae Visual Studio builds: Improve binary security
Ensure that the /DYNAMICBASE linker option (which is actually the
default) is enabled for all of our Visual Studio project builds, as the
gtk3-demo projects inadvertly disabled it.

Also, for x64 builds on MSVC 2012 or later, enable /HIGHENTROPYVA to
enhance the security of our binaries as well.

Pointed out by Ignacio Casal Quinteiro.
2017-10-20 17:01:30 +08:00
Kukuh Syafaat
d6e011afa6 Update Indonesian translation 2017-10-20 05:53:07 +00:00
Michael Catanzaro
26ff667901 Revert "gdk/wayland: Avoid idempotent wl_subsurface.set_position calls"
This reverts commit 8aa6d59b7a.

This caused a regression in totem that still needs to be investigated.

https://bugzilla.gnome.org/show_bug.cgi?id=784314
2017-10-19 19:51:43 -05:00
Carlos Garnacho
9b874a40ac gtkwidget: Emulate motion before button press on fallback touch handler
The code has been shuffled so GDK_TOUCH_BEGIN results in a
GDK_MOTION_NOTIFY to the new position and a GDK_BUTTON_PRESS on that same
place. This makes pointer emulation consistent with what X11 does. Even
though button presses have x/y arguments, there's code out there relying
on getting prior motion events.
2017-10-19 14:25:55 +02:00
Debarshi Ray
29c4d0a3ee GtkGestureZoom: Don't leak the list of sequences
https://bugzilla.gnome.org/show_bug.cgi?id=789149
2017-10-19 09:29:37 +02:00
Timm Bäder
45198d2312 emojichooser: Plug memory leak 2017-10-18 10:04:48 +01:00
Julian Sparber
6a4be7f56b icon-browser: Add scalable icons to icon detail modal window
When making mockups for GNOME apps in Inkscape, looking for symbolic
icons is a common task. Searching for icons in the file system is clumsy,
and icon-browser provides a much better interface for finding them.
However, currently there is no way to insert the symbolic icons as SVG
directly from icon-browser, so right now it is only useful for finding
the name.

This patch adds a sixth column to the modal window that appears when
clicking a symbolic icon. The icon in this column is labeled "scalable",
and dragging it onto another window results in the vector icon URI being
inserted.

This enables a much simpler workflow when designing with symbolic icons.

https://bugzilla.gnome.org/show_bug.cgi?id=778930
2017-10-16 14:09:55 +02:00
Carlos Garnacho
8aa6d59b7a gdk/wayland: Avoid idempotent wl_subsurface.set_position calls
These may not result on wl_surface.frame callbacks, yet we do trigger
a frame clock tick that would get stuck on the lack of such callback.

https://bugzilla.gnome.org/show_bug.cgi?id=784314
2017-10-16 11:27:47 +02:00
Aurimas Černius
ebb67175e2 Updated Lithuanian translation 2017-10-15 21:24:22 +03:00
Daniel Boles
6018f9098e a11y/entry: Fixups for previous commit
We still declare all variables at the start of the block.

Also, we can use the fast private _gtk_widget_get_allocation().

https://bugzilla.gnome.org/show_bug.cgi?id=784509
2017-10-15 12:57:41 +01:00
Samuel Thibault
a2d78a2de7 a11y/entry: Fix text coords not adjusted for alloc
What is missing is the "allocation" part of x/y coordinates. Since
gtk_entry_realize doesn't call gtk_widget_set_window(priv->text_area),
the coordinates returned by gdk_window_get_origin don't include it.

This patch fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=784509
2017-10-15 12:33:38 +01:00
Timm Bäder
8db9776875 scalebutton: Fix comparison for empty icon list
https://bugzilla.gnome.org/show_bug.cgi?id=786220
2017-10-15 12:31:54 +01:00
Daniel Boles
9106436003 Range: Fix inverted horizontal scroll wheel events
Bug 737175 aimed to ensure that scrolling up on a horizontal range would
result in its value increasing, as that’s what users intuitively expect.
However, its commit 416c370da1 meant that,
if the event gives scroll deltas, we inverted our delta unconditionally.

So it broke horizontal scrolling: scrolling left moved the slider right…

We must only invert if using dy as delta. dx already has the right sign,
so inverting it was wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=788905
2017-10-14 18:48:45 +01:00
gogo
2575a500be Update Croatian translation 2017-10-14 16:37:05 +00:00
Christian Kirbach
841b879aed Update German translation 2017-10-14 12:44:32 +00:00
Emmanuele Bassi
7fe07ea906 Fix previous commit
The _gtk_widget_get_parent() private accessor is defined inside
gtkwidgetprivate.h.
2017-10-13 10:55:00 +01:00
Daniel Boles
81b7f76cb8 Fixed: If can’t add child, don’t add to child info
If the call to set_parent() failed, we were still adding the child to
the internal list of children, despite that it was not really added.
That meant we could later try to do invalid stuff with that non-child.

Fix that by asserting and giving up if the child that the user is
attempting to add is already parented.

https://bugzilla.gnome.org/show_bug.cgi?id=701296
2017-10-13 09:49:48 +01:00
Daniel Boles
567ef528e5 Fixed: Don’t dereference before typechecking 2017-10-13 09:49:34 +01:00
Daniel Boles
c4b75b0fff icon-browser: Stop repeating folder-documents too 2017-10-13 00:25:15 +01:00
Dušan Kazik
1c38646122 Update Slovak translation 2017-10-12 20:40:00 +00:00
Balázs Meskó
8281c57d28 Update Hungarian translation 2017-10-12 19:35:05 +00:00
Daniel Boles
491eea5680 StyleContext: Fix CSS snippet language, node names
The language is useful for parsing tools, such as that of gtkmm, which
otherwise assumes these are C snippets and elides them from its
generated documentation.

The old GtkBlah node names are just plain obsolete.
2017-10-12 19:40:19 +01:00
Daniel Boles
b1cb34cbbb Settings: Mention Shift+primary click on Range too
This already existed, and since this doc blurb is already inflating
dramatically, what’s another half a line?
2017-10-11 22:36:54 +01:00
Daniel Boles
694686d2ed Settings: Reflect resurrected middleclick in Range
and while here, make the explanation more explicit as to which values do
what, & use general Range terminology instead of focussing on scrollbars

https://bugzilla.gnome.org/show_bug.cgi?id=787669
2017-10-11 22:11:27 +01:00
Matthias Clasen
5b2cae6703 range: Bring back middle clicks
It does not hurt us to keep middle clicks doing the same
as shift-primary clicks. This makes the transition from gtk2
less painful in terms of muscle memory.

https://bugzilla.gnome.org/show_bug.cgi?id=787669
2017-10-11 22:11:27 +01:00
Timm Bäder
ca4efb0080 bindings: Fix code snippet
Just use a more realistic example, adapted from gtklistbox.c
2017-10-11 22:11:27 +01:00
Timm Bäder
7525a11a30 accellabel: Fix code snippet 2017-10-11 22:11:27 +01:00
Timm Bäder
8169d6703a aboutdialog: Fix code snippets
Define all variables and fix a missing comma in the first
gtk_show_about_dialog call.
2017-10-11 22:11:27 +01:00
Timm Bäder
413d548edd applicationwindow: Fix code sample
Declare all variables, use proper GtkApplication constructor and the
right GTK_APPLICATION() cast for gtk_application* API.
2017-10-11 22:11:27 +01:00
Daniel Boles
a54550db7b ToggleButton: Actually show buttons in new snippet
Also, create a Window, instead of a Dialog without a transient parent,
which is (noisily) discouraged. Then s/content_area/box/g to match.
2017-10-11 22:11:27 +01:00
Timm Bäder
b0fe89d85f togglebutton: Fix code snippet
Remove gtk_box_pack_start usage, gtk_dialog_get_content_area, fix wrong
gtk_dialog_new parameters and actually add a output_state callback.
2017-10-11 22:11:27 +01:00
Timm Bäder
3973da4c65 label: Make all code snippets properly compile 2017-10-11 22:11:27 +01:00
Robert Ancell
7961e61c3b gdk: Fix gdk_screen_get_monitor_workarea not returning work area
This was introcuced in the commit 0611cb4823 (GTK+ 3.22).
2017-10-12 09:03:13 +13:00
Robert Ancell
112a61a782 icon-theme: Show filename attempted when icon fails to load 2017-10-12 09:03:13 +13:00
Robert Ancell
b21bb316bd iconhelper: Show error if fail to load placeholder icon 2017-10-12 09:03:13 +13:00
Milo Casagrande
ff6b31da23 Update Italian translation 2017-10-11 14:06:40 +00:00
Benjamin Otte
8439f06500 cssnode: Don't put wrong styles in the style cache
~Company ╡ so TL;DR: we put the static style in the cache, but then
       ⤷ ╡ compute a child style from the animated style in the cache
       ⤷ ╡ and we put the child style also in the cache (because
       ⤷ ╡ it's not animated)
       ⤷ ╡ then we run the animation, but reuse the cache every time
       ⤷ ╡ for both child and parent
       ⤷ ╡ so after the animation is done, we end up with a cache that
       ⤷ ╡ has the correct static style for the parent but an
       ⤷ ╡ incorrect static style for the child
       ⤷ ╡ because that static style was computed from the
       ⤷ ╡ initial animated style

This fixes https://bugzilla.gnome.org/show_bug.cgi?id=763517
2017-10-10 21:48:09 +02:00
Emmanuele Bassi
f50f3e2a90 docs: Clarify the visibility of buttons in GtkStackSwitcher
If a page in the GtkStack is not visible, then the GtkStackSwitcher
won't show a button for it.
2017-10-10 10:20:53 +01:00
Emmanuele Bassi
e06bce7631 docs: Update the deprecation annotation for gtk_paint_spinner()
Bring it in line with the deprecation warning in the header.

https://bugzilla.gnome.org/show_bug.cgi?id=782396
2017-10-10 10:20:53 +01:00
Rafael Fontenelle
de03dc969e Update Brazilian Portuguese translation 2017-10-10 01:37:57 +00:00
Anders Jonsson
c832ee7092 Update Swedish translation 2017-10-09 23:16:07 +00:00
Marek Cernocky
e0e57191f2 Updated Czech translation 2017-10-09 21:31:30 +02:00
Matej Urbančič
030eb106df Updated Slovenian translation 2017-10-09 20:56:15 +02:00
Matej Urbančič
7f120279de Updated Slovenian translation 2017-10-09 20:54:12 +02:00
Piotr Drąg
38892b6341 Update Polish translation 2017-10-09 20:39:31 +02:00
Piotr Drąg
b6829dea0f gdk: Translate some more key names
These are used in the Keyboard panel of GNOME Settings.

https://bugzilla.gnome.org/show_bug.cgi?id=787866
2017-10-09 20:31:58 +02:00
Marek Kasik
52e3c095bf printing: Don't show duplicate printers
Check UUID for printers obtained via DNSSD whether
they are already installed on local CUPS server.
Don't show such printers.

Not all printers published via DNSSD have UUID entry though.

https://bugzilla.gnome.org/show_bug.cgi?id=786794
2017-10-09 18:02:28 +02:00
Daniel Boles
f29007c177 Popover: Complete depr docs of transitions-enabled
Its getter and setter are deprecated, so copy in the blurb from there.
2017-10-08 23:34:31 +01:00
Daniel Boles
cbe009fe90 Dialog: Clarify that response ID 0 is not reserved
I only got so far in math, but it looks to me like zero isn’t positive.
We don’t reserve it, so be clear about that.
2017-10-08 22:19:13 +01:00
Daniel Boles
0f805d1bd9 MenuButton: Document the correct no-direction icon
Document open-menu-symbolic, which we use, not view-context-menu, which
does not exist.
2017-10-08 21:10:24 +01:00
Руслан Ижбулатов
8dfce0eacb GDK W32: Correctly report window position in HiDPI mode
Window position returned by get_frame_extents() should be scaled.

Also take this opportunity to apply the same rounding that X11 backend
applies.

https://bugzilla.gnome.org/show_bug.cgi?id=788053
2017-10-08 19:49:00 +00:00
Daniel Boles
233f49ddcb Adwaita/README: Don’t bother mentioning parse-sass
Assume no one wants to make a change without testing it in GTK+…
If anyone has a reason to do this, they’ll be able to figure it out.
2017-10-08 14:08:34 +01:00
Daniel Boles
4515c72706 Adwaita/README: Update to reflect we use sassc now
We moved from the Ruby compiler to sassc in
commit 67953e9cfb, so this copies across
the updated info about building from GTK+ 4.

Also, explain the purpose of parse-sass.sh, since while that is not
mentioned in GTK+ 4 – and perhaps does not need to be, thanks to Meson –
we are still on Autotools here, and rebuilding the entirety of GTK+ 3 if
you only edited the CSS is a lot of waiting for no good reason.
2017-10-08 14:01:38 +01:00
Daniel Boles
30effaf7fc testmenubutton: Fix inverted keynav in the GtkMenu
GtkMenu’s own keynav code, which actually bothers to account for the
layout of items, only happens if columns > 1. So, adding items to 1
column using a reverse loop meant they were placed in the Menu’s list of
children in that order, and because we only have 1 column, Menu passes
keynav up to MenuShell, which doesn’t adjust for the items’ positions.

‘Fix’ that here by adding items in the same order they’ll have when laid
out in the Menu, so keynav does what you’d expect, not the opposite. For
that, it’s simpler just to use gtk_container_add().

Let’s presume users are using add(), attach() with a non-inverted loop,
or attach() with arguments that create 2+ columns and so GtkMenu keynav.
2017-10-08 13:15:33 +01:00
Daniel Boles
26046c2afd HC: Avoid inflated titlebar separator in GEdit etc
It was selecting paned separator, which means any separator at any level
of descent within a paned, including the toplevel container in GEdit.

We need to be more specific and only select the relevant separator that
is the direct child of the paned. This is what Adwaita does.

https://bugzilla.gnome.org/show_bug.cgi?id=788573
2017-10-07 01:29:51 +01:00
Daniel Boles
c0c23f7d44 TreeViewCol: Fix SEGV on remove/add, + memory leak
Nulling priv->button in _unset_tree_view() is asymmetrical: we create
it via init(), not _set_tree_view(), so we shouldn’t null in the latter.

Worse, doing so manifests in criticals + a SEGV easily with basic use of
testtreecolumns, removing the TVC from a TV then trying to add it to one

Finally, the wrong null-out meant dispose() failed to unref the button,
so it leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=728452
https://bugzilla.gnome.org/show_bug.cgi?id=788614
2017-10-07 00:41:10 +01:00
Daniel Boles
08187aeec5 TreeViewCol: Don’t try to disconnect null treeview
https://bugzilla.gnome.org/show_bug.cgi?id=788614
2017-10-06 21:34:52 +01:00
Daniel Boles
7997a722a1 iconbrowser: Don’t repeat folder-download-symbolic
It was in both [general] with a description and [other] with none.
Leave it in [other] with the other folder- icons, + the description.

bonus: this makes all of [general] fit in our default window size!
2017-10-06 21:34:52 +01:00
Timm Bäder
13c6310688 modelbutton: set_relative_to(NULL) the popover in dispose
We do set_relative_to(menu_button) when creating it so we should do this
here (or nothing).
2017-10-06 21:34:52 +01:00
Daniel Boles
b45aa63b75 FileChooserButton: Avoid unref()ing a null model
Otherwise simply closing the widget-factory would give a critical from
g_object_unref().
2017-10-06 21:34:52 +01:00
Timm Bäder
b94bfb1678 filechooserbutton: Don't leak priv->model 2017-10-06 18:18:04 +01:00
Timm Bäder
b3f4da0439 applicationwindw: Don't leak show-help-overlay action 2017-10-06 18:15:31 +01:00
Timm Bäder
183c23d710 widget-factory: Don't leak GPropertyAction instances 2017-10-06 18:15:25 +01:00
Daniel Boles
fa04eb26d7 HC: Add border/hilight when hovering flat buttons
The border and icon highlight are useful feedback that was defeated by
CSS precedence. It worked for .titlebuttons due to their implementation,
but the same was not true for custom .flat buttons. This makes it so.

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:37:07 +01:00
Daniel Boles
61137ae163 HC: Flat titlebuttons became non-flat in backdrop
When the window was backdropped, they suddenly regained their border.
This was clearly not intentional or of any practical use to anyone.

Shuffle around some selectors so that the backdrop ones do not override
the flat ones and make the borders magically reappear when backdropped.

Note that, whereas standard titlebuttons get the border on :hover, other
.flat buttons in the headerbar do not. That should probably be fixed too

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:36:52 +01:00
Daniel Boles
7fc09f18a3 ComboBox: Don’t let modes disconnect each other
…from priv->button. My refactor to g_signal_disconnect_by_data()
included this widget, when I shouldn’t have as both modes use it.
This e.g. broke opening a CB by keyboard that was currently in menu
mode, if it had been in list mode initially (e.g. due to the theme).

Fix by moving to disconnect_by_func() and only removing in each mode’s
destroy() method the signals that it set on the button in its setup().

https://bugzilla.gnome.org/show_bug.cgi?id=788577
2017-10-06 01:40:42 +01:00
Daniel Boles
6c3d17b867 HighContrastInverse: Make window borders visible
They were hard-coded to a transparent black, but that is our bg colour
in HC Inverse, so windows stacked on top of each other or a dark
background blended together into a mush.

Fix this by making the $_wm_border* colours relative to the fg colour,
so that HighContrastInverse gets borders that are transparentised white.

https://bugzilla.gnome.org/show_bug.cgi?id=788575
2017-10-06 00:38:13 +01:00
Daniel Boles
3a0ea4e0d2 HC: Fix MessageDialog’s rounded bottom borders
A missing decoration selector meant that we got a solid black background
behind the rounded corners of the dialog.

Copy the equivalent code from Adwaita, including nicely rounding the
focus outline too (& sorry, but this needs more newlines to be readable)

https://bugzilla.gnome.org/show_bug.cgi?id=788574
2017-10-06 00:25:58 +01:00
Daniel Boles
d9df5dfa74 HighContrast: Fix titlebar containing >1 headerbar
by migrating the relevant code from Adwaita, to dodge unwanted doubling
up of the bottom border and such.

It also hopefully still encompasses whatever commit
b4371728de was trying to do; certainly, it
retains the resolution of the main bug/patch that one was attached with.

https://bugzilla.gnome.org/show_bug.cgi?id=769877
2017-10-05 21:49:11 +01:00
Daniel Boles
8abdbfee16 HC: Copy working tooltip code from Adwaita & tweak
There were various problems, like only selecting on .tooltip and not the
widget node tooltip, not being specific enough for tooltip.csd, etc. So,
specific theming was absent, and default popup window styles got applied

This commit copies in the better working tooltip CSS from Adwaita, but
applies a couple of changes to make it work better in the HC themes:
 • Reduce the transparency of the tooltip, so we achieve higher contrast
 • Drop the black text-shadow, as it is not useful on this more black bg

Note: we may then need to re-add some of this to the .tooltip class. But
it is unclear what needs done there. While Adwaita is not doing it, we
are better not to confuse by keeping it in HC only; we should try to be
as close as possible, to make it easier for HC to keep up with Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 19:41:00 +01:00
Timm Bäder
acab79040a switch: Fix int/double comparison
We get a double coordinate.
2017-10-05 18:50:12 +01:00
Timm Bäder
070af44fc7 appchooserdialog: Remove unused macro 2017-10-05 18:50:12 +01:00
Timm Bäder
18b8b2b8e8 combobox: Remove unneeded queue_resize call
The remove/add/set_parent/unparent calls in there already do the
necessary work.
2017-10-05 18:50:12 +01:00
Xavi Ivars
ee5b762246 [l10n] Updated Catalan (Valencian) translation 2017-10-05 18:06:25 +02:00
Daniel Boles
34cd1e3e5e ComboBox: list: Don’t leak path on expand/collapse
Determining that we clicked on the expander means that we had a valid
path, so we still need to free that, even though we’re not selecting it.

https://bugzilla.gnome.org/show_bug.cgi?id=788505
2017-10-05 01:33:22 +01:00
Daniel Boles
b0e18d676e HighContrast: Correctly select window decoration
We need

    .window-classes decoration

but within the decoration parent selector, we were doing
&.window-classes, which gave us

    decoration.window classes

We need to fix this by selecting on .window-classes &

https://bugzilla.gnome.org/show_bug.cgi?id=788496
2017-10-05 00:27:39 +01:00
Daniel Boles
512a33fee1 updateiconcache: Avoid confusing loop construct
n_attach_points is the result of g_strv_length(): the index at which the
string vector ends in NULL. So by definition, when i == n_attach_points,
string[i] == NULL, and there is no need to check for the latter. The
fact that we did appears to confuse static analysers, as the dereference
and index check were inverted from what would normally be safe. We could
reverse them, but we may as well just remove the unnecessary NULL check.

https://bugzilla.gnome.org/show_bug.cgi?id=788458
2017-10-04 22:55:54 +01:00
Colomban Wendling
367ff368f2 Enter submenus when activating their parent item
This gives consistent behavior with e.g. Qt, Mozilla's suites and
LibreOffice (with non-truly native backends like "gen" and "gtk",
but unlike "gtk2" and "gtk3" ones that probably use true GTK menus).

This behavior is expected by at least some accessibility users, and
it seems good to behave like other common applications and toolkits
in this area.  There should be no issue in doing so either for current
users, as it only enters the submenu instead of not doing anything.

https://bugzilla.gnome.org/show_bug.cgi?id=778811
2017-10-04 22:48:21 +01:00
Daniel Boles
a8df958c07 ComboBox: Don’t pile up ::grab-broken handlers
It was connecting a new handler to do the same thing every time it
popped up, never disconnecting between. Just connect once in init().
2017-10-04 22:48:21 +01:00
Daniel Boles
6c5b284615 ComboBox: list: Make the popup_window modal
This seems to fix 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 contained within a modal parent window.

https://bugzilla.gnome.org/show_bug.cgi?id=738387
https://bugzilla.gnome.org/show_bug.cgi?id=776793
2017-10-04 21:53:53 +01:00
Daniel Boles
b92234be08 Revert "Revert "combobox: remove superfluous GTK+ grabs""
This reverts commit 1301723905.

This only appeared to fix the two bugs it linked because, rather than
being superfluous, the GTK+ grabs resulted in effectively having *none*,
or something, and could cause a critical when closing during a scroll.

This also reverts commit b9989e554b, which
depended on the above.

See next commit, which *should* properly fix what this one claimed to…

https://bugzilla.gnome.org/show_bug.cgi?id=787274
2017-10-04 21:53:53 +01:00
Daniel Boles
a20ff44b09 ComboBox: list: Fix expanding/collapsing tree rows
On clicking release, we call TreeView.get_path_at_pos() &, if we hit a
row, select it (if sensitive) & close the popup. But this alone does
not account for clicks on the expanders within the TreeView, so in
addition to expanding/collapsing, clicking them would close the list.

Check if the click is in the cell_area() & thus “excluding surrounding
borders and the tree expander area” but still including the background
(which TreeView.is_blank_at_pos() doesn’t); if TRUE, don’t select/close.

The popup doesn’t always resize enough… so there’s still breakage here.
The XXX comment on TreeView requests in list_position() may be relevant
to this. But at least this drags such CBs one step closer to adequacy:
expanding by mouse now works ~no worse~ than by keyboard already did.

https://bugzilla.gnome.org/show_bug.cgi?id=788505
2017-10-04 21:53:53 +01:00
Daniel Boles
628ff776d1 ComboBox: rm pointless ScrolledWindow.set_policy()
This just set hpolicy to what it already was and then called
set_policy() with the same two arguments again, which did nothing.
2017-10-04 21:53:53 +01:00
Georges Basile Stavracas Neto
73155e3988 display-x11: Unset tiled state if _GTK_EDGE_CONSTRAINTS is supported
Commit c415bef5de introduced support for the new _GTK_EDGE_CONSTRAINTS
atom. If the compositor supports that atom, however, we were always
setting the tiled state, even if no actual tiling information is
available, where the correct action is to completely remove any traces
of the tiled state.

Fix that by correctly removing the tiled state when compositor supports
_GTK_EDGE_CONSTRAINTS Xatom.

https://bugzilla.gnome.org/show_bug.cgi?id=788516
2017-10-04 15:33:15 -03:00
Georges Basile Stavracas Neto
7ab6dd64de theme: Fix Adwaita headerbars
We were not detecting correctly the cases where we should have
a rounded or a squared headerbar.
2017-10-04 14:46:02 -03:00
Daniel Boles
77401118c2 Adwaita: Fix typo .backgrounf => .background 2017-10-04 15:43:21 +01:00
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
738 changed files with 229993 additions and 113390 deletions

18
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,18 @@
image: lazka/gitlab-gtk-3-22:v1
stages:
- build
before_script:
- mkdir -p _ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/_ccache
cache:
paths:
- _ccache/
build:
stage: build
script:
- bash -x ./.gitlab-ci/test-docker.sh

60
.gitlab-ci/Dockerfile Normal file
View File

@@ -0,0 +1,60 @@
FROM fedora:27
RUN dnf -y install \
adwaita-icon-theme \
atk-devel \
at-spi2-atk-devel \
avahi-gobject-devel \
cairo-devel \
cairo-gobject-devel \
ccache \
colord-devel \
cups-devel \
fribidi-devel \
gcc \
gcc-c++ \
gdk-pixbuf2-devel \
gdk-pixbuf2-modules \
gettext \
gettext-devel \
git \
glib2-devel \
gobject-introspection-devel \
graphene-devel \
gtk-doc \
hicolor-icon-theme \
itstool \
json-glib-devel \
libepoxy-devel \
libmount-devel \
librsvg2 \
libXcomposite-devel \
libXcursor-devel \
libXcursor-devel \
libXdamage-devel \
libXfixes-devel \
libXi-devel \
libXinerama-devel \
libxkbcommon-devel \
libXrandr-devel \
libXrender-devel \
make \
mesa-libEGL-devel \
mesa-libwayland-egl-devel \
meson \
pango-devel \
redhat-rpm-config \
vulkan-devel \
wayland-devel \
wayland-protocols-devel \
xorg-x11-server-Xvfb
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
USER user
WORKDIR /home/user
ENV LANG C.utf8
ENV PATH="/usr/lib64/ccache:${PATH}"

19
.gitlab-ci/run-docker.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
#
# This script builds an image from the Dockerfile, starts a container with
# the parent directory mounted as working directory and start a bash session
# there so you can test things.
# Once you are happy you can push it to the docker hub:
# sudo docker push "${TAG}"
set -e
TAG="lazka/gitlab-gtk-3-22:v1"
# HOST_USER_ID gets used to create a user with the same ID so that files
# created in the mounted volume have the same owner
sudo docker build \
--build-arg HOST_USER_ID="$UID" --tag "${TAG}" --file "Dockerfile" .
sudo docker run --security-opt label=disable \
--rm --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash

6
.gitlab-ci/test-docker.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
set -e
./autogen.sh
make -j8

883
NEWS
View File

@@ -1,3 +1,886 @@
Overview of Changes in GTK+ 3.22.30
===================================
* gtk-demo has a new 'Widgetbowl' demo
* The wayland backend now supports the stable xdg-shell protocol
* Bugs fixed:
#28 Adwaita: Selection mode styling flickers
#83 Completion popup on non-default GdkDisplay freezes GtkFileChooserDialog
#88 GtkSpinButton: Buttons aren't de/sensitised as they were in GTK+ 3
#114 All Wayland apps crash when focused (gtk_gesture_multi_press_end→...
#129 Segfault in `wl_proxy_marshal()`
#132 GtkTextView auto-scrolling to insert mark upon focus changes due to...
#141 GtkEntry: add a way to set the font to monospace
#146 GtkExpander arrow is not dimmed when the Expander is not :sensitive
#156 Transfer annotation for gtk_gl_area_new is incorrect
#157 Crashes in gdkdisplay-wayland when clicking any button/menu item
#163 Unable to explicitly set GtkModelButton role
705509 notebook popup window on tabs shows underscores
745128 Search is useless for translated app names
748784 GtkProgressBar text cannot be superimposed on the progress bar
791939 Add xdg-shell (stable) support
792632 Emoji Chooser: section buttons have no tooltips
793062 Crash under gdk_wayland_window_attach_image()
* Translation updates:
Brazilian Portuguese
Catalan
Chinese
Chinese (Taiwan)
Dutch
French
German
Hungarian
Indonesian
Italian
Latvian
Serbian
Slovak
Slovenian
Turkish
Overview of Changes in GTK+ 3.22.29
====================================
* Wayland
- add an input method based on the text protocol
* File chooser
- Stop activating without double-click
* Bugs fixed:
710888 GtkInfoBar not shown after calling gtk_widget_show
743975 Better deprecation information for GtkStatusIcon
775546 gdkscreen-x11: Don't try to calculate a refresh rate for RandR 1.3...
794008 GtkListBoxRow signal poorly documented
* Translation updates:
Brazilian Portuguese
British English
Catalan
Croatian
Czech
Danish
Dutch
Esperanto
Estonian
French
Friulian
Galician
German
Hungarian
Icelandic
Indonesian
Italian
Kazakh
Korean
Latvian
Lithuanian
Polish
Russian
Scottish Gaelic
Serbian
Serbian Latin
Slovak
Swedish
Turkish
2Overview of Changes in GTK+ 3.22.28
===================================
* Fix the build
* Improve frame clock accuracy (#787665)
2Overview of Changes in GTK+ 3.22.27
===================================
* Require libcloudproviders 0.2.0
* The Emoji chooser can now be used with GtkTextView as well
* The Emoji chooser avoids fallback sequences that break the grid
* GTK+ is now using ~/.config/gtk-3.0/settings.ini when using
Wayland without dconf
* Make fuse-mounted network filesystems show up in Other Locations
* The font chooser dialog supports search now
* Bugs fixed:
737175 most horizontal sliders are inverted when scrolled with mouse wheel
741633 GtkListBoxRow should implement GtkActionable
771986 Inconsistent 'row-activated' signal emission before drag'n'drop, 'acti...
774248 Desktop-wide text scaling factor is ignored by gtk_widget_override_fon...
779009 Missing property-change::accessible-description events when the toolti...
786123 GtkPlacesSidebar: Add support for libcloudproviders
786509 GDK W32: OLE2 DnD is completely broken
786528 Please make the output deterministic
787089 win32: GtkWindow of type GTK_WINDOW_POPUP/GDK_WINDOW_TEMP leaks memory...
787128 Re-add FUSE network mounts in local-only mode
789054 Firefox crashes @gdk_window_begin_move_drag() on WM without _NET_WM_MO...
789160 Add Windows compatible emoji shortcuts
789268 Keyboard grab by popup window causes a session-modal shortcut-inhibiti...
790029 GtkTextView: Support gtk 3.22.19's emoji chooser
790031 GtkClipboardClearFunc is not being called
790033 Add support for third stylus button on Wacom's new Pro Pen 3D
790201 Settings in ~/.config/gtk-3.0/settings.ini ignored with GDK_BACKEND=wa...
790270 avoid copy of CSS data from resources
790862 Addition of insert_emoji breaks ABI on gtk-3-22
790963 Thread safety issue in gtk_application_impl_dbus_startup
791039 Emit enter+motion after GDK_CROSSING_TOUCH_END leave
791062 Fix mapping window with complete xdg-foreign state
791234 autocleanups: allow g_autoptr() usage with GtkTreePath
791281 Backport size allocation optimization from master to 3.22
791363 Shadow vertical offset is wrong when scaling is > 2
791549 gtklistbox: Crash on page-up on GtkListBox
791650 Do not warn about missing colord systemd service unit
791710 css documentation, non-breaking spaces/hyphens, and other details
791943 gnome-shell built with meson hangs when opening more than one window
792279 Use portable sed syntax in gdk/wayland/Makefile.am
792459 gtk_tree_model_sort_set_sort_column_id() ignores change to sort order
792624 Critical due to gtk_widget_reset_controllers() passing NULL to gtk_e...
* Translation updates:
Africaans
Catalan
Chinese (Taiwan)
Esperanto
Finnish
Friulian
Galician
Hebrew
Hungarian
Icelandic
Indonesian
Italian
Lithuanian
Norwegian bokmål
Polish
Russian
Serbian
Slovenian
Spanish
Turkish
Overview of Changes in GTK+ 3.22.26
===================================
* Bugs fixed:
789630 Distribute protocol/server-decoration.xml in tarballs
787142 input/IME: Defer the emit of the "commit" signal
789134 icon-browser: Centre Copy button in dialog again
789678 AboutDialog: Fix accepting GTK_LICENSE_AGPL_3_0
788898 Inspector: better default split of CSS nodes/props
789733 Fix GtkEntry:has-frame not working
789213 gdk/win32: Fix Win32 GL Context switching
785176 placessidebar: add starred location item
* Translation updates:
Arabic
Brazilian Portuguese
Czech
Dutch
German
Norwegian bokmål
Polish
Slovak
Swedish
Overview of Changes in GTK+ 3.22.25
===================================
* The HighContrast theme has received numerous improvements
* Middle-click on scrollbars jumps to the position again
* Wayland:
- Terminal sizing problems are fixed
- The Wayland backend now implemented the KDE server-side decorations protocol
* X11:
- Problems with menus on several X servers are fixed
* Bugs fixed:
701296 gtkfixed accepts toplevel windows into its children list after gtk_w...
728452 gtk_tree_view_column_create_button creates button which is leaked
738387 ComboBox in appears-as-list-mode: popup is not hidden when focus is ...
763517 Selected then unselected Label in ListBox gets wrong colour until ho...
769877 [HighContrast(|Inverse)] dual-headerbars broken
769879 [HighContrast(|Inverse)] tooltips problems
771279 Segfault due to gtk_event_controller_get_widget() returning NULL but...
775217 Warning message "gdkcursor-wayland.c:170: Unable to load blank_curso...
776793 GtkComboBox with appears-as-list doesn't receive mouse events from a...
777072 window shrinks when restored from maximized
778811 Enter submenus when activating their parent item
778930 gtk3-icon-browser: Add scalable icons to icon detail modal window
780101 Menus do not display over remote X11
781909 Implement KDE's server-decoration protocol
782396 Inconsistent deprecation documentation for gtk_paint_spinner
783995 Monitor API inconsistencies across X11 & Wayland
784314 entry completion regression on wayland
784509 wrong coordinates given to at-spi layer from GTK3 entries
786220 Sometimes the volume icon is replaced with image-missing
786794 Print dialogue has a printer called "printer"
787274 ComboBox in appears-as-list-mode: Gtk-CRITICAL when popping down wit...
787669 Middle mouse click on scrollbar is ignored
787866 Untranslated key labels in the Keyboard panel of Settings
788053 Window position wrong in HiDPI mode
788458 (style) Array index 'i' is used before limits check.
788496 HighContrast/win32: CSD Windows have missing border and shadows floa...
788505 ComboBox in appears-as-list mode: Clicking a TreeView expander also ...
788516 dialogs in gtk+ 3.22.24 have square borders.
788573 HighContrast: titlebar separator is too wide and joined to buttons, ...
788574 HighContrast: Ugly solid black corners at bottom of MessageDialog
788575 HighContrastInverse: Windows lack visible borders, merge into each o...
788577 Global -GtkComboBox-appears-as-list breaks opening menu-mode CBs by ...
788580 HighContrast: .flat buttons become non-flat when their window is :ba...
788614 Trying to reuse a TreeViewColumn causes criticals and a segfault (e....
788841 Fix gtk_actionable_set_detailed_action_name API inconsistency
788905 GtkRange horizontal scrolling causes movement in the wrong direction
789141 Segmentation fault when adding Google online account
789149 GtkGestureZoom leaks the list of sequences while calculating the dis...
789327 appchooserwidget: Don't limit application list unconditionally
789357 Regression in 3.22.23: GDK_WINDOW_STATE_TILED flag is never set
* Translation updates:
Brazilian Portuguese
Catalan (Valencian)
Croatian
Czech
German
Hungarian
Italian
Indonesian
Lithuanian
Polish
Slovak
Slovenian
Swedish
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,10 +30,10 @@ 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'
cairo_libs = '-lcairo-gobject -lcairo '
glib_min_ver = '2.45.8'
cairo_backends = 'cairo-win32'
gdk_backends = 'win32'
gio_package = 'gio-2.0 >= ' + glib_min_ver
broadway_extra_libs = ''
@@ -41,22 +41,19 @@ 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 + ' ' + \
'cairo >= ' + cairo_min_ver + ' ' + \
'cairo-gobject >= ' + cairo_min_ver
pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver
gdk_pc_replace_items = {'@GDK_PACKAGES@': gio_package + ' ' + \
'pangowin32 pangocairo' + ' ' + \
pkg_required_packages,
'@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
'@GDK_EXTRA_LIBS@': gdk_win32_sys_libs + broadway_extra_libs,
'@GDK_PRIVATE_PACKAGES@': gio_package,
'@GDK_EXTRA_LIBS@': cairo_libs + gdk_win32_sys_libs + broadway_extra_libs,
'@GDK_EXTRA_CFLAGS@': '',
'gdk-3': 'gdk-3.0'}

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>
@@ -31,6 +35,10 @@
<Link>
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;epoxy.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='11.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='12.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='14.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='15.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@@ -64,5 +72,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

@@ -90,7 +90,6 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
@@ -114,7 +113,6 @@
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
@@ -138,7 +136,6 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
@@ -162,7 +159,6 @@
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>

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

@@ -47,7 +47,6 @@
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
@@ -80,7 +79,6 @@
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
@@ -113,7 +111,6 @@
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
@@ -146,7 +143,6 @@
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>

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], [30])
m4_define([gtk_interface_age], [30])
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.12])
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.5])
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
@@ -453,10 +459,11 @@ if test "$enable_wayland_backend" = "yes"; then
GDK_BACKENDS="$GDK_BACKENDS wayland"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_WAYLAND"
backend_immodules="$backend_immodules,wayland"
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 +471,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])
@@ -984,6 +991,7 @@ AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
AM_CONDITIONAL(INCLUDE_IM_WAYLAND, [test x"$INCLUDE_wayland" = xyes])
# Checks to see whether we should include mediaLib
# support.
@@ -1341,11 +1349,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"
@@ -1799,7 +1822,7 @@ case "$host" in
SAVED_CFLAGS="${CFLAGS}"
CFLAGS="-fvisibility=hidden"
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
AC_TRY_COMPILE([], [int main (void) { return 0; }],
AC_TRY_COMPILE([], [return 0],
AC_MSG_RESULT(yes)
enable_fvisibility_hidden=yes,
AC_MSG_RESULT(no)
@@ -1815,6 +1838,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
##################################################
@@ -1872,8 +1903,7 @@ AC_ARG_ENABLE(Bsymbolic,
[SAVED_LDFLAGS="${LDFLAGS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
[[int main (void) { return 0; }]])],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])],
[AC_MSG_RESULT(yes)
enable_Bsymbolic=yes],
[AC_MSG_RESULT(no)
@@ -1885,6 +1915,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 +1984,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,8 @@ demos_base = \
event_axes.c \
expander.c \
filtermodel.c \
fishbowl.c \
widgetbowl.c \
foreigndrawing.c \
gestures.c \
glarea.c \
@@ -63,6 +65,7 @@ demos_base = \
spinbutton.c \
spinner.c \
stack.c \
tabs.c \
textmask.c \
textview.c \
textscroll.c \
@@ -136,6 +139,8 @@ nodist_gtk3_demo_SOURCES = demos.h
gtk3_demo_SOURCES = \
$(demos) \
gtkfishbowl.c \
gtkfishbowl.h \
demo_resources.c \
main.c
@@ -149,7 +154,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,8 @@
<file>event_axes.c</file>
<file>expander.c</file>
<file>filtermodel.c</file>
<file>fishbowl.c</file>
<file>widgetbowl.c</file>
<file>flowbox.c</file>
<file>foreigndrawing.c</file>
<file>font_features.c</file>
@@ -188,6 +195,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"/>

365
demos/gtk-demo/widgetbowl.c Normal file
View File

@@ -0,0 +1,365 @@
/* Benchmark/Widgetbowl
*
* This is a version of the Fishbowl demo that instead shows different
* kinds of widgets, which is useful for comparing the rendering performance
* of theme specifics.
*/
#include <gtk/gtk.h>
#include "gtkfishbowl.h"
const char *const css =
".blurred-button {"
" box-shadow: 0px 0px 5px 10px rgba(0, 0, 0, 0.5);"
"}"
"";
GtkWidget *fishbowl;
static GtkWidget *
create_button (void)
{
return gtk_button_new_with_label ("Button");
}
static GtkWidget *
create_blurred_button (void)
{
GtkWidget *w = gtk_button_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (w), "blurred-button");
return w;
}
static GtkWidget *
create_font_button (void)
{
return gtk_font_button_new ();
}
static GtkWidget *
create_level_bar (void)
{
GtkWidget *w = gtk_level_bar_new_for_interval (0, 100);
gtk_level_bar_set_value (GTK_LEVEL_BAR (w), 50);
/* Force them to be a bit larger */
gtk_widget_set_size_request (w, 200, -1);
return w;
}
static GtkWidget *
create_spinner (void)
{
GtkWidget *w = gtk_spinner_new ();
gtk_spinner_start (GTK_SPINNER (w));
return w;
}
static GtkWidget *
create_spinbutton (void)
{
GtkWidget *w = gtk_spin_button_new_with_range (0, 10, 1);
return w;
}
static GtkWidget *
create_label (void)
{
GtkWidget *w = gtk_label_new ("pLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
gtk_label_set_line_wrap (GTK_LABEL (w), TRUE);
gtk_label_set_max_width_chars (GTK_LABEL (w), 100);
return w;
}
static const struct {
const char *name;
GtkWidget * (*create_func) (void);
} widget_types[] = {
{ "Button", create_button },
{ "Blurbutton", create_blurred_button },
{ "Fontbutton", create_font_button },
{ "Levelbar" , create_level_bar },
{ "Label" , create_label },
{ "Spinner" , create_spinner },
{ "Spinbutton", create_spinbutton },
};
static int selected_widget_type = -1;
static const int N_WIDGET_TYPES = G_N_ELEMENTS (widget_types);
#define N_STATS 5
#define STATS_UPDATE_TIME G_USEC_PER_SEC
static void
set_widget_type (GtkWidget *headerbar,
int widget_type_index)
{
if (widget_type_index == selected_widget_type)
return;
/* Remove everything */
gtk_fishbowl_set_count (GTK_FISHBOWL (fishbowl), 0);
selected_widget_type = widget_type_index;
gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar),
widget_types[selected_widget_type].name);
}
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 ("widgets - %.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, &suggested_change);
if (suggested_change > 0)
{
int i;
for (i = 0; i < suggested_change; i ++)
{
GtkWidget *new_widget = widget_types[selected_widget_type].create_func ();
gtk_widget_show (new_widget);
gtk_container_add (GTK_CONTAINER (fishbowl), new_widget);
}
}
else if (suggested_change < 0)
{
gtk_fishbowl_set_count (GTK_FISHBOWL (fishbowl),
gtk_fishbowl_get_count (GTK_FISHBOWL (fishbowl)) + suggested_change);
}
stats_update (bowl);
return G_SOURCE_CONTINUE;
}
static void
next_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
GtkWidget *headerbar = user_data;
int new_index;
if (selected_widget_type + 1 >= N_WIDGET_TYPES)
new_index = 0;
else
new_index = selected_widget_type + 1;
set_widget_type (headerbar, new_index);
}
static void
prev_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
GtkWidget *headerbar = user_data;
int new_index;
if (selected_widget_type - 1 < 0)
new_index = N_WIDGET_TYPES - 1;
else
new_index = selected_widget_type - 1;
set_widget_type (headerbar, new_index);
}
GtkWidget *
do_widgetbowl (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
static GtkCssProvider *provider = NULL;
if (provider == 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);
}
if (!window)
{
GtkWidget *info_label;
GtkWidget *count_label;
GtkWidget *titlebar;
GtkWidget *title_box;
GtkWidget *left_box;
GtkWidget *next_button;
GtkWidget *prev_button;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
titlebar = gtk_header_bar_new ();
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (titlebar), TRUE);
info_label = gtk_label_new ("widget - 00.0 fps");
count_label = gtk_label_new ("0");
fishbowl = gtk_fishbowl_new ();
title_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
prev_button = gtk_button_new_from_icon_name ("pan-start-symbolic", GTK_ICON_SIZE_BUTTON);
next_button = gtk_button_new_from_icon_name ("pan-end-symbolic", GTK_ICON_SIZE_BUTTON);
left_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
g_object_bind_property (fishbowl, "count", count_label, "label", 0);
g_signal_connect (next_button, "clicked", G_CALLBACK (next_button_clicked_cb), titlebar);
g_signal_connect (prev_button, "clicked", G_CALLBACK (prev_button_clicked_cb), titlebar);
gtk_fishbowl_set_animating (GTK_FISHBOWL (fishbowl), TRUE);
gtk_widget_set_hexpand (title_box, TRUE);
gtk_widget_set_halign (title_box, GTK_ALIGN_END);
gtk_window_set_titlebar (GTK_WINDOW (window), titlebar);
gtk_container_add (GTK_CONTAINER (title_box), count_label);
gtk_container_add (GTK_CONTAINER (title_box), info_label);
gtk_header_bar_pack_end (GTK_HEADER_BAR (titlebar), title_box);
gtk_container_add (GTK_CONTAINER (window), fishbowl);
gtk_style_context_add_class (gtk_widget_get_style_context (left_box), "linked");
gtk_container_add (GTK_CONTAINER (left_box), prev_button);
gtk_container_add (GTK_CONTAINER (left_box), next_button);
gtk_header_bar_pack_start (GTK_HEADER_BAR (titlebar), left_box);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_widget_realize (window);
gtk_widget_add_tick_callback (fishbowl, move_fish, info_label, NULL);
set_widget_type (titlebar, 0);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
return window;
}

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,515 @@
[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
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=The icon representing the location in the file system where downloaded files are stored
folder-music=
folder-pictures=
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

@@ -4,13 +4,29 @@
#include "iconstore.h"
#include <gtk/gtk.h>
/* Drag 'n Drop */
static GtkTargetEntry target_table[] = {
{ "text/uri-list", 0, 0 },
};
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;
@@ -35,6 +51,8 @@ struct _IconBrowserWindow
GtkWidget *image3;
GtkWidget *image4;
GtkWidget *image5;
GtkWidget *image6;
GtkWidget *label6;
GtkWidget *description;
};
@@ -116,6 +134,19 @@ item_activated (GtkIconView *icon_view, GtkTreePath *path, IconBrowserWindow *wi
set_image (win->image3, name, 32);
set_image (win->image4, name, 48);
set_image (win->image5, name, 64);
if (win->symbolic)
{
gtk_widget_show (win->image6);
gtk_widget_show (win->label6);
gtk_widget_show (gtk_widget_get_parent (win->image6));
set_image (win->image6, name, 64);
}
else
{
gtk_widget_hide (win->image6);
gtk_widget_hide (win->label6);
gtk_widget_hide (gtk_widget_get_parent (win->image6));
}
if (description && description[0])
{
gtk_label_set_text (GTK_LABEL (win->description), description);
@@ -154,6 +185,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 +204,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 +245,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 +301,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 +365,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);
}
@@ -783,6 +400,35 @@ get_image_data (GtkWidget *widget,
g_object_unref (pixbuf);
}
static void
get_scalable_image_data (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection,
guint target_info,
guint time,
gpointer data)
{
gchar *uris[2];
GtkIconInfo *info;
GtkWidget *image;
GFile *file;
const gchar *name;
image = gtk_bin_get_child (GTK_BIN (widget));
gtk_image_get_icon_name (GTK_IMAGE (image), &name, NULL);
info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), name, -1, 0);
file = g_file_new_for_path (gtk_icon_info_get_filename (info));
uris[0] = g_file_get_uri (file);
uris[1] = NULL;
gtk_selection_data_set_uris (selection, uris);
g_free (uris[0]);
g_object_unref (info);
g_object_unref (file);
}
static void
setup_image_dnd (GtkWidget *image)
{
@@ -794,6 +440,19 @@ setup_image_dnd (GtkWidget *image)
g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_image_data), NULL);
}
static void
setup_scalable_image_dnd (GtkWidget *image)
{
GtkWidget *parent;
parent = gtk_widget_get_parent (image);
gtk_drag_source_set (parent, GDK_BUTTON1_MASK,
target_table, G_N_ELEMENTS (target_table),
GDK_ACTION_COPY);
g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_scalable_image_data), NULL);
}
static void
icon_browser_window_init (IconBrowserWindow *win)
{
@@ -820,8 +479,9 @@ icon_browser_window_init (IconBrowserWindow *win)
setup_image_dnd (win->image3);
setup_image_dnd (win->image4);
setup_image_dnd (win->image5);
setup_scalable_image_dnd (win->image6);
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));
@@ -859,6 +519,8 @@ icon_browser_window_class_init (IconBrowserWindowClass *class)
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image3);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image4);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image5);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image6);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, label6);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, description);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), search_text_changed);
@@ -866,6 +528,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>
@@ -150,6 +150,7 @@
<property name="margin">10</property>
<property name="row-spacing">18</property>
<property name="column-spacing">18</property>
<property name="halign">center</property>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
@@ -230,6 +231,22 @@
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
<child>
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">5</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
@@ -307,21 +324,41 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="description">
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="wrap">True</property>
<property name="max-width-chars">60</property>
<property name="xalign">0</property>
<property name="valign">start</property>
<property name="halign">center</property>
<property name="valign">baseline</property>
<property name="label">scalable</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="width">5</property>
<property name="left-attach">5</property>
<property name="top-attach">2</property>
</packing>
</child>
</object>
</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>
</child>
<child>
<object class="GtkLabel" id="description">
<property name="margin">10</property>
<property name="visible">True</property>
<property name="wrap">True</property>
<property name="max-width-chars">60</property>
<property name="valign">start</property>
</object>
</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)
{
@@ -1718,12 +1728,14 @@ activate (GApplication *app)
widget = (GtkWidget *)gtk_builder_get_object (builder, "statusbar");
gtk_statusbar_push (GTK_STATUSBAR (widget), 0, "All systems are operating normally.");
g_action_map_add_action (G_ACTION_MAP (window),
G_ACTION (g_property_action_new ("statusbar", widget, "visible")));
action = G_ACTION (g_property_action_new ("statusbar", widget, "visible"));
g_action_map_add_action (G_ACTION_MAP (window), action);
g_object_unref (G_OBJECT (action));
widget = (GtkWidget *)gtk_builder_get_object (builder, "toolbar");
g_action_map_add_action (G_ACTION_MAP (window),
G_ACTION (g_property_action_new ("toolbar", widget, "visible")));
action = G_ACTION (g_property_action_new ("toolbar", widget, "visible"));
g_action_map_add_action (G_ACTION_MAP (window), action);
g_object_unref (G_OBJECT (action));
adj = (GtkAdjustment *)gtk_builder_get_object (builder, "adjustment1");
@@ -1910,6 +1922,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

@@ -1270,6 +1270,7 @@ gdk_wayland_device_get_wl_seat
gdk_wayland_display_get_wl_compositor
gdk_wayland_display_get_wl_display
gdk_wayland_display_get_xdg_shell
gdk_wayland_display_query_registry
gdk_wayland_window_get_wl_surface
gdk_wayland_window_set_use_custom_surface
GdkWaylandWindowExported

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

@@ -4,13 +4,13 @@
]>
<refentry id="chap-css-overview">
<refmeta>
<refentrytitle>GTK+ CSS</refentrytitle>
<refentrytitle>GTK+ CSS Overview</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GTK+ CSS</refname>
<refname>GTK+ CSS Overview</refname>
<refpurpose>
Overview of CSS in GTK+
</refpurpose>
@@ -21,12 +21,6 @@ Overview of CSS in GTK+
Formatting conventions:
We use
U+2011 Non-breaking Hyphen
  U+00A0 No-break Space
to control line breaks in the Name and Value columns.
We use
〈 U+2329 Left-pointing Angle Bracket
〉 U+232A Right-pointing Angle Bracket
@@ -46,7 +40,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 +117,7 @@ scale[.fine-tune]
<programlisting><![CDATA[
button, entry {
color: #ff00ea;
font: Comic Sans 12
font: 12px "Comic Sans";
}
]]></programlisting>
</example>
@@ -142,8 +136,8 @@ button, entry {
The syntax for @import rules is as follows:
</para>
<literallayout><code>〈import rule〉 = @import [ 〈url〉 | 〈string〉] ;</code>
<code>〈url〉 = url( 〈string〉)</code>
<literallayout><code>〈import rule〉 = @import [ 〈url〉 | 〈string〉 ]</code>
<code>〈url〉 = url( 〈string〉 )</code>
</literallayout>
<example><title>An example for using the @import rule</title>
@@ -154,7 +148,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>
@@ -187,7 +181,7 @@ button, entry {
<title>Theme labels that are descendants of a window</title>
<programlisting><![CDATA[
window label {
background-color: #898989
background-color: #898989;
}
]]></programlisting>
</example>
@@ -196,7 +190,7 @@ window label {
<title>Theme notebooks, and anything within</title>
<programlisting><![CDATA[
notebook {
background-color: #a939f0
background-color: #a939f0;
}
]]></programlisting>
</example>
@@ -207,7 +201,7 @@ notebook {
combobox,
notebook > entry {
color: @fg_color;
background-color: #1209a2
background-color: #1209a2;
}
]]></programlisting>
</example>
@@ -216,7 +210,7 @@ notebook > entry {
<title>Theme any widget within a GtkBox</title>
<programlisting><![CDATA[
box * {
font: Sans 20
font: 20px Sans;
}
]]></programlisting>
</example>
@@ -225,7 +219,7 @@ box * {
<title>Theme a label named title-label</title>
<programlisting><![CDATA[
label#title-label {
font: Sans 15
font: 15px Sans;
}
]]></programlisting>
</example>
@@ -234,7 +228,7 @@ label#title-label {
<title>Theme any widget named main-entry</title>
<programlisting><![CDATA[
#main-entry {
background-color: #f0a810
background-color: #f0a810;
}
]]></programlisting>
</example>
@@ -252,7 +246,7 @@ label#title-label {
<title>Theme the entry of a GtkSpinButton</title>
<programlisting><![CDATA[
spinbutton entry {
color: 900185;
color: #900185;
}
]]></programlisting>
</example>
@@ -358,136 +352,136 @@ checkbutton:indeterminate {
</thead>
<tbody>
<row>
<entry>*</entry>
<entry><phrase role="nowrap">*</phrase></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><phrase role="nowrap">E</phrase></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><phrase role="nowrap">E.class</phrase></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><phrase role="nowrap">E#id</phrase></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><phrase role="nowrap">E:nth-child(〈nth-child〉)</phrase></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><phrase role="nowrap">E:nth-last-child(〈nth-child〉)</phrase></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><phrase role="nowrap">E:first-child</phrase></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><phrase role="nowrap">E:last-child</phrase></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><phrase role="nowrap">E:only-child</phrase></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><phrase role="nowrap">E:link, E:visited</phrase></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><phrase role="nowrap">E:active, E:hover, E:focus</phrase></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><phrase role="nowrap">E:disabled</phrase></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><phrase role="nowrap">E:checked</phrase></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><phrase role="nowrap">E:indeterminate</phrase></entry>
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is in an indeterminate state</entry>
<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>
<row>
<entry>E:backdrop, E:selected</entry>
<entry><phrase role="nowrap">E:backdrop, E:selected</phrase></entry>
<entry>any E node which is part of a widget with the corresponding state</entry>
<entry></entry>
<entry>Corresponds to GTK_STATE_FLAG_BACKDROP, GTK_STATE_FLAG_SELECTED</entry>
</row>
<row>
<entry>E:not(〈selector〉)</entry>
<entry><phrase role="nowrap">E:not(〈selector〉)</phrase></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>
<entry>E:dir(ltr), E:dir(rtl)</entry>
<entry><phrase role="nowrap">E:dir(ltr), E:dir(rtl)</phrase></entry>
<entry>any E node that has the corresponding text direction</entry>
<entry><ulink url="https://drafts.csswg.org/selectors/#the-dir-pseudo">CSS4</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:drop(active)</entry>
<entry><phrase role="nowrap">E:drop(active)</phrase></entry>
<entry>any E node that is an active drop target for a current DND operation</entry>
<entry><ulink url="https://drafts.csswg.org/selectors/#drag-pseudos">CSS4</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E F</entry>
<entry><phrase role="nowrap">E F</phrase></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><phrase role="nowrap">E > F</phrase></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><phrase role="nowrap">E ~ F</phrase></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><phrase role="nowrap">E + F</phrase></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 +493,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>
@@ -514,8 +508,8 @@ checkbutton:indeterminate {
</para>
<literallayout><code>〈color〉 = currentColor | transparent | 〈color name〉 | 〈rgb color〉 | 〈rgba color〉 | 〈hex color〉 | 〈gtk color〉</code>
<code>〈rgb color 〉 = rgb( 〈number〉, 〈number〉, 〈number〉 ) | rgb( 〈percentage〉, 〈percentage〉, 〈percentage〉 )</code>
<code>〈rgba color 〉 = rgba(〈number〉, 〈number〉, 〈number〉, 〈alpha value〉) | rgba( 〈percentage〉, 〈percentage〉, 〈percentage〉, 〈alpha value〉 )</code>
<code>〈rgb color〉 = rgb( 〈number〉, 〈number〉, 〈number〉 ) | rgb( 〈percentage〉, 〈percentage〉, 〈percentage〉 )</code>
<code>〈rgba color〉 = rgba( 〈number〉, 〈number〉, 〈number〉, 〈alpha value〉 ) | rgba( 〈percentage〉, 〈percentage〉, 〈percentage〉, 〈alpha value〉 )</code>
<code>〈hex color〉 = #〈hex digits〉</code>
<code>〈alpha value〉 = 〈number〉</code>, clamped to values between 0 and 1
</literallayout>
@@ -532,7 +526,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>
@@ -552,7 +546,7 @@ checkbutton:indeterminate {
GTK+ adds several additional ways to specify colors.
</para>
<literallayout><code>〈gtk color〉 = 〈symbolic color〉 | 〈color expression〉| 〈win32 color〉</code>
<literallayout><code>〈gtk color〉 = 〈symbolic color〉 | 〈color expression〉 | 〈win32 color〉</code>
</literallayout>
<para>
@@ -576,25 +570,35 @@ checkbutton:indeterminate {
@define-color bg_color #f9a039;
* {
background-color: @bg_color;
background-color: @bg_color;
}
]]></programlisting>
</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〉 ) |</code>
<code> alpha( 〈color〉, 〈number〉 ) | mix( 〈color〉, 〈color〉, 〈number〉 )</code>
</literallayout>
<para>
On Windows, GTK+ allows to refer to system colors, as follows:
</para>
<literallayout><code>〈win32 color〉 = -gtk-win32-color( 〈name〉, 〈integer〉)</code>
<literallayout><code>〈win32 color〉 = -gtk-win32-color( 〈name〉, 〈integer〉 )</code>
</literallayout>
</refsect2>
@@ -608,17 +612,17 @@ background-color: @bg_color;
</para>
<literallayout><code>〈image〉 = 〈url〉 | 〈crossfade〉 | 〈alternatives〉 | 〈gradient〉 | 〈gtk image〉</code>
<code>〈crossfade〉 = cross-fade( 〈percentage〉, 〈image〉, 〈image〉)</code>
<code>〈alternatives〉 = image([ 〈image〉, ]* [ 〈image〉 | 〈color〉 ])</code>
<code>〈crossfade〉 = cross-fade( 〈percentage〉, 〈image〉, 〈image〉 )</code>
<code>〈alternatives〉 = image([ 〈image〉, ]* [ 〈image〉 | 〈color〉 ] )</code>
<code>〈gradient〉 = 〈linear gradient〉 | 〈radial gradient〉</code>
<code>〈linear gradient〉 = [ linear-gradient | repeating-linear-gradient ] (</code>
<code> [ [ 〈angle〉 | to 〈side or corner〉 ] , ]?</code>
<code> 〈color stops〉 )</code>
<code>〈radial gradient〉 = [ radialgradient | repeatingradialgradient ] (</code>
<code>〈radial gradient〉 = [ radial-gradient | repeating-radial-gradient ] (</code>
<code> [ [ 〈shape〉 || 〈size〉 ] [ at 〈position〉 ]? , | at 〈position〉, ]?</code>
<code> 〈color stops〉 )</code>
<code>〈side or corner〉 = [ left | right ] || [ top | bottom ]</code>
<code>〈color stops〉 = 〈color stop〉 [ , 〈color stop〉]+</code>
<code>〈color stops〉 = 〈color stop〉 [ , 〈color stop〉 ]+</code>
<code>〈color stop〉 = 〈color〉 [ 〈percentage〉 | 〈length〉 ]?</code>
<code>〈shape〉 = circle | ellipse</code>
<code>〈size〉 = 〈extent keyword〉 | 〈length〉 | [ 〈length〉 | 〈percentage〉 ]{1,2}</code>
@@ -645,7 +649,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 +730,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 +828,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');
@@ -839,7 +843,7 @@ arrow.fancy {
CSS, this can be done with the -gtk-scaled syntax.
</para>
<literallayout><code>〈scaled image〉 = -gtk-scaled( 〈image〉[, 〈image〉]* )</code>
<literallayout><code>〈scaled image〉 = -gtk-scaled( 〈image〉[ , 〈image〉 ]* )</code>
</literallayout>
<para>
@@ -858,7 +862,7 @@ arrow {
]]></programlisting>
</example>
<literallayout><code>〈recolored image〉 = -gtk-recolored( 〈url〉[, 〈color palette〉] )</code>
<literallayout><code>〈recolored image〉 = -gtk-recolor( 〈url〉 [ , 〈color palette〉 ] )</code>
</literallayout>
<para>
@@ -884,7 +888,7 @@ arrow {
</para>
<literallayout><code>〈win32 theme part〉 = -gtk-win32-theme-part( 〈name〉, 〈integer〉 〈integer〉</code>
<code> [, [ over( 〈integer〉 〈integer〉 [ , 〈alpha value〉]? ) | margins( 〈integer〉{1,4} ) ] ]* )</code>
<code> [ , [ over( 〈integer〉 〈integer〉 [ , 〈alpha value〉 ]? ) | margins( 〈integer〉{1,4} ) ] ]* )</code>
</literallayout>
</refsect2>
@@ -935,7 +939,7 @@ arrow {
<literallayout><code>〈keyframe rule〉 = @keyframes 〈name〉 { 〈animation rule〉 }</code>
<code>〈animation rule〉 = 〈animation selector〉 { 〈declaration〉* }</code>
<code>〈animation selector〉 = 〈single animation selector〉 [ , 〈single animation selector ]*</code>
<code>〈animation selector〉 = 〈single animation selector〉 [ , 〈single animation selector ]*</code>
<code>〈single animation selector〉 = from | to | 〈percentage〉</code>
</literallayout>
@@ -985,10 +989,10 @@ spinner {
The syntax for @binding-set rules is as follows:
</para>
<literallayout><code>〈binding set rule〉 = @binding-set 〈binding name〉{ [ [ 〈binding〉 | 〈unbinding〉] ; ]* }</code>
<literallayout><code>〈binding set rule〉 = @binding-set 〈binding name〉 { [ [ 〈binding〉 | 〈unbinding〉 ] ; ]* }</code>
<code>〈binding〉 = bind "〈accelerator〉" { 〈signal emission〉* }</code>
<code>〈signal emission〉 = "〈signal name〉" ( [ 〈argument〉[ , 〈argument〉]* ]? }</code>
<code>〈unbinding〉 = unbind "〈accelerator〉" ;</code>
<code>〈signal emission〉 = "〈signal name〉" ( [ 〈argument〉 [ , 〈argument〉 ]* ]? }</code>
<code>〈unbinding〉 = unbind "〈accelerator〉"</code>
</literallayout>
<para>

File diff suppressed because it is too large Load Diff

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>
@@ -450,13 +450,13 @@ example_app_window_class_init (ExampleAppWindowClass *class)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application2/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application2/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>You may have noticed that we used the <literal>_from_resource(<!-- -->)</literal> variant
of the function that sets a template. Now we need to use GLib's resource
functionality to include the ui file in the binary. This is commonly
done by listing all resources in a .gresource.xml file, such as this:
of the function that sets a template. Now we need to use <ulink url="https://developer.gnome.org/gio/stable/GResource.html">GLib's resource functionality</ulink>
to include the ui file in the binary. This is commonly done by listing
all resources in a .gresource.xml file, such as this:
</para>
<informalexample>
@@ -518,7 +518,7 @@ example_app_window_class_init (ExampleAppWindowClass *class)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application3/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>Now we revisit the example_app_window_open() function that
@@ -567,7 +567,7 @@ example_app_window_open (ExampleAppWindow *win,
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application3/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>Note that we did not have to touch the stack switcher
@@ -665,7 +665,7 @@ example_app_class_init (ExampleAppClass *class)
...
</programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application4/exampleapp.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application4/exampleapp.c">full source</ulink>)</para>
</informalexample>
<para>Our preferences menu item does not do anything yet,
@@ -731,7 +731,7 @@ example_app_window_init (ExampleAppWindow *win)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application5/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application5/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>The code to connect the font setting is a little more involved,
@@ -780,7 +780,7 @@ preferences_activated (GSimpleAction *action,
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application6/exampleapp.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application6/exampleapp.c">full source</ulink>)</para>
</informalexample>
<para>After all this work, our application can now show
@@ -866,7 +866,7 @@ example_app_window_init (ExampleAppWindow *win)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application7/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application7/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>With the search bar, our application now looks like this:</para>
@@ -926,7 +926,7 @@ example_app_window_init (ExampleAppWindow *win)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application8/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application8/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>What our application looks like now:</para>
@@ -989,12 +989,12 @@ example_app_window_init (ExampleAppWindow *win)
...
</programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application9/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>We also need a function that counts the lines of the currently
active tab, and updates the @lines label. See the
<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c">full source</ulink>
<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application9/exampleappwin.c">full source</ulink>
if you are interested in the details.</para>
<para>This brings our example application to this appearance:</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

@@ -14,12 +14,18 @@ main (int argc,
GtkBuilder *builder;
GObject *window;
GObject *button;
GError *error = NULL;
gtk_init (&argc, &argv);
/* Construct a GtkBuilder instance and load our UI description */
builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, "builder.ui", NULL);
if (gtk_builder_add_from_file (builder, "builder.ui", &error) == 0)
{
g_printerr ("Error loading file: %s\n", error->message);
g_clear_error (&error);
return 1;
}
/* Connect signal handlers to the constructed widgets. */
window = gtk_builder_get_object (builder, "window");

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

@@ -1267,7 +1267,7 @@ handle_incoming_connection (GSocketService *service,
}
else
{
request->connection = g_object_ref (connection);
request->connection = G_IO_STREAM (g_object_ref (connection));
}
in = g_io_stream_get_input_stream (request->connection);

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

@@ -300,7 +300,7 @@ gdk_device_manager_get_property (GObject *object,
* Gets the #GdkDisplay associated to @device_manager.
*
* Returns: (nullable) (transfer none): the #GdkDisplay to which
* @device_manager is associated to, or #NULL. This memory is
* @device_manager is associated to, or %NULL. This memory is
* owned by GDK and must not be freed or unreferenced.
*
* Since: 3.0

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;
/**
@@ -1183,7 +1200,7 @@ struct _GdkEventDND {
* @type: the type of the event (%GDK_TOUCHPAD_SWIPE)
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly
* @phase: (type GdkTouchpadGesturePhase): the current phase of the gesture
* @phase: the current phase of the gesture
* @n_fingers: The number of fingers triggering the swipe
* @time: the time of the event in milliseconds
* @x: The X coordinate of the pointer
@@ -1220,7 +1237,7 @@ struct _GdkEventTouchpadSwipe {
* @type: the type of the event (%GDK_TOUCHPAD_PINCH)
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly
* @phase: (type GdkTouchpadGesturePhase): the current phase of the gesture
* @phase: the current phase of the gesture
* @n_fingers: The number of fingers triggering the pinch
* @time: the time of the event in milliseconds
* @x: The X coordinate of the pointer

View File

@@ -477,7 +477,7 @@ gdk_frame_clock_get_timings (GdkFrameClock *frame_clock,
*
* Returns: (nullable): the #GdkFrameTimings for the frame currently
* being processed, or even no frame is being processed, for the
* previous frame. Before any frames have been procesed, returns
* previous frame. Before any frames have been processed, returns
* %NULL.
* Since: 3.8
*/
@@ -541,10 +541,10 @@ _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
* gdk_frame_clock_get_refresh_info:
* @frame_clock: a #GdkFrameClock
* @base_time: base time for determining a presentaton time
* @refresh_interval_return: a location to store the determined refresh
* interval, or %NULL. A default refresh interval of 1/60th of
* a second will be stored if no history is present.
* @presentation_time_return: a location to store the next
* @refresh_interval_return: (out) (optional): a location to store the
* determined refresh interval, or %NULL. A default refresh interval of
* 1/60th of a second will be stored if no history is present.
* @presentation_time_return: (out): a location to store the next
* candidate presentation time after the given base time.
* 0 will be will be stored if no history is present.
*

View File

@@ -123,6 +123,7 @@ gdk_frame_clock_idle_init (GdkFrameClockIdle *frame_clock_idle)
frame_clock_idle->priv = priv =
gdk_frame_clock_idle_get_instance_private (frame_clock_idle);
priv->frame_time = g_get_monotonic_time (); /* more sane than zero */
priv->freeze_count = 0;
}
@@ -350,9 +351,37 @@ gdk_frame_clock_paint_idle (void *data)
case GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT:
if (priv->freeze_count == 0)
{
priv->frame_time = compute_frame_time (clock_idle);
gint64 frame_interval = FRAME_INTERVAL;
gint64 reset_frame_time;
gint64 smoothest_frame_time;
gint64 frame_time_error;
GdkFrameTimings *prev_timings =
gdk_frame_clock_get_current_timings (clock);
if (prev_timings && prev_timings->refresh_interval)
frame_interval = prev_timings->refresh_interval;
/* We are likely not getting precisely even callbacks in real
* time, particularly if the event loop is busy.
* This is a documented limitation in the precision of
* gdk_threads_add_timeout_full and g_timeout_add_full.
*
* In order to avoid this imprecision from compounding between
* frames and affecting visual smoothness, we correct frame_time
* to more precisely match the even refresh interval of the
* physical display. This also means we proactively avoid (most)
* missed frames before they occur.
*/
smoothest_frame_time = priv->frame_time + frame_interval;
reset_frame_time = compute_frame_time (clock_idle);
frame_time_error = ABS (reset_frame_time - smoothest_frame_time);
if (frame_time_error >= frame_interval)
priv->frame_time = reset_frame_time;
else
priv->frame_time = smoothest_frame_time;
_gdk_frame_clock_begin_frame (clock);
/* Note "current" is different now so timings != prev_timings */
timings = gdk_frame_clock_get_current_timings (clock);
timings->frame_time = priv->frame_time;

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
@@ -338,7 +340,7 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
/**
* GdkGLContext:shared-context:
*
* The #GdkGLContext that this context is sharing data with, or #NULL
* The #GdkGLContext that this context is sharing data with, or %NULL
*
* Since: 3.16
*/
@@ -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);

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