[vte/vte-next: 82/114] Make 'dim-foreground-color' a style property
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 82/114] Make 'dim-foreground-color' a style property
- Date: Mon, 30 May 2011 17:13:38 +0000 (UTC)
commit ff6f5aa2a44fcb643fff4772065b100f97fba438
Author: Christian Persch <chpe gnome org>
Date: Sun May 22 20:50:42 2011 +0200
Make 'dim-foreground-color' a style property
doc/reference/vte-sections.txt | 1 -
src/vte.c | 33 +++++++++++++++++++++++----------
src/vte.h | 2 --
3 files changed, 23 insertions(+), 13 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 08a5cac..aef6af2 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -27,7 +27,6 @@ vte_terminal_set_scroll_on_output
vte_terminal_set_scroll_on_keystroke
vte_terminal_set_color_foreground_rgba
vte_terminal_set_color_background_rgba
-vte_terminal_set_color_dim_rgba
vte_terminal_set_color_highlight_rgba
vte_terminal_set_colors_rgba
vte_terminal_set_default_colors
diff --git a/src/vte.c b/src/vte.c
index 3524cca..376e171 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -2416,24 +2416,20 @@ _vte_terminal_set_color_bold_rgba(VteTerminal *terminal,
vte_terminal_set_color_internal(terminal, VTE_BOLD_FG, rgba, FALSE);
}
-/**
- * vte_terminal_set_color_dim_rgba:
+/*
+ * _vte_terminal_set_color_dim_rgba:
* @terminal: a #VteTerminal
* @dim: (allow-none): the new dim color or %NULL
*
* Sets the color used to draw dim text in the default foreground color.
* If @dim is %NULL then the default color is used.
- *
- * Since: 0.28
*/
-void
-vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
- const GdkRGBA *rgba)
+static void
+_vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
+ const GdkRGBA *rgba)
{
GdkRGBA mixed;
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
-
if (rgba == NULL) {
vte_terminal_generate_bold(&terminal->pvt->palette[VTE_DEF_FG],
&terminal->pvt->palette[VTE_DEF_BG],
@@ -2445,7 +2441,7 @@ vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
_vte_debug_print(VTE_DEBUG_MISC,
"Set dim color to rgba(%.3f,%.3f,%.3f,%.3f).\n",
rgba->red, rgba->green, rgba->blue, rgba->alpha);
- vte_terminal_set_color_internal(terminal, VTE_DIM_FG, rgba, TRUE);
+ vte_terminal_set_color_internal(terminal, VTE_DIM_FG, rgba, FALSE);
}
/**
@@ -4295,6 +4291,10 @@ vte_terminal_update_style_colors(VteTerminal *terminal)
color = _vte_style_context_get_color(context, "bold-foreground-color", &rgba);
_vte_terminal_set_color_bold_rgba(terminal, color);
+
+ color = _vte_style_context_get_color(context, "dim-foreground-color", &rgba);
+ _vte_terminal_set_color_dim_rgba(terminal, color);
+
}
static void
@@ -11714,6 +11714,19 @@ vte_terminal_class_init(VteTerminalClass *klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
+ * VteTerminal:dim-foreground-color:
+ *
+ * The foreground color for dim text.
+ *
+ * Since: 0.30
+ */
+ gtk_widget_class_install_style_property
+ (widget_class,
+ g_param_spec_boxed ("dim-foreground-color", NULL, NULL,
+ GDK_TYPE_RGBA,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ /**
* VteTerminal:cursor-background-color:
*
* The background color for text which is under the cursor. If not set,
diff --git a/src/vte.h b/src/vte.h
index beef344..357c376 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -228,8 +228,6 @@ void vte_terminal_set_scroll_on_keystroke(VteTerminal *terminal,
/* Set the color scheme. */
-void vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
- const GdkRGBA *rgba);
void vte_terminal_set_color_foreground_rgba(VteTerminal *terminal,
const GdkRGBA *rgba);
void vte_terminal_set_color_background_rgba(VteTerminal *terminal,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]