Author: mvidner
Date: Thu Jul 10 18:51:50 2008
New Revision: 48978
URL: http://svn.opensuse.org/viewcvs/yast?rev=48978&view=rev
Log:
Added hooks to handle Alt-Ctrl-Shift-D.
Useful when CWMTab messes up (bnc#406138).
Modified:
trunk/yast2/library/cwm/src/CWM.ycp
trunk/yast2/library/cwm/src/CWMTab.ycp
Modified: trunk/yast2/library/cwm/src/CWM.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/cwm/src/CWM.ycp?rev=48978&r1=48977&r2=48978&view=diff
==============================================================================
--- trunk/yast2/library/cwm/src/CWM.ycp (original)
+++ trunk/yast2/library/cwm/src/CWM.ycp Thu Jul 10 18:51:50 2008
@@ -733,6 +733,13 @@
Wizard::RestoreHelp (help);
}
+/**
+ * A hook to handle Alt-Ctrl-Shift-D
+ */
+void handleDebug () {
+ y2debug ("Handling a debugging event");
+}
+
/**
* Generic function to create dialog and handle it's events
* @param widgets list of widget maps
@@ -766,6 +773,9 @@
event_descr = (map) UI::WaitForEvent ();
}
ret = (event_descr["ID"]:nil);
+ if (event_descr["EventType"]:"" == "DebugEvent") {
+ handleDebug ();
+ }
symbol handle_ret = handleWidgets (widgets, event_descr);
if (handle_ret != nil
|| (is (ret, symbol) && contains (save_exits, ret)))
Modified: trunk/yast2/library/cwm/src/CWMTab.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/cwm/src/CWMTab.ycp?rev=48978&r1=48977&r2=48978&view=diff
==============================================================================
--- trunk/yast2/library/cwm/src/CWMTab.ycp (original)
+++ trunk/yast2/library/cwm/src/CWMTab.ycp Thu Jul 10 18:51:50 2008
@@ -237,6 +237,13 @@
}
/**
+ * A hook to handle Alt-Ctrl-Shift-D
+ */
+void handleDebug () {
+ y2debug ("Handling a debugging event");
+}
+
+/**
* Handle function of the widget
* @param map widget a widget description map
* @param key strnig the widget key
@@ -244,6 +251,9 @@
* @return symbol for wizard sequencer or nil
*/
global define symbol HandleWrapper (string key, map event) {
+ if (event["EventType"]:"" == "DebugEvent") {
+ handleDebug ();
+ }
return Handle (CWM::GetProcessedWidget (), key, event);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org