- error callback for loadHistory, to make the reload button enabled again after an error
- remove descriptionEdit's placeholder (for compatibilty with earlier versions of Qt)
- add placeholder text to descriptionEdit if supported by the user's version of Qt
- set contentEdit read-only while loading a new page
- saveButton was still showing "Saving" after saving had failed
- The 'save' button is disabled and shows 'No changes' at first. Editing contentEdit's text
enables the button and makes it show 'Save'.
- The 'save' button is disabled and shows 'Saving...' when the page is being saved, and stays
disabled until contentEdit's text has been changed again.
- The 'save' button shows 'Saved' once the page has been successfully saved. fixes#560
- contentEdit is readonly when the page is being saved
Most backends don't set it nb_messages and no application used it.
No backends set nb_unread and only one application tried to use it.
This should help avoid useless fillobj() calls in some cases.
fixes#827
It is unused, and no backend implemented it — so it was wrong to have it
in the function signature.
It also does not seem very helpful, we have get_threads() if we want to
do something advanced with treads.
fixes#825
Until now, ls discarded arguments.
ls = ls dir:
videoob> ls
~ (emissions) Emissions (canalplus)
~ (sport) Sport (canalplus)
~ (cinema) Cinema (canalplus)
~ (cesar-2012) Cesar 2012 (canalplus)
~ (series-fictions) Series / fictions (canalplus)
~ (du-hard-ou-du-cochon) Du hard ou du cochon (canalplus)
~ (divertissement) Divertissement (canalplus)
~ (canal-street) Canal street (canalplus)
~ (musique) Musique (canalplus)
~ (docus-infos) Docus / infos (canalplus)
videoob> ls sport
~ (emissions) Emissions (canalplus)
~ (sport) Sport (canalplus)
~ (cinema) Cinema (canalplus)
~ (cesar-2012) Cesar 2012 (canalplus)
~ (series-fictions) Series / fictions (canalplus)
~ (du-hard-ou-du-cochon) Du hard ou du cochon (canalplus)
~ (divertissement) Divertissement (canalplus)
~ (canal-street) Canal street (canalplus)
~ (musique) Musique (canalplus)
~ (docus-infos) Docus / infos (canalplus)
With this patch, we are now able to ls a dir without chdir into it.
For instance:
videoob> ls
~ (emissions) Emissions (canalplus)
~ (sport) Sport (canalplus)
~ (cinema) Cinema (canalplus)
~ (cesar-2012) Cesar 2012 (canalplus)
~ (series-fictions) Series / fictions (canalplus)
~ (du-hard-ou-du-cochon) Du hard ou du cochon (canalplus)
~ (divertissement) Divertissement (canalplus)
~ (canal-street) Canal street (canalplus)
~ (musique) Musique (canalplus)
~ (docus-infos) Docus / infos (canalplus)
videoob> ls sport
~ (les-incontournables) Les incontournables (canalplus)
~ (les-plus-recentes) Les plus recentes (canalplus)
~ (les-plus-vues) Les plus vues (canalplus)
~ (tout-le-football) Tout le football (canalplus)
~ (tout-le-rugby) Tout le rugby (canalplus)
~ (tout-le-basket) Tout le basket (canalplus)
~ (tout-le-tennis-golf) Tout le tennis / golf (canalplus)
~ (autres-sports-home-sport) Autres sports - home sport (canalplus)
~ (les-emissions-sport) Les emissions sport (canalplus)
videoob> ls
~ (emissions) Emissions (canalplus)
~ (sport) Sport (canalplus)
~ (cinema) Cinema (canalplus)
~ (cesar-2012) Cesar 2012 (canalplus)
~ (series-fictions) Series / fictions (canalplus)
~ (du-hard-ou-du-cochon) Du hard ou du cochon (canalplus)
~ (divertissement) Divertissement (canalplus)
~ (canal-street) Canal street (canalplus)
~ (musique) Musique (canalplus)
~ (docus-infos) Docus / infos (canalplus)
Signed-off-by: theo <theocrite@theocrite.org>
There is now a "latest" collection (or "latest_nsfw").
The feature didn't look much used, since it didn't work on many
backends.
Using collections will make it easy to support other things
like most viewed, featured, etc.
As a bonus, I added tests for every backend with the feature.
I used autopep8 on some files and did carefully check the changes.
I ignored E501,E302,E231,E225,E222,E221,E241,E203 in my search, and at
least E501 on any autopep8 run.
Other style fixes not related to PEP8:
* Only use new-style classes. I don't think the usage of old-style
classes was voluntary. Old-style classes are removed in Python 3.
* Convert an if/else to a one-liner in mediawiki, change docstring style
change to a comment something that wasn't really appropriate for a
docstring.
* Unneeded first if condition in meteofrance
Don't force objects to have an id, especially since that id was
incorrect. "plap/plop" would have the same id as "plop", i.e. "plop".
We don't rely on the id for handling Collections anymore.
Change to use more unique property names.
Change the display, instead of using '*', we use '~', and there is no
"Collection" header anymore.
Updated formatters could use that way of showing the object is also a
collection too.
refs #774
Handle and use exceptions.
An example is provided with the redmine backend (not very useful
though). If you cd into the project title instead of the id, it is
accepted and the path is corrected.
* Create a get_collection method similar to get_* methods for objects.
* Fix title initialization of a collection
* Remove the hack were both id and title were allowed when CDing.
That hack only worked with the canalplus module, and failed with
others like redmine (but they still showed in suggestions).
Moreover, the canalplus module now has friendlier IDs
so this is not really needed anymore.
* Allow backends to tell if a path is valid or not.
For instance, it now allows to cd in a Redmine project with no issues
in it. It also won't display "404" for invalid project IDs.
By default, we still use the unreliable method of checking there is at
least one result in iter_resources().
* Fix cd completion to work with unicode strings (all strings after an
unicode string were ignored!)
* Do not suggest '..' when completing cd in the root
refs #774