Commit Graph

16635 Commits

Author SHA1 Message Date
Benjamin Otte
1aa4a196dc stylecontext: Add setter for widget
... and actually set the widget on the style context. Note that this
function does not take a reference on the widget, which is a very good
reason to keep it private.
2012-04-17 08:59:08 +02:00
Benjamin Otte
102d10016f matcher: Add a superset matcher
This matcher always matches only on some relvant things and ignores the
rest. This allows you to match only on name and class, but ignore state
and parents/siblings for example.
2012-04-17 08:59:08 +02:00
Benjamin Otte
5f5bf27287 matcher: Add a matcher that matches anything
Lesson learned: Adwaita uses all possible selector types and all of
those for parents, too. But so far no siblings.
2012-04-17 08:59:08 +02:00
Benjamin Otte
3bdde54aaf selector: Rewrite position tracking
We now track the position as a (type,a,b) tuple where the numbers make
up the an + b formula from CSS3 nth-child.

Also, the get_sibling() and get_sibling_index() vfuncs were replaced by
a has_position() vfunc. This is mostly so that the matcher can always
return TRUE. And I need that for the everything matcher.
2012-04-17 08:59:08 +02:00
Benjamin Otte
8dbe8c8349 syleprovider: Add a vfunc to get the changes
This way we can check what changes are even interesting for our matcher.
2012-04-17 08:59:08 +02:00
Benjamin Otte
b0b6c8ad4b selector: Rename selector class
It's a 'position' pseudoclass, not a 'region' pseudoclass.
2012-04-17 08:59:08 +02:00
Benjamin Otte
2d01f7786d css: Add selector change types
This allows querying selectors for which changes would change their
"matchingness".
2012-04-17 08:59:07 +02:00
Benjamin Otte
53317aed55 matcher: Turn GtkCssMatcher into a union
That way, we can add more matchers as we need them.
2012-04-17 08:59:07 +02:00
Benjamin Otte
b368c5f10a matcher: Use a vtable
Now we can do lots of fancy matchers, yay!
2012-04-17 08:59:07 +02:00
Benjamin Otte
a94b85d375 css: Make the style provider take a matcher as an input argument 2012-04-17 08:59:07 +02:00
Benjamin Otte
c0b7c3321d css: Add GtkCssMatcher
This is so we can later do matching with other things than
GtkWidgetPath.
In particular, this is a requirement for getting rid of GtkWidgetPath.
2012-04-17 08:59:07 +02:00
Benjamin Otte
a2ded8b72a styleprovider: Add a custom object for a list of style providers
This way, we don't have to do magic inside GtkStyleContext, but have a
real API.
As a cute bonus, this object implements GtkStyleProvider itself. So we
can just pretend there's only one provider.
2012-04-17 08:59:07 +02:00
Benjamin Otte
015e3a768f stylecontext: Stop querying style providers for icon factories
Nobody implements this feature and I don't wanna maintain it. If it
turns out somebody is using it, we gotta invent something.
2012-04-17 08:59:07 +02:00
Kalev Lember
234c7fcf28 application-window: Move desktop file handling code to separate function
https://bugzilla.gnome.org/show_bug.cgi?id=674118
2012-04-16 18:33:50 +03:00
Michael Vogt
19e55d620f GtkImage: Move g_clear_object() to gtk_image_finalize()
This moves the freeing of the icon_helper from the destory to the finalize
function to avoid segfaults when trying to access a destroyed object before it
is disposed. This often happens in signal handlers which get called
asynchronously after destroy.

https://bugzilla.gnome.org/show_bug.cgi?id=674050
2012-04-16 06:51:43 +02:00
Cosimo Cecchi
398ba38cfe application-window: try to use the desktop name in the fallback menu
Try to fetch the name from the application desktop file for the
fallback menu if possible, instead of forcing applications to use
g_set_application_name or hardcoding "Application".

https://bugzilla.gnome.org/show_bug.cgi?id=673882
2012-04-12 21:41:46 -04:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Benjamin Otte
555cf516fd styleproperty: 3rd hotfix for a 3-line patch
I really should not write code sometimes...

Copy/paste error this time.
2012-04-10 16:55:05 +02:00
Benjamin Otte
3610ef90c3 Revert part of "textview: Remove extra magic for drawing children"
This partially reverts commit df37446f9b.
The commit changed API that was public (or at least semi-public) and
it's not worth changing that.

The original bug should still be fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=673839
2012-04-10 16:21:07 +02:00
Benjamin Otte
8b5910f8d7 styleproperty: Fix thinko
Introduced in 8243b16ad7 - seems I wasn't
really on top of my own capabilities on Saturday.
2012-04-09 20:33:46 +02:00
Benjamin Otte
9573ed467d customproperty: Fix thinko
.. in 43c56d70ea
2012-04-09 03:27:55 +02:00
Benjamin Otte
8243b16ad7 styleproperty: Save some memory
Only create a new CssValue when we actually need one.
2012-04-09 03:14:51 +02:00
Benjamin Otte
fde43d01e5 customproperty: Ensure style properties are registered
... before reigstering our own. Also, use that capability to emit a
warning.
2012-04-09 03:11:20 +02:00
Benjamin Otte
43c56d70ea csscustomproperty: Redo RGBA/Color parsing
This fixes custom parse functions returning RGBA values where we
expected symbolic colors.
2012-04-09 03:09:44 +02:00
Benjamin Otte
b7ad432654 cssvalue: Re-add support for random value types
This got lost in the CssValue transition, and apparently some people use
this.
2012-04-09 03:09:44 +02:00
Pavel Holejsovsky
331bba1ad6 entrycompletion: set_property() should call property setters
gtk_entry_completion_set_property() was setting many properties by
directly modifying priv values, bypassing notification invocation and
possibly another actions done by gtk_completion_entry_set_xxx ()
functions.  Fix by invoking set_xxx() instead of setting the property
value directly.

The real bug observerd was that setting text-column property using
g_object_set() caused SIGFPE later when entry completion was about to
appear.  gtk_entry_completion_set_text_column () apparently does way
more important things than just setting priv->text_column member.

https://bugzilla.gnome.org/show_bug.cgi?id=673693
2012-04-08 12:10:44 +02:00
Benjamin Otte
df37446f9b textview: Remove extra magic for drawing children
Instead, just draw the children. The cairo code will keep track of
things, so there's no need to track things.
Also, the old code was doing it wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=672544
2012-04-07 13:01:25 +02:00
Benjamin Otte
7a7e2ed92b csscomputedvalues: Unref old value when setting new one 2012-04-07 13:01:25 +02:00
Benjamin Otte
605a472c99 treeview: Don't cache expander size
Style properties should not be cached, they should be queried live.

Also, this fixes the case where the expander size wasn't set when
constructing the widget which caused expanders to go missing.
2012-04-07 13:01:25 +02:00
Benjamin Otte
1ca8098543 widget: Create style context using regular API 2012-04-07 13:01:25 +02:00
Benjamin Otte
7204724c9f menu: Undo a hack with style contexts
Widget implementations aren't allowed to fiddle with the widget's style
context.

Sheesh.
2012-04-07 13:01:25 +02:00
Benjamin Otte
b5714ea265 tray: Add suggested braces around empty body in 'if' statements 2012-04-07 13:01:24 +02:00
Benjamin Otte
bd400b0957 win32: Move variable declarations into #if block 2012-04-07 13:01:24 +02:00
Benjamin Otte
917ca6a802 gtk: Don't call gdk_window_process_updates() when scrolling
This can cause lagging when scrolling as it causes us to repaint
on every scroll event. This wasn't historically a great problem,
but with smooth scrolling we get a lot more events, so this
now creates visible lagging on slower machines.
2012-04-05 15:48:51 +02:00
Benjamin Otte
12d6b0fe62 paned: Shrinkable widgets don't require a size
This could otherwise lead to very funny size request behaviors, in
particular in empathy.

https://bugzilla.gnome.org/show_bug.cgi?id=587441
2012-04-05 11:30:41 +02:00
Nelson Benitez Leon
45a5151f94 gtktreeview: don't handle extra mouse buttons
Don't handle mouse button events greater than 5 so
they can bubble up to be used by the application.

This was causing nautilus list view to not go forward
and backwards when pressing the extra mouse buttons
designated for that.

Fixes bug 673441

Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
2012-04-04 16:26:57 +02:00
Alexander Larsson
a4cde82365 win32: Fall back to raleigh with the classic theme
This is not ideal, we should have a real classic windows theme,
but at least its better than everything being pink, which is what
happens otherwise when theming is not enables.
2012-04-03 19:26:15 +02:00
Jasper St. Pierre
356c3a3b29 gactionmuxer: Fix list_actions
The code there before was just completely wrong

https://bugzilla.gnome.org/show_bug.cgi?id=673200
2012-03-30 15:21:06 -04:00
Matthias Clasen
d51840ccf3 filechooser: Fix entry completion
Inserting the selected completion did not actually work. Oops.

https://bugzilla.gnome.org/show_bug.cgi?id=673090
2012-03-29 18:59:07 -04:00
Alexander Larsson
0b26605ab0 css: Only keep around GtkCssSections if GTK_CSS_DEBUG env var set
These are used purely for CSS debugging, and was using over 100k just
starting up gtk3-demo.
2012-03-29 13:57:22 +02:00
Rob Bradford
13b2720308 build: Don't use Wayland GtkClipboard implementation if also building for X
Workaround for: https://bugzilla.gnome.org/show_bug.cgi?id=672358
2012-03-29 10:50:07 +01:00
Murray Cumming
c00cfda370 GtkApplication Docs: Add a hint.
gtk_application_set_app_menu(), gtk_application_set_menubar():
Mention that you probably want to call this in the startup signal
handler. If you do it earlier you will likely get a warning about
a missing D-Bus connection, because doing it earlier does not
make sense anyway.
2012-03-28 11:26:22 +02:00
Benjamin Otte
94dbefda1c Fix for bug 672961 - Custom theme can crash apps with GtkEntryCompletion 2012-03-27 20:29:56 -04:00
Cosimo Cecchi
52bd5f2f1f treeview: filter out invisible columns in get_path_for_child()
Since we check for !list->next (and !list->prev for RTL) to set the
GTK_REGION_LAST flag, we have to filter out invisible columns before
looping; if we don't do that we might end up assigning GTK_REGION_LAST
to an invisible column.

https://bugzilla.gnome.org/show_bug.cgi?id=672937
2012-03-27 12:39:20 -04:00
Matthias Clasen
8759575c0a Revert "GtkMenuItem: Add since 3.2 tags for 2 signals."
This reverts commit c6e1024a86.
2012-03-26 06:15:26 -04:00
Murray Cumming
c6e1024a86 GtkMenuItem: Add since 3.2 tags for 2 signals.
These signals were added in this commit in 2010-09:
http://git.gnome.org/browse/gtk+/commit/gtk/gtkmenuitem.c?id=3bd93e5bfd968d21cbcba15b952b254c41f204f9
2012-03-26 10:51:46 +02:00
Murray Cumming
0e171a28c9 GtkColorChooser docs: Fix small typos. 2012-03-26 10:51:46 +02:00
Murray Cumming
79758e3d98 Docs: GtkApplication: Hint about GtkActionMap 2012-03-26 10:51:46 +02:00
Matthias Clasen
ed17c74f58 grid: avoid a floating point exception
When a homogeneous grid has no visible children, we were
accidentally doing a division by zero. Instead, just bail
out early in this case, there is nothing to allocate anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=672763
2012-03-24 17:19:46 -04:00
Jon McCann
482195d788 Ensure skipped row between sections has a nonzero height
https://bugzilla.gnome.org/show_bug.cgi?id=672587
2012-03-22 13:07:35 -04:00