Author: sh-sh-sh
Date: Wed Mar 5 17:12:35 2008
New Revision: 45229
URL: http://svn.opensuse.org/viewcvs/yast?rev=45229&view=rev
Log:
make Shift-F7 affect all logging, not only UI
Modified:
trunk/libyui/VERSION
trunk/libyui/package/yast2-libyui.changes
trunk/libyui/src/YUI.cc
trunk/libyui/src/YUI.h
trunk/libyui/src/YUILog.cc
trunk/libyui/src/YUILog.h
trunk/ycp-ui-bindings/VERSION
trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes
trunk/ycp-ui-bindings/src/YUIComponent.cc
trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in
Modified: trunk/libyui/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/VERSION?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/libyui/VERSION (original)
+++ trunk/libyui/VERSION Wed Mar 5 17:12:35 2008
@@ -1 +1 @@
-2.16.38
+2.16.39
Modified: trunk/libyui/package/yast2-libyui.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/package/yast2-libyui.changes?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/libyui/package/yast2-libyui.changes (original)
+++ trunk/libyui/package/yast2-libyui.changes Wed Mar 5 17:12:35 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Mar 5 17:08:42 CET 2008 - sh@suse.de
+
+- Fixed bnc #365999: Shift-F7 affects only UI logging
+- V 2.16.39
+
+-------------------------------------------------------------------
Tue Mar 4 13:48:08 CET 2008 - sh@suse.de
- Conflict with yast2-core < 2.16.38 (before pkg split)
Modified: trunk/libyui/src/YUI.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YUI.cc?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/libyui/src/YUI.cc (original)
+++ trunk/libyui/src/YUI.cc Wed Mar 5 17:12:35 2008
@@ -363,30 +363,4 @@
-
-// FIXME: Move this to another class
-// (YUI should become independent of YCP and the YaST2 infrastructure)
-
-bool YUI::debugLoggingEnabled() const
-{
-#if 0
- // FIXME: Find a way to set y2log parameters without a hard dependency on libycp
- return get_log_debug();
-#else
- return YUILog::debugLoggingEnabled();
-#endif
-}
-
-
-void YUI::enableDebugLogging( bool enable )
-{
- YUILog::enableDebugLogging( enable );
-#if 0
- // FIXME: Find a way to set y2log parameters without a hard dependency on libycp
- set_log_debug( enable );
-#endif
-}
-
-
-
// EOF
Modified: trunk/libyui/src/YUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YUI.h?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/libyui/src/YUI.h (original)
+++ trunk/libyui/src/YUI.h Wed Mar 5 17:12:35 2008
@@ -263,18 +263,6 @@
**/
bool waitForYCPThread();
- /**
- * Check if debug logging is enabled.
- **/
- bool debugLoggingEnabled() const;
-
- /**
- * Enable or disable debug logging.
- * This will propagate the parameter to YUILog::enableDebugLogging(),
- * but it might do more than just that.
- **/
- void enableDebugLogging( bool enable = true );
-
//
// Data members
Modified: trunk/libyui/src/YUILog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YUILog.cc?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/libyui/src/YUILog.cc (original)
+++ trunk/libyui/src/YUILog.cc Wed Mar 5 17:12:35 2008
@@ -254,6 +254,8 @@
**/
YUILogPrivate()
: loggerFunction( stderrLogger )
+ , enableDebugLoggingHook( 0 )
+ , debugLoggingEnabledHook( 0 )
, enableDebugLogging( true )
{}
@@ -296,10 +298,12 @@
// Data members
//
- YUILoggerFunction loggerFunction;
- bool enableDebugLogging;
+ YUILoggerFunction loggerFunction;
+ YUIEnableDebugLoggingFunction enableDebugLoggingHook;
+ YUIDebugLoggingEnabledFunction debugLoggingEnabledHook;
+ bool enableDebugLogging;
- vector threadLogInfo;
+ vector threadLogInfo;
};
@@ -336,13 +340,19 @@
YUILog::enableDebugLogging( bool debugLogging )
{
instance()->priv->enableDebugLogging = debugLogging;
+
+ if ( instance()->priv->enableDebugLoggingHook )
+ instance()->priv->enableDebugLoggingHook( debugLogging );
}
bool
YUILog::debugLoggingEnabled()
{
- return instance()->priv->enableDebugLogging;
+ if ( instance()->priv->debugLoggingEnabledHook )
+ return instance()->priv->debugLoggingEnabledHook();
+ else
+ return instance()->priv->enableDebugLogging;
}
@@ -368,6 +378,29 @@
}
+void
+YUILog::setEnableDebugLoggingHooks( YUIEnableDebugLoggingFunction enableFunction,
+ YUIDebugLoggingEnabledFunction isEnabledFunction )
+{
+ instance()->priv->enableDebugLoggingHook = enableFunction;
+ instance()->priv->debugLoggingEnabledHook = isEnabledFunction;
+}
+
+
+YUIEnableDebugLoggingFunction
+YUILog::enableDebugLoggingHook()
+{
+ return instance()->priv->enableDebugLoggingHook;
+}
+
+
+YUIDebugLoggingEnabledFunction
+YUILog::debugLoggingEnabledHook()
+{
+ return instance()->priv->debugLoggingEnabledHook;
+}
+
+
ostream &
YUILog::log( YUILogLevel_t logLevel,
const char * logComponent,
Modified: trunk/libyui/src/YUILog.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YUILog.h?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/libyui/src/YUILog.h (original)
+++ trunk/libyui/src/YUILog.h Wed Mar 5 17:12:35 2008
@@ -84,6 +84,10 @@
const char *, // sourceFunctionName
const char * ); // message
+typedef void (*YUIEnableDebugLoggingFunction)( bool );
+typedef bool (*YUIDebugLoggingEnabledFunction)();
+
+
/**
* UI logging.
**/
@@ -144,6 +148,31 @@
**/
static YUILoggerFunction loggerFunction( bool returnStderrLogger = false );
+ /**
+ * Set the hook functions to enable/disable debug logging and to query if
+ * debug logging is enabled:
+ *
+ * void enableDebugLogging( bool enable );
+ * bool debugLoggingEnabled();
+ *
+ * If those functions are set, they will be used instead of the internal
+ * "debugLogging" flag.
+ **/
+ static void setEnableDebugLoggingHooks( YUIEnableDebugLoggingFunction enableFunction,
+ YUIDebugLoggingEnabledFunction isEnabledFunction );
+
+ /**
+ * Return the hook function that enables or disables debug logging
+ * or 0 if no such hook function is set.
+ **/
+ static YUIEnableDebugLoggingFunction enableDebugLoggingHook();
+
+ /**
+ * Return the hook function that checks if debug logging is enabled
+ * or 0 if no such hook function is set.
+ **/
+ static YUIDebugLoggingEnabledFunction debugLoggingEnabledHook();
+
private:
/**
Modified: trunk/ycp-ui-bindings/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/VERSION?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/VERSION (original)
+++ trunk/ycp-ui-bindings/VERSION Wed Mar 5 17:12:35 2008
@@ -1 +1 @@
-2.16.37
+2.16.38
Modified: trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes (original)
+++ trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes Wed Mar 5 17:12:35 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Mar 5 17:09:51 CET 2008 - sh@suse.de
+
+- Fixed bnc #365999: Shift-F7 affects only UI logging
+- V 2.16.38
+
+-------------------------------------------------------------------
Tue Mar 4 13:48:28 CET 2008 - sh@suse.de
- Conflict with yast2-core < 2.16.38 (before pkg split) (bnc #366873)
Modified: trunk/ycp-ui-bindings/src/YUIComponent.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/src/YUIComponent.cc?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/src/YUIComponent.cc (original)
+++ trunk/ycp-ui-bindings/src/YUIComponent.cc Wed Mar 5 17:12:35 2008
@@ -146,6 +146,8 @@
y2debug( "Creating UI" );
YUILog::setLoggerFunction( yui_y2logger );
+ YUILog::setEnableDebugLoggingHooks( set_log_debug, // from y2log
+ get_log_debug ); // from y2log
try
{
Modified: trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in?rev=45229&r1=45228&r2=45229&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in (original)
+++ trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in Wed Mar 5 17:12:35 2008
@@ -19,8 +19,8 @@
# libycp includes crypto built-ins
BuildRequires: libxcrypt-devel
-Requires: yast2-libyui
-BuildRequires: yast2-libyui-devel
+Requires: yast2-libyui >= 2.16.39
+BuildRequires: yast2-libyui-devel >= 2.16.39
# libyui ImplPtr
BuildRequires: boost-devel
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org