Commit Graph

44087 Commits

Author SHA1 Message Date
Benjamin Otte
f16292ea02 cssprovider: Only push a new scanner when none exists
For @import, we want to emit the error as part of the @import statement,
not as part of the new file.
2015-11-16 19:36:21 +01:00
Paolo Borelli
80a362c3c3 filechooser: ignore double clicks on the selected item
Since we are now interpreting button press events and
make our own double-click determination, we should not
handle double-click events that are generated by GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=757950
2015-11-16 11:46:41 -05:00
Benjamin Otte
edff6fa652 cssprovider: Have a section on import error
When loading a nonexisting CSS file using
gtk_css_provider_load_from_file() or gtk_css_provider_load_from_path()
we would emit the error using a NULL scanner. Don't do that, because
we'll have a NULL section in that case and error handlers don't like
that.

Testcase attached.

https://bugzilla.redhat.com/show_bug.cgi?id=1277959
2015-11-16 17:40:59 +01:00
Benjamin Otte
0099b0820d cssprovider: Have a section when parsing style properties
Signal handlers expect a section to be present, so provide them with
one.

New testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=757240
2015-11-16 17:40:59 +01:00
Carlos Soriano
15cf978d5a gtkplacessidebar: improve heuristics for external drives
Since the change to use GtkPlacesView we don't want to show
internal storage on the sidebar.

In our case we were checking for drive_can_eject and
drive_is_media_removable.

However for some external hard drives it's reported that they
are not ejectable nor the have removable media. So the only
attribute that they have different from internal drives is that
they can be stopped.
So check for if the drive can be stopped to decide if it is
external or internal.

On the way realized we don't need to check for the mounts associated
with the volume to know if the volume can be ejected or not. So remove
that code.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-11-16 11:05:23 +01:00
YunQiang Su
2d1a793d57 Us ... instead of … for zh_CN 2015-11-14 21:59:24 +08:00
Ignacio Casal Quinteiro
7be06688ff win32: do not use g_clear_pointer to destroy the window
DestroyWindow expects a different calling convenction so
we endup getting an error at runtime
2015-11-13 12:54:54 +01:00
Matthias Clasen
9a7c95234c 3.18.4 3.18.4 2015-11-12 12:52:48 -05:00
Colomban Wendling
91a91b69b9 cssnode: Fix style updating when the CSS node ID changes
Since 4ebb5781ea ID has a specific value,
while it used to be the same as NAME.  Thus, explicitly list ID as a
radical change just like NAME.

https://bugzilla.gnome.org/show_bug.cgi?id=757397
2015-11-12 12:52:16 -05:00
Sébastien Wilmet
511bd4fee7 Revert "inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround"
This reverts commit 1536710dba.

Because of the revert at
commit 0dc66f5125.
2015-11-12 17:23:16 +01:00
Matthias Clasen
0dc66f5125 Revert "textbuffer: nicer get_iter functions"
This reverts commit cf51c4f6db.

This change broke binding api.
2015-11-12 10:36:26 -05:00
Mingye Wang (Arthur2e5)
a875a84846 update zh_CN translation 2015-11-12 23:17:28 +08:00
Ignacio Casal Quinteiro
e0f951a76a win32: chain up on display dispose 2015-11-12 16:01:39 +01:00
Matthias Clasen
3c331ba78d 3.18.3 3.18.3 2015-11-09 11:12:58 -05:00
Alexander Larsson
040a209031 gdk: Fix invalidation w/ pixel cache when changing child window geometry.
When moving/scrolling a child window we can't use the current clip
region to limit what is invalidated, because there may be a pixel
cache that listens for changes outside the clip region. Instead
invalidate the entire area and rely on the invalidation code to limit
the repaint to the actually visible area.
2015-11-09 11:12:58 -05:00
Benjamin Otte
2e09bddb41 placesview: Don't export API
This is a private object, don't export its symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=756978
2015-11-09 10:29:27 -05:00
Matthias Clasen
9883f592b0 Avoid excessive property notification for GtkStack::interpolate-size
make check checks this for writable properties, and fails now that
we've made this property writable.
2015-11-09 09:28:21 -05:00
Alexander Larsson
e33f4b1fef TreeModelFilter: Fix uninitialized memory read.
We were copying an iterator that sometimes was not initialized,
which caused debugger warnings in VS2015.
2015-11-09 08:49:22 -05:00
Emmanuele Bassi
ebf4ac8a5b docs: Point at for_scale() variants
Using lookup_icon() and lookup_by_gicon() with a size multiplied by a
scaling factor is almost certainly going to get worse results than using
their for_scale() variants.
2015-11-09 08:48:42 -05:00
Emmanuele Bassi
ac823cf070 docs: Clarify gtk_render_icon()'s behaviour
A GdkPixbuf has no scaling factor, so drawing directly from it can only
using a scale of 1, to avoid blurry, fuzzy icons.

You should be using gtk_render_icon_surface() anyway.
2015-11-09 08:48:36 -05:00
Emmanuele Bassi
afb6265530 docs: Fix typo in gdk_screen_get_scale_factor() 2015-11-09 08:48:30 -05:00
Christian Hergert
d1dda37f8c stack: GtkStack:interpolate-size should be read/write
It looks like the param spec for interpolate-size was
copied from the line above it, which is a read only property.

There is a setter for interpolate-size, and it is implemented in
set_property().
2015-11-09 08:48:10 -05:00
Christian Hergert
80ae3fe6f2 headerbar: remove G_PARAM_CONSTRUCT from custom-title
This fixes the ability to sublcass GtkHeaderBar from a UI template which
contains a custom <child type="title"> element.

https://bugzilla.gnome.org/show_bug.cgi?id=757544
2015-11-09 08:47:54 -05:00
Carlos Garnacho
0358fd0b33 GdkDevice: Do not free construct-only properties data on dispose()
Those are not references to other objects, and the device will be mostly
useless if those can't be set again anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=756625
2015-11-09 08:47:30 -05:00
Carlos Garnacho
1266d15c4b x11: Detect single-touch touchscreens as GDK_SOURCE_TOUCHSCREEN
Those won't have ABS_MT_* axes, so won't be reported has having
XITouchClassInfo. Fallback on these to checking whether abs x/y axes are
available. After the Wacom checks, any remaining device with absolute axes
should be touchscreens, and GDK_SOURCE_MOUSE does indeed just make sense on
devices with relative axes.

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-09 08:46:48 -05:00
Dhiru Kholia
9062a835a0 Fix a memory leak in gtk-3.0.m4 file
This fix is inspired by,

https://git.gnome.org/browse/glib/tree/m4macros/glib-2.0.m4

https://bugzilla.gnome.org/show_bug.cgi?id=757221
2015-11-09 08:46:39 -05:00
Benjamin Otte
94476c3c86 gdkrgba: Use %g instead of %.17g to print alpha
This way 0.3 isn't printed as 0.29999999999999
2015-11-09 08:45:31 -05:00
Matthias Clasen
d38c29f48b Load settings.ini from all data dirs
An error in the loading function was making us load the file from
the first data dir repeatedly, instead.

https://bugzilla.gnome.org/show_bug.cgi?id=757377
2015-11-09 08:44:28 -05:00
Matthias Clasen
c9b69f7c39 tool item group: Don't leak a button
This causes a hickup in the new css node machinery, causing
the default-value test to fail.
2015-11-09 08:42:00 -05:00
Matthias Clasen
08db197af2 icon theme: Ensure to propagate an error
If the svg pixbuf loader is not available, we end up with criticals
from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
returns NULL without setting an error.

Avoid this by propagating the load error.
2015-11-09 08:41:30 -05:00
Lars Uebernickel
bfdff24b10 gdkpixbuf-drawable: reinstate accidentally removed line 2015-11-09 08:41:18 -05:00
Lars Uebernickel
088d3449ca gdk_pixbuf_get_from_window: honor device scale
gdk_pixbuf_get_from_window() paints the given window onto a new cairo
surface. Create that new surface with the same device scale as the
window so that the result is not scaled down on hidpi screens.

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-11-09 08:41:11 -05:00
Jonas Ådahl
a4448b7578 wayland: Don't use GTK symbols from GDK
GTK_WINDOW_POPUP sets the GdkWindow type to GDK_WINDOW_TEMP, so use
that in GDK, not the GTK symbol which doesn't exist there.
2015-11-09 08:40:47 -05:00
Jonas Ådahl
8c8ed3e778 GtkTreeView: Rework the search window hack so it also works on Wayland
The search window of a tree view was implemented by showing without
making it visible by by positioning it outside the screen edge. This is
not possible on Wayland, so implement another method for being able to
enter text into a non-visible entry.

The new method is implemented by, before showing the window, pass the
key event directly to the IM context backing the entry. If the key
event triggered the context to commit new text or change the preedit
content, the search window is shown, and from that point the key events
are forwarded directly to the entry widget.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:39 -05:00
Jonas Ådahl
1b58cd10a9 wayland: Map UTILITY hinted popup windows as subsurfaces
Currently used by GtkTreeView to map windows without changing focus. We
can't map this as a popup, because popup implies focus change.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:34 -05:00
Jonas Ådahl
3a53352afe GtkTreeView: Make a search window destroy helper
https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:25 -05:00
Jonas Ådahl
ea449a032a wayland: Don't try to use subsurfaces as popup parents
If a GtkMenu (or something else that is mapped as a xdg_popup) tries to
use a subsurface window as a parent, it will be terminated by the
compositor due to protocol violation. So to avoid this, if a parent
window is not a xdg_popup or xdg_surface, i.e. a wl_subsurface, then
traverse up the transient parents until we find the right popup parent.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:20 -05:00
Jonas Ådahl
a78f4d5444 wayland: Make window type conditions switches
In order to make it easier to add/remove in future commits.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:13 -05:00
Jonas Ådahl
b31132971d GtkTreeView: Use more consistent search window naming
Instead of alternating between search dialog and search window, use
search window everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:06 -05:00
Matthias Clasen
bfedc3bafe Translate GDK_KEY_KP_Decimal according to locale
It makes sense that you should be able to type numbers that are
correctly formatted and parsable according to the current locale,
using just the keypad. This patch makes it so by translating
GDK_KEY_KP_Decimal to the decimal separator for the current locale,
instead of hardcoding a '.'.

https://bugzilla.gnome.org/show_bug.cgi?id=756751
2015-11-09 08:38:45 -05:00
Matthias Clasen
d49c1cdcf4 win32: Fix introspection syntax 2015-11-09 08:38:17 -05:00
Matthias Clasen
90dd285c22 builder: Avoid some unnecessary overhead
Only get the class once per object, not once per property.
And don't canonicalize the property name, g_object_class_find_property
does that already.
2015-11-09 08:37:20 -05:00
Paolo Borelli
276e9be383 widget: fix typo in warning message 2015-11-09 08:37:04 -05:00
Jonas Ådahl
e135358ed0 wayland: Map windows with tooltip hint as subsurfaces
Tooltips tend to be placed on top of a parent surface with a given
relative coordinate, and without any input focus. So lets map them as
subsurfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-11-09 08:36:55 -05:00
Jonas Ådahl
1d464fca3c wayland: Clean up code determining how to map a window
Restructure the mapping procedure so that its known up front what the
expected way mapping is to be done (subsurface, popup or stand alone),
and warn if it fails to actually map in such a way (for example a popup
without a parent or device grab, a tooltip without a parent).

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-11-09 08:36:49 -05:00
Timm Bäder
633b08cc8a GtkPaned: Fix gtk_paned_set_child_visible calls
Use CHILD1/CHILD2 instead of 0 and 1, always use the same order and
don't check for child NULL-ness, because it will be done in
gtk_paned_set_child_visible anyways.
2015-11-09 08:36:10 -05:00
Sébastien Wilmet
1536710dba inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround
The function is now safe to use.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-11-09 08:35:49 -05:00
Sébastien Wilmet
cf51c4f6db textbuffer: nicer get_iter functions
Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.

A boolean is returned to know if @iter has been set to the exact
location.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-11-09 08:35:37 -05:00
Matthias Clasen
2a95ab1828 Improve text a11y test
Test appending text as well as replacing the entire text.
Insert non-ASCII text to verify offsets are correct.
2015-11-09 08:35:06 -05:00
Matthias Clasen
13f680d11a file chooser: Avoid search interruption
When the search entry is shown, the 'special' nature of
., ~ and / should not trigger the location entry, because
that interrupts the search and is likely not what the
user intended.

https://bugzilla.gnome.org/show_bug.cgi?id=756505
2015-11-09 08:34:54 -05:00