[vte/vte-next: 111/114] Add terminal style class
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 111/114] Add terminal style class
- Date: Mon, 30 May 2011 17:16:04 +0000 (UTC)
commit 7bc5abd15738cad6a1f44d9ad4c2bcfad30c2062
Author: Christian Persch <chpe gnome org>
Date: Sun May 29 01:05:03 2011 +0200
Add terminal style class
doc/reference/vte-sections.txt | 3 +++
src/vte.c | 5 ++++-
src/vte.h | 9 +++++++++
3 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index c98ce5a..8589b01 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -62,6 +62,9 @@ vte_terminal_search_set_gregex
vte_terminal_search_set_wrap_around
<SUBSECTION>
+VTE_STYLE_CLASS_TERMINAL
+
+<SUBSECTION>
vte_get_default_emulation
vte_get_user_shell
diff --git a/src/vte.c b/src/vte.c
index 498a363..2c0ea65 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -7521,6 +7521,7 @@ static void
vte_terminal_init(VteTerminal *terminal)
{
VteTerminalPrivate *pvt;
+ GtkStyleContext *context;
_vte_debug_print(VTE_DEBUG_LIFECYCLE, "vte_terminal_init()\n");
@@ -7659,9 +7660,11 @@ vte_terminal_init(VteTerminal *terminal)
/* gtk_widget_get_accessible(&terminal->widget); */
#endif
- gtk_style_context_add_provider (gtk_widget_get_style_context (&terminal->widget),
+ context = gtk_widget_get_style_context (&terminal->widget);
+ gtk_style_context_add_provider (context,
VTE_TERMINAL_GET_CLASS (terminal)->priv->style_provider,
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
+ gtk_style_context_add_class (context, VTE_STYLE_CLASS_TERMINAL);
vte_terminal_update_style (terminal);
}
diff --git a/src/vte.h b/src/vte.h
index 433cb9e..5cf50a0 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -174,6 +174,15 @@ typedef enum {
VTE_TERMINAL_EFFECT_COLOR
} VteTerminalEffect;
+/**
+ * VTE_STYLE_CLASS_TERMINAL:
+ *
+ * A CSS class to match terminals.
+ *
+ * Since: 0.30
+ */
+#define VTE_STYLE_CLASS_TERMINAL "terminal"
+
/* The structure we return as the supplemental attributes for strings. */
typedef struct _VteCharAttributes VteCharAttributes;
struct _VteCharAttributes {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]