Closed Bug 391683 Opened 17 years ago Closed 16 years ago

AppleScript: Tabs can't handle "close" command

Categories

(Camino Graveyard :: OS Integration, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peeja, Assigned: peeja)

References

Details

(Keywords: fixed1.8.1.13)

Attachments

(1 file, 3 obsolete files)

Browser window gets "close" support for free as a subclass of window, but the tab class knows nothing about closing.  It should.  More specifically,

> tell application "Camino" close tab 1 of browser window 1

should do just that, rather than raise an error.
Blocks: 156078
No longer blocks: 390846
Peter, have you done any work on this? It's one of the few remaining AS bugs that we'd like to get to have a good amount of support.
As with bug 394821, expect progress soon.  We regret the delay.
Attached patch Tab Close Support (obsolete) — Splinter Review
Adds a method to BrowserWrapper (tab) which closes the tab, and adds the relevant info to the sdef.

Unfortunately, bug 396263 would bitrot this patch, so the patch is built to land after that bug (which is currently ready to land itself).
Attachment #298045 - Flags: review?
Attachment #298045 - Flags: review? → review?(Jeff.Dlouhy)
Sorry, this one should patch fine.  Ignore my previous comments.
Attachment #298045 - Attachment is obsolete: true
Attachment #298048 - Flags: review?(Jeff.Dlouhy)
Attachment #298045 - Flags: review?(Jeff.Dlouhy)
Comment on attachment 298048 [details] [diff] [review]
Tab Close Support (Working Patch)

Seems to work as advertised. :-P

r=jeff
Attachment #298048 - Flags: review?(Jeff.Dlouhy) → review+
Attachment #298048 - Flags: superreview?(stuart.morgan)
Comment on attachment 298048 [details] [diff] [review]
Tab Close Support (Working Patch)

>-  BrowserWindow *window = (BrowserWindow *)[self getNativeWindow];
>+  BrowserWindow *window = (BrowserWindow *)[self nativeWindow];

Why are you changing from the branch method to the trunk method in a diff from branch? This will break objectSpecifier.
Attached patch Same, minus mistake (obsolete) — Splinter Review
Eek, good catch Stuart.  That's just an artifact of my naive cvs diff.  This version should do; I've removed the rogue hunk.  It wasn't easy.  The ladies were crawling all over him.
Attachment #298048 - Attachment is obsolete: true
Attachment #300640 - Flags: superreview?(stuart.morgan)
Attachment #298048 - Flags: superreview?(stuart.morgan)
Does closeTab: do what we want on the last tab in a window? I can't test at the moment, but I'm pretty sure the answer is no.
Now checks to see if we're the last tab, and closes the whole window if so.  Also fixes a comment typo.

To check in on branch, replace nativeWindow with getNativeWindow.
Attachment #300640 - Attachment is obsolete: true
Attachment #300914 - Flags: superreview?(stuart.morgan)
Attachment #300640 - Flags: superreview?(stuart.morgan)
Comment on attachment 300914 [details] [diff] [review]
No Tabless Windows (see #9 before branch checkin)

sr=smorgan
Attachment #300914 - Flags: superreview?(stuart.morgan) → superreview+
Checked in on the trunk and the MOZILLA_1_8_BRANCH (with getNativeWindow) in advance of b3.

Note that you might want to update your tree so that the fix for bug 396263 appears in it ;)  Luckily, the merge here was easy, and closing tabs is now fun and fully operational.
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: fixed1.8.1.13
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: