Commit Graph

248 Commits

Author SHA1 Message Date
Cosimo Cecchi
c896adc9e9 settings: add a gtk-recent-files-enabled GtkSetting
Backed by an XSetting, so g-s-d can set it according to the GSettings
value.

https://bugzilla.gnome.org/show_bug.cgi?id=693724
2013-02-13 12:06:43 -05:00
Alexander Larsson
c1e9d46c64 css: Return 0 as change for the GtkSettingsStyleProvider 2012-12-04 19:56:18 +01:00
Benjamin Otte
1dd3ee6b59 css: Move default font handling
The default font is no longer handled like a custom style sheet that
overrides everything, but as the initial value. This is the same
behavior as in web browsers.

And it allows the theme to actually use the 'font-family' and
'font-size' properties. Of course, a well behaved theme will respect the
setting as much as possible and for example use relative font sizes
(which aren't yet supported, but will be soon).
2012-12-01 01:49:06 +01:00
Benjamin Otte
3ff7f1fd43 style: Add _gtk_style_provider_private_get_settings()
This gives a GtkSettings object for resolving system-dependant things -
like the default font family and font size.
No code does this yet, but we have an API.

Only GtkSettings implements this.
2012-12-01 01:24:12 +01:00
Benjamin Otte
41f8ba3c35 settings: Implement StyleProvider interface without StyleProperties
I want to deprecate GtkStyleProperties.
2012-12-01 00:56:12 +01:00
Benjamin Otte
fe61e6b3fe settings: Never override some font properties
According to the CSS specification, everything but font-size and
font-family are defined by CSS. So we don't override them anymore.
2012-12-01 00:18:01 +01:00
Benjamin Otte
42dc0ea0fd styleprovider: Change function prototype
Make _gtk_style_provider_private_get_color() return a GtkCssValue (a
GtkCssColorValue to be exact) instead of GtkSymbolicColor.

With this, the symbolic color usage inside GTK is minimized.
2012-11-25 02:45:10 +01:00
Benjamin Otte
5ca35bd5dd settings: Remove support for color schemes
Color schemes were unused and their interaction with CSS3 themes was
undefined. So we decided to remove support for them.

This commit does that.
2012-11-24 21:27:33 +01:00
Benjamin Otte
932794e105 styleprovider: Remove (broken) implementations of get_style
The implementations were broken and get_style() is deprecated and
documented to return NULL now.
2012-11-24 21:12:00 +01:00
Benjamin Otte
4067a45aff settings: Reset all styles when the enable-animations settings changes
https://bugzilla.gnome.org/show_bug.cgi?id=686021
2012-11-01 12:27:31 +01:00
Benjamin Otte
b1ad5c8abc settings: Use _gtk_css_provider_load_named()
This way we create one provider per settings object instead of stuffing
it into a global unchanging never-deleting hash table.
Also, we now reload the theme when instructed instead of keeping the old
loaded (and possibly stale) data forever.

https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-10-31 11:09:10 +01:00
Benjamin Otte
b41215bdea cssprovider: Move fallback code into _gtk_css_provider_load_named()
This makes sure the full theme loading logic resides in one function and
isn't scattered around.

As a side-effect, the hash table kept by gtk_css_provider_get_named()
will now be populated with fallback themes. This will not be a problem
after the next commit though.
2012-10-31 11:09:09 +01:00
Murray Cumming
1c366eb75e GtkSettings: Fix small typo in docs. 2012-09-19 09:54:47 +02:00
Matthias Clasen
6210e7fb80 GtkSettings: Properly clean up style providers 2012-09-17 22:31:25 -04:00
Matthias Clasen
ab3d6a0b0a Revert "Bind the themes to the livecycle of the screen"
This reverts commit 1f5dea9eba,
since it was causeing noticable behaviour changes.

Previously, GTK_DATA_PREFIX=/ ./gtk3-demo would start
gtk3-demo with the Raleigh theme. With that change, it
was starting with no theme at all (i.e. all black).
2012-09-17 22:31:25 -04:00
William Jon McCann
1f5dea9eba Bind the themes to the lifecycle of the screen
https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-09-16 20:20:44 -04:00
Ignacio Casal Quinteiro
909873bc6f Load settings.ini also from XDG_CONFIG_DIRS
https://bugzilla.gnome.org/show_bug.cgi?id=683874
2012-09-16 19:04:14 -04:00
Matthias Clasen
357db76c62 Fix doc comment
The setting was only introduced in 3.6.
2012-09-13 00:10:50 -04:00
Kristian Rietveld
64324a5da0 Implement gtk-primary-button-warps-slider GtkSetting
Make GtkRange honor the setting and implement it in the
quartz backend, it proxies the "click in the scroll bar to"
property from the OS X PrefPane.
2012-09-11 11:19:09 +02:00
Bastien Nocera
c1f01eb929 Add support for disabling middle click paste
Adds a gtk-enable-primary-paste setting that is backed by
and X setting, and make GtkEntry and GtkTextView respect it.

https://bugzilla.gnome.org/show_bug.cgi?id=665243
2012-05-03 21:59:54 -04:00
Chun-wei Fan
2969db9993 Bug 670449-gtk/gtksettings.c: Fix build on Windows
On Windows, gtkwin32themeprivate.h is needed as
_gtk_win32_theme_get_default() is called on that platform to avoid C4013
warnings/errors (aka implicit declaration of ... for GCC folks).
2012-05-03 11:54:15 +08:00
Benjamin Otte
23907e1d53 build: Remove now-unused GTK_DISABLE_DEPRECATED undefs 2012-05-01 03:13:01 +02:00
Benjamin Otte
6443baadb9 styleprovider: Make all implementors emit the new signal
... and listen to it in the cases where they use other style providers.
2012-04-17 08:59:21 +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
a94b85d375 css: Make the style provider take a matcher as an input argument 2012-04-17 08:59:07 +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
Alexander Larsson
95a903d020 win32: Use a separate css file for xp
Only vista and later has e.g. the menu theme parts
2012-03-13 15:14:36 +01:00
Carlos Garnacho
0e8c2db131 settings: Deprecate gtk-touchscreen-mode
It's not used anywhere in GTK+ anymore.
2012-03-01 16:25:24 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
939d6eabfa Correct Since: tag for gtk-application-prefer-dark-theme
This setting was available since 2.90.x, so give it a 3.0 tag.

https://bugzilla.gnome.org/show_bug.cgi?id=670832
2012-02-26 20:51:18 -05:00
Alexander Larsson
cdc6e82720 Remove all default css and make Raleigh a pure fallback theme
It was problematic to maintain Raleigh going forward, as any
changes in it affected all themes. Also, its more robust if
each theme is a full standalone css rather than relying on
an inherited css base.

So, this changes Raleigh to a standalone theme that we can tweak
without accidentally breaking other themes, and makes the
default theme empty. In fact, we don't even add the default
provider anymore as its always empty.
2012-02-09 23:19:17 +01:00
Benjamin Otte
ba5e7012b1 css: Redo StyleProvider interface
We now use the GtkStleProviderPrivate interface, which hopefully is
faster and more conformant to CSS. Long term, it definitely should be
both.

I would have liked to split this up into multiple commits, but couldn't
find a way.
2012-01-09 18:37:50 +01:00
Xan Lopez
5f53045707 Revert "gtksettings.c: Do not use GdkColor API"
This reverts commit baef3e5f24.

This broke the Adwaita theme pretty severely, so I don't think it can
be right. See: http://i.imgur.com/Rq7wc.png
2012-01-05 12:22:05 +01:00
Javier Jardón
baef3e5f24 gtksettings.c: Do not use GdkColor API 2012-01-05 04:38:22 +01:00
Benjamin Otte
45161fbb55 settings: Cache style properties
This way we don't need to compute them every lookup. (That's not the
real reason though - the real reason is that I want to add new APIs that
require the caching because they return consts).
2011-12-29 10:10:32 +01:00
Ryan Lortie
88f16b13f3 GtkSettings: quartz: shell always shows menus 2011-12-19 12:51:10 -05:00
Ryan Lortie
ecfdb834c9 GtkSettings: add shell-shows-menubar property
Unity will set this to tell us that it is going to handle displaying the
menubar.
2011-12-19 12:51:09 -05:00
Matthias Clasen
a6794133aa Some initial docs 2011-12-19 12:51:08 -05:00
Ryan Lortie
f826dd5481 GtkSettings: add shell-shows-app-menu property
This is a boolean property that will be set to TRUE if the current
desktop environment is capable of displaying the application menu as
part of the desktop shell.

If it is FALSE then the application will need to display the menu for
itself.
2011-12-19 12:51:08 -05:00
Alexander Larsson
88d059ff09 win32: Default to gtk-win32 theme 2011-11-18 16:54:05 +01:00
Benjamin Otte
40db65a85b settings: Disable deprecaion warnings for deprecated header 2011-11-08 21:14:06 +01:00
Akira TAGOH
4d7e47ddd0 Allow fallback for input method modules
Accept a :-separated list of module names in GTK_IM_MODULE and
the corresponding setting, to deal a bit better with broken
situations.

https://bugzilla.gnome.org/show_bug.cgi?id=603559
2011-11-05 01:48:59 -04:00
Matthias Clasen
feece3c0bb Move gtkstyle and gtkrc to deprecated/
This required a somewhat more substantial include reshuffling.
Some typedefs have been moved to gtkiconfactory.h and to
gtksettings.h.
2011-11-02 01:15:21 -04:00
Michael Natterer
2688ccdbc4 gtk: clean up the private horror
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h
- add gtkprivate.c and move stuff there from gtkmain.c
- add gtkwin32.c and move stuff there from gtkmain.c
- don't redefine GTK_DATADIR and friends in gtkprivate.h
- have _gtk_get_datadir() and friends on all platforms
- remove the horrid hacks where gtkprivate.h can't be included,
  or must be included later due to redefinition of the compile-time
  directories
2011-10-22 23:53:55 +02:00
Javier Jardón
0853ce3077 Use G_VALUE_INIT
Instead of an explicit { 0, } when declaring the variable.
2011-10-15 16:45:16 +01:00
Michael Natterer
27cbbc4a7d GtkSettings: fix compile warnings on != X11 2011-09-27 14:21:09 +02:00
Matthias Clasen
5ff8fe6971 Documentation fixes
Mostly making sure that return values and varargs don't loose
their docs.
2011-09-25 21:04:49 -04:00
Cosimo Cecchi
9d269bd7f2 settings: use the right RC parser for the gtk-visible-focus setting
Without the parser the property the property won't be settable by themes
using settings.ini
2011-08-11 15:38:45 +02:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Matthias Clasen
f1a9c3efff Remove unused includes
Nothing is using gtkrc.h functionality any more.
2011-06-16 23:33:43 -04:00