Closed Bug 308324 Opened 19 years ago Closed 14 years ago

It is unclear how to stop a DCC transfer in Chatzilla

Categories

(Other Applications :: ChatZilla, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Lxocram, Assigned: bugzilla-mozilla-20000923)

References

(Blocks 1 open bug)

Details

(Whiteboard: [cz-0.9.86.1])

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050912 Firefox/1.0.6 (Ubuntu package 1.0.6)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050912 Firefox/1.0.6 (Ubuntu package 1.0.6)

On accepting a DCC transfer there is no way to stop the transfer except for
quitting chatzilla losing all other transfers/connection info ...

Reproducible: Always

Steps to Reproduce:
1.Ask someone to send you a (large) file
2.Accept the file
3.Realize that you don't need the file after all or you can get it faster from
another sender


Actual Results:  
Dcc send succeeds without option to cease/halt transfer giving you several
copies of same file, a bunch of junk on your harddrive or smallband connection
by going over limit.

(btw no bugzilla link for chatzilla?)

Expected Results:  
Present you with an option to cease/halt transfer
found out later that you can do it with /dcc-list and then click proper close link
but it's not displayed in the file: tab

plz reassign to rginda@hacksrus.com
Component: Download Manager → ChatZilla
OS: Linux → All
Product: Firefox → Other Applications
QA Contact: download.manager → rginda
Hardware: PC → All
Assignee: nobody → rginda
QA Contact: rginda → samuel
Clarifying bug summary, and --> enhancement.
Severity: normal → enhancement
Summary: DCC transfer in Chatzilla unstopable → It is unclear how to stop a DCC transfer in Chatzilla
Status: UNCONFIRMED → NEW
Ever confirmed: true
I think it would be useful to automatically cancel a dcc transfer upon closing the tab pertaining to that dcc transfer.
In addition to comment 3, we should have a "Stop Transfer" menu item (context menu of chat area, tab and IRC main menu) in place of "Close Tab" (as we do with "Leave #channel"). We could also have an inline-button in the chat area on the "DCC File Transfer of ... started." message.
QA Contact: samuel → chatzilla
Version: unspecified → Trunk
Blocks: 251983
Assignee: rginda → silver
Status: NEW → ASSIGNED
Attachment #427821 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 427821 [details] [diff] [review]
Add "Disconnect From <username>" for DCC views

>diff --git a/xul/content/menus.js b/xul/content/menus.js
>@@ -126,10 +126,14 @@ function initMenus()
>     var ViewNetwork = "(cx.TYPE == 'IRCNetwork')";
>     var ViewChannel = "(cx.TYPE == 'IRCChannel')";
>     var ViewUser    = "(cx.TYPE == 'IRCUser')";
>+    var ViewDCCChat = "(cx.TYPE == 'IRCDCCChat')";
>+    var ViewDCCFile = "(cx.TYPE == 'IRCDCCFileTransfer')";
>+    var ViewDCC     = "(" + ViewDCCChat + " or " + ViewDCCFile + ")";

I'd suggest

var ViewDCC = "(cx.TYPE.substr(0, 6) == 'IRCDCC')";

as is done elsewhere, and getting rid of the previous two lines, unless you were planning to use them for other patches (as there's a bunch of DCC stuff planned for .87).

And I assume the $userName thing is automagically replaced even for DCC tabs? I can't recall - if you've tested it, that's good enough for me. :-)

With the above, r=me.
Attachment #427821 - Flags: review?(gijskruitbosch+bugs) → review+
getDefaultContext() provides the userName value for chat and file dcc views thanks to getObjectDetails(); the only issue I have is that for file transfers it's still the user the file's coming from and not the filename; there's a fileName value too but the format string can't do enough magic and I'm not sure it's worth some alias commands just to have something a bit more precise for file transfers.
I also suggest that /cancel works on transfers.
Attachment #427821 - Attachment is obsolete: true
Attachment #427866 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 427866 [details] [diff] [review]
Updated to make /cancel stop file transfers

>diff --git a/xul/content/commands.js b/xul/content/commands.js
>@@ -978,28 +978,32 @@ function cmdBanOrExcept(e)
> 
> function cmdCancel(e)
> {
> ...
>+    if (e.sourceObject.TYPE == "IRCDCCFileTransfer")
>+    {
>+        // We're transfering a file, abort it.
>+        if (e.sourceObject.isActive())
>+            return e.sourceObject.abort();
>+    }

This seems cleaner to me, do as you see fit (but definitely fix the comment spelling :-)):

    // If we're transferring a file, abort it:
    var source = e.sourceObject;
    if ((source.TYPE == "IRCDCCFileTransfer") && source.isActive())
        return source.abort();    

And please mention this ability in the cmd.cancel.help text.

With that, r=me.
Attachment #427866 - Flags: review?(gijskruitbosch+bugs) → review+
(In reply to comment #7)
> the only issue I have is that for file transfers
> it's still the user the file's coming from and not the filename;

It seems fine to have "disconnect from X" if you're transferring a file from X. I guess it won't terminate other files or chats with that person and so in that sense it might be suboptimal wording, but I'm not sure how else we'd do it, and that seems like an edge case. Maybe just make it say "Stop file transfer" for files? Not sure how hard that is.
Pushed with suggested changes from comment 10 --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.87]
Whiteboard: [cz-0.9.87] → [cz-0.9.86.1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: