Commit Graph

387 Commits

Author SHA1 Message Date
Matthias Clasen
3442933dd7 Revert "Deprecate and ignore gtk-entry-password-hint-timeout"
This reverts commit 4b5a389e88.

This change caused considerable concern about accidental
leaking of passwords, see e.g.

https://bugzilla.gnome.org/show_bug.cgi?id=706563
https://bugzilla.gnome.org/show_bug.cgi?id=706873
https://bugzilla.redhat.com/show_bug.cgi?id=994237

We may have to do something else for password entries, such
as the windows-style 'peekabo' icon.
2013-08-31 00:16:28 -04:00
Matthias Clasen
f8412eca34 Revert "Deprecate and ignore the cursor blink settings"
This reverts commit b2e666bf8f.

We need to keep cursor blinking configurable for accessibility
reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=704134

Conflicts:
	gdk/win32/gdkproperty-win32.c
	gdk/x11/gdksettings.c
	gtk/gtksettings.c
	gtk/gtktextview.c
2013-08-16 22:45:13 -04:00
Bastien Nocera
1c63d295ec Revert "Disable primary paste by default"
This reverts commit fbbcb5c01b.

We will be doing this in gnome-settings-daemon itself instead,
as some X11 based platforms using GTK+ will want to override this.
2013-08-02 16:42:41 +02:00
William Jon McCann
4b5a389e88 Deprecate and ignore gtk-entry-password-hint-timeout
This feature offers a number of benefits related to providing
feedback to the user when the password is masked. Some experts have
argued that password masking is harmful. I tend to agree with this
setting providing a better and more moderate solution. Some agree:
https://www.schneier.com/blog/archives/2009/07/the_pros_and_co.html

In order to further lessen the impact I've only enabled the feature
on the primary display since the likelyhood of a non-primary display
being visible by others is higher.
2013-07-11 17:08:15 -04:00
William Jon McCann
dae6afc847 Deprecate and ignore timeout-expand setting 2013-07-11 17:08:15 -04:00
William Jon McCann
57fc8763e9 Deprecate and ignore the timeout-initial and timeout-repeat settings 2013-07-11 17:08:15 -04:00
William Jon McCann
6218fb45be Deprecate and hardcode gtk-recent-files-limit
The GtkRecentChooser already has a property that can be used
to set this on a per widget basis and the recent manager already
has a max-age limit.
2013-07-09 09:38:52 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
William Jon McCann
aeb878a859 Add missing G_PARAM_DEPRECATED to gtksettings 2013-07-08 15:28:25 -04:00
William Jon McCann
7b66956e63 Deprecate and hardcode default toolbar icon size setting
Toolbar icon size can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
William Jon McCann
425e977bb6 Deprecate and hardcode default toolbar style setting
Toolbar style can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
William Jon McCann
e61c124509 Deprecate and hardcode values for gtk-tooltip* timeouts 2013-07-08 15:02:28 -04:00
William Jon McCann
c9bfd12d2f Deprecate and hardcode the value of visible-focus setting
Just use the default value of AUTOMATIC and make it just work.
2013-07-08 15:01:33 -04:00
Alexander Larsson
ae43f9facb Add GDK_DPI_SCALE env var
This is very useful for hidpi where the dpi is scaled to make
non-dpi aware apps larger. In that case a dpi aware gtk+ using
GDK_SCALE will be getting huge fonts. You can the set GDK_DPI_SCALE
to compensate for this.
2013-07-03 14:39:25 +02:00
William Jon McCann
a9e82cd46a Deprecate and ignore gtk-enable-tooltips setting
It is enabled by default except on touch input devices.
2013-06-30 14:28:02 -04:00
William Jon McCann
7ca327c9bb Deprecate the unused gtk-file-chooser-backend setting 2013-06-30 13:44:24 -04:00
William Jon McCann
c6ca2374cc Deprecate and ignore gtk-im-status-style and gtk-im-preedit-style 2013-06-30 12:57:44 -04:00
William Jon McCann
a02f2c4291 Make ignored settings be set to false by default 2013-06-27 17:02:58 -04:00
William Jon McCann
fbbcb5c01b Disable primary paste by default 2013-06-26 21:41:45 -04:00
William Jon McCann
e779e04bc2 Deprecate and ignore gtk-icon-sizes setting
We don't have icons rendered at arbitrary sizes and we have better
APIs that aren't restricted to GtkIconSizes.
2013-06-26 18:04:27 -04:00
William Jon McCann
b101d465be Deprecate and ignore gtk-keynav-cursor-only and gtk-keynav-wrap-around 2013-06-26 15:33:10 -04:00
William Jon McCann
b26c74e5da Deprecate and ignore gtk-menu-bar-accel setting
Use 'F10' by default.
2013-06-26 14:21:44 -04:00
William Jon McCann
76936193d5 Deprecate and ignore gtk-menu popup and popdown delay settings
Just pick good defaults. The a11y team confirmed that they don't
rely on them.
2013-06-26 14:08:37 -04:00
William Jon McCann
e7b5be93b1 Deprecate and ignore gtk-scrolled-window-placement
Just use GTK_CORNER_TOP_LEFT and allow it to be changed with
gtk_scrolled_window_set_placement().
2013-06-26 13:06:12 -04:00
William Jon McCann
aa78c888eb Deprecate and ignore gtk-fallback-icon-theme
The standard icon themes have built in fallbacks.
2013-06-26 12:47:43 -04:00
William Jon McCann
b2e666bf8f Deprecate and ignore the cursor blink settings
And hardcode them to reasonable values.
2013-06-26 12:32:31 -04:00
William Jon McCann
2d79334bb0 Deprecate and ignore gtk-can-change-accels
It is disabled by default
2013-06-26 12:00:42 -04:00
William Jon McCann
7cfa7e6b72 Mark gtk-color-palette as deprecated
It is only used by the deprecated color selector widget.
2013-06-26 11:47:32 -04:00
William Jon McCann
7e3a494fac Deprecate and ignore gtk-enable-mnemonics and gtk-auto-mnemonics" properties
They are both enabled by default.
2013-06-26 11:16:12 -04:00
William Jon McCann
e8147d15f7 Deprecate and ignore gtk-menu-images setting
GtkImageMenuItem images can still be enabled selectively by the app author
using the always-show-image property on the item.
2013-06-26 10:53:09 -04:00
Benjamin Otte
7bd7bcec0d settings Deprecate properties
Deprecate the properties that were brought back from the dead in the
last patch.
2013-06-26 15:51:31 +02:00
Benjamin Otte
5b7b86c231 Revert "Remove the show-unicode-menu and show-input-method-menu settings"
Removing object properties is too much of an API break, even for
properties we don't expect to be used outside of GTK itself.

This reverts commit 8b811b623c.
2013-06-26 15:51:31 +02:00
William Jon McCann
65c31629c3 Deprecate and ignore gtk-button-images setting
Button images can still be enabled selectively by the app author
using the always-use-image property on the button.
2013-06-26 09:15:22 -04:00
Matthias Clasen
8b811b623c Remove the show-unicode-menu and show-input-method-menu settings
These are no longer used.
2013-06-07 18:13:47 -04:00
Stef Walter
ed1eddabf0 gtksettings: Fix loading of uint settings
https://bugzilla.gnome.org/show_bug.cgi?id=699739
2013-05-06 14:20:48 +02:00
Matthias Clasen
f5f5b70355 Ignore deprecations where needed
There are a few places where we are still using deprecated
API internally - ignore deprecations around these uses.
2013-05-05 15:38:48 -04:00
Matthias Clasen
7d8e755d16 Fix up headerless symbols
Some symbols are exported from GTK+, but do not appear in any
headers. For these, use _GDK_EXTERN in the source file to make
sure they are exported.
2013-05-05 15:38:47 -04:00
Matthias Clasen
97caad1fec Don't clear data on a NULL screen
This makes GtkSettings survive the object finalize test.
2013-05-03 20:05:00 -04:00
Matthias Clasen
75f4f7a471 Update cursor theme on wayland
Call the new new api from gtksettings.c when it changes, just
as we do for X11.
https://bugzilla.gnome.org/show_bug.cgi?id=696428
2013-03-22 20:33:47 -04:00
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
Benjamin Otte
27a661143e settings: Recompute styles when font name changes 2011-05-01 04:44:56 +02:00
Cosimo Cecchi
24bba4cc56 gtksettings: unset attributes set to normal from font description
So that they do not override values coming from the theme.

Based on a patch by Carlos Garnacho.

https://bugzilla.gnome.org/show_bug.cgi?id=645458
2011-03-23 10:00:00 -04:00
Kristian Rietveld
a55b59fef3 Include gdkquartz.h so GDK_IS_QUARTZ_SCREEN is actually defined 2011-03-10 21:20:37 +01:00
Carlos Garnacho
191428f596 gtksettings: plug a leak
Make the GValue take the created GString.
2011-03-07 23:06:55 +01:00
John Ralls
f7f9e16939 Finish making the GtkSettings object identical on all backends so that it doesn't assert on non-X11 backends 2011-03-07 12:28:50 -08:00
Benjamin Otte
172f894120 settings: Always use the same default values
Set the Mac key theme when creating a Quartz settings object instead of
having it the default when quartz is enabled.
This keeps compatibility with the GTK2 behavior that the Mac key theme
is not used for the X11 backend, which could now happen for a
multi-backend build.
2011-03-02 17:18:49 +01:00
Benjamin Otte
e69badbcd1 settings: Keep the GtkSettings object identical no matter the backend
Previously we were enabling some settings properties only if the X11
backend was enabled. This worked fine with GTK2 where only one backend
was enabled at a time, but now when multiple backends can be enabled,
this does not make sense.
2011-03-02 17:02:51 +01:00
Benjamin Otte
399dc74d74 settings: Avoid a segfault when loading keyfile
When the keyfile is loaded, no screen exists yet, so we need to vheck
for that.
2011-03-02 16:21:44 +01:00
Matthias Clasen
f67ab808fd doc fixes 2011-01-30 23:35:25 -05:00
Carlos Garnacho
c0b8053089 Move key/theme CSS providers to GtkSettingsPrivate 2011-01-30 21:27:55 -05:00
Carlos Garnacho
a03e33b10b Parse the gtk-keys.css file in the GtkSettings::gtk-key-theme-name theme path 2011-01-30 21:25:42 -05:00
Bastien Nocera
b98caf9385 GtkCssProvider: Take into account variant
When loading a theme, make sure we take into account the variant
so we don't use the plain version when the theme changes.

Also make sure to fallback to the plain theme when loading a variant
fails.

https://bugzilla.gnome.org/show_bug.cgi?id=640983
2011-01-30 21:22:12 -05:00
Bastien Nocera
7f3aa92086 GtkSettings: Fix theme not updating for dark theme
The theme was not updated when the "gtk-application-prefer-dark-theme"
GtkSettings property changed.

https://bugzilla.gnome.org/show_bug.cgi?id=640983
2011-01-30 20:48:29 -05:00
Matthias Clasen
008de2bafd Document new default handling 2011-01-27 00:32:07 -05:00
Matthias Clasen
064e48f846 Rename GTK_SETTINGS_SOURCE_RC_FILE to _THEME
This makes more sense, since we don't parse rc files anymore.
This is private api inside gtksettings.c, anyway.
2011-01-27 00:32:07 -05:00
Matthias Clasen
5501569354 Parse a per-theme settings.ini file
This lets themes override settings values again. We are using
the same priority that was used from the rc file parser, so things
are largely unchanged, relative to other settings sources.
2011-01-27 00:32:07 -05:00
Matthias Clasen
368a5c8937 Break out into a separate function
Move key file parsing to gtk_settings_load_from_key_file(), in
preparation for loading per-theme files. Load key files from both
/etc and ~/.config, with the latter overriding the former. Support
parsing enum values.
2011-01-27 00:32:07 -05:00
Matthias Clasen
8f3a3fda0b First pass a parsing a keyfile for default settings 2011-01-27 00:32:07 -05:00
Johan Dahlin
030b5ebf3e gtksettings: Add gtk-doc to silent an annotation warning 2011-01-20 12:12:22 -02:00
Matthias Clasen
6cdb6255af More documentation fixes 2011-01-06 09:44:08 -05:00
Matthias Clasen
16877b4d7b Reduce includes of gtktypeutils.h to a minimum 2011-01-04 12:05:05 -05:00
Matthias Clasen
1bcf8a0027 Remove sealed members from GtkSettings 2010-12-23 21:56:50 -05:00
Carlos Garnacho
56c3d4b1be Remove dead Gtk[Rc]Style code
Most code in gtkrc.c has been turned into a no-op, but that one
reverting in public API (gtk_rc_scanner_new() and such). GtStyle
is also more shallow, now fully relies in the backing
GtkStyleContext and all connection to gtkrc.c has been removed.

GtkBinding has been also affected, there is no replacement yet
for custom keybindings in style files, so that piece of code that
hooked into gtkrc has been replaced by a FIXME so in the future
it may be added back.
2010-12-18 12:10:00 +01:00
Carlos Garcia Campos
3b3307b946 Use gtk_style_context_reset_widgets() instead of gtk_rc_reset_styles() 2010-12-04 15:39:56 +01:00
Carlos Garcia Campos
a8c8c23c77 GtkSettings: add _gtk_settings_get_screen() private method 2010-12-04 15:39:55 +01:00
Carlos Garnacho
066f35bf28 Parse user CSS from $XDG_CONFIG_HOME/gtk-3.0/gtk.css 2010-12-04 15:39:53 +01:00
Matthias Clasen
e598f17871 Some header cleanups
Move GtkGradient to their own files, also move GtkBorder out of
gtkstyle.h, so that header can be all deprecated.
2010-12-04 15:39:47 +01:00
Matthias Clasen
d7a0fe5bf1 Document predefined style provider priorites
Also, rename GTK_STYLE_PROVIDER_PRIORITY_DEFAULT to _THEME and
use it for themes.
2010-12-04 15:39:35 +01:00
Carlos Garnacho
9a2d1e5433 GtkSettings: install theme CSS with a lower priority.
This is so GtkSettings has an opportunity to modify theme colors.
2010-12-04 15:39:12 +01:00
Carlos Garnacho
c37797a10c GtkSettings: Keep right refcount of the theme provider. 2010-12-04 15:39:08 +01:00
Carlos Garnacho
611cb007b4 GtkSettings: Ensure the theme CSS is loaded on startup. 2010-12-04 15:39:08 +01:00
Carlos Garnacho
a185954d7c Hardcode 3.0 version for style files and paths.
It's about time to start using the right paths.
2010-12-04 15:39:07 +01:00
Carlos Garnacho
605fa03248 Fix compile warning 2010-12-04 15:38:37 +01:00
Carlos Garnacho
4acc20abc1 s/GtkStyleSet/GtkStyleProperties/
The former name had oddities such as gtk_style_set_set() and such,
so the new name is nicer in that regard and not much longer.
2010-12-04 15:38:29 +01:00
Carlos Garnacho
4e02218f52 Use GdkRGBA all around in GtkStyleContext. 2010-12-04 15:38:25 +01:00
Carlos Garnacho
5c2cf1e934 Plug some leaks. 2010-12-04 15:38:18 +01:00
Carlos Garnacho
cc68e62e24 GtkSettings: Add a new provider for the theme CSS file. 2010-12-04 15:38:16 +01:00
Carlos Garnacho
a07fe2c0e6 Add generic providers per-screen.
The providers are added as soon as gtk GtkSettings object for the screen
is created.
2010-12-04 15:38:15 +01:00
Carlos Garnacho
621a95f515 GtkSettings: implement GtkStyleProvider 2010-12-04 15:38:11 +01:00
Javier Jardón
c418ea89e5 docs: Move documentation to inline comments: GtkSettings 2010-11-06 18:21:35 +01:00
Emmanuele Bassi
9f9edb662e settings: Move setting property registration in gtksettings.c
Some GtkSettings property are registered by other classes. This leads
to the "interesting" issue that setting GtkSettings:gtk-button-images
requires that the GtkButton class is referenced first - or that a
GtkButton is created.

https://bugzilla.gnome.org/show_bug.cgi?id=632538
2010-10-20 10:34:25 +01:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Benjamin Otte
9f47be2216 gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Havoc Pennington
b3079c0d18 Use gint16 for GtkBorder
32K of border ought to be enough for any pixel dimensions. At least
until screens are so huge we start using doubles.

This saves a nice 64 bits of space when we have a GtkBorder
stored somewhere.

Signed integers are used to avoid surprising unsigned math
issues. Just search GTK's whole git log from inception
for "unsigned" if you want to find any number of commits
fixing signed/unsigned bugs.

https://bugzilla.gnome.org/show_bug.cgi?id=629387
2010-09-12 21:47:09 -04:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Bastien Nocera
4551509af1 Make it easy for apps to have dark themes
Some types of applications would benefit from having "dark" themes,
usually black backgrounds, such as:
* Movie players
* Photo management and display applications

To make it easy for those applications to prefer a dark theme,
we're adding the "gtk-application-prefer-dark-theme" GtkSetting, which
will make the theme loading code automatically look for a "gtkrc-dark"
file in the same directory you would usually find a gtkrc file.
the same name and a "-dark" suffix.

If no "-dark" gtkrc variant is available, the normal gtkrc will
be used.

https://bugzilla.gnome.org/show_bug.cgi?id=617955
2010-05-10 01:15:14 +01:00
Matthias Clasen
c59f76fda2 Only show the mnemonic underline when pressing Alt
...and show them in menus when navigating the menu with the keyboard.
This is similar to what other platforms do, and reduces visual clutter.
There is a setting to control this. Most of the work on this patch was
done by Thomas Wood. See bug 588554.
2009-12-20 03:11:05 -05:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Matthias Clasen
bbb4e4910b Make the toolbar-style and toolbar-size settings work
This broke when moving the setting from gtktoolbar.c to gtksettings.c.
Spotted by Christian Persch in bug 603271.
2009-11-28 21:43:59 -05:00
Matthias Clasen
d8dfad3eb9 Fix small documentation problems after the toolpalette merge
Several Since tags were wrong. Spotted by Christian Persch in
bug 603268.
2009-11-28 20:59:56 -05:00
Matthias Clasen
37255486d4 Merge branch 'master' into toolpalette 2009-11-26 23:54:55 -05:00
Javier Jardón
1a02671437 Fix compilation warning: Use gpointer variables 2009-11-02 23:49:00 +01:00
Johannes Schmid
c229306a18 Merge branch 'master' into toolpalette 2009-10-28 10:57:46 +01:00
Matthias Clasen
d3e6cffff7 Fix issues with symbolic colors in rc file parsing
Don't recreate the settings color hash every time, repopulate it
instead. This avoids invalidating the references held by RcContexts.
2009-10-25 23:47:59 -04:00
Yevgen Muntyan
3c510f028f Use standard mac shortcuts
This changes Ctrl-X, Ctrl-C, etc. to Cmd-X, Cmd-C, etc. Also,
Alt-Left and Alt-Right in text widgets bound to Ctrl-Left and
Ctrl-Right actions

https://bugzilla.gnome.org/show_bug.cgi?id=530351
2009-10-26 00:03:05 +01:00
Matthias Clasen
54863bbba6 Correct a doc comment
Add 'papi' to the list of possible print backends, and mention 'file'
instead of 'pdf'.
2009-08-08 22:43:16 -04:00
Murray Cumming
eb76666f1c GtkToolPalette: Use gtk-toolbar-style and gtk-toolbar-icon-size settings.
* gtk/gtksettings.c: (settings_install_property_parser): Handle enums too.
	* gtk/gtktoolbar.c (gtk_toolbar_class_init): Move the gtk-toolbar-style and
	gtk-toolbar-icon-size settings into GtkSettings because we now use it in
	GtkToolPalette too.

	* gtk/gtktoolpalette.[h|c]: Add gtk_tool_palette_unset_style() and
	gtk_tool_palette_unset_icon_size(), and use the toolbar-style and
	icon-size from GtkSettings if these are not set via the set functions.

	* demos/gtk-demo/toolpalette.c (on_combo_style_changed),
	(do_toolpalette): Add and handle a -1 value to mean the desktop "Default"
	toolbar style.
2009-07-16 17:51:55 +02:00
Behdad Esfahbod
03e5467b68 Change the "gtk-fontconfig-timestamp" property from int to uint. Doesn't
2009-02-01  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtksettings.c (gtk_settings_class_init): Change the 
        "gtk-fontconfig-timestamp" property from int to uint.  Doesn't affect
        anything in practice, except that  it overflows years later...


svn path=/trunk/; revision=22270
2009-02-01 06:04:12 +00:00
Murray Cumming
53097873ca documentation description: Mention the various properties and the
2009-01-15  Murray Cumming  <murrayc@murrayc.com>

* gtk/gtkimcontext.c: documentation description: Mention the various 
properties and the environment variable, with links to their 
 documentation.
* gtk/gtksettings.c:
* gtk/gtktextview.c: Make the im-module property documentation more 
expansive.

svn path=/trunk/; revision=22123
2009-01-15 16:53:27 +00:00
Matthias Clasen
9a8c209a80 When reconstructing the color hash, try harder to avoid unnecessary
* gtk/gtksettings.c: When reconstructing the color hash, try
        harder to avoid unnecessary notification, since this can lead
        to infinite reloading of rc files in some situations.


svn path=/trunk/; revision=21182
2008-08-22 03:51:56 +00:00