Bug 460266 - 'Open task' menu via context menu is broken;r=philipp
authorBerend Cornelius [:berend] <berend.cornelius@sun.com>
Mon, 22 Dec 2008 01:14:46 +0100
changeset 1477 e1d46719ab407c5e5f6cedeb49c5013a2ca7039c
parent 1476 71025c5f3967243d8543d31a731d09a1532cb366
child 1478 82c571b8e4b389a5a0bb14a95d43cb7bdbb1eb0f
push id1173
push userBerend.Cornelius@sun.com
push dateMon, 22 Dec 2008 00:15:02 +0000
treeherdercomm-central@e1d46719ab40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs460266
Bug 460266 - 'Open task' menu via context menu is broken;r=philipp
calendar/base/content/calendar-common-sets.js
calendar/base/content/calendar-common-sets.xul
calendar/base/content/calendar-unifinder-todo.xul
--- a/calendar/base/content/calendar-common-sets.js
+++ b/calendar/base/content/calendar-common-sets.js
@@ -118,18 +118,20 @@ var calendarController = {
                 return this.item_selected;
             case "calendar_delete_focused_item_command":
                 return this.selected_items_writable;
             case "calendar_delete_event_command":
                 return this.selected_items_writable;
             case "calendar_new_todo_command":
                 return this.writable && this.calendars_support_tasks;
             case "calendar_modify_todo_command":
-                return this.todo_items_selected &&
-                       this.todo_tasktree_focused;
+                 return this.todo_items_selected;
+                 // This code is temporarily commented out due to
+                 // bug 469684 Unifinder-todo: raising of the context menu fires blur-event
+                 // this.todo_tasktree_focused;
             case "calendar_task_filter_command":
                 return true;
             case "calendar_delete_todo_command":
             case "calendar_percentComplete-0_command":
             case "calendar_percentComplete-25_command":
             case "calendar_percentComplete-50_command":
             case "calendar_percentComplete-75_command":
             case "calendar_percentComplete-100_command":
--- a/calendar/base/content/calendar-common-sets.xul
+++ b/calendar/base/content/calendar-common-sets.xul
@@ -260,17 +260,18 @@
                 observes="cmd_paste"/>
     </popup>
 
     <!-- TASK ITEM CONTEXT MENU -->
     <menupopup id="taskitem-context-menu" onpopupshowing="changeContextMenuForTask(event);">
       <menuitem id="task-context-menu-modify"
                 label="&calendar.context.modifyorviewtask.label;"
                 accesskey="&calendar.context.modifyorviewtask.accesskey;"
-                command="calendar_modify_todo_command"/>
+                command="calendar_modify_todo_command"
+                observes="calendar_modify_todo_command"/>
       <menuitem id="task-context-menu-new"
                 label="&calendar.context.newtodo.label;"
                 accesskey="&calendar.context.newtodo.accesskey;"
                 key="calendar-new-todo-key"
                 command="calendar_new_todo_command"
                 observes="calendar_new_todo_command"/>
       <menuseparator id="calendar-menuseparator-beforemarkcompleted"/>
       <menuitem id="calendar-context-markcompleted"
--- a/calendar/base/content/calendar-unifinder-todo.xul
+++ b/calendar/base/content/calendar-unifinder-todo.xul
@@ -65,18 +65,17 @@
                 crop="end"
                 oncommand="toDoUnifinderRefresh();"
                 persist="checked"/>
     </box>
     <vbox id="calendar-task-tree-detail" flex="1">
       <calendar-task-tree id="unifinder-todo-tree" flex="1"
                           visible-columns="completed priority title"
                           persist="visible-columns ordinals widths sort-active sort-direction"
-                          context="taskitem-context-menu"
-                          onselect="document.commandDispatcher.updateCommands('calendar_commands');"/>
+                          context="taskitem-context-menu"/>
        <textbox id="unifinder-task-edit-field"
                 class="task-edit-field"
                 onfocus="taskEdit.onFocus(event)"
                 onblur="taskEdit.onBlur(event)"
                 onkeypress="taskEdit.onKeyPress(event)"/>
     </vbox>
   </vbox>
 </overlay>