Bumping manifests a=b2g-bump
[gecko.git] / toolkit / content / editMenuOverlay.js
bloba610b641abd4166e507aa0c50956e7190cb895d1
1 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 // update menu items that rely on focus or on the current selection
8 function goUpdateGlobalEditMenuItems()
10   // Don't bother updating the edit commands if they aren't visible in any way
11   // (i.e. the Edit menu isn't open, nor is the context menu open, nor have the
12   // cut, copy, and paste buttons been added to the toolbars) for performance.
13   // This only works in applications/on platforms that set the gEditUIVisible
14   // flag, so we check to see if that flag is defined before using it.
15   if (typeof gEditUIVisible != "undefined" && !gEditUIVisible)
16     return;
18   goUpdateCommand("cmd_undo");
19   goUpdateCommand("cmd_redo");
20   goUpdateCommand("cmd_cut");
21   goUpdateCommand("cmd_copy");
22   goUpdateCommand("cmd_paste");
23   goUpdateCommand("cmd_selectAll");
24   goUpdateCommand("cmd_delete");
25   goUpdateCommand("cmd_switchTextDirection");
28 // update menu items that relate to undo/redo
29 function goUpdateUndoEditMenuItems()
31   goUpdateCommand("cmd_undo");
32   goUpdateCommand("cmd_redo");
35 // update menu items that depend on clipboard contents
36 function goUpdatePasteMenuItems()
38   goUpdateCommand("cmd_paste");