From 6469efbbdc0d0ff6f8f632a3b1ce7369bc69005a Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Tue, 11 Oct 2005 09:42:53 +0000 Subject: [PATCH] Added gm_color_table_get_hex function --- src/gm-color-table.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gm-color-table.c b/src/gm-color-table.c index 4641cf6..0ff2907 100644 --- a/src/gm-color-table.c +++ b/src/gm-color-table.c @@ -222,6 +222,19 @@ gm_color_table_get(GmColorTable *table, const gchar *name, GdkColor *color) { } } +const gchar * +gm_color_table_get_hex(GmColorTable *table, const gchar *name) { + GmColorTableItem *item; + + item = g_hash_table_lookup(table->priv->colors, name); + + if (item != NULL) { + return item->hex; + } else { + return FALSE; + } +} + void gm_color_table_set_bold(GmColorTable *table, gboolean bold) { if (table->priv->bold != bold) {