gnome-documents:wip/rishi/init-getting-started

Last commit made on 2017-12-14
Get this branch:
git clone -b wip/rishi/init-getting-started https://git.launchpad.net/gnome-documents

Branch merges

Branch information

Name:
wip/rishi/init-getting-started
Repository:
lp:gnome-documents

Recent commits

c098445... by Debarshi Ray <email address hidden>

notifications, query: Use 'var' for exported constant

This avoids warnings with GJS 1.50.

https://bugzilla.gnome.org/show_bug.cgi?id=785568

85d3bfc... by Debarshi Ray <email address hidden>

documents, query: Use the standard dialect of String.prototype.replace

The Gecko-specific dialect doesn't work with GJS 1.50.

https://bugzilla.gnome.org/show_bug.cgi?id=791613

7dd0bdc... by Debarshi Ray <email address hidden>

trackerController: Assert against premature queries

The TrackerControllers are only supposed to issue their queries once
all the pieces of the application that are necessary to formulate them
have been initialized. This is indicated by the invocation of the start
method. For example, if the queries are submitted before the detection
of the getting started PDF has completed, then they won't have the
path to PDF and it will be missing from the UI.

Throwing an exception forces one to think about the details surrounding
each query submission path, as opposed to having the silently dropping
the request.

https://bugzilla.gnome.org/show_bug.cgi?id=791518

44e0f52... by Debarshi Ray <email address hidden>

trackerController: Don't submit queries until started

https://bugzilla.gnome.org/show_bug.cgi?id=791518

8f0bcd4... by Debarshi Ray <email address hidden>

application: Create the window only after detecting the PDF

This ensures that the TrackerControllers are started after the getting
started PDF has been initialized, so that it can be included in their
queries.

https://bugzilla.gnome.org/show_bug.cgi?id=791518

4ca4aeb... by Debarshi Ray <email address hidden>

application: Shuffle some code around

Having the _initGettingStarted method take care of the isBooks
condition will make it easier to chain it with the window creation.

https://bugzilla.gnome.org/show_bug.cgi?id=791518

38b1943... by Debarshi Ray <email address hidden>

application: Tie the catch block more tightly to the failure site

Having a lot of code inside a try statement makes it harder to follow
the error handling logic. The catch statements are far away from the
code that can throw an exception, so it is difficult to match them
together. Let's reduce the size of the try blocks by only using them
for fallible operations.

https://bugzilla.gnome.org/show_bug.cgi?id=791518

afe89c2... by Debarshi Ray <email address hidden>

application: Make window creation complete asynchronously

Creating MainWindow starts the TrackerControllers. The getting started
PDF needs to be located before that happens, to let the
TrackerControllers include it in their queries. Since, locating the PDF
is an asynchronous operation, the overall _createWindow method also
needs to complete asynchronously.

This doesn't make any user-visible changes, but sets the stage for the
subsequent patches.

https://bugzilla.gnome.org/show_bug.cgi?id=791518

961c846... by Debarshi Ray <email address hidden>

application: Insert the getting started PDF only when showing a window

The startup is shared between the application and the search provider.
There is no need to initialize the getting started PDF for the search
provider, since it is only useful when the user runs the application.

https://bugzilla.gnome.org/show_bug.cgi?id=791518

a0a2347... by Debarshi Ray <email address hidden>

preview: Use 'var' for exported constant

This avoids warnings with GJS 1.50.

https://bugzilla.gnome.org/show_bug.cgi?id=785568