Commit Graph

49433 Commits

Author SHA1 Message Date
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