1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

New Scheduler merged into r8442M

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

New Scheduler merged into r8442M

Postby siavoshkc » 22 Jan 2010 23:03

Please test it.
There is a warning in ScheduleItemDlg for casting BOOL into bool. Its because Settings are bool but DDX functions don't get bool.
Code: Select all
   Settings.Scheduler.ToggleBandwidth   = m_bToggleBandwidth;
   Settings.Scheduler.LimitedNetworks   = m_bLimitedNetworks;


Code: Select all
   DDX_Check(pDX, IDC_SCHEDULER_TOGGLE_BANDWIDTH, m_bToggleBandwidth);
   DDX_Check(pDX, IDC_SCHEDULER_LIMITED_NETWORKS, m_bLimitedNetworks);


RAS functionalities is not tested.
Keyboard shortcuts are not defined.
Attachments
Scheduler merged in r8442M.zip
merged into r8442M
(183.71 KiB) Downloaded 28 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby kevogod » 23 Jan 2010 02:25


Note: I have not tested or reviewed the code, so use at your own risk.
Last edited by kevogod on 28 Jan 2010 01:56, edited 2 times in total.
Reason: Updated to v41
Image
kevogod
 
Posts: 271
Joined: 13 Jun 2009 16:13

Re: New Scheduler merged into r8442M

Postby siavoshkc » 23 Jan 2010 18:58

SYSTEMTIME is replaced by CTime.
Accelerator is added.
Attachments
Scheduler merged into r8442m v2.zip
(183.23 KiB) Downloaded 26 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby mojo85 » 24 Jan 2010 06:09

What do you mean by accelerator is added?

I have played with this, and it functions well. In any case I think it is about time we add it, and transform the GUI as we go. Also for the life of me I could not remove the Scheduler link in the Internet option of the settings window.

Image

Also in the way I set it up in my transferring the code over, I didn't do an effective set of options. Bandwidth Stop is pretty much behaves like disconnect, if you have a dial-up it should disconnect the dial-up as well ... but what you observe is the rate monitor scale go to 0, and connections begin to disconnect. Bandwidth stop does the same thing, but it just doesn't initiate the dial-up to hang up. Also both actions disable all networks, I don't know if I did this, or it was by initial design ... I'm sure these are simple changes but those are areas for which I glossed over initially maybe siavoshkc you have ideas of different options worth adding or modifying ... these were mostly for testing/ sandbox what I did.
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: New Scheduler merged into r8442M

Postby old_death » 24 Jan 2010 15:45

mojo85 wrote:Also for the life of me I could not remove the Scheduler link in the Internet option of the settings window.
Well, that's relatively easy: The link is inside the translation skin, so it needs to be removed/replaced over there. If you edit the default skin in English, the other ones will be adapted one by one once they are revised the next time by the appropriate language translators.
User avatar
old_death
 
Posts: 1734
Joined: 13 Jun 2009 16:19

v3

Postby siavoshkc » 24 Jan 2010 16:34

Replace default.xml in shareaza\res with this one to get rid of wrong link in settings.

[EDIT:]Accelerator: Ctrl + Shift + F11

Bandwidth Stop is pretty much behaves like disconnect, if you have a dial-up it should disconnect the dial-up as well ... but what you observe is the rate monitor scale go to 0, and connections begin to disconnect. Bandwidth stop does the same thing, but it just doesn't initiate the dial-up to hang up. Also both actions disable all networks, I don't know if I did this, or it was by initial design ... I'm sure these are simple changes but those are areas for which I glossed over initially maybe siavoshkc you have ideas of different options worth adding or modifying ... these were mostly for testing/ sandbox what I did.


I think two options are not the same. Maybe someone wants to stop Shareaza but don't want to disconnect. Maybe another program is scheduled to start and connect to internet at the time Shareaza stops. And after for example 2 hours that program finishes and Shareaza goes to full speed again.

Another option that can be added is Start Shareaza. It will use Windows Task Scheduler to schedule Shareaza startup for whatever time that is scheduled in Shareaza Scheduler.
Another option is when to connect to which network, but I can't see much benefit in it.
Another option is to tell Shareaza when to start creating Hashes.
Attachments
Default.xml
(114.49 KiB) Downloaded 21 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby cyko_01 » 24 Jan 2010 17:51

created task to shut down shareaza at specified time( a few minutes later) to run once. Restarted shareaza manually and edited task to run again in 2 minutes, reactivated. Crashes on startup while starting host cache.
BugTrap Log (buildV2)
Join Shareaza On Facebook! --> http://facebook.com/Shareaza
All-In-One AntiSpam Filter [Aug-14-2011] --> http://forum.sure-raza.com/viewtopic.php?f=2&t=10

Image
User avatar
cyko_01
 
Posts: 929
Joined: 13 Jun 2009 15:51

Re: New Scheduler merged into r8442M

Postby cyko_01 » 24 Jan 2010 18:06

oh yea, and don't forget this feature:
Image
Join Shareaza On Facebook! --> http://facebook.com/Shareaza
All-In-One AntiSpam Filter [Aug-14-2011] --> http://forum.sure-raza.com/viewtopic.php?f=2&t=10

Image
User avatar
cyko_01
 
Posts: 929
Joined: 13 Jun 2009 15:51

Re: New Scheduler merged into r8442M

Postby siavoshkc » 24 Jan 2010 23:35

created task to shut down shareaza at specified time( a few minutes later) to run once. Restarted shareaza manually and edited task to run again in 2 minutes, reactivated. Crashes on startup while starting host cache.


Bug Fixed.

[EDIT] Another generated!
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

v41

Postby siavoshkc » 25 Jan 2010 09:06

Test this one.

I have a question about Locks. Why CSchedulerWnd::Update() uses CSingleLock pLock( &Network.m_pSection, TRUE ) ?

What will happen if it doesn't? It only reads Scheduler items (I didn't investigated it very well yet). Using lock in this way creates a potential danger because if another thread gets lock, scheduler window will freez so the main window.
Attachments
Scheduler merged into r8442m v41.zip
(202.3 KiB) Downloaded 25 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby mojo85 » 25 Jan 2010 11:49

This code was orginally done for implementation on Shareaza back in version 2.1 or maybe before? The code was lost, but at the time of writing technomage the original coder had adapted most of the code from the security window. In my edits, I removed plenty of "comments" referencing the Security Window ... not to worry as I just updated those references to mention Scheduler instead of erasing valuable commentary. In those days, Shareaza had many locks ... I think this has been reworked much better now. If you want to compare codes check out how the security window is coded as it should give insights as to what has changed from then to now.
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

v421

Postby siavoshkc » 27 Jan 2010 17:48

[EDIT]v421 and v42 are bugee, deleted.
There is a bug that sometimes when SchedulerItemDlg is opened for edit right after task is done, hWnd assertions fail. I can't imagine why this happens because SchedulerItemDlg has nothing to do with WndScheduler or Scheduler code.
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby kevogod » 28 Jan 2010 01:57

Just in case people do not see the updates to my post, you can download these builds from (link no longer available).
Last edited by kevogod on 25 Apr 2010 07:12, edited 1 time in total.
Reason: Removed negatis link
Image
kevogod
 
Posts: 271
Joined: 13 Jun 2009 16:13

Re: New Scheduler merged into r8442M

Postby cyko_01 » 28 Jan 2010 02:29

kevogod wrote:Just in case people do not see the updates to my post, you can download these builds from (link no longer available).

I'll mirror them at http://sure-raza.com/backups/ as well (feel free to upload them yourself kevogod.)
Last edited by kevogod on 25 Apr 2010 07:13, edited 1 time in total.
Reason: Removed negatis link
Join Shareaza On Facebook! --> http://facebook.com/Shareaza
All-In-One AntiSpam Filter [Aug-14-2011] --> http://forum.sure-raza.com/viewtopic.php?f=2&t=10

Image
User avatar
cyko_01
 
Posts: 929
Joined: 13 Jun 2009 15:51

V5

Postby siavoshkc » 28 Jan 2010 13:16

I made limited networks and reduced bandwidth task depedent so they are not global anymore. This change affected settings.h and settings.cpp. The change I made for media palyer settings also adds some settings so I included related files in the patch.

-I disabled all locks (We may find places where its needed).
-Added strings for menu items to string resource
-Fixed a bug in CScheduleItemDlg that sometimes ignored date entered when you changed clock.
-Removed IsEnabled() and gave its job to CheckSchedule()
-CheckShedule() will be called in WndMain OnTimer() and OnCreate()

The bug in which ScheduleItemDlg hWnd becomes invalid still exists.
Attachments
Scheduler into r8442m and 3 media v5.zip
(214.51 KiB) Downloaded 23 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby siavoshkc » 28 Jan 2010 16:37

Bugtrap report of hWnd assertion failure in scheduler dialog.
Attachments
Shareaza_error_report_100128-185510_DlgScheduleItem.zip
(459.72 KiB) Downloaded 22 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby kevogod » 30 Jan 2010 17:31

I have uploaded the latest version.
Image
kevogod
 
Posts: 271
Joined: 13 Jun 2009 16:13

v52

Postby siavoshkc » 31 Jan 2010 06:30

Locks reimplemented.
Redundant field removed from DlgScheduleItem.

It was possible to make CScheduler thread safe if it didn't give pointer of internal fields to other objects. But now any object that gets these pointers should lock CScheduler::m_pSection before getting, setting or returning them.
Attachments
Scheduler into r8442m and 3 media v52.zip
(214.44 KiB) Downloaded 23 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

V53

Postby siavoshkc » 01 Feb 2010 21:13

Bug about being unable to save description in DlgScheduleItem->FIXED
Attachments
DlgScheduleItem.cpp
(12.15 KiB) Downloaded 23 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

V54

Postby siavoshkc » 02 Feb 2010 11:17

Bug: Activate and Deactivate items in context menu of WndScheduler were not grayed out when no item was selected.->FIXED

I think this version except for hWnd assertion failure is a stable version ready to be merged into main code for a full scale test.

Thanks for your care.
Attachments
WndScheduler.cpp
(10.99 KiB) Downloaded 26 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby mojo85 » 02 Feb 2010 18:44

Thanks for your time, dedication, and effort ... Ryo please add this finally. Actually one question, does this break x64 compilation?
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: V54

Postby cyko_01 » 04 Feb 2010 13:58

siavoshkc wrote:I think this version except for hWnd assertion failure is a stable version ready to be merged into main code for a full scale test.

if this is a bug you created then it needs to be fixed before committing since you do not have SVN access to change it later. Please provide the patch as one single zip file(not just the files that have been revised since your last post) as raspopov said here, and keep it up-to-date with the current code revision if necessary.

one more question. how can we import/upgrade schedules from previous versions? I think this is also something that should be added.
Join Shareaza On Facebook! --> http://facebook.com/Shareaza
All-In-One AntiSpam Filter [Aug-14-2011] --> http://forum.sure-raza.com/viewtopic.php?f=2&t=10

Image
User avatar
cyko_01
 
Posts: 929
Joined: 13 Jun 2009 15:51

Re: V54

Postby old_death » 04 Feb 2010 14:39

cyko_01 wrote:one more question. how can we import/upgrade schedules from previous versions? I think this is also something that should be added.
This is not really necessary as the previous scheduler version was that minimalistic that duplicating its settings to the new one should be very easy. Adding complicated input code for single usage is a bit overkill in this case...

On the other hand, the ability to save the scheduler settings to a file to use it on other computers would be cool. For this, an xml based file could be created so that it could be edited via normal editor.


mfg,
Old
User avatar
old_death
 
Posts: 1734
Joined: 13 Jun 2009 16:19

Re: New Scheduler merged into r8442M

Postby siavoshkc » 04 Feb 2010 19:45

cyko_01 wrote:if this is a bug you created then it needs to be fixed before committing since you do not have SVN access to change it later.

I believe it's not created by me. I think someone more exprienced should find the cause. I can't even imagine why a modal dialog window handle assertion should fail. Can someone give me a clue :?:
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby ailurophobe » 05 Feb 2010 11:36

RG: Assert before assignment?
ailurophobe
 
Posts: 702
Joined: 11 Nov 2009 05:25

Re: New Scheduler merged into r8442M

Postby siavoshkc » 05 Feb 2010 21:15

ailurophobe wrote:RG: Assert before assignment?

Framework assertions.

Anyway I am going to change whole the code and make it like Security so many things will change. It will take at least one week. So stop testing previous versions as they will not be the base of new code.
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

V6

Postby siavoshkc » 09 Feb 2010 18:38

I tried to make it like security module.

Note that the way Media Player List works is not approved by project admin. It's just needed for code to be compiled.
Attachments
Scheduler merged into r8455 plus media player keeps track of 3 players [V6][siavoshkc].zip
(244.43 KiB) Downloaded 22 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

V61

Postby siavoshkc » 10 Feb 2010 21:16

Media player setting problem solved.

[EDIT] There may be a misplacement of icons. Will be corrected in the next version.
Attachments
Scheduler merged into r8455 plus media player keeps track of 3 players [V61][siavoshkc].zip
(255.54 KiB) Downloaded 21 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby siavoshkc » 16 Feb 2010 12:57

Stablized and bug fixed.
Attachments
Scheduler merged into r8455 plus media player keeps track of 3 players [V7][siavoshkc].zip
(251.98 KiB) Downloaded 23 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

V73

Postby siavoshkc » 18 Feb 2010 19:12

Important bug in dlg.
Clean ups.
Attachments
Scheduler merged into r8455 plus media player keeps track of 3 players [V73][siavoshkc].zip
(242.04 KiB) Downloaded 28 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby siavoshkc » 27 Feb 2010 20:28

Import/export from/to XML is added into next version.
More strings are added into resources.

I am waiting for some feedback.

Note that there are many links to old website in source code.
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby old_death » 28 Feb 2010 00:07

siavoshkc wrote:Import/export from/to XML is added into next version.
More strings are added into resources.

I am waiting for some feedback.

Note that there are many links to old website in source code.
You mean in code comments? Those can safely be removed, as (most of) the respective forum posts and pages have been lost on the page loss...
User avatar
old_death
 
Posts: 1734
Joined: 13 Jun 2009 16:19

Re: New Scheduler merged into r8442M

Postby mojo85 » 05 Mar 2010 03:29

I have been testing version 73 for about a week. Things run smoothly, and no apparent hiccups. I think this is ready, can we begin to move it into the trunk? Ryo, it's time to merge it or give feedback as on where needs to improve before importing. I think it is ready, can we move this in, and remove the old ... this is a revamp that is more than 3 years in the making, it is about time.
mojo85
 
Posts: 115
Joined: 27 Sep 2009 05:35

Re: New Scheduler merged into r8442M

Postby cyko_01 » 06 Mar 2010 05:03

I was just comparing it with the code on SVN and I noticed a few small things that should be fixed.

1) some of the copyrights have been changed from 2010 back to 2009(and some are 2004 from original code submission).
2) you had moved some code around (optimized?)in the hub promotion section, but nothing missing as far as I could tell.
3) implemented nRating points awarded for not having a scheduled shutdown - good stuff
4) alpha/beta/release notice changed - oops! probably done for testing purposes
5) a few stray tabs - no biggie

You should make sure you sync it with the latest revision on SVN (rev. 8500) as well since new code has been added since (shareaza.cpp for one). It makes it a lot easier/faster when we do not have to merge old code with the new code before committing.
Join Shareaza On Facebook! --> http://facebook.com/Shareaza
All-In-One AntiSpam Filter [Aug-14-2011] --> http://forum.sure-raza.com/viewtopic.php?f=2&t=10

Image
User avatar
cyko_01
 
Posts: 929
Joined: 13 Jun 2009 15:51

Re: New Scheduler merged into r8442M

Postby siavoshkc » 07 Mar 2010 09:06

cyko_01 wrote:I was just comparing it with the code on SVN and I noticed a few small things that should be fixed.

1) some of the copyrights have been changed from 2010 back to 2009(and some are 2004 from original code submission).
2) you had moved some code around (optimized?)in the hub promotion section, but nothing missing as far as I could tell.
3) implemented nRating points awarded for not having a scheduled shutdown - good stuff
4) alpha/beta/release notice changed - oops! probably done for testing purposes
5) a few stray tabs - no biggie

You should make sure you sync it with the latest revision on SVN (rev. 8500) as well since new code has been added since (shareaza.cpp for one). It makes it a lot easier/faster when we do not have to merge old code with the new code before committing.


2 -> Identical code is moved to new method.
4 -> I changed alpha to beta when I added scheduler.
5 -> Please tell me more.

I will update and send new version till next two weeks. Please don't commit V73.

[EDIT]
Opened a new thread in development discussion...
Last edited by siavoshkc on 09 Mar 2010 13:57, edited 2 times in total.
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Re: New Scheduler merged into r8442M

Postby ocexyz » 07 Mar 2010 14:26

Forgive me ignorance: where is actual ver for tests? I think in first post should be link to mosta actual one for testing - of course "on your own risk" etc.
User avatar
ocexyz
 
Posts: 624
Joined: 15 Jun 2009 13:09

Re: New Scheduler merged into r8442M

Postby cyko_01 » 07 Mar 2010 19:34

siavoshkc wrote:Import/export from/to XML is added into next version.

no, I meant that we should be able to upgrade the old-style schedules(in the settings window) to the new format(in it's own window). are there any differences in the way they are stored on disk?

edit: oh yea, and the language is cited as english US somewhere when it is actually english AU. And by stray tabs I meant there are blank lines with tabs on them and tabs at the end of lines - I only noticed because winmerge detects it as a changed line
Join Shareaza On Facebook! --> http://facebook.com/Shareaza
All-In-One AntiSpam Filter [Aug-14-2011] --> http://forum.sure-raza.com/viewtopic.php?f=2&t=10

Image
User avatar
cyko_01
 
Posts: 929
Joined: 13 Jun 2009 15:51

Re: New Scheduler merged into r8442M

Postby siavoshkc » 09 Mar 2010 13:46

cyko_01 wrote:
siavoshkc wrote:Import/export from/to XML is added into next version.

no, I meant that we should be able to upgrade the old-style schedules(in the settings window) to the new format(in it's own window). are there any differences in the way they are stored on disk?


Yes I know its not. Its a way to save scheduler list.

Yes they are completely different.
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

V8

Postby siavoshkc » 17 Mar 2010 15:25

New functionality for selecting specific days of week is added. Please test it and commit if ready.

[EDIT]
There is also a little optimization in OnTimer() in CWndMain.
Attachments
Scheduler merged into r8522 plus media player keeps track of 3 players [V8][siavoshkc].zip
(245.99 KiB) Downloaded 25 times
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

v8

Postby siavoshkc » 24 Mar 2010 19:34

Has anybody tested the last version? When will be commited?
siavoshkc
 
Posts: 321
Joined: 02 Nov 2009 09:37

Next

Return to Code Submission

Who is online

Users browsing this forum: No registered users and 0 guests