cpdb-libs 2.0b6 #34
tillkamppeter
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the sixth beta release for cpdb-libs 2.0.0 we have done more changes for sandboxed packaging, job data is streamed through domain sockets now and the frontend not being a D-Bus service any more. Also several crashers got fixed.
To ease making a Snap from the CPDB backend for CUPS (and other CPDB backends in the future) we now transfer the print job data from the dialog to the backend via a Unix domain socket and not by dropping the data into a file (PR Added functionality for socket streaming of file content #30).
CPDB Backends can get installed or removed at any time, also while a print dialog is open. Now a background thread is added to observe the come and go of backends and to update the printer list appropriately. New API functions are
cpdbStartBackendListRefreshing()
andcpdbStopBackendListRefreshing()
, to start and stop this thread (PR Add new backends while the dialog is open #32).Do not only find backends as registered D-Bus services (
*.service
) files but also permanently running backends which are not necessarily registered D-Bus servicesTo control hiding temporary or remote printers in the backend's printer list we have added methods to the D-Bus service provided by the backends now. Before, the frontends were also D-Bus services just to send signals to the backends for controling the filtering (PR Add new backends while the dialog is open #32).
Added convenience API functions
cpdbStartListingPrinters()
andcpdbStopListingPrinters()
to be called when opening and closing the print dialog, resp. (PR Add new backends while the dialog is open #32).cpdbGetAllJobs()
,cpdbGetActiveJobsCount()
,cpdbCancelJob()
, andcpdbPrintFilePath()
and the corresponding D-Bus methods (PR Added functionality for socket streaming of file content #30).FILE
CPDB backend (PR Added functionality for socket streaming of file content #30).cpdbActivateBackends()
: Fixed crash caused by wrong unreferencingcpdbConnectToDBus()
: Useg_main_context_get_thread_default()
for wait loopg_main_context_get_thread_default()
always returns a valid context and neverNULL
. This way we avoid crashes.Let
cpdbReadSettingsFromDisk()
return an empty data structure instead ofNULL
when there are no saved settings. Also letcpdbIgnoreLastSavedSettings()
always output and empty data structure.get-all-jobs
,get-active-jobs-count
, andcancel-job
from thecpdb-text-frontend
utility (PR Added functionality for socket streaming of file content #30).cpdb-text-frontend
: Removed unnecessaryg_main_loop
The
g_main_loop
is not actually needed, the main thread can just wait for the background thread usingg_thread_join()
.cpdb-text-frontend
: Shut down cleanly withstop
commandInstead of committing suicide with
exit(0);
we actually quit the main loop now.cpdb-text-frontend
: Spawn command interpreter not before the start of the main loop, to assure thatstop
command quits main loop and we do not fall into an infinite loop.cpdb-text-frontend
:acquire_translations_callback()
: Only issue the success message and list the translation if the loading of the translations actually succeeded.This discussion was created from the release cpdb-libs 2.0b6.
Beta Was this translation helpful? Give feedback.
All reactions