Commit Graph

27129 Commits

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