Commit 5411a3a1 authored by Dom Lachowicz's avatar Dom Lachowicz Committed by Dom Lachowicz
Browse files

Bug #313627. Make win32 theme's handling of toolbars, handleboxes, and

2005-11-12  Dom Lachowicz <cinamod@hotmail.com>

	* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
	theme's handling of toolbars, handleboxes, and menubars more in-line
	with Microsoft's IE style.
	* modules/engines/ms-windows/*.c: Indentation cleanups
parent 82f12b61
2005-11-12 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
theme's handling of toolbars, handleboxes, and menubars more in-line
with Microsoft's IE style.
* modules/engines/ms-windows/*.c: Indentation cleanups
2005-11-12 Matthias Clasen <mclasen@redhat.com> 2005-11-12 Matthias Clasen <mclasen@redhat.com>
Make builtin icons work in gtk_window_set_icon_name() Make builtin icons work in gtk_window_set_icon_name()
......
2005-11-12 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
theme's handling of toolbars, handleboxes, and menubars more in-line
with Microsoft's IE style.
* modules/engines/ms-windows/*.c: Indentation cleanups
2005-11-12 Matthias Clasen <mclasen@redhat.com> 2005-11-12 Matthias Clasen <mclasen@redhat.com>
Make builtin icons work in gtk_window_set_icon_name() Make builtin icons work in gtk_window_set_icon_name()
......
...@@ -23,19 +23,18 @@ ...@@ -23,19 +23,18 @@
#include "msw_style.h" #include "msw_style.h"
#include "msw_rc_style.h" #include "msw_rc_style.h"
static void msw_rc_style_init (MswRcStyle *style); static void msw_rc_style_init (MswRcStyle * style);
static void msw_rc_style_class_init (MswRcStyleClass *klass); static void msw_rc_style_class_init (MswRcStyleClass * klass);
static GtkStyle *msw_rc_style_create_style (GtkRcStyle *rc_style); static GtkStyle *msw_rc_style_create_style (GtkRcStyle * rc_style);
static GtkRcStyleClass *parent_class; static GtkRcStyleClass *parent_class;
GType msw_type_rc_style = 0; GType msw_type_rc_style = 0;
void void
msw_rc_style_register_type (GTypeModule *module) msw_rc_style_register_type (GTypeModule * module)
{ {
static const GTypeInfo object_info = static const GTypeInfo object_info = {
{
sizeof (MswRcStyleClass), sizeof (MswRcStyleClass),
(GBaseInitFunc) NULL, (GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL, (GBaseFinalizeFunc) NULL,
...@@ -54,12 +53,12 @@ msw_rc_style_register_type (GTypeModule *module) ...@@ -54,12 +53,12 @@ msw_rc_style_register_type (GTypeModule *module)
} }
static void static void
msw_rc_style_init (MswRcStyle *style) msw_rc_style_init (MswRcStyle * style)
{ {
} }
static void static void
msw_rc_style_class_init (MswRcStyleClass *klass) msw_rc_style_class_init (MswRcStyleClass * klass)
{ {
GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
...@@ -71,8 +70,7 @@ msw_rc_style_class_init (MswRcStyleClass *klass) ...@@ -71,8 +70,7 @@ msw_rc_style_class_init (MswRcStyleClass *klass)
/* Create an empty style suitable to this RC style /* Create an empty style suitable to this RC style
*/ */
static GtkStyle * static GtkStyle *
msw_rc_style_create_style (GtkRcStyle *rc_style) msw_rc_style_create_style (GtkRcStyle * rc_style)
{ {
return g_object_new (MSW_TYPE_STYLE, NULL); return g_object_new (MSW_TYPE_STYLE, NULL);
} }
This diff is collapsed.
...@@ -34,13 +34,11 @@ ...@@ -34,13 +34,11 @@
#define WM_THEMECHANGED 0x031A /* winxp only */ #define WM_THEMECHANGED 0x031A /* winxp only */
#endif #endif
static GModule * this_module = NULL; static GModule *this_module = NULL;
static void (*msw_rc_reset_styles) (GtkSettings * settings) = NULL; static void (*msw_rc_reset_styles) (GtkSettings * settings) = NULL;
static GdkFilterReturn static GdkFilterReturn
global_filter_func (void *xevent, global_filter_func (void *xevent, GdkEvent * event, gpointer data)
GdkEvent *event,
gpointer data)
{ {
MSG *msg = (MSG *) xevent; MSG *msg = (MSG *) xevent;
...@@ -50,12 +48,13 @@ global_filter_func (void *xevent, ...@@ -50,12 +48,13 @@ global_filter_func (void *xevent,
case WM_THEMECHANGED: case WM_THEMECHANGED:
case WM_SYSCOLORCHANGE: case WM_SYSCOLORCHANGE:
if(msw_rc_reset_styles != NULL) { if (msw_rc_reset_styles != NULL)
{
xp_theme_reset (); xp_theme_reset ();
msw_style_init (); msw_style_init ();
/* force all gtkwidgets to redraw */ /* force all gtkwidgets to redraw */
(*msw_rc_reset_styles) (gtk_settings_get_default()); (*msw_rc_reset_styles) (gtk_settings_get_default ());
} }
return GDK_FILTER_REMOVE; return GDK_FILTER_REMOVE;
...@@ -71,20 +70,21 @@ global_filter_func (void *xevent, ...@@ -71,20 +70,21 @@ global_filter_func (void *xevent,
} }
G_MODULE_EXPORT void G_MODULE_EXPORT void
theme_init (GTypeModule *module) theme_init (GTypeModule * module)
{ {
msw_rc_style_register_type (module); msw_rc_style_register_type (module);
msw_style_register_type (module); msw_style_register_type (module);
/* this craziness is required because only gtk 2.4.x and later have /* this craziness is required because only gtk 2.4.x and later have
gtk_rc_reset_styles(). But we want to be able to run acceptly well gtk_rc_reset_styles(). But we want to be able to run acceptly well on
on any GTK 2.x.x platform. */ any GTK 2.x.x platform. */
if(gtk_check_version(2,4,0) == NULL) { if (gtk_check_version (2, 4, 0) == NULL)
this_module = g_module_open(NULL, 0); {
this_module = g_module_open (NULL, 0);
if(this_module) if (this_module)
g_module_symbol (this_module, "gtk_rc_reset_styles", g_module_symbol (this_module, "gtk_rc_reset_styles",
(gpointer *)(&msw_rc_reset_styles)); (gpointer *) (&msw_rc_reset_styles));
} }
msw_style_init (); msw_style_init ();
...@@ -96,8 +96,9 @@ theme_exit (void) ...@@ -96,8 +96,9 @@ theme_exit (void)
{ {
gdk_window_remove_filter (NULL, global_filter_func, NULL); gdk_window_remove_filter (NULL, global_filter_func, NULL);
if(this_module) { if (this_module)
g_module_close(this_module); {
g_module_close (this_module);
this_module = NULL; this_module = NULL;
} }
} }
...@@ -112,8 +113,8 @@ theme_create_rc_style (void) ...@@ -112,8 +113,8 @@ theme_create_rc_style (void)
* is loaded and checks to see if we are compatible with the * is loaded and checks to see if we are compatible with the
* version of GTK+ that loads us. * version of GTK+ that loads us.
*/ */
G_MODULE_EXPORT const gchar* G_MODULE_EXPORT const gchar *
g_module_check_init (GModule *module) g_module_check_init (GModule * module)
{ {
return gtk_check_version (2,0,0); return gtk_check_version (2, 0, 0);
} }
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#endif #endif
#ifndef TMT_CAPTIONFONT #ifndef TMT_CAPTIONFONT
/* These aren't in mingw's "w32api" headers, nor in the Platform SDK /* These aren't in mingw's "w32api" headers, nor in the Platform SDK
* headers. * headers.
*/ */
...@@ -80,8 +81,7 @@ ...@@ -80,8 +81,7 @@
#define TRS_NORMAL 1 #define TRS_NORMAL 1
static const LPCWSTR class_descriptors[] = static const LPCWSTR class_descriptors[] = {
{
L"Scrollbar", /* XP_THEME_CLASS_SCROLLBAR */ L"Scrollbar", /* XP_THEME_CLASS_SCROLLBAR */
L"Button", /* XP_THEME_CLASS_BUTTON */ L"Button", /* XP_THEME_CLASS_BUTTON */
L"Header", /* XP_THEME_CLASS_HEADER */ L"Header", /* XP_THEME_CLASS_HEADER */
...@@ -101,8 +101,7 @@ static const LPCWSTR class_descriptors[] = ...@@ -101,8 +101,7 @@ static const LPCWSTR class_descriptors[] =
L"Trackbar" /* XP_THEME_CLASS_TRACKBAR */ L"Trackbar" /* XP_THEME_CLASS_TRACKBAR */
}; };
static const short element_part_map[]= static const short element_part_map[] = {
{
BP_CHECKBOX, BP_CHECKBOX,
BP_CHECKBOX, BP_CHECKBOX,
BP_PUSHBUTTON, BP_PUSHBUTTON,
...@@ -135,7 +134,7 @@ static const short element_part_map[]= ...@@ -135,7 +134,7 @@ static const short element_part_map[]=
PP_BAR, PP_BAR,
PP_BARVERT, PP_BARVERT,
TTP_STANDARD, TTP_STANDARD,
0 /*RP_BAND*/, 0 /* RP_BAND */ ,
RP_GRIPPER, RP_GRIPPER,
RP_GRIPPERVERT, RP_GRIPPERVERT,
RP_CHEVRON, RP_CHEVRON,
...@@ -159,22 +158,28 @@ static const short element_part_map[]= ...@@ -159,22 +158,28 @@ static const short element_part_map[]=
static HINSTANCE uxtheme_dll = NULL; static HINSTANCE uxtheme_dll = NULL;
static HTHEME open_themes[XP_THEME_CLASS__SIZEOF]; static HTHEME open_themes[XP_THEME_CLASS__SIZEOF];
typedef HRESULT (FAR PASCAL *GetThemeSysFontFunc) typedef HRESULT (FAR PASCAL * GetThemeSysFontFunc)
(HTHEME hTheme, int iFontID, OUT LOGFONT *plf); (HTHEME hTheme, int iFontID, OUT LOGFONT * plf);
typedef int (FAR PASCAL *GetThemeSysSizeFunc) typedef int (FAR PASCAL * GetThemeSysSizeFunc) (HTHEME hTheme, int iSizeId);
(HTHEME hTheme, int iSizeId); typedef COLORREF (FAR PASCAL * GetThemeSysColorFunc) (HTHEME hTheme,
typedef COLORREF (FAR PASCAL *GetThemeSysColorFunc)(HTHEME hTheme, int iColorID); int iColorID);
typedef HTHEME (FAR PASCAL *OpenThemeDataFunc) typedef HTHEME (FAR PASCAL * OpenThemeDataFunc) (HWND hwnd,
(HWND hwnd, LPCWSTR pszClassList); LPCWSTR pszClassList);
typedef HRESULT (FAR PASCAL *CloseThemeDataFunc)(HTHEME theme); typedef HRESULT (FAR PASCAL * CloseThemeDataFunc) (HTHEME theme);
typedef HRESULT (FAR PASCAL *DrawThemeBackgroundFunc) typedef HRESULT (FAR PASCAL * DrawThemeBackgroundFunc)
(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, (HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
const RECT *pRect, const RECT *pClipRect); const RECT * pRect, const RECT * pClipRect);
typedef HRESULT (FAR PASCAL *EnableThemeDialogTextureFunc)(HWND hwnd, DWORD dwFlags); typedef HRESULT (FAR PASCAL * EnableThemeDialogTextureFunc) (HWND hwnd,
typedef BOOL (FAR PASCAL *IsThemeActiveFunc)(VOID); DWORD dwFlags);
typedef BOOL (FAR PASCAL *IsAppThemedFunc)(VOID); typedef BOOL (FAR PASCAL * IsThemeActiveFunc) (VOID);
typedef BOOL (FAR PASCAL *IsThemeBackgroundPartiallyTransparentFunc)(HTHEME hTheme, int iPartId, int iStateId); typedef BOOL (FAR PASCAL * IsAppThemedFunc) (VOID);
typedef HRESULT (FAR PASCAL *DrawThemeParentBackgroundFunc)(HWND hwnd, HDC hdc, RECT *prc); typedef BOOL (FAR PASCAL *
IsThemeBackgroundPartiallyTransparentFunc) (HTHEME hTheme,
int iPartId,
int iStateId);
typedef HRESULT (FAR PASCAL * DrawThemeParentBackgroundFunc) (HWND hwnd,
HDC hdc,
RECT * prc);
static GetThemeSysFontFunc get_theme_sys_font_func = NULL; static GetThemeSysFontFunc get_theme_sys_font_func = NULL;
static GetThemeSysColorFunc get_theme_sys_color_func = NULL; static GetThemeSysColorFunc get_theme_sys_color_func = NULL;
...@@ -185,7 +190,8 @@ static DrawThemeBackgroundFunc draw_theme_background_func = NULL; ...@@ -185,7 +190,8 @@ static DrawThemeBackgroundFunc draw_theme_background_func = NULL;
static EnableThemeDialogTextureFunc enable_theme_dialog_texture_func = NULL; static EnableThemeDialogTextureFunc enable_theme_dialog_texture_func = NULL;
static IsThemeActiveFunc is_theme_active_func = NULL; static IsThemeActiveFunc is_theme_active_func = NULL;
static IsAppThemedFunc is_app_themed_func = NULL; static IsAppThemedFunc is_app_themed_func = NULL;
static IsThemeBackgroundPartiallyTransparentFunc is_theme_partially_transparent_func = NULL; static IsThemeBackgroundPartiallyTransparentFunc
is_theme_partially_transparent_func = NULL;
static DrawThemeParentBackgroundFunc draw_theme_parent_background_func = NULL; static DrawThemeParentBackgroundFunc draw_theme_parent_background_func = NULL;
static void static void
...@@ -193,7 +199,7 @@ xp_theme_close_open_handles (void) ...@@ -193,7 +199,7 @@ xp_theme_close_open_handles (void)
{ {
int i; int i;
for (i=0; i < XP_THEME_CLASS__SIZEOF; i++) for (i = 0; i < XP_THEME_CLASS__SIZEOF; i++)
{ {
if (open_themes[i]) if (open_themes[i])
{ {
...@@ -209,25 +215,48 @@ xp_theme_init (void) ...@@ -209,25 +215,48 @@ xp_theme_init (void)
if (uxtheme_dll) if (uxtheme_dll)
return; return;
memset(open_themes, 0, sizeof(open_themes)); memset (open_themes, 0, sizeof (open_themes));
uxtheme_dll = LoadLibrary("uxtheme.dll"); uxtheme_dll = LoadLibrary ("uxtheme.dll");
if (!uxtheme_dll) if (!uxtheme_dll)
return; return;
is_app_themed_func = (IsAppThemedFunc) GetProcAddress(uxtheme_dll, "IsAppThemed"); is_app_themed_func =
(IsAppThemedFunc) GetProcAddress (uxtheme_dll, "IsAppThemed");
if(is_app_themed_func) { if (is_app_themed_func)
is_theme_active_func = (IsThemeActiveFunc) GetProcAddress(uxtheme_dll, "IsThemeActive"); {
open_theme_data_func = (OpenThemeDataFunc) GetProcAddress(uxtheme_dll, "OpenThemeData"); is_theme_active_func =
close_theme_data_func = (CloseThemeDataFunc) GetProcAddress(uxtheme_dll, "CloseThemeData"); (IsThemeActiveFunc) GetProcAddress (uxtheme_dll,
draw_theme_background_func = (DrawThemeBackgroundFunc) GetProcAddress(uxtheme_dll, "DrawThemeBackground"); "IsThemeActive");
enable_theme_dialog_texture_func = (EnableThemeDialogTextureFunc) GetProcAddress(uxtheme_dll, "EnableThemeDialogTexture"); open_theme_data_func =
get_theme_sys_font_func = (GetThemeSysFontFunc) GetProcAddress(uxtheme_dll, "GetThemeSysFont"); (OpenThemeDataFunc) GetProcAddress (uxtheme_dll,
get_theme_sys_color_func = (GetThemeSysColorFunc) GetProcAddress(uxtheme_dll, "GetThemeSysColor"); "OpenThemeData");
get_theme_sys_metric_func = (GetThemeSysSizeFunc) GetProcAddress(uxtheme_dll, "GetThemeSysSize"); close_theme_data_func =
is_theme_partially_transparent_func = (IsThemeBackgroundPartiallyTransparentFunc) GetProcAddress(uxtheme_dll, "IsThemeBackgroundPartiallyTransparent"); (CloseThemeDataFunc) GetProcAddress (uxtheme_dll,
draw_theme_parent_background_func = (DrawThemeParentBackgroundFunc) GetProcAddress(uxtheme_dll, "DrawThemeParentBackground"); "CloseThemeData");
draw_theme_background_func =
(DrawThemeBackgroundFunc) GetProcAddress (uxtheme_dll,
"DrawThemeBackground");
enable_theme_dialog_texture_func =
(EnableThemeDialogTextureFunc) GetProcAddress (uxtheme_dll,
"EnableThemeDialogTexture");
get_theme_sys_font_func =
(GetThemeSysFontFunc) GetProcAddress (uxtheme_dll,
"GetThemeSysFont");
get_theme_sys_color_func =
(GetThemeSysColorFunc) GetProcAddress (uxtheme_dll,
"GetThemeSysColor");
get_theme_sys_metric_func =
(GetThemeSysSizeFunc) GetProcAddress (uxtheme_dll,
"GetThemeSysSize");
is_theme_partially_transparent_func =
(IsThemeBackgroundPartiallyTransparentFunc)
GetProcAddress (uxtheme_dll,
"IsThemeBackgroundPartiallyTransparent");
draw_theme_parent_background_func =
(DrawThemeParentBackgroundFunc) GetProcAddress (uxtheme_dll,
"DrawThemeParentBackground");
} }
} }
...@@ -240,7 +269,7 @@ xp_theme_reset (void) ...@@ -240,7 +269,7 @@ xp_theme_reset (void)
void void
xp_theme_exit (void) xp_theme_exit (void)
{ {
if (! uxtheme_dll) if (!uxtheme_dll)
return; return;
xp_theme_close_open_handles (); xp_theme_close_open_handles ();
...@@ -266,7 +295,8 @@ xp_theme_get_handle_by_class (XpThemeClass klazz) ...@@ -266,7 +295,8 @@ xp_theme_get_handle_by_class (XpThemeClass klazz)
{ {
if (!open_themes[klazz] && open_theme_data_func) if (!open_themes[klazz] && open_theme_data_func)
{ {
open_themes[klazz] = open_theme_data_func(NULL, class_descriptors[klazz]); open_themes[klazz] =
open_theme_data_func (NULL, class_descriptors[klazz]);
} }
return open_themes[klazz]; return open_themes[klazz];
} }
...@@ -277,7 +307,7 @@ xp_theme_get_handle_by_element (XpThemeElement element) ...@@ -277,7 +307,7 @@ xp_theme_get_handle_by_element (XpThemeElement element)
HTHEME ret = NULL; HTHEME ret = NULL;
XpThemeClass klazz = XP_THEME_CLASS__SIZEOF; XpThemeClass klazz = XP_THEME_CLASS__SIZEOF;
switch(element) switch (element)
{ {
case XP_THEME_ELEMENT_TOOLTIP: case XP_THEME_ELEMENT_TOOLTIP:
klazz = XP_THEME_CLASS_TOOLTIP; klazz = XP_THEME_CLASS_TOOLTIP;
...@@ -394,7 +424,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -394,7 +424,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
{ {
int ret = 0; int ret = 0;
switch(element) switch (element)
{ {
case XP_THEME_ELEMENT_TOOLTIP: case XP_THEME_ELEMENT_TOOLTIP:
ret = TTSS_NORMAL; ret = TTSS_NORMAL;
...@@ -457,7 +487,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -457,7 +487,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
case XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE: case XP_THEME_ELEMENT_TAB_ITEM_LEFT_EDGE:
case XP_THEME_ELEMENT_TAB_ITEM: case XP_THEME_ELEMENT_TAB_ITEM:
switch(state) switch (state)
{ {
case GTK_STATE_PRELIGHT: case GTK_STATE_PRELIGHT:
ret = TIS_HOT; ret = TIS_HOT;
...@@ -475,7 +505,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -475,7 +505,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_EDIT_TEXT: case XP_THEME_ELEMENT_EDIT_TEXT:
switch(state) switch (state)
{ {
case GTK_STATE_PRELIGHT: case GTK_STATE_PRELIGHT:
ret = ETS_FOCUSED; ret = ETS_FOCUSED;
...@@ -497,7 +527,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -497,7 +527,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
case XP_THEME_ELEMENT_SCROLLBAR_H: case XP_THEME_ELEMENT_SCROLLBAR_H:
case XP_THEME_ELEMENT_SCROLLBAR_V: case XP_THEME_ELEMENT_SCROLLBAR_V:
switch(state) switch (state)
{ {
case GTK_STATE_SELECTED: case GTK_STATE_SELECTED:
case GTK_STATE_ACTIVE: case GTK_STATE_ACTIVE:
...@@ -515,7 +545,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -515,7 +545,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_ARROW_DOWN: case XP_THEME_ELEMENT_ARROW_DOWN:
switch(state) switch (state)
{ {
case GTK_STATE_ACTIVE: case GTK_STATE_ACTIVE:
ret = ABS_DOWNPRESSED; ret = ABS_DOWNPRESSED;
...@@ -532,7 +562,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -532,7 +562,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_ARROW_UP: case XP_THEME_ELEMENT_ARROW_UP:
switch(state) switch (state)
{ {
case GTK_STATE_ACTIVE: case GTK_STATE_ACTIVE:
ret = ABS_UPPRESSED; ret = ABS_UPPRESSED;
...@@ -549,7 +579,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -549,7 +579,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_ARROW_LEFT: case XP_THEME_ELEMENT_ARROW_LEFT:
switch(state) switch (state)
{ {
case GTK_STATE_ACTIVE: case GTK_STATE_ACTIVE:
ret = ABS_LEFTPRESSED; ret = ABS_LEFTPRESSED;
...@@ -566,7 +596,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -566,7 +596,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_ARROW_RIGHT: case XP_THEME_ELEMENT_ARROW_RIGHT:
switch(state) switch (state)
{ {
case GTK_STATE_ACTIVE: case GTK_STATE_ACTIVE:
ret = ABS_RIGHTPRESSED; ret = ABS_RIGHTPRESSED;
...@@ -584,7 +614,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -584,7 +614,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
case XP_THEME_ELEMENT_CHECKBOX: case XP_THEME_ELEMENT_CHECKBOX:
case XP_THEME_ELEMENT_RADIO_BUTTON: case XP_THEME_ELEMENT_RADIO_BUTTON:
switch(state) switch (state)
{ {
case GTK_STATE_SELECTED: case GTK_STATE_SELECTED:
ret = CBS_UNCHECKEDPRESSED; ret = CBS_UNCHECKEDPRESSED;
...@@ -602,7 +632,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -602,7 +632,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
case XP_THEME_ELEMENT_PRESSED_CHECKBOX: case XP_THEME_ELEMENT_PRESSED_CHECKBOX:
case XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON: case XP_THEME_ELEMENT_PRESSED_RADIO_BUTTON:
switch(state) switch (state)
{ {
case GTK_STATE_SELECTED: case GTK_STATE_SELECTED:
ret = CBS_CHECKEDPRESSED; ret = CBS_CHECKEDPRESSED;
...@@ -619,7 +649,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -619,7 +649,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_DEFAULT_BUTTON: case XP_THEME_ELEMENT_DEFAULT_BUTTON:
switch(state) switch (state)
{ {
case GTK_STATE_ACTIVE: case GTK_STATE_ACTIVE:
ret = PBS_PRESSED; ret = PBS_PRESSED;
...@@ -636,7 +666,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -636,7 +666,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_SPIN_BUTTON_DOWN: case XP_THEME_ELEMENT_SPIN_BUTTON_DOWN:
switch(state) switch (state)
{ {
case GTK_STATE_ACTIVE: case GTK_STATE_ACTIVE:
ret = DNS_PRESSED; ret = DNS_PRESSED;
...@@ -653,7 +683,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state) ...@@ -653,7 +683,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_SPIN_BUTTON_UP: case XP_THEME_ELEMENT_SPIN_BUTTON_UP:
switch(state) switch (state)
{