- A simple application to access and organize your e-books on - GNOME. It is meant to be a simple and elegant replacement for using a - file manager to deal with e-books. -
-It lets you:
-
+
+## Useful links
+
+**Homepage**: https://wiki.gnome.org/Apps/Documents
+
+**Report issues**: https://gitlab.gnome.org/GNOME/gnome-documents/issues/
+
+**Donate**: https://www.gnome.org/friends/
+
+**Translate**: https://wiki.gnome.org/TranslationProject
+
+## Hacking on Documents
+
+To start working on Documents see the [general guide](https://wiki.gnome.org/Newcomers/BuildProject) for building GNOME apps
+with Flatpak and GNOME Builder. Then, [find a task](https://gitlab.gnome.org/GNOME/gnome-documents/issues?label_name%5B%5D=4.+Newcomers) to work on.
+
+If you're unfamiliar with GJS, here are a few good places to start:
+
+* The [beginner-level guide](https://gjs-guide.gitlab.io/) for working with GJS
+* An overview of [working with GNOME APIs via GJS](https://gitlab.gnome.org/GNOME/gjs/wikis/Mapping)
+* The [documentation for various GNOME libraries](https://devdocs.baznga.org/) in JavaScript
+
+## Communication
+
+If you need help, contact us at [#gnome-documents:disroot.org](https://matrix.to/#/#gnome-documents:disroot.org) on Matrix. If you need a client,
+we recommend using [Fractal](https://flathub.org/apps/details/org.gnome.Fractal), a Matrix app built for GNOME.
\ No newline at end of file
diff -Nru gnome-documents-3.30.0/src/application.js gnome-documents-3.31.92/src/application.js
--- gnome-documents-3.30.0/src/application.js 2018-09-12 02:30:11.000000000 -0400
+++ gnome-documents-3.31.92/src/application.js 2019-03-03 05:24:35.000000000 -0500
@@ -99,22 +99,15 @@
'miners-changed': {}
},
- _init: function(isBooks) {
+ _init: function() {
this.minersRunning = [];
this._activationTimestamp = Gdk.CURRENT_TIME;
this._extractPriority = null;
this._searchProvider = null;
- this.isBooks = isBooks;
-
let appid;
- if (this.isBooks) {
- GLib.set_application_name(_("Books"));
- appid = 'org.gnome.Books';
- } else {
- GLib.set_application_name(_("Documents"));
- appid = 'org.gnome.Documents';
- }
+ GLib.set_application_name(_("Documents"));
+ appid = 'org.gnome.Documents';
// needed by data/ui/view-menu.ui
GObject.type_ensure(Gio.ThemedIcon);
@@ -183,7 +176,7 @@
},
_onActionAbout: function() {
- this._mainWindow.showAbout(this.isBooks);
+ this._mainWindow.showAbout();
},
_onActionHelp: function() {
@@ -344,16 +337,13 @@
},
vfunc_startup: function() {
+ application = this;
this.parent();
String.prototype.format = Format.format;
EvDoc.init();
- application = this;
- if (application.isBooks)
- settings = new Gio.Settings({ schema_id: 'org.gnome.books' });
- else
- settings = new Gio.Settings({ schema_id: 'org.gnome.documents' });
+ settings = new Gio.Settings({ schema_id: 'org.gnome.documents' });
let gtkSettings = Gtk.Settings.get_default();
gtkSettings.connect('notify::gtk-theme-name', Lang.bind(this, this._themeChanged));
@@ -367,13 +357,11 @@
return;
}
- if (!application.isBooks) {
- try {
- goaClient = Goa.Client.new_sync(null);
- } catch (e) {
- logError(e, 'Unable to create the GOA client');
- return;
- }
+ try {
+ goaClient = Goa.Client.new_sync(null);
+ } catch (e) {
+ logError(e, 'Unable to create the GOA client');
+ return;
}
connectionQueue = new TrackerController.TrackerConnectionQueue();
@@ -414,8 +402,7 @@
if (this._mainWindow)
return;
- if (!this.isBooks)
- this._initGettingStarted();
+ this._initGettingStarted();
notificationManager = new Notifications.NotificationManager();
this._mainWindow = new MainWindow.MainWindow(this);
diff -Nru gnome-documents-3.30.0/src/config.js.in gnome-documents-3.31.92/src/config.js.in
--- gnome-documents-3.30.0/src/config.js.in 2018-09-12 02:30:11.000000000 -0400
+++ gnome-documents-3.31.92/src/config.js.in 1969-12-31 19:00:00.000000000 -0500
@@ -1,3 +0,0 @@
-const PACKAGE_NAME = '@PACKAGE_NAME@';
-const PACKAGE_VERSION = '@PACKAGE_VERSION@';
-const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
\ No newline at end of file
diff -Nru gnome-documents-3.30.0/src/documents.js gnome-documents-3.31.92/src/documents.js
--- gnome-documents-3.30.0/src/documents.js 2018-09-12 02:30:11.000000000 -0400
+++ gnome-documents-3.31.92/src/documents.js 2019-03-03 05:24:35.000000000 -0500
@@ -22,7 +22,6 @@
const EvDocument = imports.gi.EvinceDocument;
const EvView = imports.gi.EvinceView;
const LOKView = imports.lokview;
-const EPUBView = imports.epubview;
const GdkPixbuf = imports.gi.GdkPixbuf;
const Gio = imports.gi.Gio;
const Gd = imports.gi.Gd;
@@ -709,17 +708,7 @@
loadLocal: function(passwd, cancellable, callback) {
Utils.debug('Loading ' + this.__name__ + ' ' + this.id + ' from ' + this.uriToLoad);
- if (this.mimeType == 'application/x-mobipocket-ebook' ||
- this.mimeType == 'application/x-fictionbook+xml' ||
- this.mimeType == 'application/x-zip-compressed-fb2') {
- let exception = new GLib.Error(Gio.IOErrorEnum,
- Gio.IOErrorEnum.NOT_SUPPORTED,
- "Internal error: Ebooks preview isn't support yet");
- callback(this, null, exception);
- return;
- }
-
- if (LOKView.isOpenDocumentFormat(this.mimeType) && !Application.application.isBooks) {
+ if (LOKView.isOpenDocumentFormat(this.mimeType)) {
let exception = null;
if (!LOKView.isAvailable()) {
exception = new GLib.Error(Gio.IOErrorEnum,
@@ -730,11 +719,6 @@
return;
}
- if (EPUBView.isEpub(this.mimeType) && Application.application.isBooks) {
- callback(this, null, null);
- return;
- }
-
GdPrivate.pdf_loader_load_uri_async(this.uriToLoad, passwd, cancellable, Lang.bind(this,
function(source, res) {
try {
@@ -1131,8 +1115,6 @@
description = _("Spreadsheet");
else if (this.rdfType.indexOf('nfo#Presentation') != -1)
description = _("Presentation");
- else if (this.rdfType.indexOf('nfo#EBook') != -1)
- description = _("e-Book");
else
description = _("Document");
@@ -1428,8 +1410,6 @@
description = _("Spreadsheet");
else if (this.rdfType.indexOf('nfo#Presentation') != -1)
description = _("Presentation");
- else if (this.rdfType.indexOf('nfo#EBook') != -1)
- description = _("e-Book");
else
description = _("Document");
@@ -1623,10 +1603,7 @@
} else if (error.domain == Gio.IOErrorEnum) {
switch (error.code) {
case Gio.IOErrorEnum.NOT_SUPPORTED:
- if (Application.application.isBooks)
- message = _("You are using a preview of Books. Full viewing capabilities are coming soon!");
- else
- message = _("LibreOffice support is not available. Please contact your system administrator.");
+ message = _("LibreOffice support is not available. Please contact your system administrator.");
break;
default:
break;
@@ -1667,10 +1644,8 @@
_requestPreview: function(doc) {
let windowMode;
- if (LOKView.isOpenDocumentFormat(doc.mimeType) && !Application.application.isBooks) {
+ if (LOKView.isOpenDocumentFormat(doc.mimeType)) {
windowMode = WindowMode.WindowMode.PREVIEW_LOK;
- } else if (EPUBView.isEpub(doc.mimeType) && Application.application.isBooks) {
- windowMode = WindowMode.WindowMode.PREVIEW_EPUB;
} else {
windowMode = WindowMode.WindowMode.PREVIEW_EV;
}
diff -Nru gnome-documents-3.30.0/src/embed.js gnome-documents-3.31.92/src/embed.js
--- gnome-documents-3.30.0/src/embed.js 2018-09-12 02:30:11.000000000 -0400
+++ gnome-documents-3.31.92/src/embed.js 2019-03-03 05:24:35.000000000 -0500
@@ -23,7 +23,6 @@
const Mainloop = imports.mainloop;
const Application = imports.application;
-const EPUBView = imports.epubview;
const Edit = imports.edit;
const EvinceView = imports.evinceview;
const LOKView = imports.lokview;
@@ -72,9 +71,6 @@
case WindowMode.WindowMode.PREVIEW_LOK:
constructor = LOKView.LOKView;
break;
- case WindowMode.WindowMode.PREVIEW_EPUB:
- constructor = EPUBView.EPUBView;
- break;
case WindowMode.WindowMode.EDIT:
constructor = Edit.EditView;
break;
@@ -112,7 +108,6 @@
break;
case WindowMode.WindowMode.PREVIEW_EV:
case WindowMode.WindowMode.PREVIEW_LOK:
- case WindowMode.WindowMode.PREVIEW_EPUB:
case WindowMode.WindowMode.EDIT:
this._createPreview(mode);
this._stack.visible_child = this._preview;
diff -Nru gnome-documents-3.30.0/src/epubview.js gnome-documents-3.31.92/src/epubview.js
--- gnome-documents-3.30.0/src/epubview.js 2018-09-12 02:30:11.000000000 -0400
+++ gnome-documents-3.31.92/src/epubview.js 1969-12-31 19:00:00.000000000 -0500
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 2016 Daniel Garcia