Commit graph

109 commits

Author SHA1 Message Date
Benjamin Berg
dd2ecbfa9d color: Fix order of arguments to gcm_prefs_device_changed_cb
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
2020-08-18 21:00:36 +00:00
Yuri Chornoivan
e7050ab6f4 Fix minor typos 2020-07-20 10:38:09 +03:00
Robert Ancell
f1893b8e8b color: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:49 +13:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
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.
2020-02-03 09:36:24 +13:00
Robert Ancell
3695c22ab5 datetime: Make .ui filename match the .c filename 2018-11-12 16:41:01 +00:00
Kalev Lember
edc52c170d color: Fix fallout from the GtkTemplate port
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'
2018-09-15 17:30:44 +02:00
Georges Basile Stavracas Neto
7d58972623 Revert "color: Cache D-Bus proxies"
This reverts commit 8e56ea35f3.
2018-08-27 12:56:20 +00:00
Robert Ancell
a64ef75ad7 Simplify use of GCancellable
g_cancellable_cancell can be called without checking for a NULL value.
Use g_clear_object instead of g_object_unref
2018-06-01 21:03:19 +00:00
Robert Ancell
5ea7632b83 color: Use GtkTemplate 2018-05-30 16:27:46 +12:00
Robert Ancell
490bee5a23 color: Use g_auto for variables 2018-05-30 15:46:01 +12:00
Robert Ancell
770a3b1df6 color: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-30 15:08:44 +12:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Georges Basile Stavracas Neto
8e56ea35f3 color: Cache D-Bus proxies 2018-04-06 22:23:38 -03:00
Georges Basile Stavracas Neto
32613ed4f3 color: Replace deprecated functions
soup_session_sync_new_with_options → soup_session_new_with_options
gtk_show_uri → gtk_show_uri_on_window
2018-01-21 11:12:06 -02:00
Georges Basile Stavracas Neto
024bb97a12 color: Avoid casting before checking for errors
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
2017-08-16 18:07:19 -03:00
Georges Basile Stavracas Neto
f7bdd3c969 panels: Minor adjustments for the new shell 2017-08-09 19:31:41 +02:00
Damián Nohales
073d49ea88 color: Allow to change profile color by activating the list box row 2015-04-14 12:54:41 +01:00
Richard Hughes
ff16c19832 color: Set the users profile title when generating a profile 2015-03-25 13:46:57 +00:00
Richard Hughes
d94d512dd1 color: Set the default profile quality at startup
I assume once we got a spurious callback from GTK to set this.
2015-03-25 13:46:28 +00:00
Richard Hughes
e9b0527b4b color: Do not set the 'Details' button for virtual profiles
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1119408
2014-07-29 19:46:22 +01:00
Bastien Nocera
1ca1c883f2 color: Fix compilation warning 2014-06-25 12:46:43 +02:00
Bastien Nocera
5c732074b3 color: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
2014-06-24 11:35:30 +02:00
Richard Hughes
e33eb83305 color: Do not crash when toggling devices and reopening the panel
Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=728584
2014-04-22 11:37:19 +01:00
Damián Nohales
08b8c1b55e color: Refresh toolbar buttons when profile has changed
https://bugzilla.gnome.org/show_bug.cgi?id=724499

Signed-off-by: Richard Hughes <richard@hughsie.com>
2014-02-24 11:46:54 +00:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Richard Hughes
31b82a7863 color: Fix a crash if the user closes the window after calibrating
The assistant_calib is set from gtk_builder_get_object() and so should not be
destroyed manually.
2013-12-12 13:45:57 +00:00
Rui Matos
418b9f9811 color: Don't leak the assign dialog
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Rui Matos
177655812c color: Don't leak the calibration assistant dialog
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Rui Matos
73a7f4c4e3 color: Remove unused toplevel window from .ui file
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Yosef Or Boczko
972648fd5f color: drop GtkStock
https://bugzilla.gnome.org/show_bug.cgi?id=704178
2013-07-19 15:56:11 +03:00
Alexander Larsson
3a811defed color panel: Convert to GtkListBox
https://bugzilla.gnome.org/show_bug.cgi?id=702164
2013-07-02 16:19:09 +01:00
Antoine Jacoutot
3db55d68e1 gcm_prefs_is_livecd() should be linux-only
/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>
2013-05-08 12:44:49 +01:00
Richard Hughes
829f703af6 color: Allow uploading to the Internet when using a LiveCD
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.
2013-04-19 10:42:41 +01:00
Richard Hughes
16b28c2a18 color: Fix a typo where we set the wrong button sensitivity 2013-02-18 17:22:42 +00:00
Richard Hughes
6e3c635fe8 color: Expand profiles assigned to the device when single clicked
We only collapse the device if another device is selected.
2013-02-18 17:12:15 +00:00
Richard Hughes
3ac77e5d47 color: Do not unselect the first GtkTreeView item on realize as it makes the UI flicker 2013-02-06 15:22:48 +00:00
Richard Hughes
edc9286a0a color: Do not show the user display types the selected sensor does not support
Additionally, hide the display types page if the sensor only supports one
display technology.
2013-02-06 15:07:06 +00:00
Richard Hughes
dc77c05e91 color: Set the default calibration quality to medium 2013-02-06 12:39:45 +00:00
Richard Hughes
fe3a7df31e color: Show sRGB and AdobeRGB profiles when selecting a profile for a display
The logic here is that you can make expensive hardware emulate a known color
space, for which you shouldn't need to generate a custom profile for.
2013-02-04 11:48:47 +00:00
Richard Hughes
e759f28020 color: Remove some conditional code, the colord dep is new enough 2013-02-04 11:47:05 +00:00
Richard Hughes
4e33954d94 color: Do not show the profile warning label if there are no profiles
This can happen if gnome-settings-daemon is not running or the device type is a
camera.
2013-02-03 23:29:06 +00:00
Richard Hughes
98fde07657 color: Allow the user to remove automatically added profiles
You need to be running colord from git master for this feature to work.
2013-01-24 16:47:54 +00:00
Richard Hughes
4c9a96260f color: Show a summary page when running on a LiveCD
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.
2013-01-23 20:36:43 +00:00
Richard Hughes
80ec65b2ef color: Use a EggListBox for the main device display to match the new mockups
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.
2013-01-23 15:45:17 +00:00
Richard Hughes
8a353753e0 color: Use colord-session to calibrate the display
This allows us to match the new mockups from Allan.
2013-01-23 13:47:47 +00:00
Matthias Clasen
3472c225f9 Fix the build 2013-01-23 07:44:51 -05:00
Matthias Clasen
fcce4dcbe7 color: disconnect signals when the panel goes away
The CdClient object is a singleton, thus it could conceivable
survive the panel, even though we drop our reference in dispose.
In that case, the signal handlers have stale user_data, and
bad things might happen when they trigger.

This patch is a guess at the cause for the stacktrace in
https://bugzilla.redhat.com/show_bug.cgi?id=893914

https://bugzilla.gnome.org/show_bug.cgi?id=692354
2013-01-23 06:46:07 -05:00
Richard Hughes
c7e48eb16a color: Do not crash if no sensors are plugged in 2013-01-08 14:53:18 +00:00
Cosimo Cecchi
bd7e87babe color: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:05 +01:00
Richard Hughes
2040456835 color: Remove the virtual device functionality as it's unused
Nobody uses this, and real power users are using the D-Bus API or the command
line already.
2013-01-05 23:00:00 +00:00