Commit graph

2,306 commits

Author SHA1 Message Date
Romain Bignon
4ea7872ba4 fix setting None, NotLoaded and NotAvailable values on fields 2012-03-26 22:56:10 +02:00
Romain Bignon
8d182f8e4e havedate inherits boobmsg 2012-03-26 16:13:12 +02:00
Romain Bignon
9f86437ea1 do not check anymore if all CapBaseObject have docstrings 2012-03-26 14:41:24 +02:00
Romain Bignon
c6a141595c change way to describe fields of CapBaseObject, and lot of documentation 2012-03-26 14:35:54 +02:00
Roger Philibert
36b66e9238 [boobmsg] Photos command 2012-03-26 14:20:37 +02:00
Roger Philibert
bf17245f90 [boobmsg] Profile support 2012-03-26 14:20:37 +02:00
Clément Schreiner
0ccae70238 Remove useless Revision's attribute: 'revision'. 2012-03-26 11:47:31 +02:00
Clément Schreiner
e790778f6a Fix typo. Makes loadButton enabled again after loading has failed. 2012-03-25 12:56:00 +02:00
Clément Schreiner
76795b27a2 Ask for correct login information (for example "Account ID" in boobank) instead of always asking for "Password". 2012-03-25 12:51:38 +02:00
Clément Schreiner
9851a675d5 Set a placeholder text for cityEdit only if the user's version of Qt supports it. fixes #832 2012-03-25 10:33:49 +02:00
Clément Schreiner
5daf71effe Small UI fixes. Compatibility with Qt version < 4.7.
- 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
2012-03-25 10:22:55 +02:00
Clément Schreiner
07c7b7b1be Code cleaning. Comments, methods renaming and other cosmetic changes.
- added doc strings to every method
 - showPreview -> loadPreview (for consistency)                                                        - _loadPage_cb -> _loadedPage (same for savePage)                                                     - _loadPage_eb -> _errorLoadPage (same for savePage)
 - try to limit lines to 79 columns
2012-03-25 10:22:55 +02:00
Clément Schreiner
4b8e2937be Make the 'load' button usable again after loading has failed. 2012-03-25 10:22:55 +02:00
Romain Bignon
1833952af1 fix completion of 'cd' after using 'ls' with a parameter 2012-03-25 09:45:31 +02:00
Clément Schreiner
44ca257bae Add revisions at the end and not the beginning. Revisions are now shown in the correct order. 2012-03-24 20:54:09 +01:00
Clément Schreiner
f14f63daf2 Add 'History' tab, showing the current page's list of previous revisions. fixes #561 2012-03-24 20:14:39 +01:00
Clément Schreiner
5fe9273b2f More minor changes to the UI.
- the contentEdit widget is ReadOnly before a page has been loaded
 - the saveButton widget stays disabled after the page has been saved
2012-03-24 20:14:15 +01:00
Romain Bignon
8f282c9ae8 rename iter_operations to iter_coming 2012-03-23 17:07:34 +01:00
Clément Schreiner
85d46363a6 Placeholder text for edit summary. 2012-03-23 11:44:32 +01:00
Clément Schreiner
a1a68847bb Minor UI changes.
- 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
2012-03-23 09:53:57 +01:00
Laurent Bachelier
ba5949cd22 Remove nb_unread/nb_messages in CapMessages
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
2012-03-23 07:04:42 +01:00
Laurent Bachelier
79724c90f5 Remove "thread" argument in iter_unread_messages
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
2012-03-23 07:04:40 +01:00
Romain Bignon
2675510f32 add a class FrenchTransaction to factorize common parsing of french banks 2012-03-22 16:33:05 +01:00
Romain Bignon
e6d5fd019f add a field 'rdate' to store date of payment 2012-03-22 16:33:05 +01:00
Romain Bignon
7ecdd4e7dc load_backend: don't catch when there is an error to load a module 2012-03-22 16:33:05 +01:00
Laurent Bachelier
64d976d6d9 Add command to run the monboob process only once 2012-03-21 04:16:45 +01:00
theo
67ae0893cd Add completion to ls in CapCollection
The completion is the same code as ls used to call.
2012-03-20 07:52:40 +01:00
Romain Bignon
e2aaef914a fix 'close' command 2012-03-18 11:33:56 +01:00
theo
8c977825b9 ls dir is equivalent to cd dir + ls + cd ..
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>
2012-03-16 17:20:18 +01:00
Laurent Bachelier
b8d1a52732 Use simplejson first, and centralize import
simplejson is supposed to be faster:
http://stackoverflow.com/questions/712791/json-and-simplejson-module-differences-in-python
2012-03-16 16:27:22 +01:00
Laurent Bachelier
e958c229e6 Move the "empty search for latest" to collections
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.
2012-03-16 03:34:22 +01:00
Florent Fourcot
65251c4ceb Display renew confirmation/errors 2012-03-16 00:49:58 +01:00
Florent Fourcot
bdcc5db8bb Add "renew" in ICapBook and in boobooks 2012-03-16 00:49:54 +01:00
Florent Fourcot
34a71f9ef8 Fix error messages 2012-03-16 00:49:51 +01:00
Laurent Bachelier
30ca21c5d8 Use the right default value for XDG_DATA_DIRS
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
2012-03-15 18:51:18 +01:00
Romain Bignon
8e391d0b88 bump to 0.c 2012-03-14 22:09:24 +01:00
Romain Bignon
df7325d712 get all fields of housings 2012-03-14 21:56:36 +01:00
Romain Bignon
98968d50d1 use urlparse to parse proxy url 2012-03-14 19:44:46 +01:00
Florent
34e95f8f7b Add format as file extension 2012-03-14 10:30:17 +01:00
Florent
99a2e554e8 Download bill on freemobile 2012-03-14 07:12:03 +01:00
Laurent Bachelier
006e97a8be PEP8 style fixes and other small style fixes
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
2012-03-14 04:51:46 +01:00
Romain Bignon
1e000acf3a remove unused imports 2012-03-13 22:45:39 +01:00
Romain Bignon
9c4b8e3a59 add a formatter for subscriptions, and do 'ls' work 2012-03-13 22:43:42 +01:00
Laurent Bachelier
6ad93c7ea9 Use the helper function in the new capability
Revolutionary and magical.
2012-03-13 22:10:24 +01:00
Laurent Bachelier
fae4470101 Prepare for objects that are also Collections
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
2012-03-13 22:08:46 +01:00
Laurent Bachelier
f4dbefb6ef Add some useful properties to Collection 2012-03-13 22:08:46 +01:00
Laurent Bachelier
1430b40bc5 Fix some collecton validation
And add restrict_level helper method.
2012-03-13 22:08:46 +01:00
Laurent Bachelier
e70a125ab9 Make collection validation more powerful
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.
2012-03-13 22:08:46 +01:00
Laurent Bachelier
c0121ae6ab Fix crash when entering unicode paths
prompt must be str, not unicode, so we encode it
2012-03-13 22:08:46 +01:00
Laurent Bachelier
b6021d4732 Better path changing support
* 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
2012-03-13 22:08:45 +01:00