Commit Graph

25093 Commits

Author SHA1 Message Date
Carlos Garnacho
c0477c2c52 GtkNotebook: Use gdouble in coordinate calculations
Otherwise rounding errors fool the "tab under coordinates" checks on
crossing events, which will be triggered close enough to the window
rectangle if the pointer moves slowly enough.

With this, the tab_prelight() function correctly figures out we've
moved the pointer outside the tab area when called in
gtk_notebook_leave_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=759091
2015-12-07 17:40:01 +01:00
Adam Reichold
5088b4937e Fix method to update menu sensitivity of combo box
After removal of the selectable header and separator from the combo box,
the method to update the menu sensitivity must be changed as it assumes
at least two items within each sub menu and contains special handling
for the separator. Removing this fixes bug #759079.
2015-12-07 11:23:18 -05:00
Matthias Clasen
f7cc4abbad Avoid ugly seams on half-tiled terminals
Since we're no longer doing geometry widgets, don't send
base size and increments to the window manager anymore either.
This avoids an ugly 2 pixel gap to the right and bottom of half-tiled
terminals under gnome-shell.
2015-12-07 10:11:06 -05:00
Matthias Clasen
88c4d06973 accel cellrenderer: Fix rendering
We were getting the "New Accelerator" text mixed with the
content of the underlying cell, since plain labels don't
have a background. Go back to putting the label in selected
state, and fix the theme to render that white-on-blue. This
was lost when we switched to using a selection sub-node.
2015-12-07 07:04:43 -05:00
Erika
05dd21be88 Correct annotations for gtk_cell_layout_get_area
The function can return NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759081
2015-12-07 06:16:59 -05:00
Matthias Clasen
326f4739ca inspector: Redo the CSS node page
Showing two lists in a paned was a bit awkward, and space was
getting too limited. Go back to showing just the node list at
first, and make the CSS properties available via a stack. At
the same time, add a right-click context menu to the node list
to make the name and class editing more easily available.
2015-12-06 23:06:33 -05:00
Matthias Clasen
6f1c945010 inspector: Avoid a crash
gkt_cell_layout_get_area may return NULL, handle it.
2015-12-06 17:25:31 -05:00
Matthias Clasen
9c73603c16 css node: Some more docs 2015-12-06 15:42:13 -05:00
Matthias Clasen
2188fe0e54 places view: Use names for cursors
Use the standard name for the busy+interactive cursor.
2015-12-05 19:18:27 -05:00
Matthias Clasen
f76fa0411f entry: Always use cursor names
The names are the preferred API for cursors, so use it.
2015-12-05 19:17:52 -05:00
Matthias Clasen
93b3669273 Be forgiving if cursors are missing
No need to crash here. Missing cursors are ugly, but we
shouldn't crash.
2015-12-05 18:55:05 -05:00
Matthias Clasen
c73325c6b0 entry completion: Reduce the timeout
Pop up the completion window after 100ms. The previous timeout
of 300ms was making completions feel slow.

https://bugzilla.gnome.org/show_bug.cgi?id=758929
2015-12-05 14:12:27 -05:00
Matthias Clasen
12dbfe026f shortcuts: Another attempt to fix up forall
gtk_window_set_titlebar does not take ownership of the headerbar,
so we need to explicitly destroy it.
2015-12-05 13:53:23 -05:00
Matthias Clasen
c83ab24237 Remove GtkShortcutsGesture
The gesture functionality was taken over by GtkShortcutsShortcut,
so this widget is no longer needed, and it never was in a stable
release, so lets get rid of it.
2015-12-05 12:10:21 -05:00
Lapo Calamandrei
830b6f10a1 Adwaita: simpler active switch background
...removing the progressbar_fill mixin in the process.
2015-12-05 17:56:32 +01:00
Lapo Calamandrei
8f2cd874f1 Adwaita: first stab at some visual updates 2015-12-05 17:56:32 +01:00
Matthias Clasen
f210dc9281 Fix make check
GtkFontChooserWidget is using a GThemedIcon in its template,
so we need to ensure that the type is registered before
loading it. This was causing the defaultvalue test to fail.
2015-12-04 17:01:03 -05:00
Lionel Landwerlin
55e06e5d52 adwaita: fix property spelling mistake
https://bugzilla.gnome.org/show_bug.cgi?id=759048
2015-12-04 21:04:06 +00:00
Timm Bäder
ecc5342b0d GtkEntry: Recompute in text-inserted/text-deleted
The text-inserted/text-deleted handlers rely on the cursor positions
being unadjusted after the text change, so we can't do it in
buffer_notify_text.
2015-12-04 20:41:16 +01:00
Matthias Clasen
03769e3830 shortcut label: Tweak modifier key rendering
The subscript was affecting the vertical alignment too much,
so tweak the rendering of the L/R markers to avoid that. Also,
mark these as translatable.
2015-12-04 13:22:26 -05:00
Matthias Clasen
27b24bb68f Add a css name to GtkShortcutsShortcut
This will be useful for tweaking the gesture image details,
among other things.
2015-12-04 13:22:26 -05:00
Lapo Calamandrei
5cb06a30a0 Adwaita: added back progressbar.osd style 2015-12-04 19:04:17 +01:00
Lapo Calamandrei
c64452c29d Adwaita: fix scales with marks on the dark variant 2015-12-04 18:47:28 +01:00
Lapo Calamandrei
cfc17a0152 Adwaita: slight color tweaks 2015-12-04 18:43:24 +01:00
Benjamin Otte
d14e2a489a iconhelper: Fold function into callers
The function takes so many arguments and is so short that it's not worth
keeping.
2015-12-04 17:44:51 +01:00
Benjamin Otte
72d4b65b1d iconhelper: Apply icon-effect directly
Instead of creating an icon source, making sure no state is set and
therefore the icon-effect will be applied and then rendering that icon
source, just call the icon-effect apply function.

Also, the new way isn't deprecated.
2015-12-04 17:44:51 +01:00
Benjamin Otte
1b835fc7ce css: Leftover renaming gtk-image-effect => icon-effect
The previous renaming commit was incomplete, so here we go again.
2015-12-04 17:44:51 +01:00
Benjamin Otte
a37220109f render: Split out icon-effect apply function 2015-12-04 17:44:51 +01:00
Benjamin Otte
cefba86fb3 iconhelper: Return surface from icon-effect function
All the callers where converting to a surface anyway.
2015-12-04 17:44:51 +01:00
Benjamin Otte
295f208e1c iconhelper: Refactor missing icon handling
In particular, stop using deprecated code for loading the missing image
icon.
2015-12-04 17:44:51 +01:00
Benjamin Otte
3c54a49633 iconhelper: Fold function into only caller 2015-12-04 17:44:51 +01:00
Benjamin Otte
b8dd24b4fb iconfactory: Drop caching infrastructure
- icon sets are essentially unused
- the icon theme does caching
- this code complicates the restructuring I'm about to do

=> Delete it!
2015-12-04 17:44:51 +01:00
Matthias Clasen
8768c0b8ac shortcuts: Extend the accelerator syntax more
Cover cases like left+right control, and render them nicely.
The gtk3-demo builder shortcuts example shows the new
possibilities.
2015-12-04 10:56:48 -05:00
Timm Bäder
3ba11782db GtkEntry: nullable annotations 2015-12-03 20:20:58 +01:00
Timm Bäder
da477575cd GtkEntry: Return proper constants from signal handlers 2015-12-03 20:01:30 +01:00
Timm Bäder
d86ec52547 GtkTreeModel: Remove erroneous transfer annotation 2015-12-03 20:01:30 +01:00
Timm Bäder
f11f989f1f GtkEntry: Remove recompute idle
Just do it directly
2015-12-03 20:01:30 +01:00
Timm Bäder
cfc23cbf32 GtkEntry: Remove unused fields 2015-12-03 20:01:30 +01:00
Lapo Calamandrei
07ee962ed3 Adwaita: some OSD rationalization
taking care of https://bugzilla.gnome.org/show_bug.cgi?id=732528 in
the process, any toolbar.osd with a positional style class attached
gets squared corners now.
2015-12-03 19:28:57 +01:00
Lapo Calamandrei
d46ab0f62a Adwaita: scale with marks styling
I'm really sorry for the unlucky ones who would have to read that
code...
2015-12-03 18:41:35 +01:00
Lapo Calamandrei
37c943c8cd Adwaita: added back scale marks style 2015-12-03 18:41:35 +01:00
Matthias Clasen
ec5baa144d Update gtk_drag_highlight() docs
What they said was no longer true.
2015-12-03 08:37:58 -05:00
Lapo Calamandrei
234c497474 Adwaita: scale fill style 2015-12-03 12:57:02 +01:00
Sebastien Bacher
635da34908 GtkAppChooserWidget: wrap the label, use a standard icon
Let the label wrap if needed, that's required in some locales, use an
icon which is available in the theme

https://bugzilla.gnome.org/show_bug.cgi?id=758908
2015-12-03 12:45:56 +01:00
Lapo Calamandrei
081bdb07c3 Adwaita: rename scale sass templates to be more specific 2015-12-03 11:43:53 +01:00
Lapo Calamandrei
b7a980d5d8 Adwaita: added back style for scales on selected list rows 2015-12-03 11:38:50 +01:00
Lapo Calamandrei
a291003ad4 Adwaita: first stab at GtkScale and GtkProgressBar rewrite
...scale has marks stuff missing, coming soon.
2015-12-03 10:54:33 +01:00
Benjamin Otte
3ed71cf4a7 window: Deprecate gtk_window_resize_to_geometry()
And make it not do anything anymore.

Fixes erratic resizes of gnome-terminal.

https://bugzilla.gnome.org/show_bug.cgi?id=757282
2015-12-03 10:43:57 +01:00
Olivier Fourdan
de41389352 gtkwindow: Document further resize with csd
Applying the client-side decorations in the configure routine greatly
increases the chances of having the right size for the GtkHEaderBar and
border shadows.

Yet, it may be possible that these sizes change at a later point in
time, if for example the GtkHeaderBar grows in height while adding new
controls.

Mention this possible pitfall in the documentation for
gtk_window_resize().

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-12-03 09:16:29 +01:00
Matthias Clasen
058dfb0723 entry: Use regular drag highlight
The entry code passes GTK_DEST_DEFAULT_HIGHLIGHT when setting
up the drop target, but that is ineffective because of the
custom drag_motion implementation. Instead, call
gtk_drag_[un]hightlight ourselves.
2015-12-02 23:52:55 -05:00
Matthias Clasen
0b9136842d Use :dnd pseudoclass for drag highlighting
Instead of a ::draw handler with a hardcoded outline,
use CSS for drawing the highlight.
2015-12-02 23:49:07 -05:00
Matthias Clasen
cbde3ee01f css: Add a :dnd pseudoclass
This will be used for drag highlighting.
2015-12-02 23:23:36 -05:00
Benjamin Otte
7fa37e4bf8 css: Introduct -gtk-icon-palette
This borrows heavily from the CSS4 fonts draft's font-palette, currently
found at https://drafts.csswg.org/css-fonts-4/#font-palette-control

The palette is mainly meant to trigger invalidations when colors used for
symbolic icons change, to potentially allow extending supported colors
in symbolic icons and to recolor all colors of a symbolic icon, not just
the main one.

The syntax for the property goes like this:
Name:        -gtk-icon-palette
Value:       default | name <color> [ , name <color> ]*
Initial:     default
Applies to:  all elements with icons
Inherited:   yes
Animatable:  yes, each color animated separately

The property defines a list of named colors to be used when looking up
icons. If a name is not defined, the value of the current "color"
property is used. Which names are relevant depends on the icons in use.
Currently symbolic icons make use of the names "success", "warning" and
"error".

"default" is the current behavior of the GTK when coloring symbolic
icons and is equal to the string
  success @success_color, warning @warning_color, error @error_color

Animation is crudely implemented by animating colors that are in both
palettes that are animated and otherwise keeping the color from the
palette that defined it. Note that this can cause a sharp cut at the
beginning or end of the animation when the color goes away and will
therefore be replaced with the color property.

You can see an example of animations at
http://gfycat.com/CautiousPeacefulIaerismetalmark
2015-12-03 00:47:00 +01:00
Timm Bäder
2b9d57f726 GtkRange: Return proper constants in signal handlers 2015-12-02 21:06:11 +01:00
Timm Bäder
5a6bac7831 GtkRange: Remove recalc_marks field
And instead recalculate the marks on demand, i.e. whenever we were
previously setting recalc_marks to TRUE.
2015-12-02 21:06:11 +01:00
Timm Bäder
414ffbb708 GtkRange: Use G_MININT as default mouse position, not -1
Otherwise we're getting MOUSE_WIDGET as mouse position for unmapped
GtkRanges.
2015-12-02 21:06:11 +01:00
Timm Bäder
591e7f5ef8 GtkScale: Add missing nullable annotations 2015-12-02 21:06:11 +01:00
Lapo Calamandrei
8efdd94a31 Adwaita: button.color fix
border-radius: 0 for colorswatch overlay as well.
2015-12-02 17:42:42 +01:00
Lapo Calamandrei
a25fa9922d Adwaita: vertically linked insensitive entries
Brighter border in that case as well.
2015-12-02 17:02:58 +01:00
Benjamin Otte
c10b6b7297 dnd: Add gtk_image_set_from_definition()
... and use it in the DND code, thereby getting rid of the icon helper.
2015-12-02 15:45:14 +01:00
Benjamin Otte
4d31bf91db dnd: No need to reset the icon
When we start a drag cancel animation, we can just keep the existing
window. The reset was only necessary to convert from cursor icon to
window and we removed the cursor handling.
2015-12-02 15:22:23 +01:00
Benjamin Otte
8a7dbe5f36 image: Remove unused code
I wonder how long that stuff has existed and not been used...
2015-12-02 14:56:15 +01:00
Benjamin Otte
c66a2057af image: Split out a function 2015-12-02 14:54:15 +01:00
Krzesimir Nowak
cbbaad4135 imagedefinition: Assert when trying to free empty definition
Empty definitions are not allocated on a heap, so doing a g_free() on
it would crash anyway.
2015-12-02 12:46:21 +01:00
Krzesimir Nowak
f6ce2cd975 cssprovider: Pass NULL unconditionally
We know that parent is NULL at this point.

Also, fix indentation.
2015-12-02 12:46:21 +01:00
Olivier Fourdan
e933233479 gtkwindow: apply CSD in configure size request
Just like we did for the default size, that reduces the chances of
having the headerbar missing or wrongly sized when computing the client
side decorations controls.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-12-02 08:41:31 +01:00
Matthias Clasen
0384f9eaf3 popover: Make position property not CONSTRUCT
There is no good reason for it, and it causes problems
with widget templates.
2015-12-02 01:07:02 -05:00
Matthias Clasen
564e11cc4e popover: Port to g_object_install_properties
And use the pspecs for notification.
2015-12-02 01:03:35 -05:00
Matthias Clasen
93d9c77ead dnd: Drop an unused argument 2015-12-02 00:51:47 -05:00
Matthias Clasen
676862a213 dnd: Some simplifications
We can now use a GtkImage instead of toplevel with
a custom draw callback and a specially prepared cairo
pattern.
2015-12-02 00:48:37 -05:00
Matthias Clasen
28b97ff0e9 dnd: Prevent black background in icons 2015-12-02 00:03:11 -05:00
Matthias Clasen
ae4f6da550 DND: Drop support for using rgba cursors as icons
This adds a lot of complication to the code, and is not really
a big win, since still need to support icon windows anyway.
2015-12-01 23:47:56 -05:00
Matthias Clasen
5bb12474d9 dnd: Fix issues with drag icons under Wayland
The Wayland dnd surface must remain in place until the drag
is over. Setting it directly as the hardcoded window of the
widget we construct carries the danger that it might get
destroyed prematurely, e.g. when the application calls
gtk_drag_set_icon_name more than once and we recreate the
widget.

Instead, create a dedicated toplevel, and reparent the widget
into it. To keep the code simple, we use the same approach
under X11 as well, and make it the responsibility of the
GDK dnd code to keep the window position updated. We already
pass the current pointer position to gdk_drag_motion, which
makes this very easy.

As a side-effect of these changes, it is now possible to use
non-toplevel widgets as drag icons.

https://bugzilla.gnome.org/show_bug.cgi?id=748763
2015-12-01 23:47:56 -05:00
Benjamin Otte
d46b67dc79 widget: Don't update pango context in state_flags_changed
It only needs to be updated in style_updated, and we do it there.
2015-12-02 05:04:41 +01:00
Benjamin Otte
3513e5e87b Chain up in state_flags_changed
When introducing handlers for state_flags_changed in the node
transitions, chaining up was forgotten.
2015-12-02 04:36:31 +01:00
Benjamin Otte
da6beb994e css: Add ability to specify icontheme in CSS
-gtk-icontheme: "oxygen" works now.

This is a very crude implementation. It's meant for testing only.
2015-12-02 03:54:41 +01:00
Benjamin Otte
e1d74f7c71 window: Listen to icon theme changes on CSS
No need to connect a signal handler to the icon theme, we get notified
via CSS.
2015-12-02 03:28:36 +01:00
Benjamin Otte
bc1b53a34c css: Query icon theme from style, not from settings
No need to look at the settings when the CSS has a property for the icon
theme.
2015-12-02 03:18:26 +01:00
Benjamin Otte
d26a4b5555 spinner: Active spinners should be :checked, not :active
If that sounds confusing, it's because GTK and CSS can sometimes not
agree on naming.

:active for CSS means that a button is currently pressed on an element.
And that is clearly not the case for spinning spinners.
2015-12-02 00:39:25 +01:00
Benjamin Otte
8355ee3053 stylecontext: Don't emit state warning for transient nodes
It's fine to call set_state() on those.

https://bugzilla.gnome.org/show_bug.cgi?id=758930
2015-12-02 00:29:36 +01:00
Benjamin Otte
2396265523 css: Rename -gtk-image-effect to -gtk-icon-effect
This is a property for icons, so we should name it as such.
2015-12-02 00:29:31 +01:00
Benjamin Otte
7f93858ccc Stop using gtk_icon_size_lookup_for_settings()
Use the equivalent gtk_icon_size_lookup() instead.
2015-12-02 00:29:31 +01:00
Benjamin Otte
0c027937e8 iconhelper: Stop tracking state
The iconfactory code doesn't use it anymore, so we don't need to track
it either.
2015-12-02 00:29:31 +01:00
Benjamin Otte
6d65b7d772 iconfactory: Make state depend on image-effect
This removes the dependency on state, which should be used for selection
CSS styles, not for actually applying them.

And image-effect does exactly what we want already, so we can start
using it.
2015-12-02 00:29:30 +01:00
Benjamin Otte
6a4b91d0ed iconhelper: Remove _gtk_icon_helper_ensure_pixbuf()
The code isn't used anymore. Everything uses
gtk_icon_helper_load_surface() now.
2015-12-02 00:29:30 +01:00
Benjamin Otte
b411c31832 statusicon: Use gtk_icon_helper_load_surface()
This is in preparation for the next commit.
2015-12-02 00:29:30 +01:00
Benjamin Otte
7a154d9acd dnd: Add gtk_drag_set_icon_definition()
... and use it for entry icons.

As a side effect, icons dragged from entries will now resize to DND
size.
2015-12-02 00:29:30 +01:00
Benjamin Otte
4a42aa5229 imagedefinition: Remove icon-size
The size of icons is a property that is relevant to who is rendering the
icon, not to the icon itself.

Example: Starting a DND operation from an entry icon should cause the
icon to resize (from the entr icon's size to the DND icon size).
2015-12-02 00:29:30 +01:00
Benjamin Otte
e99eba4415 dnd: Rewrite iconhelper code
It now uses GtkImageDefinition instead.
2015-12-02 00:29:30 +01:00
Benjamin Otte
85423ea278 entry: Use gtk_icon_helper_load_surface()
This is the first step towards getting rid of pixbuf loading code in the
icon helper.
2015-12-02 00:29:30 +01:00
Benjamin Otte
482d71d680 iconhelper: Add a scale argument to gtk_icon_helper_load_surface()
It will be used in the next patch.
2015-12-02 00:29:30 +01:00
Benjamin Otte
afad393b15 iconhelper: Refactor ensure_surface()
Make gtk_icon_helper_ensure_surface() a private function that just
ensures the surface was loaded.

Add gtk_icon_helper_load_surface() that is called by the above function
and the dnd code to actually load the surface.
2015-12-02 00:29:30 +01:00
Benjamin Otte
2ce67f0098 iconhelper: Store surface in ensure_surface()
Do not assign it in the functions that actually load the surface. Make
those just return the surface.
2015-12-02 00:29:30 +01:00
Benjamin Otte
b2584eb8ed iconhelper: Don't store surface size
Instead, compute it on demand.

This avoids having to cache it in lots of places and simplifies code.
2015-12-02 00:29:29 +01:00
Benjamin Otte
751a1a9926 iconhelper: Move invalidation check
Just do the invalidation check once, there's no need to do it in every
branch of the switch.

Also remove useless checks: These functions will not be called if we
already have a rendered surface.
2015-12-02 00:29:29 +01:00
Benjamin Otte
3bacffd063 dnd: Use surface for dnd icon instead of pixbuf 2015-12-02 00:29:29 +01:00
Benjamin Otte
c601a9653a iconhelper: Move invalidation check
Just do the invalidation check once, there's no need to do it in every
branch of the switch.

Also remove useless checks: These functions will not be called if we
already have a rendered surface.
2015-12-02 00:29:29 +01:00
Benjamin Otte
afd0e28437 iconhelper: Improve size determination for surfaces
Instead of just working for image surface, this should now work for all
bounded surfaces.

Test included.
2015-12-02 00:29:29 +01:00
Benjamin Otte
071d2a1d69 iconhelper: Move size computation
We do a switch on the image type, so compute the size for a certain
image type right there.
2015-12-02 00:29:29 +01:00
Benjamin Otte
a81bdf1e60 image: queue_resize() after changing icon-size property 2015-12-02 00:29:29 +01:00
Benjamin Otte
1c96b703a6 dragsource: Store an itemdefinition, not an iconhelper
The icon is never rendered, so there's no need for the extra iconhelper
code.
2015-12-02 00:29:29 +01:00
Benjamin Otte
e666106a43 imagedefinition: Split out from icon helper
The image definition is supposed to hold the description about the image
to be displayed. The icon helper actually does caching and tracks
changes.
2015-12-02 00:29:29 +01:00
Benjamin Otte
67ab00e01e window: Remove suspicious branch
It seems this branch is not needed anymore. It was originally added in
1999 to support gtk_widget_realize(), but all those reasons seem
obsolete today.
Instead just call gtk_widget_realize().

If you end up at this commit when bisecting:
There is no bug that made me remove this code, it was purely meant to be
cleanup / dead code removal. I seem to have introduced a new bug or
bisecting wouldn't have let you here. So it seems we should just revert
this commit.
2015-12-02 00:29:29 +01:00
Matthias Clasen
e626038467 popover: Make it possible to constrain to toplevel
Under X11, popovers are always constrained to the toplevel
window. Under Wayland, they aren't. This commit adds a
property that allows to explicitly constrain popovers to
the toplevel, giving them the same behavior under Wayland
as under X11.

https://bugzilla.gnome.org/show_bug.cgi?id=757474
2015-12-01 17:26:25 -05:00
Christian Hergert
5dcf4e10b7 filechooserbutton: add some spacing between icon and text
These were a bit crammed, which doesn't match well with spacing used in
various other parts of gtk.
2015-12-01 11:23:12 -08:00
Olivier Fourdan
103d369ff6 gtkwindow: remove headerbar after disposing parent
Widgets such as gtkfilechooser may be saving their size and position on
the unmap callback, if the client-side decoration header bar is removed
first, the reported size will be wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-12-01 16:18:03 +01:00
Timm Bäder
a28103cf51 Add some more missing nullable annotations 2015-12-01 13:41:35 +01:00
Timm Bäder
88b4955fd9 GtkBox: The center widget can be NULL
Propagates to GtkActionBar.
2015-12-01 13:41:35 +01:00
Timm Bäder
1551ad4908 GtkWidget: Add some missing nullable annotations 2015-12-01 13:41:35 +01:00
Matthias Clasen
150728d6b0 inspector: Show the size request mode
This is not a property, so show it in the misc page.
2015-11-30 22:27:27 -05:00
Matthias Clasen
d908c38ec3 window: Use g_set_object
No need to do the same thing manually.
2015-11-30 20:45:57 -05:00
Sébastien Wilmet
1a8f3e2462 textiter: fix bug in case insensitive backward search
'win.lines' contains the same content as the GtkTextBuffer, so to find
@match_start, forward_chars_with_skipping() is called with
skip_decomp=FALSE (the last parameter). So far so good.

On the other hand, the content 'lines' (the needle split in lines) is
casefolded and normalized for a case insensitive search. So,
forward_chars_with_skipping(..., skip_decomp=TRUE) must be called only
for the portion of text containing the needle.

Since 'start_tmp' contains the location at the start of the match, we
can simply begin at that location to find the end of the match.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=758698
2015-11-30 19:46:16 +01:00
Florian Müllner
0a35886b0a listbox: Use :focus-on-click policy from row instead of list
Using the property from the container is inconsistent with the
:selectable and :activatable properties, which are per row.
2015-11-30 17:59:06 +01:00
Matthias Clasen
373ce9f652 stack: Update windows before allocating children
Doing things the other way around seems to cause problems in
some cases where children want to do different things depending
on the window position.

https://bugzilla.gnome.org/show_bug.cgi?id=758563
2015-11-30 10:41:13 -05:00
Emmanuele Bassi
11eab60f43 scalebutton: Annotate the return type
Instead of just listing the return type of get_plus_button() and
get_minus_button() in the documentation, we can use the (type)
annotation to ensure that the introspection data reflects the actual
type of the returned widget.
2015-11-30 14:09:19 +00:00
Benjamin Otte
f30b4ba22e gtkwindow: fix regression with firefox dropdown menu
Fix a regression introduced by:

commit 6866d1c widget: Make gtk_widget_queue_allocate() not resize

Where the dropdown menu in Firefox would not be relocated after the
toplevel window is moved.

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=758609
2015-11-30 14:32:39 +01:00
Timm Bäder
886686973c GtkScaleButton: _get_(plus|minus)_button returns a GtkButton
https://bugzilla.gnome.org/show_bug.cgi?id=539944
2015-11-28 21:09:53 +01:00
Matthias Clasen
8ea14162d3 Adwaita: No background for spinners
Blue background for spinners doesn't make sense.
2015-11-26 15:08:54 -05:00
Carlos Garnacho
4981ca9f13 GtkWindow: Reset gestures after triggering right click titlebar action
Just like it happens for window dragging, we're likely to not see the
matching button release for this event, so we must reset the controller
manually here.

https://bugzilla.gnome.org/show_bug.cgi?id=758661
2015-11-25 21:59:48 +01:00
Benjamin Otte
923ad2767a window: Don't lose position information
Before calling gdk_window_move_resize(), store the full configure
request, not just width and height.

Fixes firefox randomly losing position of its dropdown windows.

https://bugzilla.gnome.org/show_bug.cgi?id=758609
2015-11-25 20:31:27 +01:00
Benjamin Otte
415030d25f dnd: Split GtkDragSourceSite into its own file 2015-11-25 20:31:27 +01:00
Christoph Reiter
ee3397388f dnd-quartz: fix missing icon helper include 2015-11-25 20:27:21 +01:00
Benjamin Otte
2bee73c1f9 dnd: Just pass iconhelper instead of whole DragSourceSite
Simplifies the code.
2015-11-25 16:32:40 +01:00
Benjamin Otte
175d5d580e dnd: Remove unused struct members 2015-11-25 16:32:40 +01:00
Benjamin Otte
29cdb2001c iconhelper: Don't include gtk.h 2015-11-25 16:32:39 +01:00
Benjamin Otte
4843925660 iconhelper: Remove unused function 2015-11-25 16:32:39 +01:00
Benjamin Otte
2a8e6619a7 iconhelper: Remove unused context argument
Various functions don't use the style context.
2015-11-25 16:32:39 +01:00
Matthias Clasen
3e8eacc8b7 dialog: Use an element name
This will help differentiating dialogs from other windows, style-wise.
2015-11-24 07:41:26 -05:00
Timm Bäder
bd0f217ff4 GtkPopover: Restore tails
The call to gtk_style_context_get_border was accidentally removed in
2182fe7d9d.
2015-11-24 11:37:00 +01:00
Timm Bäder
df2cb5befc inspector: Leave unneeded widgets out of source files 2015-11-24 11:17:10 +01:00
Timm Bäder
5e2aec7cbb GtkWidget: Add some missing nullable annotations 2015-11-24 11:17:10 +01:00
Timm Bäder
f154875e08 GtkStack: Add some missing nullable annotations 2015-11-24 11:16:51 +01:00
Matthias Clasen
3b0ceea08b shortcuts section: Fix destroy
The container destroy implementation does not quite work here,
so do our own.
2015-11-23 19:48:50 -05:00
Matthias Clasen
8e12943a09 Raleigh: Avoid deprecated icon-shadow 2015-11-23 17:01:22 -05:00
Matthias Clasen
3532cd5365 places view: Fix up docs 2015-11-23 17:01:22 -05:00
Rico Tzschichholz
5d8f45c708 gtk: Fix make dist 2015-11-23 22:24:41 +01:00
Carlos Garnacho
728d63bfc3 searchenginetracker: Remove astray ");" closing a function
Sad face for me.
2015-11-23 18:20:44 +01:00
Carlos Garnacho
f6dd0438d1 searchenginetracker: Optimize direct/recursive folder lookups
tracker:uri-is-descendant/parent has the unfortunate side effect of
rendering the collation mechanisms in the database useless, so those
require full table scans to be validated.

Performing these as pure string comparisons will perform much better,
as those allow the underlying sqlite to rely on its own collation
to perform the search, which can be significantly faster with many
elements in the database.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 17:58:34 +01:00
Carlos Garnacho
61d6c1a523 searchenginetracker: ensure nie:url is bound
This could produce strange warnings as it is currently passed to
tracker:uri-is-* sparql functions, as these expect no NULLs.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 17:58:34 +01:00
Jakub Steiner
bb183ae591 last last gesture stock image fixes
- swipe left was missing outline conversion to allow recolorization
2015-11-23 16:13:45 +01:00
Matthias Clasen
b6e03dbc26 Load gesture images as symbolic icons
This makes them recolor in the dark theme, which looks better.
2015-11-23 10:08:14 -05:00
Jakub Steiner
454a4b7576 gesture stock images size fix
fit all images to 64x64
2015-11-23 15:53:02 +01:00
Jakub Steiner
24cedfd87e gesture stock images fixes
- convert all objects to shapes to allow css recoloring
  ala symbolic icons
2015-11-23 15:45:24 +01:00
Jakub Steiner
25d5fd97e9 more gesture stock images tweaks
- rotation gestures more natural look
2015-11-23 14:40:30 +01:00
Matthias Clasen
98fd5bda58 Tweak the gtk-font-name setting docs
Clarify that only parts of the font name are used.

https://bugzilla.gnome.org/show_bug.cgi?id=758367
2015-11-23 08:18:37 -05:00
Jakub Steiner
3e649c4812 gesture stock images sizing
- make swipe left and right less wide
2015-11-23 14:06:18 +01:00
Jakub Steiner
1cd5ef5285 minor touchups on stock gesture images
- add minimal margin for safe scaling
- fixed height of 64pixels
- pixel alignment issues (grid fit)
2015-11-23 13:53:12 +01:00
Matthias Clasen
50abc8b525 shortcuts: Add set properties for optional things
This makes it possible to switch between gesture and accelerator
types and override the builtin icons and subtitles for predefined
gestures.
2015-11-22 22:41:48 -05:00
Matthias Clasen
304c5ac226 shortcuts: Add support for standard gestures
Add an enum for gestures that GtkShortcutsShortcut knows how
to show an image and subtitle for.

https://bugzilla.gnome.org/show_bug.cgi?id=758187
2015-11-22 22:41:48 -05:00
Matthias Clasen
62620a5244 Add stock gesture images
These will be used in the shortcuts window.
2015-11-22 22:41:48 -05:00