Simplified dialog, changed default target to specific host/port

pull/16/head
Bruce Leidl 9 years ago
parent 3371eb97d2
commit 0462cf1f23

@ -378,10 +378,8 @@ const PromptDialog = new Lang.Class({
this.optionList = new OptionList(); this.optionList = new OptionList();
box.add_child(this.optionList.actor); box.add_child(this.optionList.actor);
this.optionList.addOptions([ this.optionList.addOptions([
"Any Connection", "Only PORT AND ADDRESS",
"Only PORT", "Any Connection"]);
"Only ADDRESS",
"Only PORT AND ADDRESS"]);
this.setButtons([ this.setButtons([
@ -417,13 +415,9 @@ const PromptDialog = new Lang.Class({
ruleTarget: function() { ruleTarget: function() {
switch(this.optionList.selectedIdx()) { switch(this.optionList.selectedIdx()) {
case 0: case 0:
return "*:*";
case 1:
return "*:" + this._port;
case 2:
return this._address + ":*";
case 3:
return this._address + ":" + this._port; return this._address + ":" + this._port;
case 1:
return "*:*";
} }
}, },
@ -443,9 +437,7 @@ const PromptDialog = new Lang.Class({
this.header.setIconDefault(); this.header.setIconDefault();
} }
this.optionList.setOptionText(1, "Only "+ port_str); this.optionList.setOptionText(0, "Only "+ address + " on "+ port_str);
this.optionList.setOptionText(2, "Only "+ address);
this.optionList.setOptionText(3, "Only "+ address + " on "+ port_str);
this.info.setDetails(ip, path, pid, user); this.info.setDetails(ip, path, pid, user);
}, },
}); });

Loading…
Cancel
Save