[gnome-shell] remoteMenu: Minor code cleanups
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] remoteMenu: Minor code cleanups
- Date: Mon, 13 May 2013 22:35:21 +0000 (UTC)
commit ff3c20dda2ee3f9d8eac52ec0b52ca7fbdb0caee
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri May 10 11:17:16 2013 -0400
remoteMenu: Minor code cleanups
https://bugzilla.gnome.org/show_bug.cgi?id=700257
js/ui/remoteMenu.js | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/remoteMenu.js b/js/ui/remoteMenu.js
index 144dbdb..cd3f36a 100644
--- a/js/ui/remoteMenu.js
+++ b/js/ui/remoteMenu.js
@@ -20,19 +20,16 @@ function stripMnemonics(label) {
}
function _insertItem(menu, trackerItem, position) {
- let item;
-
- if (trackerItem.get_is_separator()) {
- let mapper = new RemoteMenuSeparatorItemMapper(trackerItem);
- item = mapper.menuItem;
- } else if (trackerItem.get_has_submenu()) {
- let mapper = new RemoteMenuSubmenuItemMapper(trackerItem);
- item = mapper.menuItem;
- } else {
- let mapper = new RemoteMenuItemMapper(trackerItem);
- item = mapper.menuItem;
- }
+ let mapper;
+ if (trackerItem.get_is_separator())
+ mapper = new RemoteMenuSeparatorItemMapper(trackerItem);
+ else if (trackerItem.get_has_submenu())
+ mapper = new RemoteMenuSubmenuItemMapper(trackerItem);
+ else
+ mapper = new RemoteMenuItemMapper(trackerItem);
+
+ let item = mapper.menuItem;
menu.addMenuItem(item, position);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]