/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-gray-bar.c
 *
 * Copyright (C) 2001  Ximian, Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Ettore Perazzoli <ettore@ximian.com>
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "e-gray-bar.h"

#include <gtk/gtkrc.h>
#include <gtk/gtktypeutils.h>
#include <gtk/gtkwidget.h>

#include <gal/util/e-util.h>


#define PARENT_TYPE gtk_event_box_get_type ()
static GtkEventBoxClass *parent_class = NULL;


static void
endarken_style (GtkWidget *widget)
{
	GtkRcStyle *rc_style = gtk_rc_style_new();

	rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BG;
	rc_style->bg[GTK_STATE_NORMAL].red = 0x8000;
	rc_style->bg[GTK_STATE_NORMAL].green = 0x8000;
	rc_style->bg[GTK_STATE_NORMAL].blue = 0x8000;

	gtk_widget_modify_style (widget, rc_style);
        gtk_rc_style_unref (rc_style);
}


static void
impl_style_set (GtkWidget *widget,
		GtkStyle *previous_style)
{
	static int in_style_set = 0;

	if (in_style_set > 0)
		return;

	in_style_set ++;

	endarken_style (widget);

	in_style_set --;

	(* GTK_WIDGET_CLASS (parent_class)->style_set) (widget, previous_style);
}


static void
class_init (GtkObjectClass *object_class)
{
	GtkWidgetClass *widget_class;

	parent_class = gtk_type_class (PARENT_TYPE);

	widget_class = GTK_WIDGET_CLASS (object_class);
	widget_class->style_set = impl_style_set;
}

static void
init (EGrayBar *gray_bar)
{
}


GtkWidget *
e_gray_bar_new (void)
{
	GtkWidget *new;

	new = gtk_type_new (e_gray_bar_get_type ());

	return new;
}


E_MAKE_TYPE (e_gray_bar, "EGrayBar", EGrayBar, class_init, init, PARENT_TYPE)
it/astro/gpsman'>commit</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/diff/astro/gpsman'>diff</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/stats/astro/gpsman'>stats</a></td><td class='form'><form class='right' method='get' action='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/log/astro/gpsman'>
<select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/log/'>root</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/log/astro'>astro</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/log/astro/gpsman'>gpsman</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th></th><th class='left'>Commit message (<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/log/astro/gpsman?showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Age</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=92a23247b1467190ce10007190052c33423ff547'>Cleanup patches, a* categories.</a></td><td>mat</td><td><span title='2016-07-27 00:51:15 +0800'>2016-07-27</span></td><td>1</td><td><span class='deletions'>-6</span>/<span class='insertions'>+5</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=9ec61f48def80e1a6cac88e7acc7894cc689135b'>Remove useless WRKSRC definitions.</a></td><td>mat</td><td><span title='2016-05-25 23:43:34 +0800'>2016-05-25</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+0</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=2a95686979e4368264072daf699d735a95d8fe4f'>Fixup some whitespace at the beginning of lines problems.</a></td><td>mat</td><td><span title='2016-04-01 21:18:17 +0800'>2016-04-01</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=9d30f78a00bed11384c7259f662e9352754275db'>Convert ports to use the options helpers in categories [abc]*, and minor fixes.</a></td><td>mat</td><td><span title='2015-08-19 21:29:59 +0800'>2015-08-19</span></td><td>1</td><td><span class='deletions'>-8</span>/<span class='insertions'>+2</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=93169f3910da6e92f54bf47aa412d8e2002f411b'>Remove $FreeBSD$ from patches files in categories a-j.</a></td><td>mat</td><td><span title='2015-05-22 21:34:20 +0800'>2015-05-22</span></td><td>1</td><td><span class='deletions'>-2</span>/<span class='insertions'>+0</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=0691688a506fc2dffc574eeeb80dc0d876378fed'>Remove OSVERSION checks that do not make sense any more.</a></td><td>mat</td><td><span title='2015-04-03 19:26:48 +0800'>2015-04-03</span></td><td>1</td><td><span class='deletions'>-4</span>/<span class='insertions'>+0</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=529e86dee1c94f88aa58c0771fa2685e1bccc454'>Remove Authors from pkg-descr</a></td><td>bapt</td><td><span title='2015-03-03 07:03:01 +0800'>2015-03-03</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+0</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=5efacd3bcb7273a8d375b88dbe411d06b1edf37a'>Cleanup plist</a></td><td>bapt</td><td><span title='2014-10-20 07:19:41 +0800'>2014-10-20</span></td><td>1</td><td><span class='deletions'>-4</span>/<span class='insertions'>+0</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=5d4f6dbf6920e86fef1c7e3a8e60608b5d4f4764'>Convert a bunch of EXTRACT_SUFX=... into USES=tar:...</a></td><td>adamw</td><td><span title='2014-07-30 03:11:51 +0800'>2014-07-30</span></td><td>1</td><td><span class='deletions'>-2</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=df8d5ed85c0a81149f3f0f6294550c1526e11243'>Remove indefinite articles and trailing periods from COMMENT, plus</a></td><td>olgeni</td><td><span title='2014-06-09 19:21:52 +0800'>2014-06-09</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=644c76fbf49136591c72411651df522e0519e2c4'>- Update to 6.4.4.2 [1]</a></td><td>gahr</td><td><span title='2013-10-07 15:31:55 +0800'>2013-10-07</span></td><td>5</td><td><span class='deletions'>-38</span>/<span class='insertions'>+380</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=74ebaf5b5189571fbbcdfee128247be5302e7e50'>Add NO_STAGE all over the place in preparation for the staging support (cat: ...</a></td><td>bapt</td><td><span title='2013-09-20 21:14:04 +0800'>2013-09-20</span></td><td>1</td><td><span class='deletions'>-5</span>/<span class='insertions'>+2</span></td></tr>
<tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-graphics/commit/astro/gpsman?id=2e4755fb165fc85b66abbd26d0129a688b4273da'>Update to 6.4.4</a></td><td>crees</td><td><span title='2013-04-25 02:09:51 +0800'>2013-04-25</span>