|
From: Dom L. <ci...@us...> - 2005-06-26 02:33:20
|
Update of /cvsroot/gtk-wimp/gtk-wimp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25027/src Modified Files: msw_style.c xp_theme.c xp_theme.h Log Message: make the menubar and toolbar shadows depend on whether we're in XP theme or not Index: msw_style.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/msw_style.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** msw_style.c 26 Jun 2005 02:11:05 -0000 1.20 --- msw_style.c 26 Jun 2005 02:33:10 -0000 1.21 *************** *** 553,559 **** setup_msw_rc_style(void) { - /* TODO: Owen says: - "If your setup_system_styles() function called gtk_rc_parse_string(), then you are just piling a new set of strings on top each time the theme changes .. the old ones won't be removed" */ - char buf[1024], font_buf[256], *font_ptr; --- 553,556 ---- *************** *** 571,574 **** --- 568,573 ---- GdkColor text_prelight; + gboolean xp_theme = xp_theme_is_active(); + /* Prelight */ sys_color_to_gtk_color(XP_THEME_CLASS_TEXT, COLOR_HIGHLIGHTTEXT, &fg_prelight); *************** *** 633,641 **** "{\n" "bg[NORMAL] = { %d, %d, %d }\n" ! "GtkMenuBar::shadow-type = etched-in\n" "}widget_class \"*MenuBar*\" style \"msw-menu-bar\"\n", btn_face.red, btn_face.green, ! btn_face.blue); gtk_rc_parse_string(buf); --- 632,651 ---- "{\n" "bg[NORMAL] = { %d, %d, %d }\n" ! "GtkMenuBar::shadow-type = %s\n" "}widget_class \"*MenuBar*\" style \"msw-menu-bar\"\n", btn_face.red, btn_face.green, ! btn_face.blue, ! (xp_theme ? "etched-in" : "out")); ! gtk_rc_parse_string(buf); ! ! g_snprintf(buf, sizeof (buf), ! "style \"msw-toolbar\" = \"msw-default\"\n" ! "{\n" ! "GtkHandleBox::shadow-type = %s\n" ! "GtkToolbar::shadow-type = %s\n" ! "}widget_class \"*HandleBox*\" style \"msw-toolbar\"\n", ! (xp_theme ? "none" : "out"), ! (xp_theme ? "none" : "out")); gtk_rc_parse_string(buf); Index: xp_theme.c =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** xp_theme.c 26 Jun 2005 02:23:27 -0000 1.36 --- xp_theme.c 26 Jun 2005 02:33:10 -0000 1.37 *************** *** 722,726 **** } ! static gboolean xp_theme_is_active (void) { --- 722,726 ---- } ! gboolean xp_theme_is_active (void) { Index: xp_theme.h =================================================================== RCS file: /cvsroot/gtk-wimp/gtk-wimp/src/xp_theme.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** xp_theme.h 3 May 2005 20:06:36 -0000 1.15 --- xp_theme.h 26 Jun 2005 02:33:10 -0000 1.16 *************** *** 113,115 **** --- 113,117 ---- gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal); + gboolean xp_theme_is_active (void); + #endif /* XP_THEME_H */ |