[gtk+/gtk-style-context: 454/540] Document predefined style provider priorites
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 454/540] Document predefined style provider priorites
- Date: Fri, 3 Dec 2010 03:14:17 +0000 (UTC)
commit 8555bc5fa8ab3dab3f427bd8e50d2f830752470b
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 22 23:01:27 2010 -0500
Document predefined style provider priorites
Also, rename GTK_STYLE_PROVIDER_PRIORITY_DEFAULT to _THEME and
use it for themes.
docs/reference/gtk/gtk3-sections.txt | 4 +-
gtk/gtksettings.c | 2 +-
gtk/gtkstyleprovider.h | 42 +++++++++++++++++++++++++++++++++-
3 files changed, 44 insertions(+), 4 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index aa75160..cc35d43 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5297,10 +5297,10 @@ gtk_widget_path_prepend_type
<TITLE>GtkStyleProvider</TITLE>
GtkStyleProviderIface
GtkStyleProvider
-GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
-GTK_STYLE_PROVIDER_PRIORITY_DEFAULT
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
+GTK_STYLE_PROVIDER_PRIORITY_THEME
GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
+GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
GTK_STYLE_PROVIDER_PRIORITY_USER
gtk_style_provider_get_icon_factory
gtk_style_provider_get_style
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 4c55eec..8b70038 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -2639,7 +2639,7 @@ settings_update_theme (GtkSettings *settings)
{
gtk_style_context_add_provider_for_screen (settings->screen,
GTK_STYLE_PROVIDER (new_provider),
- GTK_STYLE_PROVIDER_PRIORITY_SETTINGS - 1);
+ GTK_STYLE_PROVIDER_PRIORITY_THEME);
g_object_ref (new_provider);
}
diff --git a/gtk/gtkstyleprovider.h b/gtk/gtkstyleprovider.h
index e901a20..a920256 100644
--- a/gtk/gtkstyleprovider.h
+++ b/gtk/gtkstyleprovider.h
@@ -33,10 +33,50 @@ G_BEGIN_DECLS
#define GTK_IS_STYLE_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_PROVIDER))
#define GTK_STYLE_PROVIDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProviderIface))
+/**
+ * GTK_STYLE_PROVIDER_PRIORITY_FALLBACK:
+ *
+ * The priority used for default style information
+ * that is used in the absence of themes.
+ */
#define GTK_STYLE_PROVIDER_PRIORITY_FALLBACK 1
-#define GTK_STYLE_PROVIDER_PRIORITY_DEFAULT 200
+
+/**
+ * GTK_STYLE_PROVIDER_PRIORITY_DEFAULT:
+ *
+ * The priority used for style information provided
+ * by themes.
+ */
+#define GTK_STYLE_PROVIDER_PRIORITY_THEME 200
+
+/**
+ * GTK_STYLE_PROVIDER_PRIORITY_SETTINGS:
+ *
+ * The priority used for style information provided
+ * via #GtkSettings.
+ *
+ * This priority is higher than #GTK_STYLE_PROVIDER_PRIORITY_THEME
+ * to let settings override themes.
+ */
#define GTK_STYLE_PROVIDER_PRIORITY_SETTINGS 400
+
+/**
+ * GTK_STYLE_PROVIDER_PRIORITY_APPLICATION:
+ *
+ * A priority that can be used when adding a #GtkStyleProvider
+ * for application-specific style information.
+ */
#define GTK_STYLE_PROVIDER_PRIORITY_APPLICATION 600
+
+/**
+ * GTK_STYLE_PROVIDER_PRIORITY_USER:
+ *
+ * The priority used for the style information from
+ * <filename>~/.gtk-3.0.css</filename>.
+ *
+ * You should not use priorities higher than this, to
+ * give the user the last word.
+ */
#define GTK_STYLE_PROVIDER_PRIORITY_USER 800
typedef struct _GtkStyleProviderIface GtkStyleProviderIface;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]