aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 2 3 [4]

Author Topic: "mark as known" function in the popup when right-clicking a search result  (Read 37155 times)

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Re: "mark as known" function in the popup when right-clicking a search result
« Reply #45 on: December 26, 2008, 09:35:51 PM »

Hi phoenix,

on the contrary, I'm glad I could help. The subtle reason for your modification is exactly what I'm talking about when I say I don't really know C++/wx. One cosmetic thing: in line 79 of the patch there still exists a now obsolete commented-out declaration of CSearchFile* file.

We probably could somewhat tune the whole thing to
uint32 DetermineStatus(){ //detection routine like now}
and
wxString DetermineStatusPrintable(... toShow) {
switch (DetermineStatus(toShow)) {
case 1:
  return wxT("foo");
 break;
case2:
...
}
}

In order to avoid having the same code for several occasions (i.e. the new column and for color determination for a search result line)... Thoughts?
Cheers,
LA
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: "mark as known" function in the popup when right-clicking a search result
« Reply #46 on: December 26, 2008, 11:26:34 PM »

Hi LittleAbacus,

My comments were not about C++ or wx, "core" refers to the way the aMule suite is divided internally. No rocket science, really and you did a good job. I will remove the unnecessary comment.

As for tunning and not duplicating code, indeed, that can be done and is a good practice, but please, before you post the next patch, compile aMuleGUI too to be sure it does not break :D

Cheers!
Logged

LittleAbacus

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 54
Re: "mark as known" function in the popup when right-clicking a search result
« Reply #47 on: January 10, 2009, 10:41:07 AM »

Hi phoenix,

attached you'll find the patch to remove duplicate code for status determination.
Regards
LA
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: "mark as known" function in the popup when right-clicking a search result
« Reply #48 on: November 08, 2010, 12:01:29 AM »

Hi folks,

This thread has been around for three years, so it's time to decide.

The other developers seem to consider this not useful. Some users disagree.

The feature is currently commented on the code. I have not enabled it at first because I had no time to check whether the change in known.met was legal. The other devs have not shown any sympathy for the feature, so it remained in the dark and very few people tested it.

If anyone can guarantee that it does not break known.met, I can enable it.

It is more than time to decide, if people find it useful or like it, please say here, and the main thing: tell us if there are issues with the file known.met. Otherwise it will be removed from the code. Soon (TM).

Cheers!
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: "mark as known" function in the popup when right-clicking a search result
« Reply #49 on: November 08, 2010, 03:26:26 PM »

I'll have a look on that later this week.
Logged
concordia cum veritate

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: "mark as known" function in the popup when right-clicking a search result
« Reply #50 on: November 08, 2010, 11:13:12 PM »

tell us if there are issues with the file known.met
I'm afraid this results in a memory leak. Known.met is loaded into knownfilelist which is kept in memory all the time, and entries are never purged from known.met.

On a sidenote: we have a list of canceled files meanwhile. Can't say if this throws a different light on this issue. At least canceled files are more efficient (just the masterhash, nothing else).
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

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: "mark as known" function in the popup when right-clicking a search result
« Reply #51 on: November 12, 2010, 02:31:10 AM »

Not exactly a leak, but certainly crap laying around.

I like the sql approach you mentioned in the other thread to keep this stuff out of memory.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: "mark as known" function in the popup when right-clicking a search result
« Reply #52 on: November 16, 2010, 08:45:02 PM »

Having another look on it I believe it's safe to enable. Though I can agree with Stu in that "Mark as cancelled" might be a better feature.
Logged
concordia cum veritate
Pages: 1 2 3 [4]