aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Cleanup filenames from context menu  (Read 6147 times)

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Cleanup filenames from context menu
« on: January 17, 2009, 06:20:01 PM »

Hi,

I'm going to make the feature from the file details dialog available via context menu, supporting multi-selections in the DownloadListCtrl. Oppinions? Suggestions while I go along?

BTW: I also suggest a possibility to make it configurable what get's cleaned up like emule provides. But there I'm lost since I don't have the first clue about wx designer and there are enough capable people around here. What do you think?
LA
« Last Edit: January 17, 2009, 06:24:02 PM by LittleAbacus »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Cleanup filenames from context menu
« Reply #1 on: January 17, 2009, 07:49:24 PM »

I'm going to make the feature from the file details dialog available via context menu
Which feature ?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Re: Cleanup filenames from context menu
« Reply #2 on: January 17, 2009, 09:22:41 PM »

You again  :D
Cleaning up filenames, as the title states.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Cleanup filenames from context menu
« Reply #3 on: January 17, 2009, 09:29:59 PM »

Yeah. Me.  Better me than no reaction at all. ;)

The detail dialog fills the name control with the cleaned up text. Then you can apply or reject it. How do you plan to do that for the context menu?
And what do you do if you clean up 5 files and they suddenly have identical names?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Re: Cleanup filenames from context menu
« Reply #4 on: January 17, 2009, 10:39:22 PM »

Just plain and simple: you click clean-up and apply in the dialog, you right-click (a) file(s) and "cleanup" -> same effect.

As for duplicate file names: how's amule handling this right now if you happen to download two identically named files?
« Last Edit: January 17, 2009, 10:48:15 PM by LittleAbacus »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Cleanup filenames from context menu
« Reply #5 on: January 17, 2009, 11:14:10 PM »

You better add a "revert to original name" then.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Cleanup filenames from context menu
« Reply #6 on: January 17, 2009, 11:31:09 PM »

As for duplicate file names: how's amule handling this right now if you happen to download two identically named files?
Well - that's allowed. When the file completes, it gets renamed if a file of the same name already exists. So that's not a real problem.

Mind, the file you want to change for your feature (DownloadListCtrl.cpp) is currently undergoing severe changes, so you better wait until it's finished. Posting a patch for it is pointless at the moment.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Re: Cleanup filenames from context menu
« Reply #7 on: January 18, 2009, 01:13:32 AM »

Well - that's allowed. When the file completes, it gets renamed if a file of the same name already exists. So that's not a real problem.
What's your worry then?

Thanks for the warning. Care to ping me here when those changes are wrapped up plz? I'll wait until then to start hacking my idea together.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Cleanup filenames from context menu
« Reply #8 on: January 18, 2009, 01:50:12 AM »

Care to ping me here when those changes are wrapped up plz? I'll wait until then to start hacking my idea together.

lololololol

Sorry it's an internal development joke. Stu will understand it. Don't worry, we'll definitely tell you when those changes are wrapped up.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Cleanup filenames from context menu
« Reply #9 on: January 20, 2009, 12:40:38 AM »

I like the idea, but Kry is right, you must have an undo feature. How would you implement it? Save the last one or a list of "n" last ones? Or make that a list per entry?

The idea of making the cleaning process configurable is great too.
Logged

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Re: Cleanup filenames from context menu
« Reply #10 on: January 20, 2009, 12:57:45 AM »

Well, the original cleanup from the dialog doesn't provide a classic undo function in the first place. So I don't really see how you deduce the need for one from my wanting to implement the accessibility of the cleanup function from the context-menu...
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Cleanup filenames from context menu
« Reply #11 on: January 20, 2009, 01:21:44 AM »

Hi LittleAbacus,

The original cleanup from the dialog lets you play with the name anyway you like it, but it only commits the changes if you press apply or ok. Otherwise you can press cancel in case you messed so bad you can't restore it to something usefull and try to change it again.

Anyway, we could start with something really simple, like one single undo level. The last edited file name would go into a buffer somewhere.
Logged

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Re: Cleanup filenames from context menu
« Reply #12 on: January 20, 2009, 01:30:18 AM »

I see, thx. Saving the original filenames for every KnownFile currently queued would mean to create another global met file to retain compatibility of emule's met files, I take it. On the other hand we could save us a lot of trouble if besides "Clean up" we offered another context menu entry "Set to first alternative known to the network" (the final text is not the matter here :-) which would set the names of all marked list entries to the contents of the first line the details dialgog would show for each entry. If that list of alternatives works as I suspect I'd just say we don't need to store information "the network" already "knows".
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Cleanup filenames from context menu
« Reply #13 on: January 20, 2009, 12:00:17 PM »

I see, thx. Saving the original filenames for every KnownFile currently queued would mean to create another global met file to retain compatibility of emule's met files, I take it.
Maybe I didn't get it. I see no need to mess with met files, because file names are totally irrelevant to the network, they are just "local annoyance" :) What kind of compatibility are you referring to? Functional compatibility of the feature? If that is so, please forgive me, it's been a while since the last time I ran eMule.

On the other hand we could save us a lot of trouble if besides "Clean up" we offered another context menu entry "Set to first alternative known to the network" (the final text is not the matter here :-) which would set the names of all marked list entries to the contents of the first line the details dialgog would show for each entry. If that list of alternatives works as I suspect I'd just say we don't need to store information "the network" already "knows".
Well, pehaps the full list of known network names sorted by number of occurrences could appear in the context menu?

The matter I wanted to address was really a simple one, sometimes when I am hand cleaning the file name, I mess it so much that I want to abort and revert to what it was. I really have never needed to do anything more than that.

Though, there is something that bogs me, and that is when I download a file and do not immediately check for the networknames. Then when I look again, the file is complete now I can't check the network names. This is the only situation where at least temporarily saving the network names would have some use.
Logged