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
// 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
#define _GNU_SOURCE
@ -296,8 +296,8 @@ void Theme::load(const char *filename){
loadMenuStyle();
loadToolbarStyle();
loadWindowStyle();
loadRootCommand();
loadTabStyle();
loadRootCommand();
loadMisc();
XrmDestroyDatabase(m_database);
@ -546,6 +546,7 @@ void Theme::loadTabStyle() {
m_windowstyle.tab.border_width = 1;
} else
m_windowstyle.tab.border_width = 1;
m_windowstyle.tab.border_width_2x = m_windowstyle.tab.border_width*2;
//---------- font
@ -557,10 +558,8 @@ void Theme::loadTabStyle() {
m_windowstyle.tab.font.set_extents =
XExtentsOfFontSet(m_windowstyle.tab.font.set);
} else {
XFontStruct *fontstruct = 0;
readDatabaseFont("window.tab.font", "Window.Tab.Font",
&fontstruct);
m_windowstyle.tab.font.fontstruct = fontstruct;
&m_windowstyle.tab.font.fontstruct);
}
//--------- rotated font for left and right tabs
@ -868,7 +867,7 @@ void Theme::readDatabaseFontSet(char *rname, char *rclass, XFontSet *fontset) {
static char *defaultFont = "fixed";
Bool load_default = False;
bool load_default = false;
XrmValue value;
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)) {
char *fontname = value.addr;
if (! (*fontset = createFontSet(fontname)))
load_default = True;
load_default = true;
} else
load_default = True;
load_default = true;
if (load_default) {
*fontset = createFontSet(defaultFont);
@ -889,13 +888,13 @@ void Theme::readDatabaseFontSet(char *rname, char *rclass, XFontSet *fontset) {
fprintf(stderr,
I18n::instance()->
getMessage(
#ifdef NLS
#ifdef NLS
ScreenSet, ScreenDefaultFontLoadFail,
#else // !NLS
#else // !NLS
0, 0,
#endif // NLS
#endif // NLS
"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";
Bool load_default = False;
bool load_default = false;
XrmValue value;
char *value_type;
@ -915,24 +914,25 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
XFreeFont(m_display, *font);
if (XrmGetResource(m_database, rname, rclass, &value_type, &value)) {
if ((*font = XLoadQueryFont(m_display,
value.addr)) == NULL) {
#ifdef DEBUG
cerr<<__FILE__<<"("<<__LINE__<<"): Load font:"<<value.addr<<endl;
#endif
if ((*font = XLoadQueryFont(m_display, value.addr)) == NULL) {
fprintf(stderr,
I18n::instance()->
getMessage(
#ifdef NLS
#ifdef NLS
ScreenSet, ScreenFontLoadFail,
#else // !NLS
#else // !NLS
0, 0,
#endif // NLS
#endif // NLS
"BScreen::LoadStyle(): couldn't load font '%s'\n"),
value.addr);
load_default = True;
load_default = true;
}
} else
load_default = True;
load_default = true;
if (load_default) {
if ((*font = XLoadQueryFont(m_display,
@ -946,7 +946,7 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
0, 0,
#endif // NLS
"BScreen::LoadStyle(): couldn't load default font.\n"));
throw static_cast<int>(2);
throw (int)(2);
}
}
}