GtkListBox's dispose function removes all rows, and
`gtk_list_box_remove ()` sends `row-selected`. In turn,
as we listen to row-selected, we end up calling
functions on our toolbar while it may be in the
process of disposing. This causes a crash.
This commit introduces an early return if the toolbar is
being destroyed.
Commit f1893b8e8 (color: Connect signals with g_signal_connect_object
in swapped form) changed the connect call to use G_CONNECT_SWAPPED, but
it did not change the order of the arguments for the
gcm_prefs_device_changed_cb function.
Fixes: #1082
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
Correct a typoed variable name so that calibration works again, instead
of crashing.
GLib-GObject-WARNING **: 15:52:50.561: invalid cast from 'GtkBox' to 'GtkEntry'
When the asynchronous operation is finished in the Color
panel, the user may potentially have already changed to
another panel, making the CcColorPanel reference invalid.
In the callback, the first thing that is done is casting
(and type-checking) the CcColorPanel pointer, causing
a segmentation fault.
Fix that by only casting anything after checking the result
of the asynchronous call.
https://bugzilla.gnome.org/show_bug.cgi?id=786096
/proc/cmdline only exists on Linux and in this case used to check
whether we are running out of a LiveCD.
Signed-off-by: Richard Hughes <richard@hughsie.com>
If the user is calibrating on a LiveCD the final finished profile is written to
disk. This somehow needs to be transfered to the main system before it will work.
Two button are now provided, one to save the profile to disk, and one to upload
the profile to the Internet.
This matches the mockups from jimmac. You need colord (specifially, the D-Bus
activated helper) from git master to make this work.
You can test this on non-live media by setting CC_COLOR_PANEL_IS_LIVECD=1
before running gnome-control-center.
This matches the new mockups as specified by Allan in
https://raw.github.com/gnome-design-team/gnome-mockups/master/system-settings/color/panel.png
The CcColorDevice and CcColorProfile widgets are lines in the EggListBox and are
smart by watching for changes in each colord device.
To use this new functionality you need colord from git master, and for the
'Laptop' devices to be recognised as internal, you also need to be _running_
gnome-settings-daemon from git, although this is not strictly required.