Commit Graph

41308 Commits

Author SHA1 Message Date
Benjamin Otte
ad74fd9d7f cssselector: Introduce a foreach_matcher vfunc
This vfunc iterates over all matchers of a selector and allows to write
functions like the match function in a generic way using foreach.
2014-12-10 03:49:40 +01:00
Benjamin Otte
8a8f34b2db cssselector: Add a match_one vfunc
It allows a default implementation of the match() and tree_match()
functions.
2014-12-10 03:49:40 +01:00
Benjamin Otte
cab05f2b63 cssselector: Introduce a few more default functions 2014-12-10 03:49:40 +01:00
Benjamin Otte
06b0b47d04 cssselector: Make specificity handling a vfunc
The new region selector tracks more than just one soimple selector, so
it requires some more advanced specificity tracking.

Technically, this is still not correct, because it will report the same
specificity for
  tab:sorted
and
  tab:sorted:sorted
(and the second selector will be printed as the first) but this is
regions, so meh.
2014-12-10 03:49:40 +01:00
Benjamin Otte
371a601858 cssselector: Remove unused variable
The variable is FALSE for every class now.
2014-12-10 03:49:40 +01:00
Benjamin Otte
73823181d3 cssselector: Handle region selector like any selector
Instead of doing the previous match magic itself, use the
DESCENDANT_FOR_REGION hack and let that one do the magic.
2014-12-10 03:49:40 +01:00
Benjamin Otte
284ccdac45 cssselector: Use simple class macro for * selector
As a side effect, the :not(*) selector needs to be renamed because the
macro chooses a different name for it.
2014-12-10 03:49:40 +01:00
Benjamin Otte
528691f5b3 cssselector: Introduce descendant matcher for regions
This is just a way to handle regions more conveniently. What this does
is to change the descendant matcher into a maybe-descendant matcher
whenever the current object we're parsing might be a region. Because "*"
might also refer to a region and not just a new element.

See testsuite/reftests/css-match-region-matches-star.ui for a testcase.
2014-12-10 03:49:40 +01:00
Benjamin Otte
8b3f25ab96 cssselector: Support :not() for position pseudoclasses
This is simple now that the latest commit used the macro and
autogenerates the SelectorClass to use.
2014-12-10 03:49:40 +01:00
Benjamin Otte
88f28aee4f cssselector: Use simple macro for position pseudoclass
This is possible now that the region-specific code is gone.
2014-12-10 03:49:40 +01:00
Benjamin Otte
28e80aa40b cssselector: Handle region flags during parse
When parsing a selector like
  tab:active
We used to create 2 selector objects, one for the region, and one for
the pseudoclass. Now, for convenience, we special-case region
pseudoclass parsing so that the active flag is added to the region
selector.

A side effect is that ":nth-child(1)" no longer works for regions.
Hopefully people didn't use this but used the saner ":first-child"
instead.
2014-12-10 03:49:40 +01:00
Benjamin Otte
272a0083a3 cssselector: Turn into a union
Instead of just keeping a gpointer data, make GtkCssSelector a union
that has actual proper members.
2014-12-10 03:49:39 +01:00
Benjamin Otte
03aabcff14 cssselector: Introduce a hash func per selector
This is unnecessary itself, but useful in preparation for further
commits.
2014-12-10 03:49:39 +01:00
Benjamin Otte
80a8b793e0 cssselector: Inline a function 2014-12-10 03:49:39 +01:00
Matthias Clasen
972ea14ef6 GtkStackSwitcher: Don't take focus on click
Moving the focus to the stack switcher buttons is
never what is wanted here.
2014-12-09 20:57:58 -05:00
Matthias Clasen
cf4afd0e93 inspector: Don't force-switch to the objects tab
We used to switch to the objects tab when an object is
picked, but now may have two places with picker buttons:
the objects tab and the interactive tab.

So, just don't do that anymore.
2014-12-09 20:57:58 -05:00
Matthias Clasen
702b647d4e inspector: Allow extensions to request a picker
Look for a 'use-picker' property on the extension page
and add a picker button to the header bar if says so.
2014-12-09 20:57:51 -05:00
Matthias Clasen
44bf61baac inspector: Another indentation fix 2014-12-09 19:23:54 -05:00
Matthias Clasen
536b10800f inspector: Reindent ui file 2014-12-09 17:49:23 -05:00
Matthias Clasen
1ed5bd07bb Make gtk_tree_model_foreach robust
Make gtk_tree_model_foreach safe for callbacks that modify
the model, even if the model does not have persistent iters.

https://bugzilla.gnome.org/show_bug.cgi?id=722781
2014-12-09 00:42:40 -05:00
Matthias Clasen
54e3711c39 Don't compare booleans
Just use negation.
2014-12-09 00:42:40 -05:00
Christian Hergert
fb8791cd16 window: fallback to window muxer if no widget has focus
This ensures that we can still match accelerators for the window even
if no widget currently has focus.
2014-12-08 20:19:33 -08:00
Carlos Soriano
235837ad49 gtkwindow: Use actions from focused widget to activate accel
Currently we only take into account the window GActionGroup for
activating the accels.

However, the application could have some custom GActionGroup in the
chain of focused widgets that could want to activate some action if
some accel is activated while that widget is focused.

To allow applications to set accels on widgets that use custom
GActionGroups, simply use the muxer of the focused widget, which
already contains the actions of the parents.

https://bugzilla.gnome.org/show_bug.cgi?id=740682
2014-12-08 20:19:33 -08:00
Matthias Clasen
17fec70022 Fix another header guard oversight
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741252
2014-12-08 19:34:23 -05:00
Matthias Clasen
4f96353964 Fix some oversights with header guards
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741254
2014-12-08 19:31:56 -05:00
Alexander Larsson
2d6ae59d7f Inspector: Support extending the inspector using GIOModules
This allows external modules to add a page to the Gtk Inspector.

https://bugzilla.gnome.org/show_bug.cgi?id=740983
2014-12-08 17:34:54 -05:00
Matthias Clasen
eed1831caf Trivial off-by-one fix
We have a tenth example.
2014-12-08 17:30:35 -05:00
Matthias Clasen
6c7e5039c7 Drop a few unneeded ifs
It does not hurt to pass NULL to g_list_free().
2014-12-08 17:30:35 -05:00
Muhammet Kara
5047d503f3 Updated Turkish translation 2014-12-08 19:38:02 +00:00
Muhammet Kara
2a13869236 Updated Turkish translation 2014-12-08 19:20:34 +00:00
Matthias Clasen
64fd964703 GtkWidget: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741251
2014-12-08 09:16:24 -05:00
Matthias Clasen
a3e37abb38 GtkPlacesSidebar: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741250
2014-12-08 09:15:07 -05:00
Matthias Clasen
a3fbf29f17 GtkMenuTracker: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741249
2014-12-08 09:13:57 -05:00
Matthias Clasen
8c3f04e754 GtkEntry: Refresh when activity ends
We need to queue a redraw when pulse mode is ended by
setting a fraction. Noticed in gtk3-demo's search entry demo.
2014-12-08 06:39:56 -05:00
Kjell Ahlstedt
5d3aa54a8a docs: Explain 'icon theme context' better in gtkicontheme.c
Add links from gtk_icon_theme_list_contexts() to
gtk_icon_theme_list_icons(), and from there to the Icon Theme
Specification and the Icon Naming Specification.

https://bugzilla.gnome.org/show_bug.cgi?id=461249
2014-12-07 23:35:31 -05:00
Matthias Clasen
f74a75ae7e Handle KP keys in copy/paste keybindings
We currently handle KP variants of some keys, but not consistenly.

https://bugzilla.gnome.org/show_bug.cgi?id=364566
2014-12-07 23:28:52 -05:00
Phillip Wood
6b26464fbb Editable cells demo: Add new row at cursor
Adding rows to the bottom of the list is confusing as you cannot see
them if the window is small so it is not apparent that anything has
happened. Fix this by adding the new row immediately below the current
row and set the cursor on the new row so it is ready to be edited.

https://bugzilla.gnome.org/show_bug.cgi?id=721939
2014-12-07 18:53:30 -05:00
Matthias Clasen
06745bc0aa Add a note to the ::destroy docs
Clarify that ::destroy is not suitable for saving widget state.

https://bugzilla.gnome.org/show_bug.cgi?id=710793
2014-12-07 18:12:46 -05:00
Trần Ngọc Quân
3276bae057 Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2014-12-07 15:06:11 +07:00
Emmanuele Bassi
c55c18c23e examples: Fix clean rule in stand alone Makefiles
Remove all the built files, including the exampleapp binary.
2014-12-06 13:30:24 +00:00
Emmanuele Bassi
f718bc9bc9 examples: Add stand alone Makefile for application10
Missed out on the last application examples.
2014-12-06 13:25:01 +00:00
Ankita Patil
a4e827e4bf GtkEntry: Added gtk_entry_grab_focus_without_selection()
Providing a way to focus an entry without selecting its contents.

https://bugzilla.gnome.org/show_bug.cgi?id=735838
2014-12-05 23:17:25 -05:00
Matthias Clasen
45bed11272 GtkTextTag: Add two missing property set cases
These were overlooked when adding ::fallback and ::letter-spacing
recently.
2014-12-05 21:24:43 -05:00
Matthias Clasen
e1716611bd Update docs
Document new fields in GtkTextAttributes, remove redundant comments.
2014-12-05 20:10:11 -05:00
Matthias Clasen
888304b172 Minor documentation fixes 2014-12-05 20:10:07 -05:00
Matthias Clasen
28497075c7 Raleigh: Fix css for active notebook tabs
This was not kept up-to-date when we changed notebootk
tab rendering.

https://bugzilla.gnome.org/show_bug.cgi?id=741185
2014-12-05 19:30:35 -05:00
Carlos Soriano
0504328bd8 gtkscale: Draw smaller marks
As a design request, use smaller marks.

https://bugzilla.gnome.org/show_bug.cgi?id=741117
2014-12-05 13:23:05 +01:00
Carlos Soriano
eec9a74304 widget-factory: Add a discontinuous GtkScale with marks
So designers can tweak the marks and developers can see how a
discontinuos scale is implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=741117
2014-12-05 13:23:05 +01:00
Matthias Clasen
042117b7bf Add epoxy to GTK_PRIVATE_PACKAGES
We are using epoxy api in GtkGLArea, so we need to link against it.

https://bugzilla.gnome.org/show_bug.cgi?id=740162
2014-12-04 23:28:33 -05:00
Matthias Clasen
39c0ba59bc places sidebar: Fix the sort function
When returning 1 for a pair (a,b), a sort function must
return -1 for the pair (b,a), otherwise things can go
badly.

https://bugzilla.gnome.org/show_bug.cgi?id=739729
2014-12-04 22:26:14 -05:00