GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
assistant-utils.c
1 /********************************************************************\
2  * assistant-utils.c -- utility functions for creating assistants *
3  * Copyright (C) 2001 Jeremy Collins *
4  * Copyright (C) 2001 Dave Peticolas <[email protected]> *
5  * Copyright (C) 2010 Geert Janssens *
6  * *
7  * This program is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License as *
9  * published by the Free Software Foundation; either version 2 of *
10  * the License, or (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License*
18  * along with this program; if not, contact: *
19  * *
20  * Free Software Foundation Voice: +1-617-542-5942 *
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
22  * Boston, MA 02110-1301, USA [email protected] *
23  * *
24 \********************************************************************/
25 
26 #include "config.h"
27 
28 #include <gtk/gtk.h>
29 
30 #include "dialog-utils.h"
31 #include "assistant-utils.h"
32 #include "qof.h"
33 #include "gnc-gnome-utils.h"
34 
35 void
36 gnc_assistant_set_colors (GtkAssistant *assistant)
37 {
38  GdkColor bluish;
39  GdkColor white;
40  GdkColormap *cm;
41 
42  if (!assistant) return;
43 
44  bluish.red = (gushort) (.40 * 65535);
45  bluish.green = (gushort) (.40 * 65535);
46  bluish.blue = (gushort) (.60 * 65535);
47 
48  white.red = 65535;
49  white.green = 65535;
50  white.blue = 65535;
51 
52  cm = gtk_widget_get_colormap (GTK_WIDGET (assistant));
53 
54  gdk_colormap_alloc_color(cm, &bluish, FALSE, TRUE);
55  gdk_colormap_alloc_color(cm, &white, FALSE, TRUE);
56 
57 }
Gnome specific utility functions.