Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[REQ] Add interval days in the hover info auto updater #43

Open
schroef opened this issue Apr 5, 2018 · 3 comments
Open

[REQ] Add interval days in the hover info auto updater #43

schroef opened this issue Apr 5, 2018 · 3 comments

Comments

@schroef
Copy link
Contributor

schroef commented Apr 5, 2018

Sweet new release! One thing i noticed is when we use the compact view, we have the auto-updater checkbox below that. When a user hovers over it states "auto check for updates using interval". But it doesnt state how long that interval is.

Perhaps this should be added so user know what interval is used?

screen shot 2018-04-04 at 8 02 36 pm

I did had an idea to get the data using;

 updater.set_check_interval(enable=auto_check_update,
					months=updater_intrval_months,
					days=updater_intrval_days,
					hours=updater_intrval_hours,
					minutes=updater_intrval_minutes
					)

But i got an error about tuple first. Then tried a different approach importing the updater from addon_updater.py (Singleton_updater) above the prefrerence panel. That way i could reach the _check_interval_days

from .addon_updater import Updater as updater

It grabs the standard days and shows this in the hover info.
screen shot 2018-04-04 at 8 40 45 pm

other option is to add in between after the boolean checkbox perhaps. Then the user will see the update interval directly. This also works, same method as i used above.
screen shot 2018-04-04 at 8 47 28 pm

It grabs the standard days set in the addon_updater.py file, it looks like this
screen shot 2018-04-04 at 8 42 01 pm

@schroef schroef changed the title [REQ] Add 7 days in the hover info auto updater [REQ] Add interval days in the hover info auto updater Apr 5, 2018
@schroef
Copy link
Contributor Author

schroef commented Apr 5, 2018

Ideally it should show all the items, didnt knew how to do that though as that setup gave a Tuple error.

@TheDuckCow
Copy link
Collaborator

Yup, your last approach is an appropriate way to get days in that tooltip (for days at least). One thing to know is that when an operator registers, it only evaluates that description at the moment of registration (ie even if you showed the user preferences options to change the interval, the text wouldn't be updated as the user changed it).

For this reason, I'll not update the master repository because updating the text this way would conflict with the primary UI which does have the interval options. I am actually going to recommend developers using the updater to simply directly modify the property text explicitly by putting in the interval of weeks/days, as I have done here. It's a little hard to fully accommodate all possible setups of the updater, so I'd rather let the individual developer do the minor relevant modifications, rather than trying to incorporate a lot fo extra code to work around these sorts of things.

As a reminder, the addon_updater.py file should never need to be modified, but the addon_updater_ops.py should be modified as needed, with this condensed UI as just an example of what's possible.

Going to keep this issue open so that others can see how you coded the example, thanks for putting it together.

@schroef
Copy link
Contributor Author

schroef commented Apr 6, 2018

oke, i understand. Its a bit of an hack indeed. I will keep i guess for the users of this addon

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants