author | mickeyl <mickeyl> | 2004-06-22 10:36:46 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-06-22 10:36:46 (UTC) |
commit | 9c471976e750812f0af3b443964954d4b5a5ed20 (patch) (side-by-side diff) | |
tree | c049d0b1b419a4b76aaea02d063484b4e3f1fc4e | |
parent | 9cff98cb70d8e3a69cefe718bf02720134c10bca (diff) | |
download | opie-9c471976e750812f0af3b443964954d4b5a5ed20.zip opie-9c471976e750812f0af3b443964954d4b5a5ed20.tar.gz opie-9c471976e750812f0af3b443964954d4b5a5ed20.tar.bz2 |
use stderr as default odebug output destination as pointed out by Brad
-rw-r--r-- | libopie2/opiecore/oglobalsettings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opiecore/oglobalsettings.cpp b/libopie2/opiecore/oglobalsettings.cpp index f34c531..89c77d7 100644 --- a/libopie2/opiecore/oglobalsettings.cpp +++ b/libopie2/opiecore/oglobalsettings.cpp @@ -1,112 +1,113 @@ /* This file is part of the Opie Project Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> Inspired by the KDE globalsettings which are Copyright (C) 2000 David Faure <faure@kde.org> =. .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* OPIE */ #include <opie2/oglobalsettings.h> #include <opie2/oconfig.h> +#include <opie2/odebug.h> #include <opie2/oglobal.h> /* QT */ #include <qdir.h> /* UNIX */ #include <stdlib.h> using namespace Opie::Core; QString* OGlobalSettings::s_desktopPath = 0; QString* OGlobalSettings::s_autostartPath = 0; QString* OGlobalSettings::s_trashPath = 0; QString* OGlobalSettings::s_documentPath = 0; QFont *OGlobalSettings::_generalFont = 0; QFont *OGlobalSettings::_fixedFont = 0; QFont *OGlobalSettings::_toolBarFont = 0; QFont *OGlobalSettings::_menuFont = 0; QFont *OGlobalSettings::_windowTitleFont = 0; QFont *OGlobalSettings::_taskbarFont = 0; QColor *OGlobalSettings::OpieGray = 0; QColor *OGlobalSettings::OpieHighlight = 0; QColor *OGlobalSettings::OpieAlternate = 0; - + OGlobalSettings::OMouseSettings *OGlobalSettings::s_mouseSettings = 0; //FIXME: Add manipulators to the accessors int OGlobalSettings::dndEventDelay() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "General" ); return c->readNumEntry("DndDelay", 2); } bool OGlobalSettings::singleClick() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "OPIE" ); return c->readBoolEntry("SingleClick", OPIE_DEFAULT_SINGLECLICK); } bool OGlobalSettings::insertTearOffHandle() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "OPIE" ); return c->readBoolEntry("InsertTearOffHandle", OPIE_DEFAULT_INSERTTEAROFFHANDLES); } bool OGlobalSettings::changeCursorOverIcon() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "OPIE" ); return c->readBoolEntry("ChangeCursor", OPIE_DEFAULT_CHANGECURSOR); } bool OGlobalSettings::visualActivate() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "OPIE" ); return c->readBoolEntry("VisualActivate", OPIE_DEFAULT_VISUAL_ACTIVATE); } unsigned int OGlobalSettings::visualActivateSpeed() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "OPIE" ); return c->readNumEntry( "VisualActivateSpeed", OPIE_DEFAULT_VISUAL_ACTIVATE_SPEED ); @@ -114,97 +115,97 @@ unsigned int OGlobalSettings::visualActivateSpeed() int OGlobalSettings::autoSelectDelay() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "OPIE" ); return c->readNumEntry("AutoSelectDelay", OPIE_DEFAULT_AUTOSELECTDELAY); } OGlobalSettings::Completion OGlobalSettings::completionMode() { int completion; OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "General" ); completion = c->readNumEntry("completionMode", -1); if ((completion < (int) CompletionNone) || (completion > (int) CompletionPopupAuto)) { completion = (int) CompletionPopup; // Default } return (Completion) completion; } bool OGlobalSettings::showContextMenusOnPress () { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs (c, "ContextMenus"); return cgs.config()->readBoolEntry("ShowOnPress", true); } int OGlobalSettings::contextMenuKey () { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs (c, "Shortcuts"); //OShortcut cut (cgs.config()->readEntry ("PopupMenuContext", "Menu")); //return cut.keyCodeQt(); return 0; // FIXME } OGlobalSettings::Debug OGlobalSettings::debugMode() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "General" ); - int debug = c->readNumEntry( "debugMode", -1 ); + int debug = c->readNumEntry( "debugMode", ODEBUG_STDERR ); if ( (debug < (int) DebugNone) || (debug > (int) DebugSocket) ) { debug = (int) DebugStdErr; // Default } return (Debug) debug; } QString OGlobalSettings::debugOutput() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, "General" ); QString deflt = QString::null; switch( debugMode() ) { case DebugNone: break; // no additional information needed case DebugFiles: deflt = "/var/log/opiedebug.log"; break; // file to save output in case DebugMsgBox: break; // no additional information needed case DebugStdErr: break; // no additional information needed case DebugSysLog: break; // no additional information needed case DebugSocket: deflt = "127.0.0.1:8913"; break; // address to send packets to } return c->readEntry( "debugOutput"+ QString::number(debugMode()), deflt ); } QColor OGlobalSettings::toolBarHighlightColor() { initColors(); OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, QString::fromLatin1("Toolbar style") ); return c->readColorEntry("HighlightColor", OpieHighlight); } QColor OGlobalSettings::inactiveTitleColor() { if (!OpieGray) OpieGray = new QColor(220, 220, 220); OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, QString::fromLatin1("WM") ); return c->readColorEntry( "inactiveBackground", OpieGray ); } QColor OGlobalSettings::inactiveTextColor() { OConfig *c = OGlobal::config(); OConfigGroupSaver cgs( c, QString::fromLatin1("WM") ); return c->readColorEntry( "inactiveForeground", &Qt::darkGray ); |