Commit Graph

26862 Commits

Author SHA1 Message Date
Matthias Clasen
6181ff2552 paned: quietly handle missing cursors
The row-/col-resize cursors should really be present, but if they
aren't we don't need to crash.

https://bugzilla.gnome.org/show_bug.cgi?id=771963
2016-09-27 14:55:13 -04:00
Gautier Pelloux-Prayer
fea851b3eb Fix wrong URL link in gtkshortcutswindow documentation
https://bugzilla.gnome.org/show_bug.cgi?id=772057
2016-09-27 14:48:38 -04:00
Daniel Drake
fa23641992 _gtk_icon_helper_draw: get style earlier
After checking for rendered_surface, the call to gtk_css_node_get_style
can invalidate the style and result in rendered_surface being set to
NULL. This was result in some icon views appearing blank on
Endless OS on armv7hl, and this error:

Gtk-CRITICAL **: gtk_css_style_render_icon_surface: assertion 'surface != NULL' failed

Call gtk_css_node_get_style earlier to ensure we always pass a valid
surface to gtk_css_style_render_icon_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=765649
https://phabricator.endlessm.com/T13524
2016-09-26 14:23:51 -07:00
Lapo Calamandrei
ebc852249a Adwaita: always use images for button backgrounds
transitions gets messed up when some background-image and
background-color are in the mix.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=769500
2016-09-24 16:11:39 +02:00
Philip Withnall
506426a30e gtktreeviewcolumn: Fix typo in typedef documentation 2016-09-23 21:10:13 -07:00
Carlos Soriano
cc814fdeac gtkplacesview: mark string as translatable
We missed it.

https://bugzilla.gnome.org/show_bug.cgi?id=771666
2016-09-22 17:02:19 +02:00
Rico Tzschichholz
a3f1596069 Add some missing (nullable) annotations
https://bugzilla.gnome.org/show_bug.cgi?id=771826
2016-09-22 14:02:07 +02:00
Timm Bäder
54fdcb3ffa widget: Don't print missing allocation warning by default
This was meant to be silenced unless expicitly requested but
G_ENABLE_DEBUG is defined by default unless --disable-debug is passed to
configure, so use G_ENABLE_CONSISTENCY_CHECKS instead which is only
defined if --enable-debug is explicitly passed.
2016-09-22 09:01:06 +02:00
Lapo Calamandrei
06b2adb107 encodesymbolic: handle circle objects
add circle objects to the injected style for recoloring.
Should avoid randomly colored symbolic icon bits when circles are
in the mix as in network-vpn-acquiring-symbolic for example.
2016-09-21 17:46:19 +02:00
Emmanuele Bassi
b74cd23e29 docs: Add a diagram for GtkListBox nodes
GtkListBox's API reference for CSS nodes should follow the template of
other widget classes.
2016-09-20 23:32:00 +01:00
Jakub Steiner
d8776ae756 Adwaita: sync svg assets with css
- scale slider strokes were lighter on the SVG variants
2016-09-19 22:21:23 +02:00
Olivier Fourdan
4cb1b9645e gtkwindow: Update shadow size on state change
Otherwise, with CSD, we could have a discrepancy where gtk uses the
right values for the shadows whereas the gdk backend still uses the old
values, leading in some cases to invalid or negative min size being
computed (which, in Wayland, leads a protocol error).

https://bugzilla.gnome.org/show_bug.cgi?id=771561
2016-09-19 19:35:50 +02:00
Emmanuele Bassi
08e443e0db docs: Update gtk_window_get_size()
The main corpus of the documentation for gtk_window_get_size() is still
full of X11-isms, so we should port it to something that is more
backend-agnostic. Additionally, having some examples would be nice for
application authors looking at a way to appropriately use this function.
2016-09-17 12:47:39 +01:00
Emmanuele Bassi
bb705837bc Ensure drawing context is set
If somebody decides to use gtk_widget_set_double_buffered() in the
middle of a draw() then there's the risk of calling end_draw_frame()
with an invalid pointer.

Some overeager compilers may warn about the double_buffered bit field
changing values and leading to a potentially uninitialized variable.

In order to avoid compiler warnings or crashes, we can simply store the
value of the double_buffered bit field at the beginning of the rendering
and use that instead of the actual bit field.

https://bugzilla.gnome.org/show_bug.cgi?id=771463
2016-09-15 10:17:24 +01:00
Timm Bäder
5ea69a136b widget: Only warn about missing allocation if G_ENABLE_DEBUG
Not all occurrences of this warning can be fixed today, so put it behind
a G_ENABLE_DEBUG flag since it still shows legitimate problems even if
some of them are false positives.
2016-09-14 18:06:54 -04:00
Matthias Clasen
29faa2db44 Redo focus handling in treeview once more
The fix for bug 767468 had some unintended side-effects. This is
an attempt at doing the same fix (don't grab focus when we are
grab-shadowed), while avoiding the breakage, by using GTK+'s
internal tracking for grab-shadowed-ness.

https://bugzilla.gnome.org/show_bug.cgi?id=770508
2016-09-11 11:47:55 -04:00
Matthias Clasen
3f102c27aa gtk-launch: Add help string for --version
This was missing for no good reason.
2016-09-11 10:51:19 -04:00
Christian Kellner
d4bf215611 placesview: keep reference during network fetching
Analogous to (un)mount operation, we now keep a reference around
during the ongoing operation and make use of the destroyed flag
to check if we are still alive or if we have been cancelled as
a result of the widget being destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Christian Kellner
7cdc04c8d2 placesview: override destory to cancel ongoing ops
Since we hold on to a reference during (un)mount operations, we
don't trigger the cancellation of operations in finalize anymore.
Instead we now override the GtkWidget's destroy() and cancel any
ongoing operations there.

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Christian Kellner
0e5b0b75c5 placesview: properly recover from cancellation
The current code wrongly assumes that cancellation can only happen
as a result widget finalization, and consequentially does not
properly recover from it. Therefore if the operation is cancelled
as a result of user interaction, the entry is will stay disabled
and the spinner will keep spinning. This is fixed by removal of
the early bail out in case of cancellation.

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Christian Kellner
3ed25941ac placesview: hold onto ref during (un)mount ops
During mount and unmount opertions we keep a reference to the
GtkPlacesView around, so we have a valid view for the callback
code, even in the case that othe external references have been
dropped (i.e. the containing window gets destroyed).

https://bugzilla.gnome.org/show_bug.cgi?id=764979
2016-09-09 16:55:47 -04:00
Tristan Van Berkom
c39ad84970 Revert "about dialog: Set a max-content-height on credits"
This reverts commit 6af5033386.

Scrolled window behavior of propagating child natural sizes
has now been made optional, so there is no need to work around
this by setting a hard coded maximum content height anymore.
2016-09-06 21:29:03 +09:00
Matthias Clasen
e51fd7cb18 css: Complete the cross-fade implementation
We need to actually compute the images. Otherwise,
bad things happen when we try to draw.

https://bugzilla.gnome.org/show_bug.cgi?id=767391
2016-09-06 06:38:50 -04:00
Matthias Clasen
c2ab49e963 Fix whitespace 2016-09-06 06:38:50 -04:00
Matthias Clasen
c30ee622fe css: Set meaningful fallback color
This code was passing out-of-range values into
gdk_cairo_set_source_rgb, which cannot really make
anything better.
2016-09-06 06:38:50 -04:00
Tristan Van Berkom
eaa6ca4a49 GtkScrolledWindow: Bug 766569 - fix return types in added APIs
In gtkscrolledwindow.c, the return type of _get_propagate_natural_width()
and _get_propagate_natural_height() were accidentally gint instead of
gboolean, fixed to match the type correctly declared in the header file.
2016-09-05 16:08:27 +09:00
Matthias Clasen
953b82a584 label: take padding into account when measuring
When doing height-for-width measurements, we need to take
padding into account. This was causing various allocation
errors.

https://bugzilla.gnome.org/show_bug.cgi?id=770849
2016-09-04 15:41:11 -04:00
Matthias Clasen
61e8c69460 label: Fix indentation
Trivial, but annoying.
2016-09-04 15:41:11 -04:00
Matthias Clasen
5b21c7d79f range: Ensure we don't underallocate the highlight gadget
This was causing warnings in HighContrast.

https://bugzilla.gnome.org/show_bug.cgi?id=770614
2016-09-04 09:43:51 -04:00
Matthias Clasen
9ddd40f61e Fix a variable name misspelling
No semantic change here; the misspelling just annoyed me.
2016-09-04 08:21:49 -04:00
Joaquim Rocha
f9658a2faf listbox: Select the last row on page down when there are few rows
When pressing page down doesn't retrieve a valid row (because the list
box has few rows), the last visible one should be selected instead.

https://bugzilla.gnome.org/show_bug.cgi?id=770703
2016-09-03 13:52:39 +02:00
Joaquim Rocha
adabec7d25 listbox: Avoid crashing on page down if the list has few rows
The code always assumed that getting a row at a certain 'y' was
possible but if the list box has more empty space than rows then a
valid row may not be retrieved.

https://bugzilla.gnome.org/show_bug.cgi?id=770703
2016-09-03 13:52:39 +02:00
Timm Bäder
857997be8c popover: Skip first frame when transitioning
Similar to what we do in GtkStack.
2016-09-03 12:24:58 +02:00
Jakub Steiner
63c18bba51 Adwaita,HC: fix icon name
- while we don't use steppers anymore, for some reason they are still
  defined in the theme and if you sacrifice a chicken and jump on one
  leg at full moon, you can enable them.

https://bugzilla.gnome.org/show_bug.cgi?id=769498
2016-09-02 19:11:29 -04:00
Timm Bäder
ce1ae60da2 popover: Propagate drawing 2016-09-01 15:20:12 +02:00
Timm Bäder
2c04941c5c popover: Fix hfw/wfh size request
Since we're using _get_rect_coords in size-allocate when allocating the
size of the child widget, use the newly introduced _get_rect_for_size to
calculate the difference between the passed size_for and the one we're
supposed to pass on to the child widget.
2016-09-01 15:16:58 +02:00
Timm Bäder
7f1ab32e60 popover: Introduce _get_rect helper for a size
When calculating the requested size of a popover, we need to do the
exact same same thing _get_rect_coords did, but not for the
current popopver allocation. Add _get_rect_for_size that can be used for
this purpose
2016-09-01 15:15:18 +02:00
Timm Bäder
4f7ec1f1c0 gtk{info,search}bar.ui: Remove some leftover attributes 2016-09-01 12:32:51 +02:00
Arnaud Bonatti
533de822ba Use 'focused' everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=770624
2016-09-01 07:14:30 +02:00
Arnaud Bonatti
3c3a11591b Fix typos.
https://bugzilla.gnome.org/show_bug.cgi?id=770624
2016-09-01 07:14:30 +02:00
Tristan Van Berkom
0984d1622d GtkScrolledWindow: Bug 766569 - Make propagation of natural child sizes optional
Making propagation of child natural sizes mandatory (or default, even) was
evidently a mistake as this causes dynamic content in a scrolled window
to resize it's parent when the scrolled window is competing for space
with an adjacent widget.

This patch instead adds API to control whether natural width and
height of the child should be propagated through the scrolled windows
size requests.
2016-08-31 14:44:50 -04:00
Lionel Landwerlin
ea1295c9ab gtk: window: don't forget to realize popovers of subwindows
https://bugzilla.gnome.org/show_bug.cgi?id=770307
2016-08-29 14:01:10 -04:00
Jonas Ådahl
f98c9fec6c window: Add Wayland implementation of gtk_window_export_handle
https://bugzilla.gnome.org/show_bug.cgi?id=769788
2016-08-29 13:20:44 -04:00
Benjamin Otte
e1a03ead7a Use NULL for generic marshallers in g_signal_new()
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
Matthias Clasen
6af5033386 about dialog: Set a max-content-height on credits
This keeps the credits section from making the dialog grow
when there are lots of credits.

https://bugzilla.gnome.org/show_bug.cgi?id=770458
2016-08-29 10:01:20 -04:00
Carlos Soriano
cfe4c9e0f4 gtkplacessidebar: fix signal marshal
We were using __VOID for the SHOW_OTHER_LOCATION signal that
uses flags named SHOR_OTHER_LOCATION_WITH_FLAGS.
However, if a signal uses flags the marshal needs to use __FLAGS.

This patch addresses this using VOID__FLAGS as the marshaler parameter.

Thanks to Jan Steffens for pointing this out.

https://bugzilla.gnome.org/show_bug.cgi?id=770550
2016-08-29 15:01:12 +02:00
Benjamin Otte
35c96c2c1f Add braces to appease gcc
-ftrack-macro-expansion=0 doesn't like if statements without braces when
evaluating indentation levels.
2016-08-25 23:02:27 +02:00
Benjamin Otte
c8b301f1ea uimanager: Correctly indent code 2016-08-25 23:02:27 +02:00
Benjamin Otte
da8cef16dc a11y: Correctly indent code 2016-08-25 23:02:27 +02:00
Matthias Clasen
f53706b003 cell renderer text: Allow entries to shrink
Set a small max-width on entries used for editing cells, so they
adapt to small columns and don't overlap the next column.

https://bugzilla.gnome.org/show_bug.cgi?id=770374
2016-08-25 07:53:32 -04:00