| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Needed by the tests.
|
|
|
|
| |
This is needed to identify the mime type
|
| |
|
|
|
|
|
|
|
|
| |
Some mime files, like epub, are not recognized if the extension is not set.
We need use the suggested_name extension to save the file,
and save the mimetype in the metadata.
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
|
| |
|
|
|
|
|
|
|
| |
I need copy the file to the instance directory,
the path provided by the datastore dissapear later in the life of the activity.
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
|
| |
|
|
|
|
|
|
|
| |
If the preview can't be opened or created, create a image with a number
showing the page number.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
| |
This improve startup time when the book is opened by second time,
and is needed by the new ObjectChooser filter available on sugar 0.100
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
| |
A message is displayed when the collaboration is requested,
because there are a time until it is establidhed.
The progressbar is updated by 10% fractions,
and the redraw of the widget is forced.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
Mostly aligment issues reported by new pep8 version
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
Previously, the file was copied two times and that is not needed
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Activities do read_file when the canvas widget is mapped.
This is a problem in Read activity, because we added a emptypanel,
and that widget is triggereing the read_file execution.
Then, this patch disable the automatic behavior, and call read_file,
when is needed:
* at start, if is reopening a object in the journal with a book.
* after selecting a object with the ObjectChooser.
* after receive a book on collaboration.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
This is in the case of receive a book because join a shared session.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With latests changes (empty panel addition) the canvas is set more than
one time, then the read_file can be triggered more than one time.
Check if a file is already openened to not open it two times.
This prevent a bug where the book is displayed two times, side by side.
This patch also avoid a situation where the book can't be shared because
the self._tempfile is not set when the file is opened at start because
is reopened the activity from the journal.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
| |
Right now, Read activity can start without a file loaded,
showing the empty panel and a button to open the object chooser.
If the user try sharing the session before a book is opened,
the collaboration is broken, because no file is available to share.
This patch disable collaboration until a file is opened.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
Is not available on old sugar versions.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
| |
This feature is available only in sugar 0.100 and better,
if is not available use the old mime.GENERIC_TYPE_TEXT filter.
This change is related to AU #2439 & SL #4523
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously used the type "Text", but this type include Write files,
and Read can't open them [1].
This filter does not work on external devices [2], but a patch for
sugar was already provided.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
[1] https://sugardextrose.org/issues/2439
[2] http://bugs.sugarlabs.org/ticket/4523
|
|
|
|
|
|
|
| |
The highlight button is moved to the edition subtoolbar,
and a invisible separator is replaced by a small margin after the label.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
| |
When the user starts a new instance of Read the 'No book' message is
shown with a button to 'Choose something to read' that opens the Object Chooser.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
|
|
|
|
|
|
|
| |
When a file is received after joining a colaboration session,
need be saved in the journal, and we need calculate the md5 hash.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the normal behaviour of the clicks on rows, so they
are expanded just tapping/clicking once on them. This is helpful when
the XO is used in eBook mode because the arrows are really small and
difficult to tap with the finger.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Reviewed-by: Manuel QuiƱones <manuq@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
| |
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
The preview is saved in another table in the sqlite db.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
| |
This change needs evince 3.5.92 to work.
The code checks evince version, before enable the functionality.
This version works with index with one level only.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
| |
The topbar was used in full screen mode.
Is removed by recomendation of Design Team, to use all the screen
with the book view and not be distracted.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
When the zoom level change or the index view to is shown / hidden.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
| |
Epub index can point to internal links in the content files.
This patch manage this cases. A particular case was found in a
file generated in UY (see attachment in the ticket) where the links
don't point to the start of a file, but to the end of the previous file.
Then, if the index is at the end of a file, we open the next file.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The table of contents, actually implemented in epub backend,
is displayed in a later panel, instead of in a combo,
to do easier the interaction with touch, and provide context.
The code is now more general to allow the implementation
in the pdf backend too.
The button used to display the table of contents, was moved
from the main toolbar to the view subtoolbar.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
| |
Is not a sidebar anymore, and we will add a sidebar to show
the index, the to avoid problems in the future, renamed the object
and variables to have more consistent nomenclature.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
| |
* Remove style in the number of pages label: is done in the theme now,
and the font is smaller.
* Set request_size in separators.
* remove unneded toolitem around highlight toogle button
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
Is using a hack.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sidebar where we displayed the bookmark was a thin area
at the left of the screen, was not very intuitive, and was dificult
to access with a finger.
With Gtk3 we can use overlays, then this patch move the sidebar
to the top/right of the screen, and display it with a shape similar
to other book readers, using the user colors.
I have tried to do the botom triangle transparent,
but without success, we can try it later.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Signed-off-by: Manuel QuiƱones <manuq@laptop.org>
Signed-off-by: Simon Schampijer <erikos@laptop.org>
|
|
|
|
|
|
|
|
|
| |
Show the bookmark for the first page (if any) in the sidebar when the
file is resumed from the Journal.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Tested-by: Simon Schampijer <simon@laptop.org>
|
|
|
|
|
|
|
|
| |
Alert the user with a Confirmation Alert when he / she removes a bookmark
informing that the bookmark information will be lost.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@latop.org>
|
|
|
|
| |
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug have two sources.
First, the button used to add/remove the bookmark is a toggle,
and the gtk3 theme is not setting the right grey color, then is not obvious
to the user if the button is pressed or not.
(this problem will be addressed in sugar-artwork)
The second problem is, if the user cancel the dialog creating the bookmark,
the bookmark is not created but the button continue pressed until the page is changed.
This was solved sending a signal to uptade the button state.
Two other problems were found and solved:
* The page number in the bookmark description was wrong by one.
* If the page had more than one bookmark, the clear method only removed the last
then the sidebar accumulated bookmark icons.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
|