Commit Graph

42791 Commits

Author SHA1 Message Date
Matthias Clasen
00616bc199 Cosmetic change 2015-06-17 20:24:29 -04:00
Matthias Clasen
0f7857f66a GtkPlacesSidebar: Fix rtl appearance
Apply the necessary directional variants for asymmetric
css padding.

https://bugzilla.gnome.org/show_bug.cgi?id=751084
2015-06-17 20:14:54 -04:00
Cosimo Cecchi
9c7b0f0491 overlay: remove gtk_overlay_add_pass_through_overlay()
The API to access this functionality will be the setter we just added in
the previous commit.

https://bugzilla.gnome.org/show_bug.cgi?id=750568
2015-06-17 11:48:37 -07:00
Cosimo Cecchi
3b1b171be5 overlay: add setters and getters for pass-through child property
This will make the API easier to use from bindings too.

https://bugzilla.gnome.org/show_bug.cgi?id=750568
2015-06-17 11:48:37 -07:00
Cosimo Cecchi
1e6ccf5c86 docs: add new GtkOverlay methods to gtk3-sections.txt
https://bugzilla.gnome.org/show_bug.cgi?id=750568
2015-06-17 11:48:37 -07:00
Alexander Larsson
94a149c8ea configure: test have_docbook_style != yes, not have_docbook_dtd 2015-06-17 17:35:32 +02:00
Matthias Clasen
8612942fe2 file chooser: Drop unused variables 2015-06-17 10:01:04 -04:00
Matthias Clasen
916cf8f61e file chooser: Use a revealer
Use a revealer to manage the visibility of the header area where
we show the pathbar, the location entry or search. This is a bit
smoother, and makes search more similar to a search bar.
2015-06-17 10:01:04 -04:00
Carlos Garnacho
15bb9acc8a texthandle: Avoid double rendering of background/frame
gtk_render_handle() already renders background/frame itself, avoid
doing this twice.
2015-06-17 15:58:55 +02:00
Carlos Garnacho
77d429bc4d gtkmain: Ignore grab for events in child popovers
Popovers may be spawn when there's GTK+ grabs somewhere else (eg.
text selection popover/handles in an entry in a modal popover). When
this happens, events go to the grab widget (in this case the modal
popover) and are effectively ignored by the event widget, even though
it's can be conceptually a child of the grab widget.

To get away with this, tweak a bit gtk_main_do_event(), so events going
to popovers that are related to grab_widget or a child of it are received,
as it would happen with regular children of grab_widget.

https://bugzilla.gnome.org/show_bug.cgi?id=750993
2015-06-17 15:56:42 +02:00
Carlos Garnacho
76dc8aced5 window: Add concept of popover "parent"
This will be the widget that the popover relates to (::pointing-to in
GtkPopover, ::parent in GtkTextHandle).

Additional API to check the popover/parent relationship between widgets
has been added, which will be useful wherever this is necessary in a
generic manner.

https://bugzilla.gnome.org/show_bug.cgi?id=750993
2015-06-17 15:56:42 +02:00
Ting-Wei Lan
3955d93e9d Fix return value error in gdk_window_set_pass_through
https://bugzilla.gnome.org/show_bug.cgi?id=751099
2015-06-17 21:36:35 +08:00
Jonas Ådahl
0dab37c78f wayland: Always request transient commit when mapping subsurface
A subsurface positioning operation only takes effect when the parent
surfaces state is applied. If a subsurface is mapped and positioned, but
the parent surface state is not immediately committed, the relative
position of the subsurface is undefined and may be placed incorrectly.

To avoid this undefined state, always request that the parent surface
should be committed after mapping a subsurface so that the position
operation will take effect.

https://bugzilla.gnome.org/show_bug.cgi?id=751098
2015-06-17 17:41:31 +08:00
Christian Hergert
fb06b6e4b8 treeview: always pixelcache widget contents
GtkTreeView has a particularly expensive drawing path. This can cause
issues when part of animated widget sequences. Caching the content while
a model is attached helps reduce the number of full redraws during
exposure greatly.

https://bugzilla.gnome.org/show_bug.cgi?id=751082
2015-06-16 18:08:22 -07:00
Christian Hergert
6a2143ab31 pixelcache: allow widgets to always require cached content
Some widgets have very expensive drawing paths. So caching the content
can be useful even when not scrolling.

This can help speed up widgets that are part of animation sequences and
thereby go through spurious expose events.

https://bugzilla.gnome.org/show_bug.cgi?id=751082
2015-06-16 18:08:22 -07:00
Yosef Or Boczko
3665a17102 Updated Hebrew translation 2015-06-17 03:24:12 +03:00
Christian Hergert
213b92e644 gdkwindow: avoid updating background pattern if it matches previous
Background patterns are often updated when style changes. In many cases,
the new pattern will match the previous. We can optimize out the
invalidation that will occur upon resetting the same pattern.
2015-06-16 14:40:09 -07:00
Carlos Soriano
569e59b2c5 gtkplacessidebar: improve variable name 2015-06-16 16:54:24 +02:00
Carlos Soriano
0bb82bf1de gtkplacessidebar: Remove some old comments
We didn't made up our minds until now from some of them, and for
the others no progress has been made or bugs reported, so probably
they are fine.
2015-06-16 16:25:33 +02:00
Carlos Soriano
fbbad5deec gtkplacesidebar: use GtkListBox
We were using GTkTreeView in a simple list. Also, as we know,
GtkCellRenderers are not the best way to theme and manipulate
widgets.

So instead use a GtkListBox to modernize the GtkPlacesSidebar,
and in the way clean up some parts of the code (like headings)
which were not used anymore.
Also we don't use a model anymore, since the data is simple
enough to manage it in a subclass of the row itself.
2015-06-16 16:19:37 +02:00
Carlos Soriano
d881b15349 theme: decrease list row transition
It was somewhat annoying given the "trace" of it. Decrease
the time to avoid too much "trace"
2015-06-16 16:19:37 +02:00
Carlos Soriano
43a4843b9c gtkfilechooserwidget: show drop hints on gtkplacessidebar
Now with the API addition on gtkplacessidebar, we can show some
hints for the drop targets.

https://bugzilla.gnome.org/show_bug.cgi?id=747793
2015-06-16 16:19:37 +02:00
Carlos Soriano
4499174e32 gtkplacessidebar: make insensitive invalid drop targets
https://bugzilla.gnome.org/show_bug.cgi?id=747793
2015-06-16 16:19:37 +02:00
Carlos Soriano
fb034f38b3 gtkplacessidebar: add new bookmark icon
Following design mockups

https://bugzilla.gnome.org/show_bug.cgi?id=747793
2015-06-16 16:19:37 +02:00
Carlos Soriano
a9b698b265 gtkplacesidebar: remove obsolete drop state
We didn't use those for some time now.
2015-06-16 16:19:37 +02:00
Carlos Soriano
91e1e80862 gtkplacessidebar: add API for show drop hints
It is convenient to allow applications to show all the drop
targets at once. This improves the user experience with drag
an drop.

The new API allows the application to set the gtkplacessidebar
in a mode where invalid drop targets are insensitive and it
adds a "new bookmark" row. This mode is intended to be set
when the application is aware of a dnd operation and needs to
be stopped kwhen the application is aware that dnd operation
was cancelled or ended in a different part than gtkplacesisdebar.

The context parameter is unused in this patch, but will be
used in next patches when the sidebar will use a GtkListBox.
The reason of being unused now is just convenience.

https://bugzilla.gnome.org/show_bug.cgi?id=747793
2015-06-16 16:19:37 +02:00
Carlos Soriano
4371cc8f01 gtkplacessidebar: new bookmark row only at first position
Following the new mockups, put the new bookmark row always
in the first position, so it's easier to drop an item.

https://bugzilla.gnome.org/show_bug.cgi?id=747793
2015-06-16 16:19:36 +02:00
Matthias Clasen
e367c4baa0 Deal with events from wrong display
GtkInspector is opening a separate display connection, which makes
it more likely that gtk_get_current_event() returns an event from
the "wrong" display.
2015-06-15 19:50:02 -04:00
Matthias Clasen
002699402d GtkMenuButton: Make programmatic toggling work again
This was broken in 0796d7b6ff.

https://bugzilla.gnome.org/show_bug.cgi?id=751018
2015-06-15 19:49:49 -04:00
Matthias Clasen
f99375f91e GtkMenuButton: Avoid direct button access
We were getting ourselves in trouble by casting touch events
to GdkEventButton and poking directly at their internals. Instead,
use GdkEvent API to get what we need.

This fixes a crash when using the gear menu in epiphany with
touch. The same crash also occurred in testmenubutton.
2015-06-15 18:54:13 -04:00
Alexander Larsson
9fc19b5a26 gtkoverlay: Fix issues with remove
The iteration now progresses past a delete, so make sure we iterate
safely. Also, don't chain up if we removed a child.
2015-06-15 16:32:50 +02:00
Alexander Larsson
5cf2896308 testoverlay: Fix indentation 2015-06-15 11:00:40 +02:00
Alexander Larsson
1a44a85847 testoverlay: Add test for overlay z ordering
https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:46 +02:00
Alexander Larsson
a9bf6532b4 testoverlay: Fix test by using add_pass_through_overlay
https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:46 +02:00
Alexander Larsson
4dd66b0c53 GtkOverlay: Add support for input pass-through overlays
For these widgets we set pass-through on the child window so that
input over these widgets (that are not on a child input window) goes
to the window below the overlay.

https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:46 +02:00
Alexander Larsson
76ba5a03b9 overlay: Add reorder_overlay()
This allows you to control the z-ordering of overlay children

https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:45 +02:00
Alexander Larsson
4c3eece663 gdk: Add gdk_window_set_pass_through
An pass_through window is something you can draw in but does not
affect event handling. Normally if a window has with no event mask set
for a particular event then input events in it go to its parent window
(X11 semantics), whereas if pass_through is enabled the window below
the window will get the event. The later mode is useful when the
window is partially transparent. Note that an pass-through windows can
have child windows that are not pass-through so they can still get events
on some parts.

Semantically, this behaves the same as an regular window with
gdk_window_set_child_input_shapes() called on it (and re-called any
time a child is changed), but its far more efficient and easy to use.

This allows us to fix the testoverlay input stacking test.

https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:45 +02:00
Alexander Larsson
ccc4b192ec testoverlay: Add new input stacking test
In this case we have a bunch of interactive main children
of the overlay, and then a centered overlay that contains both
non-interactive (labels) and interactive (entry) widgets.

This shows off a problem where the non-interactive parts (the labels)
steals input from the overlay main children (breaks button click and
hover effects).

https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:45 +02:00
Daniel Mustieles
3271eb2141 Updated Spanish translation 2015-06-15 08:55:00 +00:00
Dimitris Spingos
da4e83e707 Updated Greek translation 2015-06-15 11:14:00 +03:00
Benjamin Otte
fe51ac273c stylecontext: Change fallback behavior on state mismatch
For functions that take state flags as an argument we need to special
case the situation where the passed in flags don't match the current
state.

Previously we would create a copy of the style info, change its state
and do the lookup from there.

Now that GtkCssNode has replaced style infos, this doesn't work as well
anymore as copying a GtkCssNode is not possible.
However, unike style infos, GtkCssNodes are instant-apply, so we don't
need to copy anymore, we can just change the state of the node.

This causes some invalidations to be queued, but we can take that
performance hit as this is fallback code.

https://bugzilla.redhat.com/show_bug.cgi?id=1228852
2015-06-15 04:36:47 +02:00
Matthias Clasen
fa29a01c26 widget-factory: Make the circular button do something 2015-06-14 21:37:58 -04:00
Matthias Clasen
675467063e testassistant: Remove padding from the filechooser page
This tests the new assistant api to remove padding from
pages.
2015-06-14 21:30:01 -04:00
Matthias Clasen
c3a0880cd6 GtkAssistant: Add a way to have pages without padding
This can be useful when embedding complex widgets like
a file chooser as a page.

https://bugzilla.gnome.org/show_bug.cgi?id=750631
2015-06-14 21:29:09 -04:00
Matthias Clasen
43fcae91f1 Add a filechooser-in-assistant example
This is one of the cases where one wants a page without
any padding.
2015-06-14 21:05:49 -04:00
Matthias Clasen
6cc65260f4 GtkAssistant: Redo page margins
Instead of having padding outside the notebook containing
all pages, put each page in an extra box and add the padding
there. This is in preparation for allowing pages without
padding.
2015-06-14 21:04:15 -04:00
Matthias Clasen
cfd85dee03 assistant: Drop hardcoded padding
This means the pages themselves will be responsible for setting
suitable padding.

https://bugzilla.gnome.org/show_bug.cgi?id=750631
2015-06-14 20:54:47 -04:00
Jordi Mas
ef8ad1c734 Fixes to Catalan translation 2015-06-14 08:32:03 +02:00
Matthias Clasen
9fbd71394c Only build testfontchooserdialog on linux
We are using this to test pango functionality that
uses fontconfig apis, so this doesn't build on OS X
or Windows anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=750892
2015-06-13 23:00:41 -04:00
Matthias Clasen
d1f2e5896b color editor: make popups toggleable
The popups on the color editor are somewhat hard to get rid of.
Arrange things so that clicking the same control again dismisses
the current popup.
2015-06-13 22:32:05 -04:00