1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r22136: Fix incorrect event handling.

Submitted by John Jorgensen <jorgensen.john@gmail.com>

rafal
(This used to be commit f12a7f223dbd6e744df85308098a093b4e48cadb)
This commit is contained in:
Rafal Szczesniak 2007-04-09 12:06:42 +00:00 committed by Gerald (Jerry) Carter
parent 3ff1625f1f
commit c0b76be62f
2 changed files with 10 additions and 4 deletions

View File

@ -61,7 +61,7 @@ qx.Proto.buildFsm = function(module)
{ {
// Yup. Re-open the database // Yup. Re-open the database
var dbName = fsm.getObject("dbName"); var dbName = fsm.getObject("dbName");
dbName.dispatchEvent(new qx.event.type.Event("changeSelection"), dbName.dispatchEvent(new qx.event.type.Event("changeSelected"),
true); true);
} }
else else
@ -104,8 +104,14 @@ qx.Proto.buildFsm = function(module)
"changeSelection": "changeSelection":
{ {
"tree" : "tree" :
"Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed", "Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed"
},
// If another database is selected, try to open it and refresh
// the tree
"changeSelected":
{
"dbName": "dbName":
"Transition_Idle_to_AwaitRpcResult_via_db_changed" "Transition_Idle_to_AwaitRpcResult_via_db_changed"
} }

View File

@ -52,9 +52,9 @@ qx.Proto.buildGui = function(module)
// Add our global database name (the only option, for now) // Add our global database name (the only option, for now)
var item = new qx.ui.form.ListItem(module.dbFile); var item = new qx.ui.form.ListItem(module.dbFile);
o.add(item); o.add(item);
// We want to be notified if the selection changes // We want to be notified if the selection changes
o.addEventListener("changeSelection", fsm.eventListener, fsm); o.addEventListener("changeSelected", fsm.eventListener, fsm);
// Save the database name object so we can react to changes // Save the database name object so we can react to changes
fsm.addObject("dbName", o); fsm.addObject("dbName", o);