Index: /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/expand.xpm
===================================================================
--- /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/expand.xpm	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/expand.xpm	(revision 1018)
@@ -0,0 +1,101 @@
+/* XPM */
+static char *expand_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 71 1",
+"  c #010101",
+". c #070708",
+"X c #0c0c0c",
+"o c #110e13",
+"O c #131313",
+"+ c #1b171f",
+"@ c #1a191b",
+"# c #1e1c21",
+"$ c Gray14",
+"% c #262429",
+"& c #2c2c2b",
+"* c #2d2a31",
+"= c #312d34",
+"- c #30302f",
+"; c #343434",
+": c #38333c",
+"> c #3b3c3b",
+", c #3e3943",
+"< c #403f3f",
+"1 c #464544",
+"2 c #484746",
+"3 c #484847",
+"4 c #4d4c4c",
+"5 c #4b4451",
+"6 c #504f4f",
+"7 c #514f50",
+"8 c #555454",
+"9 c #595759",
+"0 c #585857",
+"q c #5d5d5d",
+"w c #5c5364",
+"e c #695f71",
+"r c #646463",
+"t c #686767",
+"y c Gray42",
+"u c #6d6476",
+"i c #6f6578",
+"p c #71677b",
+"a c #73697c",
+"s c #727272",
+"d c #787877",
+"f c #7b7b7a",
+"g c #776d80",
+"h c #786e81",
+"j c #7c7285",
+"k c #83798c",
+"l c #848484",
+"z c #898887",
+"x c #8c8b8b",
+"c c #918f8f",
+"v c #9d9c9c",
+"b c #a4a3a2",
+"n c #adacac",
+"m c #b0afaf",
+"M c #b5b4b3",
+"N c #b8b7b7",
+"B c #bcbbba",
+"V c #c0bfbe",
+"C c #c1c0bf",
+"Z c #c4c3c2",
+"A c #c7c8c5",
+"S c #c9c7c7",
+"D c #c8c8c7",
+"F c #cccbcb",
+"G c #d1d0cf",
+"H c #d6d6d5",
+"J c #d8d7d7",
+"K c #dbdbda",
+"L c #f6f6f6",
+"P c Gray100",
+"I c None",
+/* pixels */
+"II                     I",
+"IIIIIIIIIIIIIIIIIIIIIIII",
+" I XOOOOOOooooOOOOOOO. I",
+" IXFFFFFFFFFDFFFFFFZKr I",
+" IOFBBBBBBBBBBBBBBBNZ1 I",
+" IODBBBBBBBBBBBBBBBBC1 I",
+" IOHBCCBCCCCCCCCCCCCD3 I",
+" I.y84496466666666668$ I",
+" I.upau,uaippppppppih: I",
+" IXkghuX$ihahhhhggggh# I",
+" IXjghww>@uaahahggggg+ I",
+" IXjia5zv;%uiippppppp# I",
+" I.5**oxJq1X%=*******O I",
+" IXZAFczPdr$-BDAZZSZHr I",
+" IOFNCzfPn3q@&nBBBBBZ1 I",
+" IODBCzdPLt1@$xMNBBBZ1 I",
+" IOHBZzxPBMOO6zMBVVBD2 I",
+" I.s00>18 zs -188008q& I",
+" IXBZBb;$@%n@fNBVVVBGq I",
+" IOGBBnzqt&lx>mNVVBBA2 I",
+" IODBBMbvvf%q$xMBBBNC1 I",
+" IOHZZZBCBn8@4cNZZZZF3 I",
+" I.t111111>;$$;111113$ I",
+"II                     I"
+};
Index: /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/switch2.c
===================================================================
--- /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/switch2.c	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/switch2.c	(revision 1018)
@@ -0,0 +1,984 @@
+/* Gtk Theme Switch, a fast and small Gtk theme switching utility that has a 
+ * GUI and console interface.
+ * Released under the GPL.
+ * copyright Maher Awamy <muhri@muhri.net>
+ * 	     Aaron Lehmann <aaronl@vitelus.com>
+ * 	     Joshua Kwan <joshk@triplehelix.org> 
+ * 	     Pedro Villavicencio Garrido <pvillavi@gnome.cl>*/
+
+
+#include "switch.h"
+#define INIT_GTK if (!using_gtk) { gtk_init (&argc, &argv); using_gtk = 1; }
+
+/* globals */
+GHashTable *hash;
+GList *glist=NULL;
+GSList *kids=NULL;
+gint preview_counter = 0;
+
+gchar	*homedir, /* we use it a lot, so keep it handy */
+	*execname, /* == argv[0] */
+	*newfont; /* The name of a new font to use as the default if the user has
+				 selected one. Otherwise NULL. */
+
+GtkWidget *dockwin, *combo=NULL, *font_entry, *use_font_button, *box, *install_button, *browse;
+gint hidden = 1;
+/*end globals */
+
+static short fgrep_gtkrc_for (gchar *needle)
+{
+	gchar *path_to_gtkrc = g_strdup_printf("%s/.gtkrc-2.0", homedir);
+	FILE *gtkrc = fopen(path_to_gtkrc, "r");
+	char tempbuf[16384], *commentsearch;
+	g_free (path_to_gtkrc);
+
+        if (!gtkrc)
+          return 0;
+
+	while (!feof (gtkrc))
+	{
+		fgets (tempbuf, 16383, gtkrc);
+		/* Strip comments */
+		for (commentsearch = tempbuf; *commentsearch != '\0'; ++commentsearch)
+			if (*commentsearch == '#') { *commentsearch = '\0'; break; }
+		if (strstr(tempbuf, needle))
+		{
+			fclose (gtkrc);
+			return 1;
+		}
+	}
+	fclose (gtkrc);
+	return 0;
+}
+
+static GList*
+get_dirs (void) 
+{
+	gchar *dirname;
+	DIR *dir; 
+	struct dirent *dent;
+	struct stat stats;
+	gchar *origdir=g_get_current_dir(); /* back up cwd */
+	GList *list=0;
+	
+	dirname = g_strconcat(homedir,"/.themes",NULL);
+	chdir (dirname);
+	dir = opendir (dirname);
+	if (dir)
+	{
+		while ((dent = readdir (dir)))
+		{
+                        gchar* gtkrc_path = g_strconcat(dent->d_name, "/gtk-2.0/gtkrc", NULL);
+			stat(dent->d_name,&stats);
+			if (!S_ISDIR(stats.st_mode)) continue;
+			if (strcmp(dent->d_name,"." ) == 0) continue;
+			if (strcmp(dent->d_name,"..") == 0) continue;
+                        if (access(gtkrc_path, R_OK) == -1) continue;
+			g_hash_table_insert (hash, dent->d_name, dirname);
+			list = g_list_insert_sorted(list, g_strdup(dent->d_name), (GCompareFunc)strcmp);
+                        g_free(gtkrc_path);
+		}
+	}
+ 
+	/* DO NOT FREE dirname!! */
+	/* We are supposed to. */
+	/* But we need our own copy anyway, to store in the hash table */
+
+	dirname = gtk_rc_get_theme_dir();
+	chdir (dirname);
+	dir = opendir (dirname);
+	if (dir)
+	{
+		while ((dent = readdir (dir)))
+		{
+                        gchar* gtkrc_path = g_strconcat(dent->d_name,"/gtk-2.0/gtkrc",NULL);
+			stat(dent->d_name,&stats);
+			if (!S_ISDIR(stats.st_mode)) continue;
+			if (strcmp(dent->d_name, "." ) == 0) continue;
+			if (strcmp(dent->d_name, "..") == 0) continue;
+                        if (access(gtkrc_path, R_OK) == -1) continue;
+			g_hash_table_insert (hash, dent->d_name, dirname);
+			list =  g_list_insert_sorted(list, g_strdup(dent->d_name), (GCompareFunc)strcmp);
+                        g_free(gtkrc_path);
+		}
+	}
+	
+	/* DO NOT FREE dirname!! */
+	/* We are supposed to. */
+	/* But we need our own copy anyway, to store in the hash table */
+
+	chdir(origdir); /* Go back to where we were */
+	g_free(origdir); /* Now go play like a good little program */
+
+	return list;
+}
+
+/* Find the first element in t2 that does not exist in t1.
+ * Uses the supplied cmpfunc() for determining equality of list->data
+ * strcmp() is the recommended compare function */
+static GList*
+compare_glists (GList *t1, GList *t2, GCompareFunc cmpfunc)
+{
+	GList *tmp1;
+	for (; t2; t2=t2->next)
+	{ 
+		short matched = 0;
+		for (tmp1=t1; tmp1; tmp1=tmp1->next)
+			if ((*cmpfunc)(tmp1->data, t2->data) == 0) { matched = 1; break; }
+		if (!matched) return t2;
+	}
+	return 0;
+}
+
+static void
+preview_clicked(GtkWidget *button, gpointer data)
+{
+	G_CONST_RETURN gchar *entry; 
+	gchar *dir; 
+	gchar *rc;
+	gchar *actual;
+
+	entry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry));
+	dir = g_hash_table_lookup(hash,entry);
+	dir = g_strconcat(dir,"/",NULL);
+	rc = g_strconcat(dir,entry,NULL);
+	actual = g_strconcat(dir,entry,NULL);
+	rc = g_strconcat(rc,"/gtk-2.0/gtkrc",NULL);
+	update_newfont ();
+	preview(rc);
+	g_free(rc);
+	g_free(actual);
+}
+
+/* Update 'newfont' */
+static void update_newfont (void)
+{
+	if (newfont) g_free (newfont);
+
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(use_font_button)))
+	{
+		G_CONST_RETURN gchar *newerfont = gtk_entry_get_text (GTK_ENTRY(font_entry));
+		if (newerfont && newerfont[0])
+		{
+			newfont = g_strdup(newerfont);
+		}
+	}
+	else newfont = NULL;
+}
+
+static void 
+apply_clicked(GtkWidget *button, gpointer data)
+{
+	G_CONST_RETURN gchar *entry = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry));
+	gchar *dir = g_hash_table_lookup(hash,entry);
+	gchar *name = g_strdup_printf ("%s/%s/gtk-2.0/gtkrc", dir, entry);
+/*	GtkStyle *style;*/
+	
+	update_newfont ();
+
+	ok_clicked(name);
+	g_free(name);
+
+	/* make sure we get the ClientEvent ourselves */
+	while (gtk_events_pending())
+		gtk_main_iteration();
+
+	/* sync the font field with the GTK font */
+/*	style = gtk_rc_get_style (font_entry);
+	if (style && style->rc_style)
+		gtk_entry_set_text (GTK_ENTRY(font_entry), pango_font_description_to_string(style->rc_style->font_desc));*/
+}
+
+static void
+usage (void)
+{
+	printf("\
+%s command line options:\n\
+-h[elp]\t\t\t(display this help message)\n\
+-d[ock]\t\t\t(open dock)\n\
+file\t\t\t(switch to theme (install if theme is a tarball))\n\
+-p[review] file\t\t(preview a theme (installs if file is a tarball))\n\
+-i[nstall] theme.tar.gz\t(install a .tar.gz)\n\
+-f[ont] fontstring\t(set GTK's main font to fontstring)\n\n\
+\
+Passing no command line arguments will cause %s to start in dock-mode)\n\n\
+\
+\"file\" represents any one of (looked for in the listed order):\n\
+1) An absoulte or relative path to a GTK theme directory.\n\
+   A directory is considered a theme directory if it contains a\n\
+   gtk/gtkrc file.\n\
+2) A gzipped tar file which expands to a GTK theme directory as explained in 1).\n\
+3) A GTK theme directory with the name passed located in ~/.themes.\n\
+4) A GTK theme directory with the name passed located in the global\n\
+   \"gtk_themedir\"\n\
+If none of these files are located and found to be correct, the program will\n\
+exit with an error.\n",
+execname, execname);
+}
+
+static void
+write_rc_file (gchar *include_file, gchar *path)
+{
+	FILE *gtkrc = fopen(path, "w");
+	/* the caps stuff is bullshit for gnome */
+	fprintf(gtkrc, "# -- THEME AUTO-WRITTEN DO NOT EDIT\ninclude \"%s\"\n\n", include_file);
+	if (newfont)
+		/* User set a custom font to overrride defaults. */
+		fprintf (gtkrc, "style \"user-font\"\n{\n  font_name=\"%s\"\n}\nwidget_class \"*\" style \"user-font\"\n\n", newfont);
+	fprintf(gtkrc, "include \"%s/.gtkrc-2.0.mine\"\n\n# -- THEME AUTO-WRITTEN DO NOT EDIT\n", homedir);
+	fclose (gtkrc);
+}
+
+static void
+backup_gtkrc(gchar *path_to_gtkrc)
+{
+	FILE *gtkrc;
+	if (!(gtkrc = fopen(path_to_gtkrc, "r")))
+		return;
+	int c;
+	FILE *gtkrc_backup = fopen(g_strdup_printf("%s/.gtkrc-2.0.bak", homedir),"w");
+	
+	while((c = fgetc(gtkrc)) != EOF){
+		fputc(c, gtkrc_backup);
+	}
+	
+	fclose(gtkrc);
+	fclose(gtkrc_backup);
+}	
+
+static void
+ok_clicked (gchar *rc_file)
+{
+	/* Write the config file to disk */
+	gchar *path_to_gtkrc = g_strdup_printf("%s/.gtkrc-2.0", homedir);
+	backup_gtkrc(path_to_gtkrc);
+	write_rc_file (rc_file, path_to_gtkrc);
+	send_refresh_signal();
+	g_free(path_to_gtkrc);
+}
+
+static void
+preview_ok_clicked (gchar *rc_file)
+{
+	/* Write the config file to disk */
+	gchar *path_to_gtkrc = g_strdup_printf("%s/.gtkrc-2.0", homedir);
+	rename (rc_file, path_to_gtkrc);
+	send_refresh_signal();
+	g_free(path_to_gtkrc);
+}
+
+static void
+install_clicked (GtkWidget *w, gpointer data)
+{
+	GtkWidget *checkbutton = gtk_check_button_new_with_label ("Switch to theme after installation");
+	GtkWidget *fs = gtk_file_selection_new ("Select a GTK theme tarball");
+	g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), "clicked", G_CALLBACK(install_ok_clicked), fs);
+	g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(fs)->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)fs);
+	gtk_box_pack_start (GTK_BOX(GTK_FILE_SELECTION(fs)->main_vbox), checkbutton, FALSE, FALSE, 0);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(checkbutton), FALSE);
+	g_object_set_data (G_OBJECT(fs), "checkbutton", checkbutton);
+	gtk_widget_show(checkbutton);
+	gtk_widget_show(fs);
+}
+
+static void
+install_ok_clicked (GtkWidget *w, gpointer data)
+{
+	gchar *rc_file, *beginning_of_theme_name, *thn;
+     	G_CONST_RETURN gchar *filename;
+	gint i, pos;
+	short slashes=0;
+	gboolean cbstate=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g_object_get_data(G_OBJECT(data), "checkbutton")));
+	filename = gtk_file_selection_get_filename(GTK_FILE_SELECTION(data));
+     	thn = g_strdup(filename);
+	search_for_theme_or_die_trying(thn, &rc_file);
+     	g_free(thn);
+	gtk_widget_destroy(GTK_WIDGET(data));
+	/* ok, we're like evil or something, but that won't stop us */
+	for (i=strlen(rc_file); i != 0; --i)
+	{
+		if (rc_file[i] == '/') ++slashes;
+		if (slashes == 2) { rc_file[i] = '\0'; break; }
+	}
+	beginning_of_theme_name = rc_file;
+	for (i=strlen(rc_file) /*different*/; i != 0; --i)
+	{
+		if (rc_file[i] == '/') { beginning_of_theme_name = &rc_file[i+1]; break; }
+	}
+	/* we've been very naugthy, but we should have the theme's NAME now..
+	 * it's about time. */
+	/* get the list item that contains this */
+	pos = g_list_position (glist, g_list_find_custom (glist, beginning_of_theme_name, (GCompareFunc) strcmp));
+	if (pos != -1)
+		/* set combo's item to the newly-installed theme */
+/*FIXME		gtk_list_select_item(GTK_LIST(GTK_COMBO(combo)->list), pos);*/
+	
+	if (cbstate) /* checkbutton pressed */
+		apply_clicked(NULL, NULL);
+
+	/* I guess we should free this... */
+	g_free (rc_file);
+}
+
+static void
+set_font (GtkWidget *w, GtkWidget *dialog)
+{
+	if (newfont) g_free (newfont);
+	newfont = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(dialog));
+	gtk_entry_set_text (GTK_ENTRY(font_entry), newfont);
+	gtk_widget_destroy (dialog);
+}
+
+static void
+font_browse_clicked (GtkWidget *w, gpointer data)
+{
+	GtkWidget *font_dialog;
+	font_dialog = gtk_font_selection_dialog_new ("Select Font");
+	gtk_font_selection_dialog_set_preview_text (GTK_FONT_SELECTION_DIALOG(font_dialog), "Gtk Theme Switch");
+/*	gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG(font_dialog), gtk_entry_get_text(GTK_ENTRY(font_entry)));*/
+	g_signal_connect (G_OBJECT(GTK_FONT_SELECTION_DIALOG(font_dialog)->ok_button), "clicked", G_CALLBACK(set_font), (gpointer)font_dialog);
+	g_signal_connect_swapped (G_OBJECT(GTK_FONT_SELECTION_DIALOG(font_dialog)->cancel_button), "clicked", G_CALLBACK(gtk_widget_destroy), (gpointer)font_dialog);
+
+	gtk_widget_show (font_dialog);
+}
+
+void quit()
+{
+	GSList *l;
+     	for (l = kids; l ; l=l->next) {
+	     kill(GPOINTER_TO_INT(l->data), 9);
+	}
+     	exit(0);
+}
+
+static void
+dock (void)
+{
+	GtkWidget *label, *button, *pixmap, *evbox;
+       	GtkTooltips *tips;
+     	
+	dockwin = gtk_dialog_new();
+     	gtk_widget_realize(dockwin);
+	gtk_window_set_title(GTK_WINDOW(dockwin),"Theme Dock");
+/*     	gtk_window_set_policy(GTK_WINDOW(dockwin), TRUE, TRUE, FALSE);*/
+     	gtk_window_set_resizable(GTK_WINDOW(dockwin), TRUE);
+	g_signal_connect(G_OBJECT(dockwin),"destroy",G_CALLBACK(quit),NULL);
+	box = gtk_hbox_new(FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dockwin)->vbox), box, FALSE, FALSE, 0);
+	tips = gtk_tooltips_new();
+	label = gtk_label_new("Theme: ");
+	gtk_box_pack_start(GTK_BOX(box),label,FALSE,FALSE,FALSE);
+
+	combo = gtk_combo_new();
+	glist = get_dirs();
+	gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist);
+	gtk_box_pack_start(GTK_BOX(box),combo,TRUE,TRUE,FALSE);
+     	
+     	pixmap = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
+
+     	evbox = gtk_event_box_new();
+
+     	gtk_tooltips_set_tip(tips,evbox,"click here for more options","private");
+     	gtk_widget_set_events(evbox, GDK_BUTTON_PRESS);
+     	g_signal_connect(G_OBJECT(evbox), "button_press_event", G_CALLBACK(on_eventbox_click), NULL);
+     
+     	gtk_container_add(GTK_CONTAINER(evbox), pixmap);
+     	gtk_box_pack_start(GTK_BOX(box),evbox,FALSE,FALSE,FALSE);
+	gtk_widget_show_all(box);
+     
+     	box = gtk_hbox_new(FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dockwin)->vbox), box, FALSE, FALSE, 0);
+
+	use_font_button = gtk_check_button_new_with_label("Use font: ");
+	gtk_box_pack_start(GTK_BOX(box), use_font_button, FALSE, FALSE, 0);
+	gtk_widget_show(use_font_button);
+     
+	font_entry = gtk_entry_new();
+	gtk_box_pack_start(GTK_BOX(box), font_entry, TRUE, TRUE, 0);
+	gtk_widget_show(font_entry);
+	if (newfont)
+	{
+		gtk_entry_set_text (GTK_ENTRY(font_entry), newfont);
+		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(use_font_button), TRUE);
+		g_free (newfont);
+	}
+	else
+	{
+/*		GtkStyle *style = gtk_rc_get_style (font_entry);
+		if (style && style->rc_style)
+	       		gtk_entry_set_text (GTK_ENTRY(font_entry), pango_font_description_to_string(style->rc_style->font_desc));*/
+	}
+	
+	newfont = g_strdup(gtk_entry_get_text(GTK_ENTRY(font_entry)));
+
+	if (newfont != 0 && newfont[0])
+	{
+		/* Very dirty hack...
+		   We want to only set the checkbutton to TRUE if the user specified
+		   the font. If the name occurs in their ~/.gtkrc file, they probably did.
+		   If it isn't, they probably didn't. So, "grep" the file for the font string. */
+		if (fgrep_gtkrc_for(newfont))
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(use_font_button), TRUE);
+	}
+
+	browse = gtk_button_new_with_label("Browse...");
+	g_signal_connect(G_OBJECT(browse), "clicked", G_CALLBACK(font_browse_clicked), NULL);
+	gtk_box_pack_start(GTK_BOX(box), browse, FALSE, FALSE, 0);
+	
+	button = gtk_button_new_with_label("\nApply");
+	g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(apply_clicked),NULL);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG (dockwin)->action_area),button,TRUE,TRUE,FALSE);
+	gtk_widget_set_size_request(button, 81, 37);
+	gtk_widget_show(button);
+     
+	button = gtk_button_new_with_label("Preview");
+	gtk_widget_set_name(button,"dailer_button");
+	g_signal_connect(GTK_OBJECT(button),"clicked",G_CALLBACK(preview_clicked),NULL);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG (dockwin)->action_area),button,TRUE,TRUE,FALSE);
+	gtk_widget_show(button);
+     
+	install_button = gtk_button_new_with_label("Install New Theme");
+	g_signal_connect(G_OBJECT(install_button), "clicked", G_CALLBACK(install_clicked), NULL);
+	gtk_box_pack_start(GTK_BOX(GTK_DIALOG (dockwin)->action_area),install_button,TRUE,TRUE,FALSE);
+
+	gtk_widget_show(dockwin);
+
+}
+
+void on_eventbox_click()
+{
+     	if (hidden) {
+	     	show_stuff();
+	} else {
+	     	hide_stuff();
+	}
+}
+
+void hide_stuff()
+{
+     	gtk_widget_hide(box);
+     	gtk_widget_hide(install_button);
+     	gtk_widget_hide(browse);
+	hidden = 1;
+}
+
+void show_stuff()
+{
+     	gtk_widget_show(box);
+     	gtk_widget_show(install_button);
+     	gtk_widget_show(browse);
+     	hidden = 0;
+}
+
+	
+static GtkTreeModel *
+create_model (void)
+{
+
+  GtkListStore *store;
+  GtkTreeIter iter;
+  gint i;
+  gchar *stuff[6][2] = { { "blah1", "blah2" },
+	 		{ "blah3", "blah4" },
+	 		{ "blah5", "blah6" },
+	 		{ "blah7", "blah7" },
+	 		{ "blah9", "blah9" },
+	 		{ "blah11", "blah11" } };
+
+  /* create list store */
+  store = gtk_list_store_new (2,
+			      G_TYPE_STRING,
+			      G_TYPE_STRING);
+
+  /* add data to the list store */
+  for (i = 0; i < 6; i++)
+    {
+      gtk_list_store_append (store, &iter);
+      gtk_list_store_set (store, &iter,
+			  0, stuff[i][0],
+			  1, stuff[i][1],
+				-1);
+    }
+
+  return GTK_TREE_MODEL (store);
+}
+
+
+static void
+preview (gchar *rc_file)
+{
+	FILE *pipe;
+     	gint got_it = 0, it_died = 0;
+     	gchar *line;
+     	gchar *path = g_strdup_printf ("%s/.gtkrc.tmp-%i", homedir, preview_counter);
+	gchar *command = g_strdup_printf ("%s -_dont-use-this %s &", execname, path);
+	write_rc_file (rc_file, path);
+	
+	pipe = popen(command,"r");
+     	
+     	if (pipe == NULL) {
+	     	g_print("gts: error previewing\n");
+	     	return;
+	}
+
+     	fcntl(fileno(pipe), F_SETFL, O_NONBLOCK);
+     	
+     	line = (gchar *)g_malloc(1024);     
+     	while(!feof(pipe)) {
+      		fgets(line,1024,pipe);
+	     	line[strlen(line)-1] = '\0';	       
+       	     	if (!got_it && !g_strncasecmp(line,"pid=",4)) {
+		     	kids = g_slist_append(kids,GINT_TO_POINTER(atoi(line+4)));
+		     	got_it = 1;
+		} else if (!it_died && !g_strncasecmp(line,"die=",4)) {
+		     	kids = g_slist_remove(kids,GINT_TO_POINTER(atoi(line+4)));
+		     	it_died = 1;
+		     	break;
+		}
+	     
+		while (gtk_events_pending())
+	     		gtk_main_iteration();
+		usleep(50000);
+	}
+            
+     	pclose(pipe);
+	g_free (line);
+	g_free (path);
+	g_free (command);
+	++preview_counter;
+}
+
+static void
+preview_window (gchar *rc_file)
+{
+
+	GtkWidget *label;
+	GtkWidget *win;
+	GtkWidget *button;
+	GtkWidget *toggle_button;
+	GtkWidget *check_button;
+	GtkWidget *sw;
+	GtkWidget *clist;
+	GtkWidget *vbox;
+	GtkWidget *hbox;
+	GtkWidget *radio;
+	GtkWidget *radio2;
+	GtkWidget *radio3;
+	GtkWidget *ok;
+	GtkWidget *cancel;
+	GtkWidget *hbox2;
+	GtkWidget *notebook;
+	GtkWidget *text;
+     	GtkTreeModel *model;
+/*	GtkWidget *popup;
+	GtkWidget *item;*/
+     	GtkTextBuffer *buff;
+	gint argc=1;
+	gchar **argv = &execname;
+	gchar *default_files[] = { rc_file, NULL};
+	gchar *bb  = "Type some text here\nto check if your\ntheme has a problem\nwith the text widget.\nAlso right-click here\nfor a popup-menu sample.\n";
+	GSList *group;
+
+	gtk_rc_set_default_files (default_files);
+	gtk_init (&argc, &argv);
+	
+	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_title(GTK_WINDOW(win), "Gtk Theme Switch theme preview");
+/*	gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, FALSE);*/
+	g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(quit_preview), NULL);
+	
+	vbox = gtk_vbox_new(FALSE,0);
+	notebook = gtk_notebook_new();
+	gtk_container_add (GTK_CONTAINER(win), notebook);
+	label = gtk_label_new("Page 1");
+	gtk_notebook_append_page (GTK_NOTEBOOK(notebook), vbox, label);
+	label = gtk_label_new("Label");
+	button = gtk_button_new_with_label("Button");
+	toggle_button = gtk_toggle_button_new_with_label("Toggle Button");
+	check_button = gtk_check_button_new_with_label("Check Button");
+	hbox = gtk_hbox_new(FALSE,0);
+	radio = gtk_radio_button_new_with_label(NULL,"Radio 1");
+	group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio));
+	radio2 = gtk_radio_button_new_with_label(group,"Radio 2");
+	group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio2));
+	radio3 = gtk_radio_button_new_with_label(group,"Radio 3");
+	gtk_box_pack_start((GtkBox*)hbox,radio,FALSE,FALSE,FALSE);
+	gtk_box_pack_start((GtkBox*)hbox,radio2,FALSE,FALSE,FALSE);
+	gtk_box_pack_start((GtkBox*)hbox,radio3,FALSE,FALSE,FALSE);
+	sw = gtk_scrolled_window_new(NULL,NULL);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
+     	model = create_model();
+	clist = gtk_tree_view_new_with_model(model);
+     	gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (clist), TRUE);
+     	gtk_tree_view_set_search_column (GTK_TREE_VIEW (clist),0);     
+     	g_object_unref (G_OBJECT (model));     
+
+	ok = gtk_button_new_with_label("Ok");
+	g_signal_connect_swapped(G_OBJECT(ok),"clicked",G_CALLBACK(preview_ok_clicked), (gpointer) rc_file);
+	cancel = gtk_button_new_with_label("Cancel");
+	g_signal_connect_swapped(G_OBJECT(cancel),"clicked",G_CALLBACK(quit_preview),NULL);
+	hbox2 = gtk_hbox_new(FALSE,0);
+	gtk_box_pack_start((GtkBox*)hbox2,ok,TRUE,TRUE,FALSE);
+	gtk_box_pack_start((GtkBox*)hbox2,cancel,TRUE,TRUE,FALSE);
+	gtk_container_add(GTK_CONTAINER(sw),clist);
+	gtk_box_pack_start((GtkBox*)vbox,label,FALSE,FALSE,FALSE);
+	gtk_box_pack_start((GtkBox*)vbox,button,FALSE,FALSE,FALSE);
+	gtk_box_pack_start((GtkBox*)vbox,toggle_button,FALSE,FALSE,FALSE);
+	gtk_box_pack_start((GtkBox*)vbox,check_button,FALSE,FALSE,FALSE);
+	gtk_box_pack_start((GtkBox*)vbox,hbox,FALSE,FALSE,FALSE);
+	gtk_box_pack_start((GtkBox*)vbox,sw,TRUE,TRUE,FALSE);
+	gtk_box_pack_start((GtkBox*)vbox,hbox2,FALSE,FALSE,FALSE);
+
+	vbox = gtk_vbox_new (FALSE, 0);
+	label = gtk_label_new ("Page 2");
+	gtk_notebook_append_page (GTK_NOTEBOOK(notebook), vbox, label);
+	label = gtk_label_new ("Insensitive Label");
+	gtk_widget_set_sensitive (label, 0);
+	gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
+	button = gtk_button_new_with_label ("Insensitive Button");
+	gtk_widget_set_sensitive (button, 0);
+	gtk_box_pack_start (GTK_BOX(vbox), button, FALSE, FALSE, 0);
+	sw = gtk_scrolled_window_new (NULL, NULL);
+	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+     	buff = gtk_text_buffer_new(NULL);
+     	gtk_text_buffer_set_text(buff,bb, strlen(bb));
+	text = gtk_text_view_new();
+     	gtk_text_view_set_buffer(GTK_TEXT_VIEW(text), buff);
+				 
+	gtk_container_add (GTK_CONTAINER(sw), text);
+/*
+	popup = gtk_menu_new ();
+	gtk_widget_show (popup);
+	item = gtk_menu_item_new_with_label ("Menu Entry 1");
+	gtk_widget_show (item);
+	gtk_menu_append(GTK_MENU(popup), item);
+	item = gtk_menu_item_new_with_label ("Menu Entry 2");
+	gtk_widget_show (item);
+	gtk_menu_append(GTK_MENU(popup), item);
+	item = gtk_menu_item_new_with_label ("Menu Entry 3");
+	gtk_widget_show (item);
+	gtk_menu_append(GTK_MENU(popup), item);
+	gtk_signal_connect(GTK_OBJECT(text), "button_press_event", GTK_SIGNAL_FUNC(rightclick), popup);
+ */
+	gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0);
+
+	label = gtk_label_new ("About");
+	vbox = gtk_vbox_new (FALSE, 0);
+	gtk_notebook_append_page (GTK_NOTEBOOK(notebook), vbox, label);
+	label = gtk_label_new ("Gtk Theme Switch\nby Maher Awamy <muhri@muhri.net>\nand Aaron Lehmann <aaronl@vitelus.com>\nhttp://www.muhri.net/nav.php3?node=gts");
+	gtk_box_pack_start (GTK_BOX(vbox), label, TRUE, TRUE, 0);
+
+     	clist_insert(GTK_TREE_VIEW(clist));
+
+	gtk_widget_show_all(win);
+
+
+	g_print("pid=%d\n",getpid());
+
+	gtk_main ();
+
+	unlink (rc_file);
+	
+	_exit (1); /* no change */ 
+}
+
+void quit_preview()
+{
+	g_print("die=%d\n",getpid());
+     	gtk_main_quit();
+}
+
+static void
+send_refresh_signal(void)
+{
+	GdkEventClient event;
+    	event.type = GDK_CLIENT_EVENT;
+	event.send_event = TRUE;
+	event.window = NULL;
+	event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
+	event.data_format = 8;
+	gdk_event_send_clientmessage_toall((GdkEvent *)&event);
+}
+
+/* Sets rc_file to the rc_file of the theme if the result is true.
+ * It is the caller's repsonsibility to free rc_file */
+static short is_themedir (gchar *path, gchar **rc_file)
+{
+	gchar *test_rc_file;
+	struct stat info;
+	test_rc_file = g_strdup_printf ("%s/gtk-2.0/gtkrc",path);
+	if (stat(test_rc_file, &info) == 0 && (S_ISREG(info.st_mode) || S_ISLNK(info.st_mode)))
+	{
+		/* $path/gtk/gtkrc exists, and is a regular file */
+		*rc_file = test_rc_file;
+		return 1;
+	}
+	else
+	{
+		g_free (test_rc_file);
+		return 0;
+	}
+}
+
+static short install_tarball (gchar *path, gchar **rc_file)
+{
+	gchar *command, *themedir;
+	gint result;
+	GList *new_list, *new_theme;
+
+	themedir = g_strdup_printf ("%s/.themes", homedir);
+
+	if (path[0] != '/')
+	{
+		gchar *cwd = g_get_current_dir();
+		command = g_strdup_printf ("tar --directory %s -xzf %s/%s 2>/dev/null", themedir, cwd, path);
+		g_free (cwd);
+	}
+	else
+		command = g_strdup_printf ("tar --directory %s -xzf %s 2>/dev/null", themedir, path);
+
+	/* Ensure that ~/.themes exists */
+	mkdir (themedir, S_IRUSR | S_IWUSR | S_IXUSR);
+
+	result = system(command);
+	g_free (command);
+	g_free (themedir);
+	if (result != EXIT_SUCCESS)
+		return 0;
+	/* We don't do that anymore. Now we find the first new directory
+	 * in either themedir, and presume that to be the name of the new theme.
+	 * NOT FOOLPROOF, but good as long as you don't mess with stuff while the
+	 * program is running. At least better than deriving the theme name from
+	 * the tarball name. Ugh. */
+	
+	new_list = get_dirs();
+	new_theme = compare_glists(glist, new_list, (GCompareFunc)strcmp);
+	if (new_theme)
+	{
+		result = is_installed_theme(new_theme->data, rc_file);
+		g_list_foreach (glist, (GFunc)g_free, NULL);
+		g_list_free (glist);
+		glist = new_list;
+		/* Update combo, but only in dock mode */
+		if (combo)	gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist);
+	}
+	else
+	{
+		gchar *interestingpath, basename[1024];
+		g_list_foreach (new_list, (GFunc)g_free, NULL);
+		g_list_free (new_list);
+		/* fall back to our old hack if no new dir was created, say if the theme
+		 * was already installed... */
+	
+		/* Set rc_file to our best darn guess of the resultant gtk theme
+		 * dir/gtk/gtkrc. This is very tricky. The hack that is used to is
+		 * to return the segment in path between the last slash and the
+		 * first dot or dash after that. */
+		interestingpath = &path[strlen(path)-1];
+		while (interestingpath != path && *(interestingpath-1) != '/') interestingpath--;
+		strcpy (basename, interestingpath);
+		for (interestingpath = &basename[0]; *interestingpath != '\0'; ++interestingpath)
+		{
+			if (*interestingpath == '-' || *interestingpath == '.')
+			{
+				*interestingpath = '\0';
+				break;
+			}
+		}
+		result = is_installed_theme(basename, rc_file);
+	}
+	
+	return result;
+}
+
+static short
+is_installed_theme (gchar *path, gchar **rc_file)
+{
+	gchar *gtk_rc_theme_dir = gtk_rc_get_theme_dir();
+	/* don't strlen things twice when computing the size to use for fullpath */
+	gint path_len = strlen(path), homedir_len = strlen(homedir);
+	/* ditto with get_theme_dir */
+	gint gtk_rc_theme_dir_len = strlen(gtk_rc_theme_dir);
+	gchar *fullpath = (gchar *) g_malloc (MAX(homedir_len+path_len+10,
+										  gtk_rc_theme_dir_len+path_len+1));
+	short result;
+
+	/* use memcpy since we already have the lengths */
+	memcpy (fullpath, homedir, homedir_len);
+	memcpy (fullpath+homedir_len, "/.themes/", 9);
+	/* add 1 to length so we get the null char too */
+	memcpy (fullpath+homedir_len+9, path, path_len+1);
+
+	if (is_themedir(fullpath, rc_file))
+	{
+		g_free(fullpath);
+		return 1;
+	}
+	memcpy (fullpath, gtk_rc_theme_dir, gtk_rc_theme_dir_len);
+	/* add 1 to length so we get the null char too */
+	memcpy (fullpath+gtk_rc_theme_dir_len, path, path_len+1);
+	
+	result = is_themedir(fullpath, rc_file);
+
+	g_free(fullpath);
+
+	return result;
+}
+
+static void
+search_for_theme_or_die_trying (gchar *actual, gchar **rc_file)
+{
+	if (!is_themedir(actual, rc_file) &&
+		!install_tarball(actual, rc_file) &&
+		!is_installed_theme(actual, rc_file))
+	{
+		fprintf (stderr, "\
+%s: Sorry, \"%s\" does not appear to be a valid theme directory or tarball!\n", execname, actual);
+		exit (EXIT_FAILURE);
+	}
+}
+
+static gint
+switcheroo (gchar *actual)
+{
+	gchar *rc_file;
+	search_for_theme_or_die_trying (actual, &rc_file);
+	/* If we get here, we actually found the theme */
+	ok_clicked(rc_file);
+	g_free (rc_file);
+	return EXIT_SUCCESS;
+}
+
+
+
+int main (int argc, char *argv[])
+{
+	gchar *rc_file;
+	gchar *actual;
+	gint i;
+	gint result = EXIT_SUCCESS;
+     	GSList *l=NULL;
+	short using_gtk = 0;
+
+	newfont = 0;
+	execname = argv[0];
+	homedir = getenv("HOME");
+	hash = g_hash_table_new (g_str_hash, g_str_equal);
+
+	if (argc == 1) /* start in dock mode auto if no args */
+	{
+		INIT_GTK
+		dock();
+	}
+
+	else if (strcmp(argv[1], "-_dont-use-this") == 0)
+	{
+		preview_window (argv[2]); /* GARGARGAR */
+	}				  /* hehe, aaronl is crazy */
+	
+	for (i=1; i != argc; ++i)
+	{
+		if (argv[i][0] == '-')
+		{
+			/* Single-arg commands/options */
+			if (argv[i][1] == 'd')
+			{
+				INIT_GTK
+				dock();
+				continue;
+			}
+			
+			/* Double-arg commands/options */
+			if (i+1 != argc)
+			{
+				if (argv[i][1] == 'p')
+				{
+					glist = get_dirs ();
+					actual = argv[++i];
+					if (!is_themedir(actual, &rc_file) && !install_tarball(actual, &rc_file) && !is_installed_theme(actual, &rc_file))
+					{
+						fprintf (stderr, "\
+%s: Sorry, \"%s\" does not appear to be a valid theme directory or tarball!\n", execname, actual);
+						result = EXIT_FAILURE;
+					}
+					else
+					{
+						preview (rc_file);
+						g_free (rc_file);
+					}
+					continue;
+				}
+
+				if (argv[i][1] == 'i')
+				{
+					actual = argv[++i];
+					if (!install_tarball(actual, &rc_file))
+					{
+						fprintf (stderr, "\
+%s: Sorry, \"%s\" does not appear to be a valid theme tarball!\n", execname, actual);
+					}
+					result = EXIT_FAILURE;
+					continue;
+				}
+
+				if (argv[i][1] == 'f')
+				{
+					newfont = g_strdup (argv[++i]);
+					continue;
+				}
+			}
+
+			/* if this starts with a minus, it's either an unrecognized command
+			 * or -help. Perfect */
+			usage();
+			result = EXIT_FAILURE;
+			continue;
+		}
+		/* got here... fallback and assume it's a theme */
+		glist = get_dirs ();
+		gtk_init (&argc, &argv);
+		result |= switcheroo(argv[i]);
+	}
+
+	if (using_gtk) {
+		gtk_main();
+		for (l=kids;l;l=l->next) {
+		     kill(GPOINTER_TO_INT(l->data), 9);
+			
+		}
+	}
+     
+     	return result;
+}
+
+void clist_insert(GtkTreeView *clist)
+{
+     GtkCellRenderer *renderer;
+     GtkTreeViewColumn *column;
+
+
+     renderer = gtk_cell_renderer_text_new();
+     column = gtk_tree_view_column_new_with_attributes("Column 1",
+						       renderer,
+						       "text",
+						       0,
+						       NULL);
+
+
+     gtk_tree_view_column_set_sort_column_id(column, 0);
+     gtk_tree_view_append_column(clist, column);
+
+     
+     renderer = gtk_cell_renderer_text_new();
+
+     column = gtk_tree_view_column_new_with_attributes("Column2",
+						       renderer,
+						       "text",
+							1,
+						       NULL);
+
+     gtk_tree_view_column_set_sort_column_id(column, 1);
+     gtk_tree_view_append_column(clist, column);
+
+     return;
+}
Index: /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/make.sh
===================================================================
--- /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/make.sh	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/make.sh	(revision 1018)
@@ -0,0 +1,1 @@
+gcc -DSWITCH_GTK2 -o switch2 switch2.c -g -O2 -Wall `pkg-config gtk+-2.0 --cflags` `pkg-config gtk+-2.0 --libs`
Index: /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/switch.h
===================================================================
--- /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/switch.h	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/gtk-theme-switch/switch.h	(revision 1018)
@@ -0,0 +1,49 @@
+#include <gtk/gtk.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <signal.h>
+
+static GList *get_dirs(void);
+static void preview_clicked(GtkWidget *button, gpointer data);
+static void update_newfont (void);
+static void apply_clicked(GtkWidget *button, gpointer data);
+static void usage(void);
+static void backup_gtkrc(gchar *path_to_gtkrc);
+static void ok_clicked(gchar *rc);
+static void preview_ok_clicked(gchar *rc);
+#ifdef SWITCH_GTK2
+static GtkTreeModel *create_model (void);
+void clist_insert (GtkTreeView *clist);
+#endif
+static void dock(void);
+#ifndef SWITCH_GTK2
+static int rightclick (GtkWidget *w, GdkEventButton *event, gpointer data);
+static void clist_insert(GtkWidget *clist);
+#endif
+static void preview(gchar *rc_file);
+static void preview_window(gchar *rc_file);
+static void send_refresh_signal(void);
+static short is_themedir (gchar *path, gchar **rc_file);
+static short is_installed_theme (gchar *path, gchar **rc_file);
+static short install_tarball (gchar *path, gchar **rc_file);
+static int switcheroo (gchar *actual);
+static void install_clicked (GtkWidget *w, gpointer data);
+static void install_ok_clicked (GtkWidget *w, gpointer data);
+static void search_for_theme_or_die_trying (gchar *actual, gchar **rc_file);
+static void set_font (GtkWidget *w, GtkWidget *dialog);
+static void font_browse_clicked (GtkWidget *w, gpointer data);
+static short fgrep_gtkrc_for (gchar *needle);
+static GList *compare_glists (GList *t1, GList *t2, GCompareFunc cmpfunc);
+void quit_preview();
+void quit();
+void hide_stuff();
+void show_stuff();
+void on_eventbox_click();
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokobutton
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokobutton	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokobutton	(revision 1018)
@@ -0,0 +1,528 @@
+
+# Normal button for stylus application
+style "button"
+{
+
+  fg[NORMAL]        = "#ffffff"
+  fg[ACTIVE]        = "#ffffff"
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_toolbar_action.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_toolbar_action.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_toolbar_action_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+   
+   MokoPixmapButton::size-request = { 0, 82, 0, 38 }
+   GtkButton::focus-line-width = 0
+   
+}
+
+
+
+# Dialer number button
+style "btn_dial_pad"
+{
+  
+  #fg[NORMAL]        = "#eee08a"
+  #fg[NORMAL]        = "#000000"
+  #fg[ACTIVE]        = "#000000"
+
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        shadow          = OUT
+        file            = "btn_dial_pad.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        shadow          = OUT
+        file            = "btn_dial_pad.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        shadow          = IN
+        file            = "btn_dial_pad_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+   }
+}
+
+
+# Left menu button for stylus application
+style "btn_menu_left"
+{
+
+  fg[NORMAL]        = "#ffffff" # 
+  fg[ACTIVE]        = "#ffffff" # 
+
+  #text[NORMAL]      = "#000000" # 
+  #text[PRELIGHT]    = "#ffffff" # 
+  #text[ACTIVE]      = "#ffffff" # 
+  #text[SELECTED]    = "#ffffff" # 
+  #text[INSENSITIVE] = "#696969" # 
+  
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        file            = "btn_menu_left.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+
+# Filter menu button for stylus application
+style "btn_filter_menu"
+{
+
+  fg[NORMAL]        = "#ffffff" # 
+  fg[ACTIVE]        = "#ffffff" # 
+
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_filter_menu.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_filter_menu.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_filter_menu_p.png"
+        stretch         = TRUE
+      }
+   }
+}
+
+
+
+# Dialer phone button
+style "btn_dial_call"
+{
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_dial_call.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_dial_call.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_dial_call_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+# Dialer history/delete button
+style "btn_dial_his_del"
+{
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_type01.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_type01.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_type01_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+# Popup dialer button
+style "btn_type02"
+{
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_type02.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_type02.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_type02_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+# Dialog circle button
+style "btn_type03"
+{
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_type03.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_type03.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_type03_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = INSENSITIVE
+        file            = "btn_type03_disable.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+
+# Dialog next button
+style "btn_dialog_next"
+{
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_dialog_next.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_dialog_next.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_dialog_next_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+# Dialog preview button
+style "btn_dialog_prev"
+{
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_dialog_prev.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_dialog_prev.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_dialog_prev_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+
+
+# Dialer wheel button
+style "btn_wheel"
+{
+
+  engine "pixmap"
+    {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_wheel.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_wheel.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_wheel_p.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+
+   }
+}
+
+style "btn_bar_separate"
+{
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_bar_separate.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_bar_separate.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_bar_separate_p.png"
+        stretch         = TRUE
+      }
+   }
+}
+
+
+
+class "GtkButton" style "button"
+widget "*mokotoolbox-action-button" style "button"
+
+widget "*.btn_dial_pad"             style "btn_dial_pad"
+widget "*.btn_dial_pad.*"           style "label_btn_dial_pad"
+
+widget "*.btn_menu_left"            style "btn_menu_left"
+widget "*.btn_filter_menu"          style "btn_filter_menu"
+
+
+widget "*.btn_dial_call"            style "btn_dial_call"
+widget "*.btn_dial_call.*"          style "label_hoariness"
+
+widget "*.btn_dial_his_del"         style "btn_dial_his_del"
+widget "*.btn_dial_his_del.*"       style "label_hoariness"
+
+widget "*.btn_type03"               style "btn_type03"
+widget "*.btn_type03.*"             style "label_white"
+
+widget "*.btn_type02"               style "btn_type02"
+widget "*.btn_type02.*"             style "label_white"
+
+
+widget "*.btn_dialog_prev"          style "btn_dialog_prev"
+widget "*.btn_dialog_next"          style "btn_dialog_next"
+
+
+widget "*.btn_wheel"                style "btn_wheel"
+widget "*btn_bar_separate"          style "btn_bar_separate"
+
+
+
+
+style "togglebutton"
+{
+   engine "pixmap" {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        shadow          = IN
+        file            = "btn_toggle.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        shadow          = OUT
+        file            = "btn_toggle.png"
+        border          = { 9,9,9,9 }
+        stretch         = TRUE
+      }
+  }
+}
+
+class "GtkToggleButton" style "togglebutton"
+
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokotoolbox
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokotoolbox	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokotoolbox	(revision 1018)
@@ -0,0 +1,127 @@
+
+style "bg_normal_toolbar" {
+  bg_pixmap[NORMAL] = "bg_normal_toolbar.png"
+  MokoFixed::size-request = { 0, 480, 0, 52 }
+  MokoFixed::cargo-border = { 80, 480, 0, 52 }
+}
+widget "*bg_normal_toolbar" style "bg_normal_toolbar"
+widget "*mokotoolbox-normal-mode" style "bg_normal_toolbar"
+
+
+style "bg_search_toolbar" {
+  bg_pixmap[NORMAL] = "bg_search_toolbar.png"
+  MokoFixed::size-request = { 0, 480, 0, 52 }
+  MokoFixed::cargo-border = { 36, 340, 17, 40 }
+}
+widget "*bg_search_toolbar" style "bg_search_toolbar"
+widget "*.mokotoolbox-search-mode" style "bg_search_toolbar"
+
+
+style "bg_search_toolbar_focusout" {
+  bg_pixmap[NORMAL] = "bg_search_toolbar_focusout.png"
+  MokoFixed::size-request = { 0, 480, 0, 52 }
+  MokoFixed::cargo-border = { 36, 340, 17, 40 }
+    
+}
+widget "*bg_search_toolbar_focusout" style "bg_search_toolbar_focusout"
+widget "*mokotoolbox-search-mode-focusout" style "bg_search_toolbar_focusout"
+
+
+
+
+style "btn_toolbar_search"
+{
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_toolbar_search.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_toolbar_search.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_toolbar_search_p.png"
+        stretch         = TRUE
+      }
+   }
+   
+   MokoPixmapButton::size-request = { 0, 68, 0, 52 }
+}
+
+style "btn_toolbar_search_on"
+{
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "btn_toolbar_search_on.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "btn_toolbar_search_on.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "btn_toolbar_search_on_p.png"
+        stretch         = TRUE
+      }
+   }
+   MokoPixmapButton::size-request = { 0, 80, 0, 52 }
+}
+
+widget "*btn_toolbar_search"        style "btn_toolbar_search"
+widget "*btn_toolbar_search_on"     style "btn_toolbar_search_on"
+widget "*mokotoolbox-search-button" style "btn_toolbar_search"
+widget "*mokotoolbox-back-button"   style "btn_toolbar_search_on"
+
+
+
+# Search toolbox entry
+style "entry_search_toolbar"
+{
+  base[NORMAL] = "#ffeddb"
+}
+
+# Search toolbox entry focus out
+style "entry_search_toolbar_focusout"
+{
+  base[NORMAL] = "#fdfdfd"
+}
+widget "*entry_search_toolbar"          style "entry_search_toolbar"
+widget "*entry_search_toolbar*"         style "label_search_toolbar"
+widget "*entry_search_toolbar_focusout" style "entry_search_toolbar_focusout"
+
+widget "*mokotoolbox-search-entry"           style "entry_search_toolbar"
+widget "*mokotoolbox-search-entry*"          style "label_search_toolbar"
+widget "*mokotoolbox-search-entry-focusout"  style "entry_search_toolbar_focusout"
+
+
+
+
+
+
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokolist
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokolist	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokolist	(revision 1018)
@@ -0,0 +1,123 @@
+
+
+# call history list item style
+style "call_history_item"
+{
+  GtkTreeView::allow-rules = 1
+  GtkTreeView::expander_size = 47
+  
+  text[NORMAL]      = "#ffffff"
+  text[SELECTED]    = "#ffffff"
+  
+  base[NORMAL]  = "#666666"
+  
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        state           = SELECTED
+        file            = "highlight_bar_type01.png"
+        border          = { 0, 0, 0, 0 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+#        state           = NORMAL
+        file            = "bg_list_type01.png"
+        border          = { 0, 0, 0, 0 }
+        stretch         = TRUE
+      }
+      
+      
+  }
+}
+
+style "treeview_navigation_list"
+{
+
+  GtkTreeView::allow_rules = 1
+  GtkTreeView::vertical_separator = 6
+  GtkTreeView::even_row_color = "#f2f2f2"
+  GtkTreeView::odd_row_color = "#f8f8f8"
+  GtkTreeView::expander_size = 30
+
+  
+  text[NORMAL]      = "#999999"
+  text[SELECTED]    = "#ffffff"
+  text[ACTIVE]      = "#ffffff"
+  text[INSENSITIVE] = "#ffffff"
+  text[PRELIGHT]    = "#ffffff"
+  
+  font_name = "Sans 13"
+  
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        state           = SELECTED
+        file            = "highlight_bar_type02.png"
+        border          = { 10, 5, 5, 10 }
+        stretch         = TRUE
+      }
+#    image
+#      {
+#        function        = FLAT_BOX
+#        recolorable     = TRUE
+#        state           = NORMAL
+#        file            = "bg_list_type01.png"
+#        border          = { 10, 5, 5, 10 }
+#        stretch         = TRUE
+#      }
+
+      
+  }
+}
+
+widget "*.call_history_item" style "call_history_item"
+widget "*.treeview_navigation_list" style "treeview_navigation_list"
+
+style "btn_navigation_list"
+{
+#  bg[NORMAL] = "#e7e7e7"
+
+  engine "pixmap"
+    {
+      image
+        {
+          function        = BOX
+          recolorable     = TRUE
+          file            = "btn_navigation_list.png"
+          stretch         = TRUE
+        }
+
+   }
+
+}
+
+
+widget "*.treeview_navigation_list.*.GtkLabel" style "label_navigation_list_head"
+#widget "*.treeview_navigation_list.GtkButton" style "btn_navigation_list"
+widget "*btn_navigation_list" style "btn_navigation_list"
+
+
+style "navigation_list_head_separate"
+{
+
+  engine "pixmap"
+    {
+    image
+      {
+        function        = VLINE
+        recolorable     = TRUE
+        file            = "navigation_list_head_separate.png"
+        stretch         = FALSE
+      }
+
+   }
+
+}
+widget "*navigation_list_head_separate" style "navigation_list_head_separate"
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/apprc
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/apprc	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/apprc	(revision 1018)
@@ -0,0 +1,153 @@
+
+
+style "eventbox_dial" {
+  bg[NORMAL]      = "#443d35"
+  bg[INSENSITIVE] = "#443d35"
+  bg[PRELIGHT]    = "#443d35"
+  bg[SELECTED]    = "#443d35"
+  bg[ACTIVE]      = "#443d35"
+}
+
+widget "*.eventbox_dial" style "eventbox_dial"
+
+
+style "checkradiobutton" {
+
+  engine "pixmap" {
+    image
+      {
+        function        = CHECK
+        state           = NORMAL
+        recolorable     = TRUE
+        shadow          = OUT
+        overlay_file    = "checkbox_off.png"
+        overlay_stretch = TRUE
+      }
+
+    image
+      {
+        function        = CHECK
+        state           = PRELIGHT
+        recolorable     = TRUE
+        shadow          = OUT
+        overlay_file    = "checkbox_off.png"
+        overlay_stretch = TRUE
+      }
+
+    image
+     {
+        function        = CHECK
+        state           = ACTIVE
+        recolorable     = TRUE
+        shadow          = OUT
+        overlay_file    = "checkbox_off.png"
+        overlay_stretch = TRUE
+     }
+
+    image
+      {
+        function        = CHECK
+        state           = INSENSITIVE
+        recolorable     = TRUE
+        shadow          = OUT
+        overlay_file    = "checkbox_off_disable.png"
+        overlay_stretch = TRUE
+      }
+
+      
+    image
+      {
+        function        = CHECK
+        state           = NORMAL
+        recolorable     = TRUE
+        shadow          = IN
+        overlay_file    = "checkbox_on.png"
+        overlay_stretch = TRUE
+      }
+    image
+      {
+        function        = CHECK
+        state           = PRELIGHT
+        recolorable     = TRUE
+        shadow          = IN
+        overlay_file    = "checkbox_on.png"
+        overlay_stretch = TRUE
+      }
+    image
+     {
+        function        = CHECK
+        state           = ACTIVE
+        recolorable     = TRUE
+        shadow          = IN
+        overlay_file    = "checkbox_on.png"
+        overlay_stretch = TRUE
+     }
+      
+    image
+      {
+        function        = CHECK
+        state           = INSENSITIVE
+        recolorable     = TRUE
+        shadow          = IN
+        overlay_file    = "checkbox_on_disable.png"
+        overlay_stretch = TRUE
+      }
+
+
+
+  
+#    image
+#      {
+#        function        = OPTION
+#        recolorable     = TRUE
+#        shadow          = OUT
+#        overlay_file    = "option1.png"
+#        overlay_border  = { 0, 0, 0, 0 }
+#        overlay_stretch = FALSE
+#      }
+#    image
+#      {
+#        function        = OPTION
+#        recolorable     = TRUE
+#        shadow          = IN
+#        overlay_file    = "option2.png"
+#        overlay_border  = { 0, 0, 0, 0 }
+#        overlay_stretch = FALSE
+#      }      
+
+# check/radio button flat box
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        file            = "button5.png"
+        border          = { 10,5,5,10 }
+        stretch         = TRUE
+      }
+
+      
+  }
+}
+
+#class "GtkRadioButton" style "checkradiobutton"
+class "GtkCheckButton" style "checkradiobutton"
+
+
+
+# Dialer application textview background
+style "textview_dial"
+{
+  base[NORMAL] = "#000000"
+}
+widget "*.textview_dial" style "textview_dial"
+
+# Stylus application detail area textview background
+style "textview_detail_area"
+{
+  base[NORMAL] = "#e5e5e5"
+  text[NORMAL] = "#000000"
+
+}
+widget "*.textview_detail_area" style "textview_detail_area"
+
+
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/gtkrc.bak
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/gtkrc.bak	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/gtkrc.bak	(revision 1018)
@@ -0,0 +1,944 @@
+style "default"
+{
+  fg[NORMAL]      = { 0.00, 0.00, 0.00 }
+  fg[PRELIGHT]    = { 0.00, 0.00, 0.00 }
+  fg[ACTIVE]      = { 0.00, 0.00, 0.00 }
+  fg[SELECTED]    = { 0.00, 0.00, 0.00 }
+  fg[INSENSITIVE] = { 0.70, 0.70, 0.70 }
+  bg[NORMAL]      = "#e7e7e7"
+  bg[PRELIGHT]    = "#e7e7e7"
+  bg[ACTIVE]      = "#e7e7e7"
+  bg[INSENSITIVE] = "#e7e7e7"
+  bg[SELECTED]    = "#c7c7c7"
+  bg_pixmap[NORMAL]    = "background.png"
+  base[NORMAL]    = "#fcfcfc"
+  engine "pixmap"
+  {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	state           = PRELIGHT
+	file            = "scrollbar_horiz1.png"
+	border          = { 15, 15, 2, 2 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	file            = "scrollbar_horiz1.png"
+	border          = { 13, 12, 2, 2 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	state           = PRELIGHT
+	file            = "scrollbar_vert1.png"
+	border          = { 2, 2, 15, 15 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	file            = "scrollbar_vert1.png"
+	border          = { 2, 2, 15, 15 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+#
+# Any trough....
+#
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "trough"
+	file            = "vtrough.png"
+	border          = { 3, 3, 23, 23 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "trough"
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+	file            = "htrough.png"
+	border          = { 23, 23, 3, 3 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "bar"
+	file            = "scrollbar_horiz1.png"
+	border          = { 13, 12, 2, 2 }
+	stretch         = TRUE
+      }
+#
+# Handlebox
+#
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "handlebox_bin"
+	file            = "button1.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+      }
+#
+# Paned widget
+#
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "paned"
+	file            = "button5.png"
+	border          = { 10, 5, 5, 10 }
+	stretch         = TRUE
+      }
+#
+# Tooltips
+#
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	detail          = "tooltip"
+	file            = "button5.png"
+	border          = { 10, 5, 5, 10 }
+	stretch         = TRUE
+      }
+#
+# Selected text in entries, text widget, lists and trees
+#
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	state           = INSENSITIVE
+	detail          = "selected"
+	file            = "button5.png"
+	border          = { 10, 5, 5, 10 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	detail          = "selected"
+	file            = "button2.png"
+	border          = { 3, 3, 3, 3 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	state           = INSENSITIVE
+	detail          = "text"
+	file            = "button5.png"
+	border          = { 10, 5, 5, 10 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	detail          = "text"
+	file            = "button6.png"
+	border          = { 4, 4, 3, 3 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	detail          = "viewportbin"
+	file            = "background.png"
+	stretch         = FALSE
+      }
+#
+# Hline and Vline widgets
+#
+    image
+      {
+        function        = HLINE
+	recolorable     = TRUE
+	file            = "hline.png"
+	border          = { 0, 0, 1, 1 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = VLINE
+	recolorable     = TRUE
+	file            = "vline.png"
+	border          = { 1, 1, 0, 0 }
+	stretch         = TRUE
+      }
+#
+# Check marks
+#
+    image
+      {
+        function        = CHECK
+	recolorable     = TRUE
+	shadow          = OUT
+	overlay_file    = "check1.png"
+	overlay_stretch = FALSE
+      }
+    image
+      {
+        function        = CHECK
+	recolorable     = TRUE
+	shadow          = IN
+	overlay_file    = "check2.png"
+	overlay_stretch = FALSE
+      }
+#
+# Option marks
+#
+    image
+      {
+        function        = OPTION
+	recolorable     = TRUE
+	shadow          = OUT
+	overlay_file    = "option1.png"
+	overlay_border  = { 0, 0, 0, 0 }
+	overlay_stretch = FALSE
+      }
+    image
+      {
+        function        = OPTION
+	recolorable     = TRUE
+	shadow          = IN
+	overlay_file    = "option2.png"
+	overlay_border  = { 0, 0, 0, 0 }
+	overlay_stretch = FALSE
+      }
+#
+# The "tab" on the OptionMenu
+#
+#    image
+#      {
+#        function        = TAB
+#	recolorable     = TRUE
+#	overlay_file    = "notebook2.png"
+#	overlay_stretch = FALSE
+#      }
+#
+# Fun with Scrollbars
+#
+    image
+      {
+        function        = SLIDER
+	recolorable     = TRUE
+	file            = "scrollbar_horiz1.png"
+	border          = { 5, 5, 2, 2 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+    image
+      {
+        function        = SLIDER
+	recolorable     = TRUE
+	file            = "scrollbar_vert1.png"
+	border          = { 2, 2, 5, 5 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+#
+# The handle on Handleboxes
+#
+    image
+      {
+        function        = HANDLE
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 5, 5, 5, 5 }
+	stretch         = TRUE
+	overlay_file    = "handle_vert_thumb.png"
+	overlay_border  = { 0, 0, 0, 0 }
+	overlay_stretch = FALSE
+	orientation     = VERTICAL
+      }
+#
+# The background for entry widgets
+#
+    image
+      {
+	function        = FLAT_BOX
+	recolorable     = TRUE
+	state           = INSENSITIVE
+        detail          = "entry_bg"
+	file            = "entry2.png"
+	border          = { 3, 3, 3, 3 }
+	stretch         = TRUE
+      }
+    image
+      {
+	function        = FLAT_BOX
+	recolorable     = TRUE
+        detail          = "entry_bg"
+	file            = "entry1.png"
+	border          = { 3, 3, 3, 3 }
+	stretch         = TRUE
+      }
+#
+# How to draw the focus around a widget
+#
+    image
+      {
+        function        = FOCUS
+	recolorable     = TRUE
+	overlay_file    = "focus.png"
+	overlay_border  = { 4, 4, 4, 4 }
+	overlay_stretch = TRUE
+      }
+#
+# Some defaults as to how to draw boxes if they haven't already been covered
+#
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "hruler"
+	file            = "button12alpha.png"
+	border          = { 9, 9, 9, 9 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "vruler"
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	shadow          = IN
+	file            = "button6.png"
+	border          = { 5, 5, 5, 5 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+      }
+   }
+}
+
+# common default
+class "GtkWidget" style "default"
+
+
+style "eventbox" {
+  bg_pixmap[NORMAL] = "<parent>"
+  bg_pixmap[INSENSITIVE] = "<parent>"
+  bg_pixmap[PRELIGHT] = "<parent>"
+  bg_pixmap[SELECTED] = "<parent>"
+  bg_pixmap[ACTIVE] = "<parent>"
+}
+
+class "GtkEventBox" style "eventbox"
+
+#
+# Buttons
+#
+
+style "checkradiobutton" {
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 10,5,5,10 }
+	stretch         = TRUE
+      }
+  }
+}
+
+class "GtkRadioButton" style "checkradiobutton"
+class "GtkCheckButton" style "checkradiobutton"
+
+style "togglebutton"
+{
+   engine "pixmap" {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	shadow          = IN
+	file            = "button11alpha.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	shadow          = OUT
+	file            = "button12alpha.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+  }
+}
+
+class "GtkToggleButton" style "togglebutton"
+
+style "button"
+{
+  bg[NORMAL] = "#e7e7e7"
+
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	state           = NORMAL
+	shadow          = OUT
+	file            = "button12alpha.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	state           = PRELIGHT
+	shadow          = OUT
+	file            = "button11alpha.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	state           = NORMAL
+	shadow          = IN
+	file            = "focus.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	state           = INSENSITIVE
+	shadow          = IN
+	file            = "button13alpha.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	state           = INSENSITIVE
+	shadow          = OUT
+	file            = "button13alpha.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	state           = SELECTED
+	shadow          = IN
+	file            = "button1.png"
+	border          = { 10,10,5,5 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	state           = ACTIVE
+	shadow          = IN
+	file            = "button11alpha.png"
+	border          = { 9,9,9,9 }
+	stretch         = TRUE
+      }
+   }
+}
+
+class "GtkButton" style "button"
+
+style "clist"
+{
+  bg[PRELIGHT] = "#e7e7e7"
+  fg[PRELIGHT] = "#000000"
+  base[NORMAL] = "#e7e7e7"
+}
+
+class "GtkCList" style "clist"
+
+style "notebook"
+{
+  engine "pixmap"
+    {
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	state           = ACTIVE
+	file            = "notebook3.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side	= BOTTOM
+      }
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	state           = ACTIVE
+	file            = "notebook5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side	= TOP
+      }
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	state           = ACTIVE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side	= RIGHT
+      }
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	state           = ACTIVE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side	= LEFT
+      }
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	file            = "notebook2.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side        = BOTTOM
+      }
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	file            = "notebook4.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side        = TOP
+      }
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	file            = "button6.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side        = RIGHT
+      }
+    image
+      {
+        function        = EXTENSION
+	recolorable     = TRUE
+	file            = "button6.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side        = LEFT
+     }
+#
+# How to draw boxes with a gap on one side (ie the page of a notebook)
+#
+    image
+      {
+        function        = BOX_GAP
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+        gap_file        = "gap_top.png"
+        gap_border      = { 0, 0, 0, 0 }
+        gap_start_file  = "gap_top_start.png"
+        gap_start_border= { 2, 0, 0, 0 }
+        gap_end_file    = "gap_top_end.png"
+        gap_end_border  = { 0, 2, 0, 0 }
+	gap_side        = TOP
+      }
+    image
+      {
+        function        = BOX_GAP
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+        gap_file        = "gap_bottom.png"
+        gap_border      = { 0, 0, 0, 0 }
+        gap_start_file  = "gap_bottom_start.png"
+        gap_start_border= { 2, 0, 0, 0 }
+        gap_end_file    = "gap_bottom_end.png"
+        gap_end_border  = { 0, 2, 0, 0 }
+	gap_side        = BOTTOM
+      }
+    image
+      {
+        function        = BOX_GAP
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+        gap_file        = "gap_left.png"
+        gap_border      = { 0, 0, 0, 0 }
+        gap_start_file  = "gap_left_start.png"
+        gap_start_border= { 0, 0, 2, 0 }
+        gap_end_file    = "gap_left_end.png"
+        gap_end_border  = { 0, 0, 0, 2 }
+	gap_side        = LEFT
+      }
+    image
+      {
+        function        = BOX_GAP
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+        gap_file        = "gap_right.png"
+        gap_border      = { 0, 0, 0, 0 }
+        gap_start_file  = "gap_right_start.png"
+        gap_start_border= { 0, 0, 2, 0 }
+        gap_end_file    = "gap_right_end.png"
+        gap_end_border  = { 0, 0, 0, 2 }
+	gap_side        = RIGHT
+      }
+#
+# How to draw the box of a notebook when it isnt attached to a tab
+#
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	file            = "button5.png"
+	border          = { 10, 10, 10, 10 }
+	stretch         = TRUE
+	gap_side	= TOP
+      }
+  }
+}
+
+class "GtkNotebook" style "notebook"
+
+style "menu"
+{
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	file            = "background.png"
+	border          = { 3, 3, 3, 3 }
+	stretch         = FALSE
+	overlay_file    = "menu_shadow.png"
+	overlay_border  = { 3, 3, 3, 3 }
+	overlay_stretch = TRUE
+      }
+  }
+}
+
+class "GtkMenu" style "menu"
+
+style "menuitem"
+{
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	file            = "menu_selected.png"
+	border          = { 8, 8, 8, 8 }
+	stretch         = TRUE
+      }
+  }
+}
+
+class "GtkMenuItem" style "menuitem"
+
+style "menubar"
+{
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	file            = "background.png"
+	border          = { 3, 3, 3, 3 }
+	stretch         = FALSE
+      }
+  }
+}
+
+class "GtkMenuBar" style "menubar"
+
+style "optionmenu"
+{
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	file            = "option_menu.png"
+	border          = { 12, 32, 2, 3 }
+	stretch         = TRUE
+      }
+  }
+}
+
+class "GtkOptionMenu" style "optionmenu"
+
+style "progressbar"
+{
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "bar"
+	file            = "button6.png"
+	border          = { 5, 5, 5, 5 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "trough"
+        file            = "button5.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        orientation     = HORIZONTAL
+      }
+    }
+}
+
+class "GtkProgressBar" style "progressbar"
+class "GtkBar" style "progressbar"
+
+style "ruler"
+{
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "vruler"
+	file            = "button5.png"
+	border          = { 2, 2, 2, 2 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "hruler"
+	file            = "button5.png"
+	border          = { 2, 2, 2, 2 }
+	stretch         = TRUE
+      }
+  }
+}
+
+class "GtkRuler" style "ruler"
+
+style "item"
+{
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	state           = INSENSITIVE
+	file            = "button3.png"
+	border          = { 10, 5, 5, 10 }
+	stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	file            = "button6.png"
+	border          = { 10, 5, 5, 10 }
+	stretch         = TRUE
+      }
+  }
+}
+
+class "GtkTreeItem" style "item"
+class "GtkListItem" style "item"
+
+style "window"
+{
+  engine "pixmap" {
+    image
+      {
+	function        = FLAT_BOX
+	recolorable     = TRUE
+	file            = "empty.png"
+	stretch         = FALSE
+      }
+  }
+}
+
+class "GtkWindow" style "window"
+
+style "curve"
+{
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+	recolorable     = TRUE
+	detail          = "curve_bg"
+	file            = "button1.png"
+	border          = { 2, 2, 2, 2 }
+	stretch         = TRUE
+      }
+  }
+}
+
+class "GtkCurve" style "curve"
+
+style "scrollbar"
+{
+  engine "pixmap"
+  {
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	state           = PRELIGHT
+	file            = "scrollbar_horiz1.png"
+	border          = { 15, 15, 2, 2 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	file            = "scrollbar_horiz1.png"
+	border          = { 13, 12, 2, 2 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	state           = PRELIGHT
+	file            = "scrollbar_vert1.png"
+	border          = { 2, 2, 15, 15 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "slider"
+	file            = "scrollbar_vert1.png"
+	border          = { 2, 2, 15, 15 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "trough"
+	file            = "vtrough.png"
+	border          = { 3, 3, 23, 23 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "trough"
+	file            = "htrough.png"
+	border          = { 23, 23, 3, 3 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+  }
+}
+
+class "GtkScrollbar" style "scrollbar"
+
+style "range"
+{
+  engine "pixmap" {
+
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "trough"
+	file            = "slider_vth1.png"
+	border          = { 5, 2, 2, 2 }
+	stretch         = TRUE
+	orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+	recolorable     = TRUE
+	detail          = "trough"
+	file            = "slider_hth1.png"
+	border          = { 2, 2, 5, 2 }
+	stretch         = TRUE
+	orientation     = HORIZONTAL
+      }
+  }
+}
+class "GtkRange" style "range"
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoscrollbar
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoscrollbar	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoscrollbar	(revision 1018)
@@ -0,0 +1,243 @@
+
+style "scrollbar"
+{
+
+  GtkScrollbar::slider_width = 34
+  GtkScrollbar::stepper_size = 24
+
+  GtkScrollbar::has_backward_stepper = 0
+  GtkScrollbar::has_secondary_forward_stepper = 0
+
+  GtkScrollbar::has_forward_stepper = 1
+  GtkScrollbar::has_secondary_backward_stepper = 1
+
+
+  engine "pixmap"
+  {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "slider"
+        file            = "scrollbar_horiz.png"
+        border          = { 15, 15, 2, 2 }
+        stretch         = TRUE
+        orientation     = HORIZONTAL
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "slider"
+        file            = "scrollbar_vert.png"
+        border          = { 2, 2, 15, 15 }
+        stretch         = TRUE
+        orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "trough"
+        file            = "scrollbar_vtrough.png"
+        border          = { 3, 3, 23, 23 }
+        stretch         = TRUE
+        orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "trough"
+        file            = "scrollbar_htrough.png"
+        border          = { 23, 23, 3, 3 }
+        stretch         = TRUE
+        orientation     = HORIZONTAL
+      }
+      
+
+# arrow background
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        file            = "scroll_action_btn_down.png"
+##        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#      }
+
+
+    image
+      {
+        function              = STEPPER
+        state                 = NORMAL
+        file                  = "scroll_action_btn_up.png"
+        border                = { 1,1,4,4 }
+        stretch               = TRUE
+        arrow_direction       = UP
+      }
+
+    image
+      {
+        function              = STEPPER
+        state                 = PRELIGHT
+        file                  = "scroll_action_btn_up.png"
+        border                = { 1,1,4,4 }
+        stretch               = TRUE
+        arrow_direction       = UP
+      }
+
+    image
+      {
+        function              = STEPPER
+        state                 = ACTIVE
+        file                  = "scroll_action_btn_up_p.png"
+        border                = { 1,1,4,4 }
+        stretch               = TRUE
+        arrow_direction       = UP
+      }
+
+    image
+      {
+        function              = STEPPER
+        state                 = NORMAL
+        file                  = "scroll_action_btn_down.png"
+        border                = { 1,1,4,4 }
+        stretch               = TRUE
+        arrow_direction       = DOWN
+      }
+
+    image
+      {
+        function              = STEPPER
+        state                 = PRELIGHT
+        file                  = "scroll_action_btn_down.png"
+        border                = { 1,1,4,4 }
+        stretch               = TRUE
+        arrow_direction       = DOWN
+      }
+
+    image
+      {
+        function              = STEPPER
+        state                 = ACTIVE
+        file                  = "scroll_action_btn_down_p.png"
+        border                = { 1,1,4,4 }
+        stretch               = TRUE
+        arrow_direction       = DOWN
+      }
+
+
+
+      
+#      
+# arrows
+#
+    image
+      {
+        function			= ARROW
+        recolorable		= TRUE
+        overlay_file		= "arrow_up.png"
+        overlay_border	= { 0, 0, 0, 0 }
+        overlay_stretch	= TRUE
+        arrow_direction	= UP
+      }
+    image
+      {
+        function			= ARROW
+        recolorable		= TRUE
+        overlay_file		= "arrow_down.png"
+        overlay_border	= { 0, 0, 0, 0 }
+        overlay_stretch	= TRUE
+        arrow_direction	= DOWN
+      }
+    image
+      {
+        function			= ARROW
+        recolorable		= TRUE
+        overlay_file		= "arrow_left.png"
+        overlay_border	= { 0, 0, 0, 0 }
+        overlay_stretch	= TRUE
+        arrow_direction	= LEFT
+      }
+    image
+      {
+        function			= ARROW
+        recolorable		= TRUE
+        overlay_file		= "arrow_right.png"
+        overlay_border	= { 0, 0, 0, 0 }
+        overlay_stretch	= TRUE
+        arrow_direction	= RIGHT
+      }
+      
+  }
+}
+
+class "GtkScrollbar" style "scrollbar"
+
+
+
+style "scroll_fullscreen_btn_on"
+{
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "scroll_fullscreen_btn_on.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "scroll_fullscreen_btn_on.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "scroll_fullscreen_btn_on_p.png"
+        stretch         = TRUE
+      }
+   }
+}
+
+style "scroll_fullscreen_btn_off"
+{
+  engine "pixmap"
+    {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = NORMAL
+        file            = "scroll_fullscreen_btn_off.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "scroll_fullscreen_btn_off.png"
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "scroll_fullscreen_btn_off_p.png"
+        stretch         = TRUE
+      }
+   }
+}
+
+widget "*scroll_fullscreen_btn_on"     style "scroll_fullscreen_btn_on"
+widget "*scroll_fullscreen_btn_off"    style "scroll_fullscreen_btn_off"
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoprogressbar
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoprogressbar	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoprogressbar	(revision 1018)
@@ -0,0 +1,86 @@
+
+
+
+#style "progressbar"
+#{
+#  engine "pixmap"
+#    {
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        detail          = "bar"
+#        file            = "button6.png"
+#        border          = { 5, 5, 5, 5 }
+#        stretch         = TRUE
+#      }
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        detail          = "trough"
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#        orientation     = HORIZONTAL
+#      }
+#    }
+#}
+#
+#class "GtkProgressBar" style "progressbar"
+#class "GtkBar" style "progressbar"
+
+#style "ruler"
+#{
+#  engine "pixmap" {
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        detail          = "vruler"
+#        file            = "button5.png"
+#        border          = { 2, 2, 2, 2 }
+#        stretch         = TRUE
+#      }
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        detail          = "hruler"
+#        file            = "button5.png"
+#        border          = { 2, 2, 2, 2 }
+#        stretch         = TRUE
+#      }
+#  }
+#}
+#
+#class "GtkRuler" style "ruler"
+
+
+style "range"
+{
+  engine "pixmap" {
+
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "trough"
+        file            = "slider_vth1.png"
+        border          = { 5, 2, 2, 2 }
+        stretch         = TRUE
+        orientation     = VERTICAL
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "trough"
+        file            = "slider_hth1.png"
+        border          = { 2, 2, 5, 2 }
+        stretch         = TRUE
+        orientation     = HORIZONTAL
+      }
+  }
+}
+class "GtkRange" style "range"
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokolabel
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokolabel	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokolabel	(revision 1018)
@@ -0,0 +1,86 @@
+
+# Dialer number button label color
+style "label_btn_dial_pad"
+{
+  fg[NORMAL]        = "#e7e7e7"
+  fg[ACTIVE]        = "#e6c7ab"
+  fg[PRELIGHT]      = "#e7e7e7"
+  fg[SELECTED]      = "#e7e7e7"
+  fg[INSENSITIVE]   = "#e7e7e7"
+}
+
+# Hoariness label
+style "label_hoariness"
+{
+  fg[NORMAL]        = "#c5c5c5"
+  fg[ACTIVE]        = "#c5c5c5"
+  fg[PRELIGHT]      = "#c5c5c5"
+  fg[SELECTED]      = "#c5c5c5"
+  fg[INSENSITIVE]   = "#c5c5c5"
+}
+
+# White label
+style "label_white"
+{
+  fg[NORMAL]        = "#ffffff"
+  fg[ACTIVE]        = "#ffffff"
+  fg[PRELIGHT]      = "#ffffff"
+  fg[SELECTED]      = "#ffffff"
+  fg[INSENSITIVE]   = "#ffffff"
+}
+
+
+style "label_footer"
+{
+  fg[NORMAL]        = "#eee08a" # normal label text color
+  #fg[NORMAL]        = "#000000" #
+  fg[ACTIVE]        = "#000000" #
+
+}
+widget "*label_footer" style "label_footer"
+
+
+
+style "label_navigation_list_head"
+{
+    font_name = "Sans Bold 12"
+    fg[NORMAL] = "#999999"
+}
+widget "*label_navigation_list_head" style "label_navigation_list_head"
+
+
+# Search toolbar entry font
+style "label_search_toolbar"
+{
+    font_name = "Sans 18"
+}
+
+
+###### label ######
+
+style "label"
+{
+  fg[NORMAL]        = "#eee08a" # normal label text color
+  #fg[NORMAL]        = "#000000" #
+  fg[ACTIVE]        = "#000000" #
+
+  #fg[PRELIGHT]      = "#ffffff" # prelight label text color
+  #fg[SELECTED]      = "#ffffff" #
+  #fg[INSENSITIVE]   = "#111111" #
+
+  #bg[NORMAL]        = "#4c4c4c" # 
+  #bg[PRELIGHT]      = "#3a588e" # 
+  #bg[ACTIVE]        = "#3a588e" # 
+  #bg[SELECTED]      = "#3a588e" # 
+  #bg[INSENSITIVE]   = "#000000" # 
+
+  #text[NORMAL]      = "#000000" # 
+  #text[PRELIGHT]    = "#ffffff" # 
+  #text[ACTIVE]      = "#ffffff" # 
+  #text[SELECTED]    = "#ffffff" # 
+  #text[INSENSITIVE] = "#696969" # 
+  #fg[NORMAL] = "#111111"
+  
+
+}
+#class "GtkLabel" style "label"
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokobg
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokobg	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokobg	(revision 1018)
@@ -0,0 +1,127 @@
+
+# set window background,works ok for notebook,button background
+style "window"
+{
+
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        file            = "bg_dialer.png"
+        stretch         = TRUE
+      }
+  }
+}
+class "GtkWindow" style "window"
+
+style "bg_dialer"
+{
+
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        file            = "bg_dialer.png"
+        stretch         = TRUE
+      }
+  }
+}
+widget "bg_dialer" style "bg_dialer"
+
+style "bg_dialog"
+{
+
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        file            = "bg_dialog.png"
+        stretch         = TRUE
+      }
+  }
+}
+widget "bg_dialog" style "bg_dialog"
+
+style "bg_popup_dialog"
+{
+
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        file            = "bg_popup_dialog.png"
+        stretch         = TRUE
+      }
+  }
+}
+widget "bg_popup_dialog" style "bg_popup_dialog"
+
+
+style "bg_footer"
+{
+
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        file            = "bg_footer.png"
+        stretch         = TRUE
+      }
+  }
+}
+widget "bg_footer" style "bg_footer"
+
+
+style "bg_navigation_list" {
+
+#  bg_pixmap[NORMAL] = "bg_navigation_list.png"
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        detail          = "viewportbin"
+        file            = "bg_navigation_list.png"
+        stretch         = TRUE
+      }      
+      
+  }  
+}
+widget "*bg_navigation_list" style "bg_navigation_list"
+
+
+style "bg_navigation_list_head" {
+  bg_pixmap[NORMAL] = "bg_navigation_list_head.png"
+}
+widget "*bg_navigation_list_head" style "bg_navigation_list_head"
+
+style "bg_detail_area" {
+
+  engine "pixmap" {
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        detail          = "viewportbin"
+        file            = "bg_detail_area.png"
+        stretch         = TRUE
+      }
+   
+  }
+}
+widget "*bg_detail_area" style "bg_detail_area"
+
+
+
+style "bg_bar_separate" {
+    bg_pixmap[NORMAL] = "bg_bar_separate.png"
+#    bg_pixmap[ACTIVE] = "bg_bar_separate_p.png"
+}
+widget "*bg_bar_separate" style "bg_bar_separate"
+
+
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokomenu
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokomenu	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokomenu	(revision 1018)
@@ -0,0 +1,104 @@
+
+
+style "menu"
+{
+   bg_pixmap[NORMAL]  = "bg_menu.png" # menu background image
+   
+#   engine "pixmap" {
+#     image
+#       {
+#         function        = BOX
+#         recolorable     = TRUE
+#         state           = NORMAL
+#         file            = "bg_menu.png"
+#         border          = { 3, 3, 3, 3 }
+#         stretch         = TRUE
+#
+#       }
+#   }
+}
+class "GtkMenu" style "menu"
+
+style "menuitem"
+{
+#   bg[NORMAL]        = "#c4d2ca"
+  
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "bg_menu_selected.png"
+        border          = { 8, 8, 8, 8 }
+        stretch         = TRUE
+      }
+      
+  }
+}
+
+class "GtkMenuItem" style "menuitem"
+
+
+style "menubar"
+{
+  #bg[NORMAL]        = "#4c4c4c"
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        file            = "bg_menubar.png"
+        border          = { 3, 3, 3, 3 }
+        stretch         = TRUE
+      }
+  }
+}
+
+class "GtkMenuBar" style "menubar"
+
+
+
+#style "optionmenu"
+#{
+#  engine "pixmap" {
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        file            = "option_menu.png"
+#        border          = { 12, 32, 2, 3 }
+#        stretch         = TRUE
+#      }
+#  }
+#}
+
+#class "GtkOptionMenu" style "optionmenu"
+
+
+###### Dialer menu setup ######
+style "dial_menu"
+{
+   bg_pixmap[NORMAL]  = "bg_dialer_menu.png"
+   
+}
+widget "*dial_menu" style "dial_menu"
+
+style "dial_menuitem"
+{
+#  bg[NORMAL]        = "#c4d2ca"
+  
+  engine "pixmap" {
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        state           = PRELIGHT
+        file            = "highlight_bar_type03.png"
+        border          = { 8, 8, 8, 8 }
+        stretch         = TRUE
+      }
+      
+  }
+}
+widget "*dial_menuitem" style "dial_menuitem"
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/gtkrc
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/gtkrc	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/gtkrc	(revision 1018)
@@ -0,0 +1,455 @@
+pixmap_path "/usr/share/themes/openmoko/gtk-2.0"
+pixmap_path "/usr/share/themes/openmoko/gtk-2.0/icons"
+
+include "mokoicon"
+
+
+style "openmokodefault"
+{
+
+  
+  #bg[NORMAL]        = "#c4d2ca" # label,check/radio,menu background color
+  #bg_pixmap[NORMAL]  = "bg_window.png" # label,check/radio,menu background image
+  bg[PRELIGHT]      = "#3a588e" # 
+  bg[ACTIVE]        = "#3a588e" # 
+  bg[SELECTED]      = "#3a588e" # 
+  bg[INSENSITIVE]   = "#4e4e4e" # 
+	
+  base[NORMAL]      = "#e2e2e2" # 
+  #base[NORMAL]      = "#000000" # 
+  #base[PRELIGHT]    = "#92b6f4" # 
+  #base[ACTIVE]      = "#3a588e" # 
+  #base[SELECTED]    = "#4467a6" # 
+  #base[INSENSITIVE] = "#696969" # 
+	
+  #text[NORMAL]      = "#000000" # 
+  #text[PRELIGHT]    = "#ffffff" # 
+  #text[ACTIVE]      = "#ffffff" # 
+  #text[SELECTED]    = "#ffffff" # 
+  #text[INSENSITIVE] = "#696969" # 
+  
+  
+  engine "pixmap"
+  {
+
+
+
+
+#
+# Handlebox
+#
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "handlebox_bin"
+        file            = "button1.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+      }
+      
+
+
+#
+# Paned widget
+#
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "paned"
+        file            = "button5.png"
+        border          = { 10, 5, 5, 10 }
+        stretch         = TRUE
+      }
+#
+# Tooltips
+#
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        detail          = "tooltip"
+        file            = "button5.png"
+        border          = { 10, 5, 5, 10 }
+        stretch         = TRUE
+      }
+#
+# Selected text in entries, text widget, lists and trees
+#
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        state           = INSENSITIVE
+        detail          = "selected"
+        file            = "button5.png"
+        border          = { 10, 5, 5, 10 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        detail          = "selected"
+        file            = "button2.png"
+        border          = { 3, 3, 3, 3 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        state           = INSENSITIVE
+        detail          = "text"
+        file            = "button5.png"
+        border          = { 10, 5, 5, 10 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = FLAT_BOX
+        recolorable     = TRUE
+        detail          = "text"
+        file            = "button6.png"
+        border          = { 4, 4, 3, 3 }
+        stretch         = TRUE
+      }
+#    image
+#      {
+#        function        = FLAT_BOX
+#        recolorable     = TRUE
+#        detail          = "viewportbin"
+#        file            = "bg_window.png"
+#        stretch         = FALSE
+#      }
+#
+# Hline and Vline widgets
+#
+#    image
+#      {
+#        function        = HLINE
+#        recolorable     = TRUE
+#        file            = "hline.png"
+#        border          = { 0, 0, 1, 1 }
+#        stretch         = TRUE
+#      }
+#    image
+#      {
+#        function        = VLINE
+#        recolorable     = TRUE
+#        file            = "vline.png"
+#        border          = { 1, 1, 0, 0 }
+#        stretch         = TRUE
+#      }
+
+#
+# The "tab" on the OptionMenu
+#
+#    image
+#      {
+#        function        = TAB
+#        recolorable     = TRUE
+#        overlay_file    = "notebook2.png"
+#        overlay_stretch = FALSE
+#      }
+
+
+#
+# The handle on Handleboxes
+#
+    image
+      {
+        function        = HANDLE
+        recolorable     = TRUE
+        file            = "button5.png"
+        border          = { 5, 5, 5, 5 }
+        stretch         = TRUE
+        overlay_file    = "handle_vert_thumb.png"
+        overlay_border  = { 0, 0, 0, 0 }
+        overlay_stretch = FALSE
+        orientation     = VERTICAL
+      }
+#
+# The background for entry widgets
+#
+#    image
+#      {
+#        function        = FLAT_BOX
+#        recolorable     = TRUE
+#        state           = INSENSITIVE
+#        detail          = "entry_bg"
+#        file            = "entry2.png"
+#        border          = { 3, 3, 3, 3 }
+#        stretch         = TRUE
+#      }
+#    image
+#      {
+#        function        = FLAT_BOX
+#        recolorable     = TRUE
+#        detail          = "entry_bg"
+#        file            = "entry1.png"
+#        border          = { 3, 3, 3, 3 }
+#        stretch         = TRUE
+#      }
+
+#
+# How to draw the focus around a widget
+
+    image
+      {
+        function        = FOCUS
+        recolorable     = TRUE
+        overlay_file    = "focus.png"
+        overlay_border  = { 4, 4, 4, 4 }
+        overlay_stretch = TRUE
+      }
+
+# Some defaults as to how to draw boxes if they haven't already been covered
+#
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "hruler"
+        file            = "button12alpha.png"
+        border          = { 9, 9, 9, 9 }
+        stretch         = TRUE
+      }
+    image
+      {
+        function        = BOX
+        recolorable     = TRUE
+        detail          = "vruler"
+        file            = "button5.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+      }
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        shadow          = IN
+#        file            = "button6.png"
+#        border          = { 5, 5, 5, 5 }
+#        stretch         = TRUE
+#      }
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#      }
+   }
+}
+
+# common default
+#class "GtkWidget" style "openmokodefault"
+widget_class "*" style "openmokodefault"
+
+
+
+
+
+
+
+style "notebook"
+{
+#  bg[NORMAL]        = "#4c4c4c"
+ 
+  engine "pixmap"
+    {
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "notebook3.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side	= BOTTOM
+      }
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "notebook5.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side	= TOP
+      }
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "button5.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side	= RIGHT
+      }
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        state           = ACTIVE
+        file            = "button5.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side	= LEFT
+      }
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        file            = "notebook2.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side        = BOTTOM
+      }
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        file            = "notebook4.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side        = TOP
+      }
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        file            = "button6.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side        = RIGHT
+      }
+    image
+      {
+        function        = EXTENSION
+        recolorable     = TRUE
+        file            = "button6.png"
+        border          = { 10, 10, 10, 10 }
+        stretch         = TRUE
+        gap_side        = LEFT
+     }
+#
+# How to draw boxes with a gap on one side (ie the page of a notebook)
+#
+#    image
+#      {
+#        function        = BOX_GAP
+#        recolorable     = TRUE
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#        gap_file        = "gap_top.png"
+#        gap_border      = { 0, 0, 0, 0 }
+#        gap_start_file  = "gap_top_start.png"
+#        gap_start_border= { 2, 0, 0, 0 }
+#        gap_end_file    = "gap_top_end.png"
+#        gap_end_border  = { 0, 2, 0, 0 }
+#        gap_side        = TOP
+#      }
+#    image
+#      {
+#        function        = BOX_GAP
+#        recolorable     = TRUE
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#        gap_file        = "gap_bottom.png"
+#        gap_border      = { 0, 0, 0, 0 }
+#        gap_start_file  = "gap_bottom_start.png"
+#        gap_start_border= { 2, 0, 0, 0 }
+#        gap_end_file    = "gap_bottom_end.png"
+#        gap_end_border  = { 0, 2, 0, 0 }
+#        gap_side        = BOTTOM
+#      }
+#    image
+#      {
+#        function        = BOX_GAP
+#        recolorable     = TRUE
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#        gap_file        = "gap_left.png"
+#        gap_border      = { 0, 0, 0, 0 }
+#        gap_start_file  = "gap_left_start.png"
+#        gap_start_border= { 0, 0, 2, 0 }
+#        gap_end_file    = "gap_left_end.png"
+#        gap_end_border  = { 0, 0, 0, 2 }
+#        gap_side        = LEFT
+#      }
+#    image
+#      {
+#        function        = BOX_GAP
+#        recolorable     = TRUE
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#        gap_file        = "gap_right.png"
+#        gap_border      = { 0, 0, 0, 0 }
+#        gap_start_file  = "gap_right_start.png"
+#        gap_start_border= { 0, 0, 2, 0 }
+#        gap_end_file    = "gap_right_end.png"
+#        gap_end_border  = { 0, 0, 0, 2 }
+#        gap_side        = RIGHT
+#      }
+#
+# How to draw the box of a notebook when it isnt attached to a tab
+#
+#    image
+#      {
+#        function        = BOX
+#        recolorable     = TRUE
+#        file            = "button5.png"
+#        border          = { 10, 10, 10, 10 }
+#        stretch         = TRUE
+#        gap_side	= TOP
+#      }
+  }
+}
+
+class "GtkNotebook" style "notebook"
+
+
+
+
+
+
+#style "curve"
+#{
+#  engine "pixmap" {
+#    image
+#      {
+#        function        = FLAT_BOX
+#        recolorable     = TRUE
+#        detail          = "curve_bg"
+#        file            = "button1.png"
+#        border          = { 2, 2, 2, 2 }
+#        stretch         = TRUE
+#      }
+#  }
+#}
+#
+#class "GtkCurve" style "curve"
+
+
+
+
+
+
+include "mokobg"
+include "mokolabel"
+include "mokobutton"
+include "mokoscrollbar"
+include "mokotoolbox"
+include "mokomenu"
+include "mokolist"
+include "mokoprogressbar"
+include "apprc"
Index: /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoicon
===================================================================
--- /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoicon	(revision 1018)
+++ /trunk/src/target/tests/openmoko-theme/openmoko/gtk-2.0/mokoicon	(revision 1018)
@@ -0,0 +1,19 @@
+
+style "icons" {
+	stock["icon_message"]		      = {{"icon_message.png"}}
+	stock["icon_phone"]		        = {{"icon_phone.png"}}
+	stock["icon_dialer_people"]		= {{"icon_dialer_people.png"}}
+	stock["icon_app_history"]	    = {{"icon_app_history.png"}}
+	stock["icon_app_toggle"]		  = {{"icon_app_toggle.png"}}
+	
+	stock["icon_outgoing_call"]		= {{"icon_outgoing_call.png"}}
+	stock["icon_incoming_call"]		= {{"icon_incoming_call.png"}}
+	stock["icon_missing_call"]		= {{"icon_missing_call.png"}}
+	stock["icon_all_call"]		    = {{"icon_all_call.png"}}
+	
+	
+	
+}
+widget_class "GtkWidget" style "icons"
+class "GtkWidget" style "icons"
+
