summaryrefslogtreecommitdiff
path: root/font-viewer/font-model.c
AgeCommit message (Collapse)AuthorFilesLines
2017-02-17Fontviewer: font-model: actually cancel the thread when rebuilding font listraveit651-13/+27
Also, we need to protect the font list with a mutex, since we might modify it from the main thread while the load thread is still parsing the previous list. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=fd3c6a88d7e4833d5be00cf6dc1a398adf46283b
2017-02-17Fontviewer: font-model, cancel previous loading when refreshing font listraveit651-5/+25
This should help in case a refresh is requested before the previous operation completes. Currently, we seem to be crashing when that happens, see https://bugzilla.redhat.com/show_bug.cgi?id=870753 taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=47fbb29
2017-02-17Fontviewer: model: load font names asynchronouslyraveit651-64/+140
This makes loading/populating of the model completely asynchronous. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=331a080
2017-02-17Fontviewer: model: use a single IO scheduler job to load thumbnail imagesraveit651-64/+64
Instead of firing a new thread for all files. Using g_io_scheduler_job_send_to_mainloop_async() we can load thumbnails into the model as they get created anyway. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=4f08812
2017-02-17Fontviewer: model: cache tree iters when setting values on the modelraveit651-45/+22
This speeds up model loading again, since we don't need to go through the font list again when setting the thumbnail pixbuf. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=2120af2
2017-02-17Fontviewer: model, cache the fallback icon in the private structraveit651-27/+29
There's no need to look it up in the icon theme every time; this speeds up loading of the model. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=a37af39
2017-02-17Fontviewer: font-model, use g_utf8_collation_key to sort the modelraveit651-8/+13
So that we get the right sort order according to the current locale. Store the collation key in the model to avoid a performance hit. Taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=d6a5278
2017-02-17Fontviewer: font-model, use g_io_scheduler_push_job() to refactor ↵raveit651-197/+135
thumbnailing code Always set the fallback pixbuf by default as icon in the model. At the same time, wrap the thumbnailing code in a single thread spawned with g_io_scheduler_push_job(). This makes the code more robust and avoids being too resource-greedy, as described in https://bugzilla.gnome.org/show_bug.cgi?id=677605 taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=1fc4a85
2017-02-17Font-viewer: font-model, don't use sync g_file_query_info()raveit651-10/+23
Use g_file_query_info_async() instead. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=d360c01
2017-02-17Fontviewer: font-model, set a fallback icon if we fail to read the thumbnailraveit651-3/+20
In case we fail to read the thumbnail, set the fallback icon instead of just returning. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=7ed08a3
2017-02-17Fontviewer: font-model, add API to get an iter from a FT_Faceraveit651-36/+36
We'll need this to update the Install button state when a new font is installed. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=1a21320
2017-02-17Fontviewer: font-model, install file monitors on fontconfig font directoriesraveit651-0/+78
So we can update our model when a font file is added there. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=b3c81f6
2017-02-17Fontviewer: move FontConfig init/deinit to the application classraveit651-2/+0
Safely init FontConfig once for the whole app, and de-init it when quitting. taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=beec585
2017-02-17Fontviewer: font-model: set a fallback icon if we fail thumbnailing the font ↵raveit651-11/+46
file taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=a244951
2017-02-17Font-viewer: add FontViewModelraveit651-0/+458
taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=184661h