indentation

This commit is contained in:
fluxgen 2002-01-27 13:16:07 +00:00
parent 76a38e466c
commit b6f3feac0b

View file

@ -41,7 +41,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Theme.cc,v 1.16 2002/01/21 02:02:38 fluxgen Exp $ // $Id: Theme.cc,v 1.17 2002/01/27 13:16:07 fluxgen Exp $
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
@ -296,8 +296,8 @@ void Theme::load(const char *filename){
loadMenuStyle(); loadMenuStyle();
loadToolbarStyle(); loadToolbarStyle();
loadWindowStyle(); loadWindowStyle();
loadRootCommand();
loadTabStyle(); loadTabStyle();
loadRootCommand();
loadMisc(); loadMisc();
XrmDestroyDatabase(m_database); XrmDestroyDatabase(m_database);
@ -546,6 +546,7 @@ void Theme::loadTabStyle() {
m_windowstyle.tab.border_width = 1; m_windowstyle.tab.border_width = 1;
} else } else
m_windowstyle.tab.border_width = 1; m_windowstyle.tab.border_width = 1;
m_windowstyle.tab.border_width_2x = m_windowstyle.tab.border_width*2; m_windowstyle.tab.border_width_2x = m_windowstyle.tab.border_width*2;
//---------- font //---------- font
@ -557,10 +558,8 @@ void Theme::loadTabStyle() {
m_windowstyle.tab.font.set_extents = m_windowstyle.tab.font.set_extents =
XExtentsOfFontSet(m_windowstyle.tab.font.set); XExtentsOfFontSet(m_windowstyle.tab.font.set);
} else { } else {
XFontStruct *fontstruct = 0;
readDatabaseFont("window.tab.font", "Window.Tab.Font", readDatabaseFont("window.tab.font", "Window.Tab.Font",
&fontstruct); &m_windowstyle.tab.font.fontstruct);
m_windowstyle.tab.font.fontstruct = fontstruct;
} }
//--------- rotated font for left and right tabs //--------- rotated font for left and right tabs
@ -868,7 +867,7 @@ void Theme::readDatabaseFontSet(char *rname, char *rclass, XFontSet *fontset) {
static char *defaultFont = "fixed"; static char *defaultFont = "fixed";
Bool load_default = False; bool load_default = false;
XrmValue value; XrmValue value;
char *value_type; char *value_type;
@ -878,9 +877,9 @@ void Theme::readDatabaseFontSet(char *rname, char *rclass, XFontSet *fontset) {
if (XrmGetResource(m_database, rname, rclass, &value_type, &value)) { if (XrmGetResource(m_database, rname, rclass, &value_type, &value)) {
char *fontname = value.addr; char *fontname = value.addr;
if (! (*fontset = createFontSet(fontname))) if (! (*fontset = createFontSet(fontname)))
load_default = True; load_default = true;
} else } else
load_default = True; load_default = true;
if (load_default) { if (load_default) {
*fontset = createFontSet(defaultFont); *fontset = createFontSet(defaultFont);
@ -895,7 +894,7 @@ void Theme::readDatabaseFontSet(char *rname, char *rclass, XFontSet *fontset) {
0, 0, 0, 0,
#endif // NLS #endif // NLS
"BScreen::LoadStyle(): couldn't load default font.\n")); "BScreen::LoadStyle(): couldn't load default font.\n"));
throw static_cast<int>(2); throw 2;
} }
} }
} }
@ -907,7 +906,7 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
static char *defaultFont = "fixed"; static char *defaultFont = "fixed";
Bool load_default = False; bool load_default = false;
XrmValue value; XrmValue value;
char *value_type; char *value_type;
@ -915,9 +914,10 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
XFreeFont(m_display, *font); XFreeFont(m_display, *font);
if (XrmGetResource(m_database, rname, rclass, &value_type, &value)) { if (XrmGetResource(m_database, rname, rclass, &value_type, &value)) {
#ifdef DEBUG
if ((*font = XLoadQueryFont(m_display, cerr<<__FILE__<<"("<<__LINE__<<"): Load font:"<<value.addr<<endl;
value.addr)) == NULL) { #endif
if ((*font = XLoadQueryFont(m_display, value.addr)) == NULL) {
fprintf(stderr, fprintf(stderr,
I18n::instance()-> I18n::instance()->
getMessage( getMessage(
@ -929,10 +929,10 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
"BScreen::LoadStyle(): couldn't load font '%s'\n"), "BScreen::LoadStyle(): couldn't load font '%s'\n"),
value.addr); value.addr);
load_default = True; load_default = true;
} }
} else } else
load_default = True; load_default = true;
if (load_default) { if (load_default) {
if ((*font = XLoadQueryFont(m_display, if ((*font = XLoadQueryFont(m_display,
@ -946,7 +946,7 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
0, 0, 0, 0,
#endif // NLS #endif // NLS
"BScreen::LoadStyle(): couldn't load default font.\n")); "BScreen::LoadStyle(): couldn't load default font.\n"));
throw static_cast<int>(2); throw (int)(2);
} }
} }
} }