Closed Bug 1121678 Opened 9 years ago Closed 9 years ago

Add a menuitem in the bookmarks context menu to "open in a private window".

Categories

(SeaMonkey :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.35

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #821724 +++

We need to implement the menuitem of "open in a private window" in bookmark context menu. It's shown in bookmark toolbar/sidebar/window etc.
Attached patch Proposed patch (obsolete) — Splinter Review
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #8549161 - Flags: review?(philip.chee)
Summary: Implement the menuitem of "open in a private window" in bookmark context menu. → Add a menuitem in the bookmarks context menu to "open in a private window".
Comment on attachment 8549161 [details] [diff] [review]
Proposed patch

> +    <command id="placesCmd_open:private"
> +             oncommand="goDoPlacesCommand('placesCmd_open:private');"/>

I prefer to match Firefox to make it easier to support Firefox extensions. e.g.:
    <command id="placesCmd_open:privatewindow"
             oncommand="goDoPlacesCommand('placesCmd_open:privatewindow');"/>

Also move it after "placesCmd_open:window" for consistency.

> +    case "placesCmd_open:private":
>      case "placesCmd_open:window":
Ditto.
> +  updatePlacesCommand("placesCmd_open:private");
>    updatePlacesCommand("placesCmd_open:window");
Ditto.

> -        item.hidden = hideIfNoIP ||
> +        var hideIfPrivate = item.getAttribute("hideifprivatebrowsing") == "true" && top.gPrivate;
hasAttribute("hideifprivatebrowsing") unless you anticipate someone doing hideifprivatebrowsing = "false"

> +<!ENTITY cmd.open_private.label           "Open in a Private Window">
> +<!ENTITY cmd.open_private.accesskey       "v">
Can we instead use "Open in a New Private Window"? Makes it more explicit.
Attachment #8549161 - Flags: review?(philip.chee) → review+
(In reply to Philip Chee from comment #2)
> Also move it after "placesCmd_open:window" for consistency.
Actually if you want consistency I'd need to move window to after tab.

> hasAttribute("hideifprivatebrowsing") unless you anticipate someone doing
> hideifprivatebrowsing = "false"
Do you want me to change the other attribute to match?

> > +<!ENTITY cmd.open_private.label           "Open in a Private Window">
> > +<!ENTITY cmd.open_private.accesskey       "v">
> Can we instead use "Open in a New Private Window"? Makes it more explicit.
Right-click just opens a link in private window...
(In reply to neil@parkwaycc.co.uk from comment #3)
> (In reply to Philip Chee from comment #2)
> > Also move it after "placesCmd_open:window" for consistency.
> Actually if you want consistency I'd need to move window to after tab.
> 
> > hasAttribute("hideifprivatebrowsing") unless you anticipate someone doing
> > hideifprivatebrowsing = "false"
> Do you want me to change the other attribute to match?
> 
> > > +<!ENTITY cmd.open_private.label           "Open in a Private Window">
> > > +<!ENTITY cmd.open_private.accesskey       "v">
> > Can we instead use "Open in a New Private Window"? Makes it more explicit.
> Right-click just opens a link in private window...
Actually that hides the open in new window item when you're already in a private window, maybe I should do the same thing here (move hideifprivatebrowsing to the newwindow menuitem)?
Flags: needinfo?(philip.chee)
>> Also move it after "placesCmd_open:window" for consistency.
> Actually if you want consistency I'd need to move window to after tab.
Sounds reasonable. Rearrange at your discretion.

>> hasAttribute("hideifprivatebrowsing") unless you anticipate someone doing
>> hideifprivatebrowsing = "false"
> Do you want me to change the other attribute to match?
Yes please.

>>> Can we instead use "Open in a New Private Window"? Makes it more explicit.
>> Right-click just opens a link in private window...
> Actually that hides the open in new window item when you're already in a 
> private window, maybe I should do the same thing here (move 
> hideifprivatebrowsing to the newwindow menuitem)?
That makes sense. Yes.

r=me on any or all of these changes.
Flags: needinfo?(philip.chee)
I thought there were enough changes to warrant a new review.
Attachment #8549161 - Attachment is obsolete: true
Attachment #8554053 - Flags: review?(philip.chee)
Attachment #8554053 - Flags: review?(philip.chee) → review+
Pushed comm-central changeset 9c7f3c9bc127.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: