Changeset 113:d1a1981520f5 for source
- Timestamp:
- Jan 19, 2009, 1:23:03 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/class/pf/Application.js
r112 r113 2133 2133 q = new qx.event.Command("Ctrl+R"); 2134 2134 q.addListener("execute", function(ev) { 2135 location.reload(true); 2136 }); 2135 if (!this.prefs.warnOnExit || 2136 confirm("Restart Plasma Formulary?")) { 2137 this.intendedExit = true; 2138 location.reload(true); 2139 } 2140 }, this); 2137 2141 btn = new qx.legacy.ui.menu.Button("Restart", "pf/image/reset.png", q); 2138 2142 submenu.add(btn); … … 2140 2144 q = new qx.event.Command("Ctrl+Q"); 2141 2145 q.addListener("execute", function(ev) { 2142 window.close(); 2143 }); 2146 if (!this.prefs.warnOnExit || 2147 confirm("Quit Plasma Formulary?")) { 2148 this.intendedExit = true; 2149 window.close(); 2150 } 2151 }, this); 2144 2152 btn = new qx.legacy.ui.menu.Button("Quit", "pf/image/exit.png", q); 2145 2153 submenu.add(btn); … … 2329 2337 } 2330 2338 2339 if (undefined === this.prefs.warnOnExit) { 2340 this.prefs.warnOnExit = true; 2341 } 2342 2331 2343 if (!this.prefs.units) { 2332 2344 this.prefs.units = new Object; … … 2708 2720 rc.add(e); 2709 2721 2722 e = new qx.legacy.ui.form.CheckBox("Warn on exit or restart"); 2723 e.setChecked(this.prefs.warnOnExit); 2724 e.addListener("changeChecked", function(ev) { 2725 this.prefs.warnOnExit = ev.getTarget().getChecked(); 2726 }, this); 2727 rc.add(e); 2728 2710 2729 this.doc.add(w); 2711 2730 this.prefsWindow = w; … … 2865 2884 2866 2885 // Prompt user 2867 // return "Do you really want to close the application?"; 2886 if (this.prefs.warnOnExit && !this.intendedExit) { 2887 return "This will end your Plasma Formulary session."; 2888 } 2868 2889 } 2869 2890 }
Note: See TracChangeset
for help on using the changeset viewer.