Commit Graph

23683 Commits

Author SHA1 Message Date
Matthias Clasen
140a157d47 file chooser: Update sidsebar when entry goes away 2015-07-04 00:29:24 -04:00
Matthias Clasen
6516437353 file chooser: Use icon for create folder button
This follows the latest mockups.
2015-07-04 00:29:24 -04:00
Matthias Clasen
e9e4ed5f7f file chooser dialog: Show a subtitle
Use the new "subtitle" property of the file chooser widget
to display a subtitle in the headerbar, if we have one.
2015-07-04 00:29:24 -04:00
Matthias Clasen
10f5076bb5 file chooser widget: Expose a "subtitle" property
Give the file chooser widget a "subtitle" property, which
contains a short string that explains the current mode.
2015-07-04 00:29:24 -04:00
Matthias Clasen
715aba650e places sidebar: Add private api to get title
The places sidebar already does all the work to determine the
right label to use for the current location of the filechooser.
We want to use the same label in the headerbar subtitle, so
add some private API to get it.
2015-07-04 00:29:24 -04:00
Matthias Clasen
7e45b09c8e file chooser: More search rework
Drop the radio buttons for current location vs everywhere, and
always search in the current location.
2015-07-04 00:29:23 -04:00
Georges Basile Stavracas Neto
1f96f351e0 entrycompletion: no need to return boolean
The boolean _gtk_entry_completion_resize_popup's return
value is not used anywhere, and only adds more complexity
for the method.

https://bugzilla.gnome.org/show_bug.cgi?id=751913
2015-07-03 15:51:06 -03:00
Olivier Fourdan
c806f9b709 ignore size inc when maximized/fullscreen
Under Wayland, fullscreen/maximized windows may not cover the entire
area when a size increment is specified.

Ignore size increments for fullscreen/maximized windows just like most
window managers do under X11 so that windows with size increments can
still be fullscreen or fully maximized under Wayland as well.

https://bugzilla.gnome.org/show_bug.cgi?id=751368
2015-07-03 16:21:13 +02:00
Víctor Manuel Jáquez Leal
b3166b745f drawingarea: checks parent's draw() before call it
commit 6786c9d7 introduced a bug when a drawing area is used for
rendering videos, since GtkWidgetClass doesn't set a draw()
method by itself.

https://bugzilla.gnome.org/show_bug.cgi?id=751877
2015-07-03 14:21:30 +01:00
Matthias Clasen
28e1ed4f2a Fix warnings in the font options code
This code gets called before a screen is set.
2015-07-01 23:36:29 -07:00
Matthias Clasen
a0e8d8db0b Improve the font options support
Instead of just overwriting the default options, merge the per-widget
font options with the defaults.

https://bugzilla.gnome.org/show_bug.cgi?id=751811
2015-07-01 19:15:56 -07:00
Matthias Clasen
1be338fd44 GtkSwitch: fix a reentry issue
The introduction of state broke some users which relied on
being able to set active in a notify::active handler.

https://bugzilla.gnome.org/show_bug.cgi?id=751754
2015-07-01 18:04:56 -07:00
Jasper St. Pierre
862e0dab03 gtkwindow: Reset maximize / fullscreen_initially on state changes
Since 740bcf5, we use these properties to properly compute shadow widths
for unmapped windows. If a client calls gtk_window_maximize and a window
manager unmaximizes a window, we should draw borders, so we need to
reset these when we get the property notification.
2015-07-01 17:50:23 -07:00
Cosimo Cecchi
e67b4874eb window: don't override background every style_updated()
This queues an unnecessary resize on the toplevel, and is not needed
anymore, now that GtkWidget does not call
gtk_style_context_set_background() on the window's GdkWindow anymore.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
a1e80d99d2 stylecontext: deprecate gtk_style_context_set_background()
Nothing in GTK calls it anymore.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
d6b8261622 widget: don't call gtk_style_context_set_background()
We don't need to do this here anymore, since widgets typically render
their backgrounds now.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
a9b45e7c3c layout: add a comment for gtk_style_context_set_background()
And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, refactor some common code in a single function.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
380ebbf76d fixed: add a comment for gtk_style_context_set_background()
And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, gtk_style_context_set_background() should really be called every
time the style is updated. Fix that.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
74f2d9448f window: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
8832648846 socket: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
06b943fec9 toolitemgroup: don't use gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
e6f97f10dd textview: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
f89c86df52 revealer: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
6b0f202bf3 toolpalette: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
d4ecdbd300 viewport: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
15908cfdf9 treeview: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
18be2d697c plug: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
b4ee73a291 paned: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
9230143bbf overlay: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
aab3d4679f offscreenwindow: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
b7be29390f menushell: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
828db3eca9 menu: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
db76eae41a listbox: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
ba2f479aa0 iconview: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
9696d1b4bb flowbox: don't set gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
1c9468c81b eventbox: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
6786c9d724 drawingarea: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Carlos Garnacho
8c9e426dc5 placessidebar: Do not set as a "track motion" DnD site
It has the unintended effect of picking the suggested action from the
context, which conflicts with the (possibly 0) status we set on our
::drag-motion handler.

Given this widget is not interested in listening to DnD from every
possible target, it is safe to just disable it.
2015-07-01 19:37:42 +02:00
Christoph Reiter
5d17b0af54 GtkWindow: don't increase the preferred size for empty windows if there is a size request set.
This fixes a reftest broken by commit 84e99b20ac

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-07-01 09:32:19 -07:00
Arc Riley
15c73a2b1a Add gtk_widget_set_font_options and gtk_widget_get_font_options
This allows a widget to override global font_options, such as hinting and
subpixel order. The widget's PangoContext is updated when this is set.

Some update code from gtk_widget_update_pango_context was moved to
update_pango_context so that gtk_widget_update_pango_context runs it.

http://bugzilla.gnome.org/show_bug.cgi?id=751677
2015-07-01 07:34:32 -07:00
Cosimo Cecchi
9913b02e3b switch: add a style property for the switch height
Instead of hardcoding an aspect ratio.
This will be replaced by min-height/max-height when we have them.

https://bugzilla.gnome.org/show_bug.cgi?id=751689
2015-06-30 13:28:26 -07:00
Jasper St. Pierre
04e727709d window: Don't send startup notifications for offscreen / popup windows
The WM isn't aware of O-R (popup) or offscreen windows. If somebody
maps an offscreen or a popup GTK+ window before the main window, we'll
complete the sequence before a "real" window is mapped. Make sure to
ignore these for startup notifies.
2015-06-29 14:26:45 -07:00
nick
802b006b37 settings: Include pangofc-fontmap.h header on Wayland
In case the X11 backend is not enabled, we still need to include the
pangofc-fontmap.h header file, as we use the Pango/FontConfig API in
both the X11 and Wayland case.

https://bugzilla.gnome.org/show_bug.cgi?id=751625
2015-06-29 20:41:04 +01:00
Benjamin Otte
cd3f24d579 cssvalue: Change color transitions to run premultiplied
Previously, the unpremultiplied values from the GdkRGBA were taken. Now
we premultiply the color values as specified by the CSS specs.
This is only relevant when transitioning with translucent colors.

An example is the halfway transition between transparent (0, 0, 0, 0)
and white (1, 1, 1, 1). Previously, all 4 values where transitioned
separately and the result was semi-transparent gray (0.5, 0.5, 0.5,
0.5).
By depending on the alpha value, the result is now semi-transparent
white (1, 1, 1, 0.5) which is what one would naively expect.

New reftest: color-transition
2015-06-26 21:12:50 +02:00
Benjamin Otte
142abce46a cssvalue: Special case resulting color for transparency
Again, preparation for using premultiplied color transitions.
2015-06-26 20:54:57 +02:00
Benjamin Otte
e3d8f03b3a cssvalue: Restructure RGBA transitions
Split out a function to make the code clearer for the changes ahead.
2015-06-26 19:06:02 +02:00
Lapo Calamandrei
029800c426 Adwaita: entry linking fixes
Set the right border color on the linked entry after the focused
one.
2015-06-25 20:04:32 +02:00
Lapo Calamandrei
56a3fd888a Adwaita: rubberbands!
Darken the rubberband a bit to make it visible on the selected
color background, fix treeview rubberband border issue.
2015-06-25 19:57:07 +02:00
Carlos Garnacho
0606b525b4 gtkdnd: Plug a leak
We create a cairo_t in order to find out the surface extents, but it
was being leaked, dragging the whole drag surface with it through
extra refs.
2015-06-25 15:09:56 +02:00
Carlos Garnacho
33f9cbafcd gtkmodelbutton: Plug a leak
The private struct had some data that needed freeing, but this widget
didn't have any destroy/dispose/finalize handlers.
2015-06-25 15:09:56 +02:00
Carlos Garnacho
6de82c9be3 gtkmenusectionbox: plug a leak
The list returned by gtk_container_get_children() wasn't being freed.
2015-06-25 15:09:56 +02:00
Matthias Clasen
f8b7623b3c builder-tool: Don't strip h/vexpand
Setting these properties has the side-effect of setting the
corresponding -set properties, which makes GTK+ behave subtly
different. So don't mess with these.
2015-06-25 07:01:26 -04:00
Matthias Clasen
e9e9dfade6 GtkSearchBar: Don't vexpand
It turns out that setting vexpand to its default value has
side-effects that we need.

https://bugzilla.gnome.org/show_bug.cgi?id=751447
2015-06-25 07:00:13 -04:00
cedlemo
d31e1fbef0 GtkImage: Make resource property work properly
gtk_image_set_from_resource was setting the resource_path,
only to have it overwritten again before returning. That
is not as it should be, so change things to set the resource
path late.

https://bugzilla.gnome.org/show_bug.cgi?id=751443
2015-06-25 06:50:44 -04:00
Christoph Reiter
48ea0cbe4b GtkWindow: some min/nat size corrections.
Don't add the container border to the title request size; it
is only used for the child widget.

Don't call gtk_widget_get_preferred_width_for_height() for
the title bar with an unrelated height and subtract the title
bar height before querying the child widget width.

Guard against negative size requests after substracting the
borders/shadows and the title bar.

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-24 10:58:30 +02:00
Matthias Clasen
3b97a0b940 Fix an oversight 2015-06-23 16:46:26 -04:00
Matthias Clasen
7f0606509d GtkPlacesSidebar: Simplify sidebar code
Make this code follow GTK+ styles and conventions better.
2015-06-23 16:35:17 -04:00
Matthias Clasen
ae8c07c67c GktPlacesSidebar: Plug a ton of leaks
If you don't keep in mind that g_object_get() returns references to
objects and copies fo strings, things leak all over the place.
2015-06-23 16:35:17 -04:00
Matthias Clasen
f2a8ddfecf sidebarrow: Avoid object-valued properties
They tend to leak...as these do.
2015-06-23 16:35:17 -04:00
Benjamin Otte
9f27ee7f5a render: Fix ridge/groove border rendering
The typo strikes again!
2015-06-23 22:33:40 +02:00
Christoph Reiter
335c070f9b GtkHeaderBar: reduce minimum title width
The minimum title width affects the minimum window width
for CSD windows. To allow smaller windows like without
CSD reduce it a bit (276px vs 156px min width)

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-23 21:16:37 +02:00
Christoph Reiter
84e99b20ac GtkWindow: fix default empty window size with CSD
In the non-CSD case we checked for 0x0 window size requisition
and replaced it with 200x200 so the window was still visible.
This no longer works in case of CSD as the shadow and title bar
are always added to the requisition resulting in a titlebar/shadow
only window in case there is no child widget (this is currently
visible under wayland or when setting GTK_CSD=1).

Instead of special casing the final window size, special case
the child requisition paths instead. This gives us the same
requisition in both, CSD and non-CSD cases (the header bar
has a too large minimum width atm so the resulting window is
still not the same)

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-23 21:16:14 +02:00
Lapo Calamandrei
ec9a39977a Adwaita: scale marks visible on the dark variant 2015-06-23 19:11:15 +02:00
Matthias Clasen
1ed21ad3d4 GtkScale: More work on mark spacing
Try harder not to push the scale out of balance by marks. With
this change, the remaining difference in the drawing is down
to asymmetric assets and margins coming out of the theme.
To fully support such asymmetric rendering, we need implement
baseline alignment for scales.

https://bugzilla.gnome.org/show_bug.cgi?id=749650
2015-06-23 09:36:14 -04:00
Matthias Clasen
7ce96cb6ac GtkStack: Avoid some unnecessary complication
We already have an in-destruction flag, so use it.
2015-06-23 06:45:07 -04:00
Christoph Reiter
3c9cca596f Fix calculation of edge input window size in case the real window is too small.
This error resulted in warnings like
"pixman_region32_init_rect: Invalid rectangle passed"

In case the window is smaller than handle_size * 2 the resulting
edge window got a negative size. Prevent that by limiting the
handle size to half the respective edge length. This also
prevents the corner windows from overlapping in case the window
is too small.
2015-06-22 14:22:50 +01:00
Emmanuele Bassi
97e728580c Revert "window: Check if we can use CSD before enabling them"
This reverts commit c5e5ee6749.

It turns out that this commit breaks the default sizing of GtkWindow,
which in turn causes the window to be smaller than the handle size,
which ends up sending invalid rectangles to Cairo.

We'll have to find another way to fix the CSD issue.

See also: https://bugzilla.gnome.org/show_bug.cgi?id=751140

https://bugzilla.gnome.org/show_bug.cgi?id=750343
2015-06-22 14:21:47 +01:00
Paolo Borelli
4e155d784d Avoid spurious operations on destroy
When the stack is destroyed we do not want to waste time running
animations and notifying listeners about which is our current
visible child.

This is not only an optimization, but it is important for the stack
switcher widgets: since they are in another branch of the hieratchy
we do not want to get notifications while the stack is being destroyed.

Based on a patch by Paolo Borelli
https://bugzilla.gnome.org/show_bug.cgi?id=724506
2015-06-21 11:32:31 -04:00
Matthias Clasen
3b43951ba4 Pacify gobject-introspection
gobject-introspection complains about the parameter names of
vfuncs. Why, you ask ? No idea.
2015-06-20 20:29:18 -04:00
Matthias Clasen
93f9a81ac5 GtkRange: Improve zoom handling a bit
The calculation to update the initial slider position on zoom
changes was not working correctly when using keys to toggle
zoom on and off for scales. Avoid it by updating the position
beforehand.
2015-06-20 20:26:42 -04:00
Matthias Clasen
27dabaefa6 GtkRange: Make drag gesture less agressive
Moving the mouse while pressing one of the steppers was making
the slider jump to the end, unexpectedly. This was caused by the
drag gesture kicking in when it shouldn't. Fix this by making
all drag gesture signal handlers only do something if we are in
a drag thats started on the slider.

https://bugzilla.gnome.org/show_bug.cgi?id=751050
2015-06-20 18:37:15 -04:00
Caolán McNamara
b4a88c7287 file chooser: Avoid tall combos
The filter combo box in the file chooser was stretching to match
the height of the extra widgets next to it. Since, stretched combo
boxes are not a pretty sight, make it stick to the top instead.

Patch by Caolán McNamara,

https://bugzilla.gnome.org/show_bug.cgi?id=751227
2015-06-20 10:55:02 -04:00
Matthias Clasen
b684e70dd5 GtkOverlay: Sync up parameter names
gtk-doc gets confused if the parameter names between header,
source and doc comment don't match up.
2015-06-20 10:52:44 -04:00
Matthias Clasen
3c711cc98a Fix a typo
gtk-doc complained about a multi-line Since: tag, but the
real culprit was a typo in the Deprecated: tag.
2015-06-20 10:52:01 -04:00
Matthias Clasen
d642ae78fc GtkWindow: Small documentation addition 2015-06-20 10:36:09 -04:00
Matthias Clasen
5981e15115 GtkTextView: Small documentation addition 2015-06-20 10:33:56 -04:00
Matthias Clasen
2caa1deb5b Fix up index for some 3.14 symbols
Marking these as "Since: 3.14.1" may be more accurate, but
it causes gtk-doc to not put these symbols in any versioned
index at all (it generates an unused index for 3.14.1). So,
lets lie a little, and say these symbols were added in 3.14.
2015-06-20 10:28:03 -04:00
Matthias Clasen
2f8e4f2685 GtkAssistant: Fix criticals on dispose
After the recent change thta introduced boxes between the pages
and the notebook, we were no longer careful enough when disposing
the assistant. Fix that up.
2015-06-19 21:56:29 -04:00
Matthias Clasen
a4dcc6bc52 file chooser: Small cleanup
Ask the search model if it is empty, instead of maintaining this
information manually in the file chooser widget.
2015-06-19 01:04:42 -04:00
Matthias Clasen
66b5d2e523 GtkSearchEngineTracker: Fix SPARQL syntax
The function is called tracker:uri-is-descendant, not
tracker-uri-is-descendant.
2015-06-19 01:04:18 -04:00
Matthias Clasen
489b48d0b5 Forgotten file 2015-06-19 01:03:28 -04:00
Matthias Clasen
9426fb08ce GtkSearchEngineSimple: Avoid a private struct
We can just make this type final, and avoid the private struct.
2015-06-19 00:48:29 -04:00
Matthias Clasen
ca31662630 GtkSearchEngineTracker: Avoid a private struct
We can just make this type final, and avoid the private struct.
2015-06-19 00:41:10 -04:00
Matthias Clasen
d9a22e7e30 Avoid an unnecessary check
We create the indexed_locations array unconditionally.
2015-06-19 00:34:28 -04:00
Matthias Clasen
ed50772b41 GtkSearchEngine: Avoid a crash
Add a destroy notify for the data of the callback, so we don't
end up leaving a dangling pointer behind for a short while if
the native engine is finalized before the simple one. This
was showing up as crash when typing and backspacing in the
search entry of the file chooser.
2015-06-19 00:32:49 -04:00
Matthias Clasen
d12c7186b6 GtkSearchEngine: Avoid crawling indexed locations
Implement the IsIndexed callback for tracker. This requires
reading settings of the tracker file miner. We are careful
to avoid a hard dependency on the tracker schemas.
2015-06-19 00:12:46 -04:00
Matthias Clasen
c7d86ef4e4 GtkSearchEngine: Avoid crawling indexed locations
Add a framework to the simple engine that allows to skip
locations which are indexed by the native engine.
2015-06-19 00:11:01 -04:00
Matthias Clasen
33e2d12e90 GtkSearchEngine: Initialize recursive flag
Otherwise all our searches become non-recursive, which was not
the intention.
2015-06-19 00:06:51 -04:00
Matthias Clasen
a3a58fa7d9 GtkSearchEngine: Add recursive flag
Add a flag for recursive search, and implement non-recursive
search in both the tracker and simple search engines.

This is not currently used in the file chooser.
2015-06-18 22:59:44 -04:00
Matthias Clasen
15a41e0bf5 Remove an unused field 2015-06-18 22:40:49 -04:00
Matthias Clasen
d260d2c466 GtkSearchEngine: Remove unused code
Nothing ever uses or emits the hits-subtracted signal.
Nautilus dropped it a few years ago. Time to follow suit.
2015-06-18 17:08:09 -04:00
Matthias Clasen
1d63335c8e Use infos from search engine instead of getting them again
When the search engine provides hits with GFileInfo, use that
to add the hits to the model directly, without going through
another round of async get_info calls.

To do this, we add a batched variant of the
_gtk_file_system_model_update_file call that takes lists of
GFiles and GFileInfos. Again, we can avoid repeated resorting
that happens when the files are updated individually.
2015-06-18 15:20:06 -04:00
Matthias Clasen
1b755c546e Fix an oversight in the previous commit
We lost the line marking the search model as non-empty, causing
us to show the 'no results' page despite there being results.
2015-06-18 15:14:54 -04:00
Matthias Clasen
56c05c429f Request the right attributes in the simple search engine
This change makes it so that the file info passed along
from the simple search engine has all the attributes that
the file system model wants.
2015-06-18 14:37:23 -04:00
Matthias Clasen
abe4829e36 search engine: Pass file infos along for hits 2015-06-18 14:33:13 -04:00
Matthias Clasen
4b8df8c546 file chooser: Use batched insertion for search results
This helps avoiding excess work when procesing many search
results, as typically happens with short search strings
and recursive search.

https://bugzilla.gnome.org/show_bug.cgi?id=751169
2015-06-18 13:11:30 -04:00
Matthias Clasen
b2ceadb057 file system model: Add batched insertion
Add a batched version of gtk_file_system_model_add_and_query_file
that takes a list of files and avoids resorting the model for each
individual insertion. The querying is still done one-file-at-a-time,
so more optimization is certainly possible.
2015-06-18 13:11:30 -04:00
Emmanuele Bassi
9590879e2f Revert "window: Reinstate logic for should_use_csd()"
This reverts commit f043fd532d.

The whole point of having can_use_csd() return TRUE when GTK_CSD is
unset is to use it inside enable_csd().

https://bugzilla.gnome.org/show_bug.cgi?id=751140
2015-06-18 16:10:36 +01:00
Emmanuele Bassi
f043fd532d window: Reinstate logic for should_use_csd()
The old should_use_csd() function would return FALSE if the GTK_CSD
environment variable is unset; the change in commit c5e5ee6749
made it return TRUE if GTK_CSD is unset. This has a cascade effect
on the window size, which causes invalid rectangles to bubble down
to Pixman.

https://bugzilla.gnome.org/show_bug.cgi?id=751140
2015-06-18 14:52:17 +01:00
Timm Bäder
c82ce07d80 gtkdialog: Remove 2px border 2015-06-18 15:41:29 +02:00
Timm Bäder
b61d79e354 messagedialog: remove 2px border 2015-06-18 15:41:28 +02:00
Timm Bäder
a97a3d6a5b filechooserdialog: Remove space between window and content
Was removed in 232d6f84f0.
2015-06-18 15:41:28 +02:00
Jakub Steiner
dc8cc6291b Adwaita: indentation
- lapo was shouting at me.
2015-06-18 13:09:22 +02:00
Lapo Calamandrei
3a462b174d Adwaita: volume button and scale button padding
I was assuming that GtkVolumeButton and GtkScaleButton could only
contain a icon, now they get the image-button padding by default,
but if the text-button class is applied it is not overridden.
2015-06-18 12:46:00 +02:00
Lapo Calamandrei
5e616e0298 Adwaita: scale popup quick fix 2015-06-18 12:33:59 +02:00
Jakub Steiner
58813a0db1 Adwaita: markup cleanup
- move touch selection selectors to its own section
- use scss style markup for .button common elsewhere
  (more compact and legible)
2015-06-18 12:01:12 +02:00
Jakub Steiner
ff20abda8e HC: touch text selection styling
- sync with Adwaita
- try to avoid using image assets

https://bugzilla.gnome.org/show_bug.cgi?id=750883
2015-06-18 11:56:20 +02:00
Ting-Wei Lan
f85db624eb Fix return value error in _gtk_window_get_popover_parent 2015-06-18 12:14:44 +08:00
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
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
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
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
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
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
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
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
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
Matthias Clasen
822886edbc Don't show a menu on the color editor swatch
There's nothing to customize here, so no need to show a menu.
2015-06-13 21:57:07 -04:00
Matthias Clasen
98a3fac6ab Add a way to avoid menu on color swatches 2015-06-13 21:56:41 -04:00
Matthias Clasen
1bba3b0a38 Avoid uninitialized variables
clang complains that these may be used uninitialized.
2015-06-13 21:10:26 -04:00
Matthias Clasen
8cbed0b04a entry: Drop an unused variable 2015-06-13 21:10:26 -04:00
Matthias Clasen
047ad11353 Drop an unused variable 2015-06-13 21:10:26 -04:00
Matthias Clasen
5b162fa44a GtkColorEditor: Remove old todo
Most of this is done, and the rest will not happen because
of this note.
2015-06-13 21:10:25 -04:00
Ting-Wei Lan
d8657a8156 Fix return value error in _gtk_text_handle_set_direction
https://bugzilla.gnome.org/show_bug.cgi?id=750888
2015-06-13 23:00:21 +08:00
Matthias Clasen
6f955a7df6 Redo font map support in GtkFontChooser
We can't add properties to the interface, since it breaks
3rd party implementations of the GtkFontChooser interface.
These exist, for example in gnumeric.

So, instead of a new property, add getter/setter vfuncs.
2015-06-13 00:00:51 -04:00
Benjamin Otte
8c6130e68a fontchooser: Don't cause "row-changed" signal in cell data func
The font chooser delays creating the font description from the font face
as long as possible (it's slow). Because we use fixed height mode, we
only have to create font descriptions for rows we are actually going to
show.

This was achieved by looking at the font description column and if it
was NULL, we created a font description and gtk_list_stiore_set() it.
Unfortunately this caused a "row-changed" signal to be emitted and this
emission could happen during the cell data func.
And that caused infinite loops with accessibility when you were unlucky.

This change replaces the NULL font description with an empty one and
instead of setting the correct font description, we
pango_font_description_merge() it in. This way, the list store doesn't
change and no signals are emitted.

https://bugzilla.redhat.com/show_bug.cgi?id=1197267
2015-06-12 22:04:17 +02:00
Carlos Garnacho
a01fe14056 popover: Avoid hiding modal popovers if another popover is taking focus
Due to popover modality itself, there's quite high chances the popover
stealing focus has been triggered from within, so stay friendly to it.
Hiding the popover here will only hide the grabbing popover too if this
happens.

https://bugzilla.gnome.org/show_bug.cgi?id=750741
2015-06-12 21:00:45 +02:00
Carlos Garnacho
a0ff35f032 window: Avoid rising the window of already shown popovers
This breaks stacking, as popovers are repositioned sort of frequently
(even more after show/hide animations).

https://bugzilla.gnome.org/show_bug.cgi?id=750741
2015-06-12 21:00:45 +02:00
Cosimo Cecchi
06df94ff7b icontheme: don't modify symbolic SVG dimensions when recoloring
When recoloring symbolic SVG, do not modify the original width and
height of the passed-in file; the function later will scale the image
through gdk_pixbuf_new_from_stream_at_scale(), but we should still
use the original size to create the proxy SVG, or the image will
possibly be doubly-resized or blurry.

https://bugzilla.gnome.org/show_bug.cgi?id=750605
2015-06-12 08:55:23 -07:00
Matthias Clasen
e847c27aac recent chooser: Make it expand
It is expected that the list fills the available space.

https://bugzilla.gnome.org/show_bug.cgi?id=750690
2015-06-12 08:27:27 -04:00
Carlos Garnacho
a2d1d5244b entry: Ensure we unset the magnifier widget on ::destroy
Otherwise there's dangling signal handlers which cause warnings
at the time we attempt to disconnect these.
2015-06-12 13:33:13 +02:00
Carlos Garnacho
5c38991367 textview: Set handles' mode to "none" if showing the bubble
show_or_hide_handles() tries to disable visibility when the popover is
shown, although it triggers a bit late, and lets the handles flash briefly
if both popover and handles try to show at the same time (eg. when
pressing on the selection of a previously unfocused textview, the handles
were previously hidden, so they try to show again on focus in).
2015-06-12 13:04:45 +02:00
Carlos Garnacho
c11906fcdb textview: Perform tougher handle visibility checks after hiding the popover
The handles might fall outside the visible area, and shouldn't be shown
then. Just call gtk_text_view_update_handles() which will perform these
checks, and keep the handle conveniently hidden.

This was leading to unexpectedly visible handles (and in the
wrong/previous position, the handle code doesn't relocate the widget
it's about to hide) when "select all" was selected in the popover on
a textview needing scrollbars.
and extending the selection beyond the view above and/or below.
2015-06-12 12:45:03 +02:00
Carlos Garnacho
2be6d09c9e popover: Be lenient wrt visibility of popovers too close to widget borders
The check used to hide the popover if the pointed area fell partly out of
the widget allocation, textviews now can trigger that with text selections
too close to the visible edge, as a small extra area around is now reserved.

The check has been changed to only hide the popover if the pointed area
falls completely outside the widget allocation.
2015-06-12 12:07:30 +02:00
Carlos Garnacho
5a499ef3e1 texthandle: Remove knowledge about window borders
We need to expand beyond these if necessary, so don't artificially
limit things here.
2015-06-11 17:14:23 +02:00
Carlos Garnacho
551931c1c6 window: Allow more space at edges for popovers
We're clamping to the visible window edge, which misplaces text handles.
2015-06-11 17:14:23 +02:00
Carlos Garnacho
10cb7f90e4 entry: Set text direction information on text handles
This way the handles point to the right side on the presence of rtl/ltr
text.
2015-06-11 17:14:23 +02:00
Carlos Garnacho
8d56346f9b textview: set text direction information on text handles
This makes them point to the correct place, given the theme supports
this.
2015-06-11 17:14:23 +02:00
Carlos Garnacho
3a7689bae0 texthandle: Handle ltr/rtl positioning
This setting is per handle, as is dependent on the selected text, rather
than the locale.
2015-06-11 17:14:23 +02:00
Carlos Garnacho
cd5f70357c Adwaita: support rtl on text handles
Just use the opposite variant for the opposite LTR side.
2015-06-11 17:14:23 +02:00
Carlos Garnacho
fc6871b43b texthandles: Move start handle to bottom
The asset is going to change to point upwards, so physically place
the handle below the text position.

https://bugzilla.gnome.org/show_bug.cgi?id=750692
2015-06-11 17:12:06 +02:00
Jakub Steiner
c8d70c8d8c Adwaita: update text selection handles
- we'll put both handles to teh bottom
- renamed top, bottom to start and end. will be easier
  for rtl too.

https://bugzilla.gnome.org/show_bug.cgi?id=750692
2015-06-11 17:12:06 +02:00
Piotr Drąg
1600d54012 docs: Fix some minor typos in comments in GtkWidget 2015-06-11 15:50:15 +02:00
Emmanuele Bassi
8b06900362 settings: Fix the type annotation for color-hash
The (element-type) annotation cannot be used with properties that return
container types like GHashTable; we need to use the (type) annotation.

https://bugzilla.gnome.org/show_bug.cgi?id=750489
2015-06-11 11:45:03 +01:00
Emmanuele Bassi
b2cbe7ba79 builder: Skip introspecting lookup_callback_symbol()
Opaque function pointers as return values are not really usable in high
level languages, even via introspection.
2015-06-11 11:45:03 +01:00
Emmanuele Bassi
7410a4a994 docs: Fix annotation for GtkGLArea::resize signal
We need to document all arguments for the signal, for both gtk-doc and
introspection.
2015-06-11 11:45:03 +01:00
Emmanuele Bassi
d11e81257e docs: Improve deprecation notices for GtkSettings
The button and menu item icons settings are deprecated; application
developers should control whether or not a widget should show an icon,
using the existing API.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-06-11 11:45:03 +01:00
Emmanuele Bassi
b493bf091a docs: Improve deprecation notices for GtkMisc
Point to the replacement properties and functions.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-06-11 11:45:03 +01:00
Emmanuele Bassi
56faf49b8e docs: Improve deprecation notice for rules-hint property
Specify that the theme is wholly in control.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-06-11 11:45:03 +01:00
Emmanuele Bassi
5a61246946 docs: Improve deprecation notices for GtkImageMenuItem properties
Should help porting code away from the deprecated GtkImageMenuItem
class.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-06-11 11:45:03 +01:00
Emmanuele Bassi
715777154b docs: Add deprecation notices for GtkAlignment properties
We want people to port their code away from deprecated classes, and this
helps finding a replacement.

https://bugzilla.gnome.org/show_bug.cgi?id=750718
2015-06-11 11:45:03 +01:00
Carlos Soriano
e74d2b7564 gtklistboxrow: propagate in the draw vfunc
So objects connected by g_signal_connect_after actually get
the signal.
This was causing an issue in the dnd highlight, since there
a cairo rectangle is draw using g_signal_connect_after on the draw
signal.
2015-06-10 17:47:23 +02:00
Matthias Clasen
90a331c84a entry: Select word on double tap
The same approach as taken for GtkTextView in the previous commit.
2015-06-10 06:20:18 -04:00
Matthias Clasen
ac5fcc6b72 text view: Select word on double tap
This is an initial attempt at implementing double-tap selection.
2015-06-09 23:31:00 -04:00
Matthias Clasen
ecebdfc58c GtkTextHandle: Improve handle positioning
When we are close the window edge, we need to shrink the 'invisible
border' around the handle to avoid mispositioning it. A fiddly
calculation, but it works.
2015-06-09 21:19:17 -04:00
Matthias Clasen
df5a2e7152 GtkTextHandle: drop non-implemented functions 2015-06-09 19:07:34 -04:00
Matthias Clasen
0b3835a93f GtkTextHandle: position handles properly
Move the handles so that the asymmetric assets align with the
start/end of the selection.
2015-06-09 17:06:27 -04:00
Matthias Clasen
70f1e2306d entry: Make touch selection work with mouse
The buttons on the popover where stealing the focus from the text
view on click, causing the popover to be dismissed before the action
was taken. Fix this by making the buttons not take focus on click.
2015-06-09 15:50:30 -04:00
Matthias Clasen
8ad0ef27a1 text view: Make touch selection work with mouse
The buttons on the popover where stealing the focus from the text
view on click, causing the popover to be dismissed before the action
was taken. Fix this by making the buttons not take focus on click.
2015-06-09 15:49:10 -04:00
Jakub Steiner
ac798dc307 adwaita: style tweaks to touch selections
- use dark theme assets for the checkboxes and radios
- darken the popover for legibility (white bg/black text is
  really the most problematic background to have).

unfortunatley in terms of SCSS structure this is further digging us into the
hole of specificity. It would be much nicer to set the .osd class on the popover
and have everything just work. I'm sure we'll end up using OSD styled popovers
outside the touch context.

https://bugzilla.gnome.org/show_bug.cgi?id=750396
2015-06-09 15:36:25 -04:00
Matthias Clasen
ca077a085c entry: Avoid criticals
After the recent changes, we could end up calling
gtk_entry_update_handles in cases where the text_handle
has not be created (e.g. when dragging text from an entry).
Avoid that.
2015-06-08 19:04:06 -04:00
Benjamin Otte
1cc8de2412 widget: Clarify docs on gtk_widget_set_double_buffered()
Also make them more scary so people really really don't use it as a
random knob when trying to make things go fast.

//bugzilla.gnome.org/show_bug.cgi?id=750505
2015-06-08 20:29:24 +02:00
Rui Matos
ef93257db7 main: Push the current event on the stack before we start needing it
The changes in commit 13e22e2030 made
_gtk_window_check_handle_wm_event() indirectly depend on
gtk_get_current_event_time() which relies on the current event being
available on the current_events stack.

Since the current event is only pushed on the stack afterwards we get
an invalid timestamp which breaks ewmh window moving.

This fixes the issue by pushing the current event before we start
relying on it being there in gtk_main_do_event() and, as a byproduct,
also fixes a potential memory leak when we have a rewritten event and
return early due to _gtk_window_check_handle_wm_event() being TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=750384
2015-06-08 14:23:19 +02:00
Matthias Clasen
3c1a2c8d24 entry: Always clear handles for mouse interaction
There were some cases where we left a handle visible
during mouse interaction, which is a little weird.
2015-06-08 06:56:12 -04:00
Matthias Clasen
d055f8e64c entry: Move touch selection a little further away
Otherwise, it looks cramped, and we end up under the finger.
2015-06-08 06:56:12 -04:00
Matthias Clasen
3e386e0abb entry: Hide popover when touching elsewhere
Otherwise, the popover becomes 'sticky' and hard-to-dismiss.
2015-06-08 06:56:12 -04:00
Matthias Clasen
bd65c14813 entry: Use the drag-started signal
Use the drag-started signal to differentiate between drags that
move a handle and taps on a handle. Show the touch selection popup
for the latter, but not the former.
2015-06-08 06:56:12 -04:00
Matthias Clasen
79b09cccce entry: Make handles come back reliably
We were setting the text handle mode to NONE too aggressively.
2015-06-08 06:56:12 -04:00
Matthias Clasen
a219e6b4cd entry: Never show handles and popover at the same time
Hide the handles when the popover appears, and brind them back
when it disappears. This will need revisiting if we start using
the popover for mouse interaction as well, where we may not
want handles to show up.
2015-06-08 06:56:12 -04:00
Matthias Clasen
1bd10f2a7b entry: Shorten touch selection timeout
We don't want the popup to appear spontaneously, so eventually
the timeout may go away altogether. For now, shorten it to 50ms,
to avoid rewriting all the places where the timeout is set or
unset.
2015-06-08 06:56:12 -04:00
Matthias Clasen
0a2b1b68fa text view: Always clear handles for mouse interaction
There were some cases where we left a handle visible
during mouse interaction, which is a little weird.
2015-06-08 06:56:12 -04:00
Matthias Clasen
76836dcd81 text view: Move touch selection a little further away
Otherwise, it looks cramped, and we end up under the finger.
2015-06-08 06:55:21 -04:00
Matthias Clasen
4511ff76fa text view: Use the drag-started signal
Use the drag-started signal to differentiate between drags that
move a handle and taps on a handle. Show the touch selection popup
for the latter, but not the former.
2015-06-08 06:55:21 -04:00
Matthias Clasen
805fa78221 GtkTextHandle: add a drag-started signal
This will be used to discriminate drags from taps.
2015-06-08 06:55:21 -04:00
Matthias Clasen
32be35010f text view: Don't popup after drag selection
Don't show the touch selection popover after a selection drag
ends. Instead, the popover will be triggered by an explicit
touch on the selection.
2015-06-08 06:55:21 -04:00
Matthias Clasen
aff47da950 text view: Never show handles and popover at the same time
Hide the handles when the popover appears, and brind them back
when it disappears. This will need revisiting if we start using
the popover for mouse interaction as well, where we may not
want handles to show up.
2015-06-08 06:55:21 -04:00
Matthias Clasen
0c6205d538 text view: Shorten touch selection timeout
We don't want the popover to appear spontaneously, so eventually
the timeout may go away altogether. For now, shorten it to 50ms,
to avoid rewriting all the places where the timeout is set or
unset.
2015-06-08 06:51:08 -04:00
Matthias Clasen
1ff1040c20 Adwaita: Some touch selection updates
Make touch selection popovers use osd style.
2015-06-07 01:11:32 -04:00
Matthias Clasen
6bbaa70c4c Update touch selection style
Update style for touch selection in GtkEntry and GtkTextView
according to https://wiki.gnome.org/Design/OS/Selections

Add 'Select All' to the default actions, change actions
to use icons and move the popover to the bottom. If there is
no selection, just offer to paste.
2015-06-07 01:08:33 -04:00
Timm Bäder
6bbe48ad3d gtkfilechooserbutton: Align the label to the left
Using GtkLabel's xalign property so the label doesn't jump around when
the button gets resized.

https://bugzilla.gnome.org/show_bug.cgi?id=750477
2015-06-06 22:32:07 -04:00
Matthias Clasen
a8191e7113 places sidebar: Make 'recent' work on other platforms
Since nautilus merge, we were not showing 'Recent' in the sidebar
if GIO did not support the recent: scheme. But the file chooser
can show recent files independent of gvfs - it loads the recent
files manually. This is relevant on Windows and OS X, where gvfs
is typically not used.

This commit adds a show-recent property which can be used to override
the recent: scheme check. We use it in the file chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=750068
2015-06-06 17:13:22 -04:00
Carlos Garnacho
1e8be1c446 texthandle: Set prelight state on the pointer-interacted handle
This will be useful with the theming changes to come.

https://bugzilla.gnome.org/show_bug.cgi?id=750396
2015-06-05 08:57:43 -04:00
Carlos Garnacho
88d88591d2 texthandle: Allow setting individual states, and separately to handles
Now each handle gets its individual current state, and we can accumulate
more than one state on these.

https://bugzilla.gnome.org/show_bug.cgi?id=750396
2015-06-05 08:57:43 -04:00
Jakub Steiner
9c53f76cbd Adwaita: updates style for text selection
- use consistent widget style. unfortunately using assets
- light/dark variant
- new assets for text selestions, using existing slider asset for
  insertion point

https://bugzilla.gnome.org/show_bug.cgi?id=750396
2015-06-05 08:57:43 -04:00
Alberts Muktupāvels
245daa415e gtkplug: set decorated to FALSE by default
The change in c5e5ee6749 introduced
a regression - all GtkPlug windows has unexpected extra space. Fix
this by setting decorated to FALSE for GtkPlug window.

https://bugzilla.gnome.org/show_bug.cgi?id=750424
2015-06-04 23:41:19 -04:00
Carlos Soriano
c37f569ae8 gtkrevealer: add css padding support
Add css padding support to GtkRevealer.

As a future work, GtkRevealer still needs to support the border
property.

https://bugzilla.gnome.org/show_bug.cgi?id=750338
2015-06-04 23:18:17 -04:00
Matthias Clasen
3d82fc6d7e GtkScale: Move marks inward
We don't want scale marks to affect scale sizing and positioning,
so draw them inside the range recangle. This avoids size changes
for marks that don't have labels, at least.

https://bugzilla.gnome.org/show_bug.cgi?id=749650
2015-06-04 19:58:40 -04:00
Matthias Clasen
557f96c0fe Trivial: remove outdated comment 2015-06-04 15:14:43 -04:00
Lapo Calamandrei
6d4d2766e0 Adwaita: entry linking logic change.
Use the same linking logic of buttons for entries, this avoids
specialcasing rtl.
2015-06-04 16:19:05 +02:00
Emmanuele Bassi
c5e5ee6749 window: Check if we can use CSD before enabling them
The change in 03213b9509 changed the rules
as to when CSD can be enabled, but it also unconditionally enables CSD
with the implicit assumption that client-side shadows were the real
issue, and that we could work around that by drawing our own borders.
This also means that setting a titlebar for a GtkWindow will enable CSD
unconditionally.

In reality, some window managers (like Matchbox) *only* support
server-side decorations, and will ignore all hints to the contrary, to
the point of drawing decorations at random locations on top of the
window.

Since CSD are enabled unconditionally, the GTK_CSD environment variable
is also not a suitable escape hatch.

In the grand tradition of asking ourselves if we should do something
just because we can, we should split the environment checks from the
checks on what the user requested; by doing that, we can also check
when enabling client-side decorations, and ideally bail out if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=750343
2015-06-03 16:06:10 +01:00
Carlos Garnacho
243cfd21a2 textview: Update handles after flushing scroll changes
Text insertion/pasting might trigger scroll, so we'd have to wait
until the text was revalidated and the scrolling truly happened
before we can check the new handle(s) position.
2015-06-02 17:30:09 +02:00
Carlos Garnacho
a0e8056848 dnd: Remove emission of fake button release event
Nowadays (and for quite some years now) we rely on GdkEventGrabBroken
events to be received. This fake button event seems a remnant of
the early Gtk 2.x days, and is currently even inconsistent with our
event delivery model, so just remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=749737
2015-06-02 17:27:05 +02:00
Matthias Clasen
cb6615b557 updateiconcache: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
e96d258495 queryimmodules: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
cd8a50ef11 xembed: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
b9919153b2 widget path: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
165861323a widget: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
121c195521 tree view: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
3dd7f12f78 tree model sort: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
bed26edfd1 tree model filter: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
555663c686 tool palette: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:16 -04:00
Matthias Clasen
5dc440295e text buffer: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
a111f6ee23 print operation: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
9bb121c55d paned: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
a0dddbbafa menu: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
9545c01764 kinetic scrolling: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
6ee9281a24 im context: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
138e958614 icon view: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
85b4eef004 icon theme: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
359d3669ff file chooser: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
d71c5bf983 entry: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
2a0d5c39d9 dnd: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
29ab70b801 css: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
f16fc99391 combo box: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
1f525e263e builder: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
75f0146c69 application: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
7c03f62206 accel map: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
94825c1777 about dialog: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:14 -04:00
Matthias Clasen
00236c0d21 Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:14 -04:00
John Ralls
13c303fec5 Bug 745957 - GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel
Implement gtk_drag_cancel, made public in c160ba069 and 62616a71, in
gtkdnd-quartz.c.
2015-05-31 11:59:34 -07:00
Matthias Clasen
f5b245ff04 GtkStack: Don't mix code and declarations 2015-05-30 09:43:56 -04:00
Matthias Clasen
833dbd65cd Trivial: Use a convenience macro
g_strstrip is less obscure than the two individual functions,
so lets use it here.
2015-05-30 09:36:51 -04:00
Matthias Clasen
4c971c6f5e file chooser: Respect recent settings
When recent files are not supported in gvfs, or turned off by
settings, we should not try to load them even if the startup
mode says so. This prevents inconsistency with the places
sidebar where 'Recent' will not appear in this case.
2015-05-30 09:21:16 -04:00
Matthias Clasen
4de444ca61 placessidebar: Simplify some code
Use existing functions, instead of open-coding manipulation
of string arrays.
2015-05-30 09:20:27 -04:00
Benjamin Otte
5984bc78ee flowbox: Fix compiler warnings
Introduced in e59e38b581
2015-05-30 06:00:14 +02:00
Benjamin Otte
91fac8b5aa cssnode: Fix position invalidation
The previous code was overly complicated and wrong.
2015-05-30 05:50:31 +02:00
Matthias Clasen
e59e38b581 GtkFlowBox: support positional css selectors
As in the previous commit for GtkListBox, support :first-child,
:last-child, :nth-child() and :last-nth-child() selectors here.
2015-05-29 23:37:42 -04:00