Commit Graph

52185 Commits

Author SHA1 Message Date
Daniel Boles
65b6e92c27 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-07 00:44:24 +01:00
Daniel Boles
c1a5afb3a8 FileChooserButton: Avoid unref()ing a null model 2017-10-07 00:44:24 +01:00
Matthias Clasen
ad9c70537d gtk-demo: Fix the assistant demo
The progress bar was no longer expanding as intended,
due to the demise of GtkBox::expand.
2017-10-06 19:38:16 -04:00
Matthias Clasen
b5fe4c0a1d settings: Don't assert in notify
We can legitimately hit the default case in this switch,
so don't assert that we don't.
2017-10-06 19:30:27 -04:00
Matthias Clasen
b9b03cf570 gskrenderer: Make the window property not construct
We never set this, since it is assigned as a side-effect
of realizing the renderer. Make this a plain readonly property.
2017-10-06 19:29:42 -04:00
Matthias Clasen
10ec3e91f5 vulkan: Add some missing cases to switch 2017-10-06 18:29:00 -04:00
Benjamin Otte
43c212ac28 build: Enable -Wswitch-enum and -Wswitch-default
This patch makes that work using 1 of 2 options:

1. Add all missing enums to the switch statement
  or
2. Cast the switch argument to a uint to avoid having to do that (mostly
   for GdkEventType).

I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.

The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Benjamin Otte
2ac66328a3 build: Turn on more warning flags
-Wshadow these days does not overwarn anymore like it did in gcc 4.
There are no warnings inside gtk, so better enable it to keep it that
way.

-Wuninitialized also has no positives, so I'm gonna turn it on just
because.
2017-10-06 21:23:39 +02:00
Matthias Clasen
e7b79e2097 gtk-demo: Keep treeviews expanding
This is fallout from GtkBox::expand child property going away.
2017-10-06 14:21:19 -04:00
Carlos Garnacho
a0de570e47 gtktreeview: Transform cell area to widget coordinates
GtkCellArea uses event coordinates (thus in treeview relative
coordinates), but calculations used to happen in bin window coords.
We can just offset the cell area by the bin window, fixes cell
renderer activation and edition.
2017-10-06 18:26:08 +02:00
Carlos Garnacho
f7d02bfb61 treeviewcolumn: Don't swallow motion/crossing events
If the column is not clickable, it may make some sense to stop
event propagation here for button events. However motion events
should be left alone.

Fixes treeview column resize pointer cursors, since that's
implemented up the bubbling phase in the treeview.
2017-10-06 18:25:44 +02:00
Carlos Garnacho
0724fa7f61 treeview: Transform motion event coords to "bin window" coords
The operations rely there on bin window relative coordinates, but we
are receiving GtkTreeView relative coordinates there. Fixes clicking
on treeview expanders, which was offset by visible headers.
2017-10-06 18:23:26 +02:00
Timm Bäder
d832e5b2dd 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 17:35:28 +02:00
Timm Bäder
2c28c627c1 treeviewcolumn: Don't leak button
We g_object_ref_sink the button in _create_button, so we need to unref
it ourselves.
2017-10-06 17:23:34 +02:00
Timm Bäder
d292ebc7bd filechooserbutton: Don't leak priv->model 2017-10-06 17:14:31 +02:00
Timm Bäder
b34c84ab6d applicationwindw: Don't leak show-help-overlay action 2017-10-06 16:30:31 +02:00
Timm Bäder
9115291515 widget-factory: Don't leak GPropertyAction instances 2017-10-06 16:30:20 +02:00
Benjamin Otte
c1e9869329 build: Don't turn off critical warnings
-Wint-conversion is important because it checks casts from ints to
pointers.

-Wdiscarded-qualifiers is important to catch cases where we don't
strings when we should.
2017-10-06 16:03:08 +02:00
Benjamin Otte
defcf17d3d gtk-demo: Remove old build file
The includes are now generated with a Python script, so remvoe the old
perl script.
2017-10-06 16:03:07 +02:00
Benjamin Otte
2936953d9f build: Remove old Makefile.inc files
They seem to have been forgotten in the meson transition
2017-10-06 16:03:07 +02:00
Piotr Drąg
0fa46b4123 Update Polish translation 2017-10-06 15:55:55 +02:00
Matthias Clasen
ec1addf618 Some updates 2017-10-06 09:15:23 -04:00
Timm Bäder
869d9e8fe7 Widget: make sure windowed widgets have a 1×1 min size 2017-10-06 14:38:07 +02:00
Timm Bäder
3b9aa2f8d9 widget: Allow 0×0 allocations
Don't MAX the allocations with 1 anymore.
2017-10-06 14:38:07 +02:00
Timm Bäder
aef86a8b2c searchbar: Remove superfluous padding
So it's not 6px high when the child revealer is concealed.
2017-10-06 14:38:07 +02:00
Timm Bäder
9125dc7069 box: Drop priv pointer 2017-10-06 14:24:52 +02:00
Timm Bäder
02a526c04a image: Remove mention on gdk-pixbuf-csource
gdk-pixbuf-csource as well as gdk_pixbuf_new_from_inline are deprecated.
Mention GResource instead.
2017-10-06 10:40:23 +02:00
Daniel Boles
fbf24d1bd0 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:40:42 +01:00
Daniel Boles
70fa5be983 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:40:15 +01:00
Daniel Boles
018bee64aa 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:53 +01:00
Daniel Boles
efaf9948be 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)
2017-10-06 00:25:10 +01:00
Daniel Boles
84de918ce0 HighContrast: Fix titlebar containing >1 headerbar
by migrating the relevant code from Adwaita, to dodge unwanted doubling
up of the bottom border and such.

https://bugzilla.gnome.org/show_bug.cgi?id=769877
2017-10-05 23:03:01 +01:00
Marco Trevisan (Treviño)
d2a577d797 HighContrast: set min-height for headerbars
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-05 22:36:52 +01:00
Daniel Boles
0fb4a018f5 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:40:36 +01:00
Daniel Boles
6b2c8bfcf1 HC: Give tooltips a border for contrast on Inverse
https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 18:44:04 +01:00
Daniel Boles
3ad7a86961 HighContrast: Actually style tooltips...
We need to select on the widget itself too, not just other things with
the .tooltip class.

https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 18:44:04 +01:00
Xavi Ivars
fd7d0067c3
[l10n] Updated Catalan (Valencian) translation 2017-10-05 18:05:24 +02:00
Timm Bäder
7770bdcb36 switch: Fix int/double comparison
We get a double coordinate.
2017-10-05 10:21:54 +02:00
Timm Bäder
786d89cd9d scrolledwindow: Make sure gtk_get_current_event_state returned a state
Technically correct and pleases Coverity.
2017-10-05 10:21:54 +02:00
Timm Bäder
3515a27f8e appchooserdialog: Remove unused macro 2017-10-05 10:21:54 +02:00
Timm Bäder
f9744cf194 combobox: Remove unneeded queue_resize call
The remove/add/set_parent/unparent calls in there already do the
necessary work.
2017-10-05 10:21:47 +02:00
Daniel Boles
a4fda99539 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 01:40:24 +01:00
Matthias Clasen
090b833d8b wayland: fix a typo
This was noticed in the gtk3 backport of these changes.
2017-10-04 20:04:12 -04:00
Daniel Boles
88b15beb0a 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:59:11 +01:00
Colomban Wendling
e4754a007b 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:52:18 +01:00
Georges Basile Stavracas Neto
04456404be -wayland: Safeguard against NULL gtk_surface1
There is no guarantee that the gtk_surface won't be NULL,
and Wayland API does not safeguard against NULL, so we have
to do that ourselves here.

We were also mistakenly cheking for the surface version off
by one, fix that too by checking if the surface version is
equal or greater.
2017-10-04 18:30:34 -03:00
Daniel Boles
f63519dc01 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:05:13 +01:00
Daniel Boles
06941c593d 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:17:57 +01:00
Daniel Boles
9c3ea3f9a0 ComboBox|TreeMenu: Slightly clarify wrap-width doc 2017-10-04 10:22:21 +01:00
Daniel Boles
5849b98568 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:22:20 +01:00