Commit Graph

27264 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Carlos Garnacho
a3178fd665 gtkclipboard: Fix typo
The standard atom is UTF8_STRING.
2017-05-10 20:25:40 +02: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
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
Daniel Boles
cc0e6eb374 Frame: Explain the .flat style class 2017-02-19 17:17:41 +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
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
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
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