Add context menus to some entries

Use ShellEntry.addContextMenu() to add context menus to most
existing entries, with the exception of:

 - the login dialog - it may act be used to enter either the
                      username (e.g. no password entry) or the
                      password, and copy/paste does not make sense
                      (nowhere to copy from, nowhere to paste to)
 - notifications    - while adding a context menu is useful here as
                      well, it will require changes to the tray's
                      focus grab handling, so leave those entries
                      out for now

https://bugzilla.gnome.org/show_bug.cgi?id=659275
This commit is contained in:
Florian Müllner
2011-10-12 00:38:24 +02:00
parent 6257e64d03
commit 9439da81c4
5 changed files with 11 additions and 0 deletions

View File

@ -12,6 +12,7 @@ const Signals = imports.signals;
const FileUtils = imports.misc.fileUtils;
const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog;
const ShellEntry = imports.ui.shellEntry;
const Tweener = imports.ui.tweener;
const Util = imports.misc.util;
const History = imports.misc.history;
@ -210,6 +211,7 @@ __proto__: ModalDialog.ModalDialog.prototype,
this.contentLayout.add(label, { y_align: St.Align.START });
let entry = new St.Entry({ style_class: 'run-dialog-entry' });
ShellEntry.addContextMenu(entry);
this._entryText = entry.clutter_text;
this.contentLayout.add(entry, { y_align: St.Align.START });