[gnome-control-center/gbsneto/gtk4: 70/72] [WIP] color: Port to GTK4
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/gtk4: 70/72] [WIP] color: Port to GTK4
- Date: Thu, 18 Nov 2021 15:08:16 +0000 (UTC)
commit 3d01b9ac2a45887c3f0e77d50585b0368c585584
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Nov 9 20:41:46 2021 -0300
[WIP] color: Port to GTK4
This is very rough still. The calibration code
is entirely untested.
meson.build | 1 +
panels/color/cc-color-calibrate.c | 33 +-
panels/color/cc-color-calibrate.ui | 87 +-
panels/color/cc-color-cell-renderer-text.c | 20 +-
panels/color/cc-color-device.c | 33 +-
panels/color/cc-color-panel.c | 260 +++---
panels/color/cc-color-panel.ui | 1214 +++++++++-------------------
panels/color/cc-color-profile.c | 16 +-
panels/color/meson.build | 4 +-
panels/meson.build | 2 +-
shell/cc-panel-loader.c | 4 +-
11 files changed, 607 insertions(+), 1067 deletions(-)
---
diff --git a/meson.build b/meson.build
index af30e4ec3..5075eacfc 100644
--- a/meson.build
+++ b/meson.build
@@ -115,6 +115,7 @@ gio_dep = dependency('gio-2.0')
glib_dep = dependency('glib-2.0', version: '>= 2.68.0')
gnome_desktop_dep = dependency('gnome-desktop-4')
gnome_bg_dep = dependency('gnome-bg-4')
+gnome_rr_dep = dependency('gnome-rr-4')
gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.27.90')
goa_dep = dependency('goa-1.0', version: goa_req_version)
gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 40.alpha')
diff --git a/panels/color/cc-color-calibrate.c b/panels/color/cc-color-calibrate.c
index 3f53858df..ac464a8f4 100644
--- a/panels/color/cc-color-calibrate.c
+++ b/panels/color/cc-color-calibrate.c
@@ -29,7 +29,7 @@
#include <colord-session/cd-session.h>
#define GNOME_DESKTOP_USE_UNSTABLE_API
-#include <libgnome-desktop/gnome-rr.h>
+#include <gnome-rr/gnome-rr.h>
#include "cc-color-calibrate.h"
@@ -170,7 +170,7 @@ cc_color_calibrate_calib_setup_screen (CcColorCalibrate *calibrate,
gboolean ret = TRUE;
/* get screen */
- calibrate->x11_screen = gnome_rr_screen_new (gdk_screen_get_default (), error);
+ calibrate->x11_screen = gnome_rr_screen_new (gdk_display_get_default (), error);
if (calibrate->x11_screen == NULL)
{
ret = FALSE;
@@ -608,25 +608,28 @@ cc_color_calibrate_move_and_resize_window (GtkWindow *window,
CdDevice *device,
GError **error)
{
+ g_autoptr(GListModel) monitors = NULL;
+ g_autoptr(GdkMonitor) monitor = NULL;
const gchar *xrandr_name;
gboolean ret = TRUE;
GdkRectangle rect;
GdkDisplay *display;
- GdkMonitor *monitor;
gint i;
gint monitor_num = -1;
gint num_monitors;
/* find the monitor num of the device output */
display = gdk_display_get_default ();
- num_monitors = gdk_display_get_n_monitors (display);
+ monitors = gdk_display_get_monitors (display);
+ num_monitors = g_list_model_get_n_items (monitors);
xrandr_name = cd_device_get_metadata_item (device, CD_DEVICE_METADATA_XRANDR_NAME);
for (i = 0; i < num_monitors; i++)
{
+ g_autoptr(GdkMonitor) m = NULL;
const gchar *plug_name;
- monitor = gdk_display_get_monitor (display, i);
- plug_name = gdk_monitor_get_model (monitor);
+ m = g_list_model_get_item (monitors, i);
+ plug_name = gdk_monitor_get_model (m);
if (g_strcmp0 (plug_name, xrandr_name) == 0)
monitor_num = i;
@@ -643,16 +646,14 @@ cc_color_calibrate_move_and_resize_window (GtkWindow *window,
}
/* move the window, and set it to the right size */
- monitor = gdk_display_get_monitor (display, monitor_num);
+ monitor = g_list_model_get_item (monitors, monitor_num);
gdk_monitor_get_geometry (monitor, &rect);
- gtk_window_move (window, rect.x, rect.y);
- gtk_window_resize (window, rect.width, rect.height);
g_debug ("Setting window to %ix%i with size %ix%i",
rect.x, rect.y, rect.width, rect.height);
out:
return ret;
}
-
+#if 0
static void
cc_color_calibrate_window_realize_cb (CcColorCalibrate *self)
{
@@ -690,6 +691,7 @@ cc_color_calibrate_window_state_cb (CcColorCalibrate *calibrate,
g_warning ("Failed to resize window: %s", error->message);
return TRUE;
}
+#endif
static void
cc_color_calibrate_button_done_cb (CcColorCalibrate *calibrate)
@@ -730,6 +732,7 @@ cc_color_calibrate_button_cancel_cb (CcColorCalibrate *calibrate)
cc_color_calibrate_cancel (calibrate);
}
+#if 0
static gboolean
cc_color_calibrate_alpha_window_draw (CcColorCalibrate *calibrate, cairo_t *cr)
{
@@ -769,6 +772,7 @@ cc_color_calibrate_alpha_screen_changed_cb (CcColorCalibrate *calibrate)
visual = gdk_screen_get_system_visual (screen);
gtk_widget_set_visual (GTK_WIDGET (window), visual);
}
+#endif
static void
cc_color_calibrate_uninhibit (CcColorCalibrate *calibrate)
@@ -998,7 +1002,7 @@ cc_color_calibrate_finalize (GObject *object)
{
CcColorCalibrate *calibrate = CC_COLOR_CALIBRATE (object);
- g_clear_pointer ((GtkWidget **)&calibrate->window, gtk_widget_destroy);
+ g_clear_pointer (&calibrate->window, gtk_window_destroy);
g_clear_object (&calibrate->builder);
g_clear_object (&calibrate->device);
g_clear_object (&calibrate->proxy_helper);
@@ -1044,8 +1048,7 @@ cc_color_calibrate_init (CcColorCalibrate *calibrate)
"vbox_status"));
calibrate->sample_widget = cd_sample_widget_new ();
gtk_widget_set_size_request (calibrate->sample_widget, 400, 400);
- gtk_box_pack_start (box, calibrate->sample_widget, FALSE, FALSE, 0);
- gtk_box_reorder_child (box, calibrate->sample_widget, 0);
+ gtk_box_prepend (box, calibrate->sample_widget);
gtk_widget_set_vexpand (calibrate->sample_widget, FALSE);
gtk_widget_set_hexpand (calibrate->sample_widget, FALSE);
@@ -1076,6 +1079,7 @@ cc_color_calibrate_init (CcColorCalibrate *calibrate)
/* setup the specialist calibration window */
window = GTK_WINDOW (gtk_builder_get_object (calibrate->builder,
"dialog_calibrate"));
+ /*
g_signal_connect_object (window, "draw",
G_CALLBACK (cc_color_calibrate_alpha_window_draw), calibrate, G_CONNECT_SWAPPED);
g_signal_connect_object (window, "realize",
@@ -1084,11 +1088,10 @@ cc_color_calibrate_init (CcColorCalibrate *calibrate)
G_CALLBACK (cc_color_calibrate_window_state_cb), calibrate, G_CONNECT_SWAPPED);
g_signal_connect_object (window, "delete-event",
G_CALLBACK (cc_color_calibrate_delete_event_cb), calibrate, G_CONNECT_SWAPPED);
- gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
- gtk_window_set_keep_above (window, TRUE);
cc_color_calibrate_alpha_screen_changed_cb (calibrate);
g_signal_connect_object (window, "screen-changed",
G_CALLBACK (cc_color_calibrate_alpha_screen_changed_cb), calibrate,
G_CONNECT_SWAPPED);
+ */
calibrate->window = window;
}
diff --git a/panels/color/cc-color-calibrate.ui b/panels/color/cc-color-calibrate.ui
index 1d98b0b8e..44f67e708 100644
--- a/panels/color/cc-color-calibrate.ui
+++ b/panels/color/cc-color-calibrate.ui
@@ -2,114 +2,65 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="dialog_calibrate">
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
+ <property name="margin_top">32</property>
+ <property name="margin_bottom">32</property>
+ <property name="margin_start">12</property>
+ <property name="margin_end">12</property>
<property name="title" translatable="yes">Display Calibration</property>
- <property name="hide_titlebar_when_maximized">True</property>
- <property name="type_hint">dialog</property>
<property name="deletable">False</property>
<style>
<class name="osd"/>
</style>
- <child internal-child="vbox">
+ <child>
<object class="GtkBox" id="dialog-vbox4">
- <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <object class="GtkBox" id="dialog-action_area1">
<child>
<object class="GtkButton" id="button_cancel">
<property name="label" translatable="yes">_Cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- <property name="secondary">True</property>
- </packing>
</child>
<child>
<object class="GtkButton" id="button_start">
<property name="label" translatable="yes" comments="This starts the calibration
process">_Start</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
<object class="GtkButton" id="button_resume">
<property name="label" translatable="yes" comments="This resumes the calibration
process">_Resume</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
<child>
<object class="GtkButton" id="button_done">
<property name="label" translatable="yes" comments="This button returns the user back to the
color control panel">_Done</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkBox" id="vbox_status">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">15</property>
<child>
<object class="GtkImage" id="image_status">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="yalign">1</property>
+ <property name="valign">end</property>
<property name="pixel_size">192</property>
<property name="icon_name">address-book-new</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkLabel" id="label_status">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="yalign">0</property>
+ <property name="valign">start</property>
<property name="label">Do not disturb the calibration device while in progress</property>
<property name="justify">center</property>
<property name="wrap">True</property>
@@ -118,30 +69,12 @@
<attribute name="foreground" value="#ffffffffffff"/>
</attributes>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
<object class="GtkProgressBar" id="progressbar_status">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="padding">25</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
diff --git a/panels/color/cc-color-cell-renderer-text.c b/panels/color/cc-color-cell-renderer-text.c
index 8e64ecfe7..5803ac548 100644
--- a/panels/color/cc-color-cell-renderer-text.c
+++ b/panels/color/cc-color-cell-renderer-text.c
@@ -77,12 +77,12 @@ cc_color_cell_renderer_text_set_property (GObject *object, guint param_id,
}
static void
-cc_color_cell_renderer_render (GtkCellRenderer *cell,
- cairo_t *cr,
- GtkWidget *widget,
- const GdkRectangle *background_area,
- const GdkRectangle *cell_area,
- GtkCellRendererState flags)
+cc_color_cell_renderer_snapshot (GtkCellRenderer *cell,
+ GtkSnapshot *snapshot,
+ GtkWidget *widget,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
CcColorCellRendererText *renderer;
GtkStyleContext *context;
@@ -94,9 +94,9 @@ cc_color_cell_renderer_render (GtkCellRenderer *cell,
gtk_style_context_add_class (context, "dim-label");
else
gtk_style_context_remove_class (context, "dim-label");
- GTK_CELL_RENDERER_CLASS (parent_class)->render (cell, cr, widget,
- background_area,
- cell_area, flags);
+ GTK_CELL_RENDERER_CLASS (parent_class)->snapshot (cell, snapshot, widget,
+ background_area,
+ cell_area, flags);
gtk_style_context_restore (context);
}
@@ -105,7 +105,7 @@ cc_color_cell_renderer_text_class_init (CcColorCellRendererTextClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkCellRendererClass *object_class_gcr = GTK_CELL_RENDERER_CLASS (class);
- object_class_gcr->render = cc_color_cell_renderer_render;
+ object_class_gcr->snapshot = cc_color_cell_renderer_snapshot;
parent_class = g_type_class_peek_parent (class);
diff --git a/panels/color/cc-color-device.c b/panels/color/cc-color-device.c
index a49eaadf9..fbb74d88a 100644
--- a/panels/color/cc-color-device.c
+++ b/panels/color/cc-color-device.c
@@ -63,7 +63,6 @@ cc_color_device_refresh (CcColorDevice *color_device)
{
g_autofree gchar *title = NULL;
g_autoptr(GPtrArray) profiles = NULL;
- AtkObject *accessible;
g_autofree gchar *name1 = NULL;
g_autofree gchar *name2 = NULL;
@@ -79,20 +78,21 @@ cc_color_device_refresh (CcColorDevice *color_device)
gtk_widget_set_visible (color_device->widget_switch, profiles->len > 0);
gtk_widget_set_visible (color_device->widget_button, profiles->len > 0);
gtk_image_set_from_icon_name (GTK_IMAGE (color_device->widget_arrow),
- color_device->expanded ? "pan-down-symbolic" : "pan-end-symbolic",
- GTK_ICON_SIZE_BUTTON);
+ color_device->expanded ? "pan-down-symbolic" : "pan-end-symbolic");
gtk_widget_set_visible (color_device->widget_nocalib, profiles->len == 0);
gtk_widget_set_sensitive (color_device->widget_button, cd_device_get_enabled (color_device->device));
gtk_switch_set_active (GTK_SWITCH (color_device->widget_switch),
cd_device_get_enabled (color_device->device));
- accessible = gtk_widget_get_accessible (color_device->widget_switch);
name1 = g_strdup_printf (_("Enable color management for %s"), title);
- atk_object_set_name (accessible, name1);
+ gtk_accessible_update_property (GTK_ACCESSIBLE (color_device->widget_switch),
+ GTK_ACCESSIBLE_PROPERTY_LABEL, name1,
+ -1);
name2 = g_strdup_printf (_("Show color profiles for %s"), title);
- accessible = gtk_widget_get_accessible (color_device->widget_button);
- atk_object_set_name (accessible, name2);
+ gtk_accessible_update_property (GTK_ACCESSIBLE (color_device->widget_button),
+ GTK_ACCESSIBLE_PROPERTY_LABEL, name2,
+ -1);
}
CdDevice *
@@ -263,41 +263,40 @@ cc_color_device_init (CcColorDevice *color_device)
gtk_widget_set_margin_top (color_device->widget_description, 12);
gtk_widget_set_margin_bottom (color_device->widget_description, 12);
gtk_widget_set_halign (color_device->widget_description, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (color_device->widget_description, TRUE);
gtk_label_set_ellipsize (GTK_LABEL (color_device->widget_description), PANGO_ELLIPSIZE_END);
gtk_label_set_xalign (GTK_LABEL (color_device->widget_description), 0);
- gtk_box_pack_start (GTK_BOX (box), color_device->widget_description, TRUE, TRUE, 0);
+ gtk_box_append (GTK_BOX (box), color_device->widget_description);
/* switch */
color_device->widget_switch = gtk_switch_new ();
gtk_widget_set_valign (color_device->widget_switch, GTK_ALIGN_CENTER);
- gtk_box_pack_start (GTK_BOX (box), color_device->widget_switch, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), color_device->widget_switch);
/* arrow button */
- color_device->widget_arrow = gtk_image_new_from_icon_name ("pan-end-symbolic",
- GTK_ICON_SIZE_BUTTON);
+ color_device->widget_arrow = gtk_image_new_from_icon_name ("pan-end-symbolic");
color_device->widget_button = gtk_button_new ();
g_signal_connect_object (color_device->widget_button, "clicked",
G_CALLBACK (cc_color_device_clicked_expander_cb),
color_device, G_CONNECT_SWAPPED);
gtk_widget_set_valign (color_device->widget_button, GTK_ALIGN_CENTER);
- gtk_button_set_relief (GTK_BUTTON (color_device->widget_button), GTK_RELIEF_NONE);
- gtk_container_add (GTK_CONTAINER (color_device->widget_button), color_device->widget_arrow);
+ gtk_widget_add_css_class (color_device->widget_button, "flat");
+ gtk_button_set_child (GTK_BUTTON (color_device->widget_button), color_device->widget_arrow);
gtk_widget_set_visible (color_device->widget_arrow, TRUE);
gtk_widget_set_margin_top (color_device->widget_button, 9);
gtk_widget_set_margin_bottom (color_device->widget_button, 9);
gtk_widget_set_margin_end (color_device->widget_button, 12);
- gtk_box_pack_start (GTK_BOX (box), color_device->widget_button, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), color_device->widget_button);
/* not calibrated */
color_device->widget_nocalib = gtk_label_new (_("Not calibrated"));
context = gtk_widget_get_style_context (color_device->widget_nocalib);
gtk_style_context_add_class (context, "dim-label");
gtk_widget_set_margin_end (color_device->widget_nocalib, 18);
- gtk_box_pack_start (GTK_BOX (box), color_device->widget_nocalib, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), color_device->widget_nocalib);
/* refresh */
- gtk_container_add (GTK_CONTAINER (color_device), box);
- gtk_widget_set_visible (box, TRUE);
+ gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (color_device), box);
}
GtkWidget *
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index 603178efc..8aee58a7a 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -23,10 +23,9 @@
#include <glib/gi18n.h>
#include <colord.h>
#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
+#include <gdk/x11/gdkx.h>
#include <libsoup/soup.h>
-#include "list-box-helper.h"
#include "cc-color-calibrate.h"
#include "cc-color-cell-renderer-text.h"
#include "cc-color-panel.h"
@@ -55,14 +54,12 @@ struct _CcColorPanel
GtkWidget *box_calib_temp;
GtkWidget *box_calib_title;
GtkWidget *box_devices;
- GtkWidget *button_assign_cancel;
GtkWidget *button_assign_import;
GtkWidget *button_assign_ok;
GtkWidget *button_calib_export;
GtkWidget *button_calib_upload;
GtkWidget *dialog_assign;
GtkWidget *entry_calib_title;
- GtkWidget *frame_devices;
GtkWidget *label_assign_warning;
GtkWidget *label_calib_summary_message;
GtkWidget *label_calib_upload_location;
@@ -70,7 +67,6 @@ struct _CcColorPanel
GtkTreeModel *liststore_assign;
GtkTreeModel *liststore_calib_kind;
GtkTreeModel *liststore_calib_sensor;
- GtkWidget *main_window;
GtkWidget *toolbar_devices;
GtkWidget *toolbutton_device_calibrate;
GtkWidget *toolbutton_device_default;
@@ -222,9 +218,62 @@ gcm_prefs_default_cb (CcColorPanel *prefs)
error->message);
}
+typedef struct
+{
+ GtkResponseType response;
+ GMainLoop *mainloop;
+} DialogRunData;
+
+static void
+dialog_response_cb (GtkDialog *dialog,
+ GtkResponseType response,
+ DialogRunData *run_data)
+{
+ run_data->response = response;
+ g_main_loop_quit (run_data->mainloop);
+}
+
+static gboolean
+dialog_close_cb (GtkDialog *dialog,
+ GtkResponseType response,
+ DialogRunData *run_data)
+{
+ g_main_loop_quit (run_data->mainloop);
+ return GDK_EVENT_PROPAGATE;
+}
+
+static GtkResponseType
+run_dialog (GtkDialog *dialog)
+{
+ g_autoptr(GMainLoop) mainloop = NULL;
+ DialogRunData run_data;
+ guint response_id;
+ guint close_id;
+
+ mainloop = g_main_loop_new (NULL, FALSE);
+
+ run_data = (DialogRunData) {
+ .response = GTK_RESPONSE_DELETE_EVENT,
+ .mainloop = mainloop,
+ };
+
+ response_id = g_signal_connect (dialog, "response", G_CALLBACK (dialog_response_cb), &run_data);
+ close_id = g_signal_connect (dialog, "close-request", G_CALLBACK (dialog_close_cb), &run_data);
+
+ gtk_window_present (GTK_WINDOW (dialog));
+
+ g_main_loop_run (mainloop);
+
+ g_signal_handler_disconnect (dialog, response_id);
+ g_signal_handler_disconnect (dialog, close_id);
+
+ return run_data.response;
+}
+
static GFile *
gcm_prefs_file_chooser_get_icc_profile (CcColorPanel *prefs)
{
+ g_autoptr(GFile) current_folder = NULL;
GtkWindow *window;
GtkWidget *dialog;
GFile *file = NULL;
@@ -238,9 +287,9 @@ gcm_prefs_file_chooser_get_icc_profile (CcColorPanel *prefs)
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Import"), GTK_RESPONSE_ACCEPT,
NULL);
- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(dialog), g_get_home_dir ());
+ current_folder = g_file_new_for_path (g_get_home_dir ());
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(dialog), current_folder, NULL);
gtk_file_chooser_set_create_folders (GTK_FILE_CHOOSER(dialog), FALSE);
- gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(dialog), FALSE);
/* setup the filter */
filter = gtk_file_filter_new ();
@@ -258,11 +307,11 @@ gcm_prefs_file_chooser_get_icc_profile (CcColorPanel *prefs)
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
/* did user choose file */
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+ if (run_dialog (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER(dialog));
/* we're done */
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
/* or NULL for missing */
return file;
@@ -338,14 +387,6 @@ gcm_prefs_calib_apply_cb (CcColorPanel *prefs)
gtk_widget_hide (GTK_WIDGET (window));
}
-static gboolean
-gcm_prefs_calib_delete_event_cb (CcColorPanel *prefs)
-{
- /* do not destroy the window */
- gcm_prefs_calib_cancel_cb (prefs);
- return TRUE;
-}
-
static void
gcm_prefs_calib_temp_treeview_clicked_cb (CcColorPanel *prefs,
GtkTreeSelection *selection)
@@ -547,7 +588,7 @@ gcm_prefs_calibrate_display (CcColorPanel *prefs)
tmp = cd_device_get_vendor (prefs->current_device);
if (tmp == NULL)
tmp = _("Screen");
- gtk_entry_set_text (GTK_ENTRY (prefs->entry_calib_title), tmp);
+ gtk_editable_set_text (GTK_EDITABLE (prefs->entry_calib_title), tmp);
cc_color_calibrate_set_title (prefs->calibrate, tmp);
/* set the display whitepoint to D65 by default */
@@ -555,7 +596,7 @@ gcm_prefs_calibrate_display (CcColorPanel *prefs)
/* show ui */
gtk_window_set_transient_for (GTK_WINDOW (prefs->assistant_calib),
- GTK_WINDOW (prefs->main_window));
+ GTK_WINDOW (gtk_widget_get_native (GTK_WIDGET (prefs))));
gtk_widget_show (prefs->assistant_calib);
}
@@ -566,7 +607,7 @@ gcm_prefs_title_entry_changed_cb (CcColorPanel *prefs)
const gchar *value;
assistant = GTK_ASSISTANT (prefs->assistant_calib);
- value = gtk_entry_get_text (GTK_ENTRY (prefs->entry_calib_title));
+ value = gtk_editable_get_text (GTK_EDITABLE (prefs->entry_calib_title));
cc_color_calibrate_set_title (prefs->calibrate, value);
gtk_assistant_set_page_complete (assistant, prefs->box_calib_title, value[0] != '\0');
}
@@ -574,9 +615,11 @@ gcm_prefs_title_entry_changed_cb (CcColorPanel *prefs)
static void
gcm_prefs_calibrate_cb (CcColorPanel *prefs)
{
+ GtkNative *native;
+ GdkSurface *surface;
gboolean ret;
g_autoptr(GError) error = NULL;
- guint xid;
+ guint xid = 0;
g_autoptr(GPtrArray) argv = NULL;
/* use the new-style calibration helper */
@@ -587,7 +630,11 @@ gcm_prefs_calibrate_cb (CcColorPanel *prefs)
}
/* get xid */
- xid = gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (prefs->main_window)));
+ native = gtk_widget_get_native (GTK_WIDGET (prefs));
+ surface = gtk_native_get_surface (native);
+
+ if (GDK_IS_X11_SURFACE (surface))
+ xid = gdk_x11_surface_get_xid (GDK_X11_SURFACE (surface));
/* run with modal set */
argv = g_ptr_array_new_with_free_func (g_free);
@@ -881,17 +928,16 @@ gcm_prefs_calib_export_cb (CcColorPanel *prefs)
/* TRANSLATORS: this is the dialog to save the ICC profile */
dialog = gtk_file_chooser_dialog_new (_("Save Profile"),
- GTK_WINDOW (prefs->main_window),
+ GTK_WINDOW (gtk_widget_get_native (GTK_WIDGET (prefs))),
GTK_FILE_CHOOSER_ACTION_SAVE,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Save"), GTK_RESPONSE_ACCEPT,
NULL);
- gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
default_name = g_strdup_printf ("%s.icc", cd_profile_get_title (profile));
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), default_name);
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
+ if (run_dialog (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
{
source = g_file_new_for_path (cd_profile_get_filename (profile));
destination = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
@@ -906,17 +952,16 @@ gcm_prefs_calib_export_cb (CcColorPanel *prefs)
g_warning ("Failed to copy profile: %s", error->message);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
gcm_prefs_calib_export_link_cb (CcColorPanel *prefs,
const gchar *url)
{
- gtk_show_uri_on_window (GTK_WINDOW (prefs->main_window),
- "help:gnome-help/color-howtoimport",
- GDK_CURRENT_TIME,
- NULL);
+ gtk_show_uri (GTK_WINDOW (gtk_widget_get_native (GTK_WIDGET (prefs))),
+ "help:gnome-help/color-howtoimport",
+ GDK_CURRENT_TIME);
}
static void
@@ -932,8 +977,10 @@ gcm_prefs_profile_add_cb (CcColorPanel *prefs)
gtk_widget_set_sensitive (prefs->button_assign_ok, FALSE);
/* show the dialog */
+ gtk_window_set_transient_for (GTK_WINDOW (prefs->dialog_assign),
+ GTK_WINDOW (gtk_widget_get_native (GTK_WIDGET (prefs))));
+
gtk_widget_show (prefs->dialog_assign);
- gtk_window_set_transient_for (GTK_WINDOW (prefs->dialog_assign), GTK_WINDOW (prefs->main_window));
}
static void
@@ -1019,13 +1066,19 @@ gcm_prefs_device_profile_enable_cb (CcColorPanel *prefs)
static void
gcm_prefs_profile_view (CcColorPanel *prefs, CdProfile *profile)
{
+ GtkNative *native;
+ GdkSurface *surface;
g_autoptr(GPtrArray) argv = NULL;
- guint xid;
+ guint xid = 0;
gboolean ret;
g_autoptr(GError) error = NULL;
/* get xid */
- xid = gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (prefs->main_window)));
+ native = gtk_widget_get_native (GTK_WIDGET (prefs));
+ surface = gtk_native_get_surface (native);
+
+ if (GDK_IS_X11_SURFACE (surface))
+ xid = gdk_x11_surface_get_xid (GDK_X11_SURFACE (surface));
/* open up gcm-viewer as a info pane */
argv = g_ptr_array_new_with_free_func (g_free);
@@ -1084,12 +1137,6 @@ gcm_prefs_profile_view_cb (CcColorPanel *prefs)
gcm_prefs_profile_view (prefs, profile);
}
-static void
-gcm_prefs_button_assign_cancel_cb (CcColorPanel *prefs)
-{
- gtk_widget_hide (prefs->dialog_assign);
-}
-
static void
gcm_prefs_button_assign_ok_cb (CcColorPanel *prefs)
{
@@ -1151,13 +1198,6 @@ gcm_prefs_button_assign_ok_cb (CcColorPanel *prefs)
prefs);
}
-static gboolean
-gcm_prefs_profile_delete_event_cb (CcColorPanel *prefs)
-{
- gcm_prefs_button_assign_cancel_cb (prefs);
- return TRUE;
-}
-
static void
gcm_prefs_add_profiles_columns (CcColorPanel *prefs,
GtkTreeView *treeview)
@@ -1177,7 +1217,6 @@ gcm_prefs_add_profiles_columns (CcColorPanel *prefs,
/* image */
column = gtk_tree_view_column_new ();
renderer = gtk_cell_renderer_pixbuf_new ();
- g_object_set (renderer, "stock-size", GTK_ICON_SIZE_MENU, NULL);
gtk_tree_view_column_pack_start (column, renderer, FALSE);
gtk_tree_view_column_add_attribute (column, renderer,
"icon-name", GCM_PREFS_COMBO_COLUMN_WARNING_FILENAME);
@@ -1450,8 +1489,7 @@ gcm_prefs_add_device_profile (CcColorPanel *prefs,
/* add to listbox */
widget = cc_color_profile_new (device, profile, is_default);
- gtk_widget_show (widget);
- gtk_container_add (GTK_CONTAINER (prefs->list_box), widget);
+ gtk_list_box_append (prefs->list_box, widget);
gtk_size_group_add_widget (prefs->list_box_size, widget);
}
@@ -1527,37 +1565,47 @@ gcm_prefs_find_widget_by_object_path (GList *list,
static void
gcm_prefs_device_changed_cb (CcColorPanel *prefs, CdDevice *device)
{
+ GtkWidget *child;
CdDevice *device_tmp;
CdProfile *profile_tmp;
gboolean ret;
- GList *l;
g_autoptr(GList) list = NULL;
GPtrArray *profiles;
guint i;
/* remove anything in the list view that's not in Device.Profiles */
profiles = cd_device_get_profiles (device);
- list = gtk_container_get_children (GTK_CONTAINER (prefs->list_box));
- for (l = list; l != NULL; l = l->next)
+ child = gtk_widget_get_first_child (GTK_WIDGET (prefs->list_box));
+ while (child)
{
- if (!CC_IS_COLOR_PROFILE (l->data))
- continue;
+ GtkWidget *next = gtk_widget_get_next_sibling (child);
+
+ if (!CC_IS_COLOR_PROFILE (child))
+ {
+ list = g_list_prepend (list, child);
+ goto next;
+ }
/* correct device ? */
- device_tmp = cc_color_profile_get_device (CC_COLOR_PROFILE (l->data));
+ device_tmp = cc_color_profile_get_device (CC_COLOR_PROFILE (child));
if (g_strcmp0 (cd_device_get_id (device),
cd_device_get_id (device_tmp)) != 0)
- continue;
+ {
+ list = g_list_prepend (list, child);
+ goto next;
+ }
/* if profile is not in Device.Profiles then remove */
- profile_tmp = cc_color_profile_get_profile (CC_COLOR_PROFILE (l->data));
+ profile_tmp = cc_color_profile_get_profile (CC_COLOR_PROFILE (child));
ret = gcm_prefs_find_profile_by_object_path (profiles,
cd_profile_get_object_path (profile_tmp));
- if (!ret) {
- gtk_widget_destroy (GTK_WIDGET (l->data));
- /* Don't look at the destroyed widget below */
- l->data = NULL;
- }
+ if (!ret)
+ gtk_list_box_remove (prefs->list_box, child);
+ else
+ list = g_list_prepend (list, child);
+
+next:
+ child = next;
}
/* add anything in Device.Profiles that's not in the list view */
@@ -1587,20 +1635,20 @@ gcm_prefs_device_expanded_changed_cb (CcColorPanel *prefs,
g_free (prefs->list_box_filter);
if (is_expanded)
{
- g_autoptr(GList) list = NULL;
- GList *l;
+ GtkWidget *child;
prefs->list_box_filter = g_strdup (cd_device_get_id (cc_color_device_get_device (widget)));
/* unexpand other device widgets */
- list = gtk_container_get_children (GTK_CONTAINER (prefs->list_box));
prefs->model_is_changing = TRUE;
- for (l = list; l != NULL; l = l->next)
+ for (child = gtk_widget_get_first_child (GTK_WIDGET (prefs->list_box));
+ child != NULL;
+ child = gtk_widget_get_next_sibling (child))
{
- if (!CC_IS_COLOR_DEVICE (l->data))
+ if (!CC_IS_COLOR_DEVICE (child))
continue;
- if (l->data != widget)
- cc_color_device_set_expanded (CC_COLOR_DEVICE (l->data), FALSE);
+ if (CC_COLOR_DEVICE (child) != widget)
+ cc_color_device_set_expanded (CC_COLOR_DEVICE (child), FALSE);
}
prefs->model_is_changing = FALSE;
}
@@ -1630,8 +1678,7 @@ gcm_prefs_add_device (CcColorPanel *prefs, CdDevice *device)
widget = cc_color_device_new (device);
g_signal_connect_object (widget, "expanded-changed",
G_CALLBACK (gcm_prefs_device_expanded_changed_cb), prefs, G_CONNECT_SWAPPED);
- gtk_widget_show (widget);
- gtk_container_add (GTK_CONTAINER (prefs->list_box), widget);
+ gtk_list_box_append (prefs->list_box, widget);
gtk_size_group_add_widget (prefs->list_box_size, widget);
/* add profiles */
@@ -1647,22 +1694,25 @@ gcm_prefs_add_device (CcColorPanel *prefs, CdDevice *device)
static void
gcm_prefs_remove_device (CcColorPanel *prefs, CdDevice *device)
{
+ GtkWidget *child;
CdDevice *device_tmp;
- GList *l;
- g_autoptr(GList) list = NULL;
- list = gtk_container_get_children (GTK_CONTAINER (prefs->list_box));
- for (l = list; l != NULL; l = l->next)
+ child = gtk_widget_get_first_child (GTK_WIDGET (prefs->list_box));
+ while (child)
{
- if (CC_IS_COLOR_DEVICE (l->data))
- device_tmp = cc_color_device_get_device (CC_COLOR_DEVICE (l->data));
+ GtkWidget *next = gtk_widget_get_next_sibling (child);
+
+ if (CC_IS_COLOR_DEVICE (child))
+ device_tmp = cc_color_device_get_device (CC_COLOR_DEVICE (child));
else
- device_tmp = cc_color_profile_get_device (CC_COLOR_PROFILE (l->data));
+ device_tmp = cc_color_profile_get_device (CC_COLOR_PROFILE (child));
if (g_strcmp0 (cd_device_get_object_path (device),
cd_device_get_object_path (device_tmp)) == 0)
{
- gtk_widget_destroy (GTK_WIDGET (l->data));
+ gtk_list_box_remove (prefs->list_box, child);
}
+
+ child = next;
}
g_signal_handlers_disconnect_by_func (device,
G_CALLBACK (gcm_prefs_device_changed_cb),
@@ -1673,18 +1723,16 @@ gcm_prefs_remove_device (CcColorPanel *prefs, CdDevice *device)
static void
gcm_prefs_update_device_list_extra_entry (CcColorPanel *prefs)
{
- g_autoptr(GList) device_widgets = NULL;
- guint number_of_devices;
+ GtkListBoxRow *first_row;
/* any devices to show? */
- device_widgets = gtk_container_get_children (GTK_CONTAINER (prefs->list_box));
- number_of_devices = g_list_length (device_widgets);
- gtk_widget_set_visible (prefs->label_no_devices, number_of_devices == 0);
- gtk_widget_set_visible (prefs->box_devices, number_of_devices > 0);
+ first_row = gtk_list_box_get_row_at_index (prefs->list_box, 0);
+ gtk_widget_set_visible (prefs->label_no_devices, first_row == NULL);
+ gtk_widget_set_visible (prefs->box_devices, first_row != NULL);
/* if we have only one device expand it by default */
- if (number_of_devices == 1)
- cc_color_device_set_expanded (CC_COLOR_DEVICE (device_widgets->data), TRUE);
+ if (gtk_list_box_get_row_at_index (prefs->list_box, 1) == NULL)
+ cc_color_device_set_expanded (CC_COLOR_DEVICE (first_row), TRUE);
}
static void
@@ -1865,12 +1913,6 @@ gcm_prefs_is_livecd (void)
#endif
}
-static void
-gcm_prefs_window_realize_cb (CcColorPanel *prefs)
-{
- prefs->main_window = gtk_widget_get_toplevel (GTK_WIDGET (prefs));
-}
-
static const char *
cc_color_panel_get_help_uri (CcPanel *panel)
{
@@ -1917,7 +1959,7 @@ cc_color_panel_dispose (GObject *object)
g_clear_object (&prefs->list_box_size);
g_clear_pointer (&prefs->sensors, g_ptr_array_unref);
g_clear_pointer (&prefs->list_box_filter, g_free);
- g_clear_pointer (&prefs->dialog_assign, gtk_widget_destroy);
+ g_clear_pointer ((GtkWindow **)&prefs->dialog_assign, gtk_window_destroy);
G_OBJECT_CLASS (cc_color_panel_parent_class)->dispose (object);
}
@@ -1953,18 +1995,17 @@ cc_color_panel_class_init (CcColorPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, box_calib_temp);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, box_calib_title);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, box_devices);
- gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_assign_cancel);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_assign_import);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_assign_ok);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_calib_export);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, button_calib_upload);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, dialog_assign);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, entry_calib_title);
- gtk_widget_class_bind_template_child (widget_class, CcColorPanel, frame_devices);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_assign_warning);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_calib_summary_message);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_calib_upload_location);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, label_no_devices);
+ gtk_widget_class_bind_template_child (widget_class, CcColorPanel, list_box);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_assign);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_calib_kind);
gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_calib_sensor);
@@ -2039,7 +2080,6 @@ static void
cc_color_panel_init (CcColorPanel *prefs)
{
GtkCellRenderer *renderer;
- GtkStyleContext *context;
GtkTreeModel *model;
GtkTreeModel *model_filter;
GtkTreeSelection *selection;
@@ -2088,16 +2128,7 @@ cc_color_panel_init (CcColorPanel *prefs)
g_signal_connect_object (prefs->toolbutton_device_calibrate, "clicked",
G_CALLBACK (gcm_prefs_calibrate_cb), prefs, G_CONNECT_SWAPPED);
- context = gtk_widget_get_style_context (prefs->toolbar_devices);
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_INLINE_TOOLBAR);
- gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
-
/* set up assign dialog */
- g_signal_connect_object (prefs->dialog_assign, "delete-event",
- G_CALLBACK (gcm_prefs_profile_delete_event_cb), prefs, G_CONNECT_SWAPPED);
-
- g_signal_connect_object (prefs->button_assign_cancel, "clicked",
- G_CALLBACK (gcm_prefs_button_assign_cancel_cb), prefs, G_CONNECT_SWAPPED);
g_signal_connect_object (prefs->button_assign_ok, "clicked",
G_CALLBACK (gcm_prefs_button_assign_ok_cb), prefs, G_CONNECT_SWAPPED);
@@ -2106,9 +2137,6 @@ cc_color_panel_init (CcColorPanel *prefs)
G_CALLBACK (gcm_prefs_button_assign_import_cb), prefs, G_CONNECT_SWAPPED);
/* setup the calibration helper */
- g_signal_connect_object (prefs->assistant_calib, "delete-event",
- G_CALLBACK (gcm_prefs_calib_delete_event_cb),
- prefs, G_CONNECT_SWAPPED);
g_signal_connect_object (prefs->assistant_calib, "apply",
G_CALLBACK (gcm_prefs_calib_apply_cb),
prefs, G_CONNECT_SWAPPED);
@@ -2224,7 +2252,6 @@ cc_color_panel_init (CcColorPanel *prefs)
G_CALLBACK (gcm_prefs_device_removed_cb), prefs, 0);
/* use a listbox for the main UI */
- prefs->list_box = GTK_LIST_BOX (gtk_list_box_new ());
gtk_list_box_set_filter_func (prefs->list_box,
cc_color_panel_filter_func,
prefs,
@@ -2233,12 +2260,6 @@ cc_color_panel_init (CcColorPanel *prefs)
cc_color_panel_sort_func,
prefs,
NULL);
- gtk_list_box_set_header_func (prefs->list_box,
- cc_list_box_update_header_func,
- prefs, NULL);
- gtk_list_box_set_selection_mode (prefs->list_box,
- GTK_SELECTION_SINGLE);
- gtk_list_box_set_activate_on_single_click (prefs->list_box, FALSE);
g_signal_connect_object (prefs->list_box, "row-selected",
G_CALLBACK (gcm_prefs_list_box_row_selected_cb),
prefs, G_CONNECT_SWAPPED);
@@ -2247,9 +2268,6 @@ cc_color_panel_init (CcColorPanel *prefs)
prefs, G_CONNECT_SWAPPED);
prefs->list_box_size = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
- gtk_container_add (GTK_CONTAINER (prefs->frame_devices), GTK_WIDGET (prefs->list_box));
- gtk_widget_show (GTK_WIDGET (prefs->list_box));
-
/* connect to colord */
cd_client_connect (prefs->client,
cc_panel_get_cancellable (CC_PANEL (prefs)),
@@ -2276,8 +2294,4 @@ cc_color_panel_init (CcColorPanel *prefs)
G_CALLBACK (gcm_prefs_calib_upload_cb), prefs, G_CONNECT_SWAPPED);
g_signal_connect_object (prefs->label_calib_summary_message, "activate-link",
G_CALLBACK (gcm_prefs_calib_export_link_cb), prefs, G_CONNECT_SWAPPED);
-
- g_signal_connect (prefs, "realize",
- G_CALLBACK (gcm_prefs_window_realize_cb),
- NULL);
}
diff --git a/panels/color/cc-color-panel.ui b/panels/color/cc-color-panel.ui
index 647e59894..9bad35c2c 100644
--- a/panels/color/cc-color-panel.ui
+++ b/panels/color/cc-color-panel.ui
@@ -2,987 +2,582 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAssistant" id="assistant_calib">
- <property name="can_focus">False</property>
<property name="title" translatable="yes">Screen Calibration</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
<property name="destroy_with_parent">True</property>
+ <property name="hide-on-close">True</property>
+
<child>
- <object class="GtkBox" id="box_calib_quality">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkLabel" id="label_calib_quality_message">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Calibration will produce a profile that you can use to
color manage your screen. The longer you spend on calibration, the better the quality of the color
profile.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_calib_quality_message2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">You will not be able to use your computer while
calibration takes place.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box_label_calib_quality_header">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">12</property>
+ <object class="GtkAssistantPage">
+ <property name="title" translatable="yes">Calibration Quality</property>
+ <property name="complete">True</property>
+ <property name="child">
+ <object class="GtkBox" id="box_calib_quality">
+ <property name="orientation">vertical</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkLabel" id="label_calib_quality_header">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <object class="GtkLabel" id="label_calib_quality_message">
<property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes" comments="This is the approximate time it takes to
calibrate the display.">Quality</property>
- <style>
- <class name="dim-label"/>
- </style>
+ <property name="label" translatable="yes">Calibration will produce a profile that you can
use to color manage your screen. The longer you spend on calibration, the better the quality of the color
profile.</property>
+ <property name="wrap">True</property>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkLabel" id="label_calib_quality_approx_time">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes" comments="This is the approximate time it takes to
calibrate the display.">Approximate Time</property>
- <style>
- <class name="dim-label"/>
- </style>
+ <object class="GtkLabel" id="label_calib_quality_message2">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">You will not be able to use your computer while
calibration takes place.</property>
+ <property name="wrap">True</property>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow_calib_quality">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
<child>
- <object class="GtkTreeView" id="treeview_calib_quality">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">liststore_calib_quality</property>
- <property name="headers_visible">False</property>
- <property name="search_column">0</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection3"/>
+ <object class="GtkBox" id="box_label_calib_quality_header">
+ <property name="margin_top">12</property>
+ <child>
+ <object class="GtkLabel" id="label_calib_quality_header">
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" comments="This is the approximate time it
takes to calibrate the display.">Quality</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_calib_quality_approx_time">
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes" comments="This is the approximate time it
takes to calibrate the display.">Approximate Time</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow_calib_quality">
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">never</property>
+ <child>
+ <object class="GtkTreeView" id="treeview_calib_quality">
+ <property name="model">liststore_calib_quality</property>
+ <property name="headers_visible">False</property>
+ <property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection3"/>
+ </child>
+ </object>
</child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
+ </property>
</object>
- <packing>
- <property name="title" translatable="yes">Calibration Quality</property>
- <property name="complete">True</property>
- </packing>
</child>
+
<child>
- <object class="GtkBox" id="box_calib_sensor">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkLabel" id="label_calib_sensor_message">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Select the sensor device you want to use for
calibration.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow_calib_sensor">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
+ <object class="GtkAssistantPage">
+ <property name="title" translatable="yes">Calibration Device</property>
+ <property name="child">
+ <object class="GtkBox" id="box_calib_sensor">
+ <property name="orientation">vertical</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkTreeView" id="treeview_calib_sensor">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">liststore_calib_sensor</property>
- <property name="headers_visible">False</property>
- <property name="search_column">1</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection4"/>
+ <object class="GtkLabel" id="label_calib_sensor_message">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select the sensor device you want to use for
calibration.</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow_calib_sensor">
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">never</property>
+ <child>
+ <object class="GtkTreeView" id="treeview_calib_sensor">
+ <property name="model">liststore_calib_sensor</property>
+ <property name="headers_visible">False</property>
+ <property name="search_column">1</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection4"/>
+ </child>
+ </object>
</child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ </property>
</object>
- <packing>
- <property name="title" translatable="yes">Calibration Device</property>
- </packing>
</child>
+
<child>
- <object class="GtkBox" id="box_calib_kind">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkLabel" id="label_calib_kind_message">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Select the type of display that is
connected.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow_calib_kind">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
+ <object class="GtkAssistantPage">
+ <property name="title" translatable="yes">Display Type</property>
+ <property name="child">
+ <object class="GtkBox" id="box_calib_kind">
+ <property name="orientation">vertical</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkTreeView" id="treeview_calib_kind">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">liststore_calib_kind</property>
- <property name="headers_visible">False</property>
- <property name="search_column">0</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection5"/>
+ <object class="GtkLabel" id="label_calib_kind_message">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select the type of display that is
connected.</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow_calib_kind">
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">never</property>
+ <child>
+ <object class="GtkTreeView" id="treeview_calib_kind">
+ <property name="model">liststore_calib_kind</property>
+ <property name="headers_visible">False</property>
+ <property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection5"/>
+ </child>
+ </object>
</child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ </property>
</object>
- <packing>
- <property name="title" translatable="yes">Display Type</property>
- </packing>
</child>
+
<child>
- <object class="GtkBox" id="box_calib_temp">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkLabel" id="label_calib_temp_message">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Select a display target white point. Most displays
should be calibrated to a D65 illuminant.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow_calib_temp">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
+ <object class="GtkAssistantPage">
+ <property name="title" translatable="yes">Profile Whitepoint</property>
+ <property name="child">
+ <object class="GtkBox" id="box_calib_temp">
+ <property name="orientation">vertical</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkTreeView" id="treeview_calib_temp">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">liststore_calib_temp</property>
- <property name="headers_visible">False</property>
- <property name="search_column">0</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection6"/>
+ <object class="GtkLabel" id="label_calib_temp_message">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select a display target white point. Most displays
should be calibrated to a D65 illuminant.</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow_calib_temp">
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">never</property>
+ <child>
+ <object class="GtkTreeView" id="treeview_calib_temp">
+ <property name="model">liststore_calib_temp</property>
+ <property name="headers_visible">False</property>
+ <property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection6"/>
+ </child>
+ </object>
</child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ </property>
</object>
- <packing>
- <property name="title" translatable="yes">Profile Whitepoint</property>
- </packing>
</child>
+
<child>
- <object class="GtkBox" id="box_calib_brightness">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkLabel" id="label_calib_brightness_message1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Please set the display to a brightness that is typical
for you. Color management will be most accurate at this brightness level.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_calib_brightness_message2">
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Alternatively, you can use the brightness level used
with one of the other profiles for this device.</property>
- <property name="wrap">True</property>
+ <object class="GtkAssistantPage">
+ <property name="title" translatable="yes">Display Brightness</property>
+ <property name="child">
+ <object class="GtkBox" id="box_calib_brightness">
+ <property name="orientation">vertical</property>
+ <property name="spacing">9</property>
+ <child>
+ <object class="GtkLabel" id="label_calib_brightness_message1">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Please set the display to a brightness that is
typical for you. Color management will be most accurate at this brightness level.</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_calib_brightness_message2">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Alternatively, you can use the brightness level
used with one of the other profiles for this device.</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ </property>
</object>
- <packing>
- <property name="title" translatable="yes">Display Brightness</property>
- </packing>
</child>
+
<child>
- <object class="GtkBox" id="box_calib_title">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkLabel" id="label_calib_title_message">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">You can use a color profile on different computers, or
even create profiles for different lighting conditions.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_calib_title_header">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Profile Name:</property>
- <property name="wrap">True</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entry_calib_title">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="truncate_multiline">True</property>
- <property name="invisible_char_set">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
+ <object class="GtkAssistantPage">
<property name="page_type">confirm</property>
<property name="title" translatable="yes">Profile Name</property>
- </packing>
+ <property name="child">
+ <object class="GtkBox" id="box_calib_title">
+ <property name="orientation">vertical</property>
+ <property name="spacing">9</property>
+ <child>
+ <object class="GtkLabel" id="label_calib_title_message">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">You can use a color profile on different
computers, or even create profiles for different lighting conditions.</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_calib_title_header">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Profile Name:</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="entry_calib_title">
+ <property name="invisible_char">●</property>
+ <property name="truncate_multiline">True</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
</child>
+
<child>
- <object class="GtkBox" id="box_calib_summary">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkLabel" id="label_calib_summary_title">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">Profile successfully created!</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="spacing">6</property>
+ <object class="GtkAssistantPage">
+ <property name="page_type">summary</property>
+ <property name="title" translatable="yes">Summary</property>
+ <property name="child">
+ <object class="GtkBox" id="box_calib_summary">
+ <property name="orientation">vertical</property>
+ <property name="spacing">9</property>
+ <child>
+ <object class="GtkLabel" id="label_calib_summary_title">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Profile successfully created!</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
<child>
- <object class="GtkButton" id="button_calib_export">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">start</property>
+ <object class="GtkBox" id="box2">
+ <property name="halign">center</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox" id="box3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="spacing">9</property>
+ <object class="GtkButton" id="button_calib_export">
+ <property name="halign">start</property>
<child>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixel_size">48</property>
- <property name="icon_name">folder-symbolic</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">3</property>
+ <object class="GtkBox" id="box3">
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <property name="margin_start">6</property>
+ <property name="margin_end">6</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Copy profile</property>
+ <object class="GtkImage" id="image2">
+ <property name="pixel_size">48</property>
+ <property name="icon_name">folder-symbolic</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Requires writable media</property>
- <attributes>
- <attribute name="style" value="italic"/>
- </attributes>
+ <object class="GtkBox" id="box6">
+ <property name="orientation">vertical</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Copy profile</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Requires writable media</property>
+ <attributes>
+ <attribute name="style" value="italic"/>
+ </attributes>
+ </object>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_calib_upload">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">start</property>
<child>
- <object class="GtkBox" id="box4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="spacing">9</property>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixel_size">48</property>
- <property name="icon_name">preferences-system-sharing-symbolic</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <object class="GtkButton" id="button_calib_upload">
+ <property name="halign">start</property>
<child>
- <object class="GtkBox" id="box5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">3</property>
+ <object class="GtkBox" id="box4">
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <property name="margin_start">6</property>
+ <property name="margin_end">6</property>
+ <property name="spacing">9</property>
<child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Upload profile</property>
+ <object class="GtkImage" id="image3">
+ <property name="pixel_size">48</property>
+ <property name="icon_name">preferences-system-sharing-symbolic</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Requires Internet connection</property>
- <attributes>
- <attribute name="style" value="italic"/>
- </attributes>
+ <object class="GtkBox" id="box5">
+ <property name="orientation">vertical</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Upload profile</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Requires Internet
connection</property>
+ <attributes>
+ <attribute name="style" value="italic"/>
+ </attributes>
+ </object>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">12</property>
- <property name="position">1</property>
- </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_calib_upload_location">
+ <property name="xalign">0</property>
+ <property name="label">The profile has been uploaded to
http://foo.bar/deadbeef.icc</property>
+ <property name="selectable">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_calib_summary_message">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">You may find these instructions on how to use the
profile on <a href="linux">GNU/Linux</a>, <a href="osx">Apple OS X</a> and <a
href="windows">Microsoft Windows</a> systems useful.</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">12</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_calib_upload_location">
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label">The profile has been uploaded to http://foo.bar/deadbeef.icc</property>
- <property name="selectable">True</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_calib_summary_message">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">6</property>
- <property name="label" translatable="yes">You may find these instructions on how to use the
profile on <a href="linux">GNU/Linux</a>, <a href="osx">Apple OS X</a> and <a
href="windows">Microsoft Windows</a> systems useful.</property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
+ </property>
</object>
- <packing>
- <property name="page_type">summary</property>
- <property name="title" translatable="yes">Summary</property>
- </packing>
</child>
+
<child internal-child="action_area">
<object class="GtkBox" id="assistant-action_area1">
- <property name="can_focus">False</property>
<property name="halign">end</property>
<property name="spacing">6</property>
</object>
</child>
</object>
+
<object class="GtkDialog" id="dialog_assign">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
<property name="title" translatable="yes">Add Profile</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
<property name="destroy_with_parent">True</property>
<property name="icon_name">gnome-color-manager</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="skip_pager_hint">True</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="use-header-bar">1</property>
+ <property name="hide-on-close">True</property>
+ <child>
+ <object class="GtkBox" id="box1">
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button_assign_import">
- <property name="label" translatable="yes">_Import File…</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_assign_cancel">
- <property name="label" translatable="yes">_Cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- <property name="secondary">True</property>
- </packing>
- </child>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow_assign">
+ <property name="hscrollbar_policy">never</property>
+ <property name="hscrollbar-policy">GTK_POLICY_NEVER</property>
+ <property name="min-content-height">300</property>
<child>
- <object class="GtkButton" id="button_assign_ok">
- <property name="label" translatable="yes">_Add</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <object class="GtkTreeView" id="treeview_assign">
+ <property name="model">liststore_assign</property>
+ <property name="headers_visible">False</property>
+ <property name="enable_search">False</property>
+ <property name="search_column">0</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection2"/>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow_assign">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
- <property name="hscrollbar-policy">GTK_POLICY_NEVER</property>
- <property name="min-content-height">300</property>
- <child>
- <object class="GtkTreeView" id="treeview_assign">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">liststore_assign</property>
- <property name="headers_visible">False</property>
- <property name="enable_search">False</property>
- <property name="search_column">0</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection2"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_assign_warning">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Problems detected. The profile may not work
correctly. <a href="">Show details.</a></property>
- <property name="use_markup">True</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <object class="GtkLabel" id="label_assign_warning">
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <property name="margin_start">6</property>
+ <property name="margin_end">6</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Problems detected. The profile may not work correctly.
<a href="">Show details.</a></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="titlebar">
+ <object class="GtkHeaderBar">
+ <child type="start">
+ <object class="GtkButton" id="button_assign_import">
+ <property name="label" translatable="yes">_Import File…</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child type="end">
+ <object class="GtkButton" id="button_assign_ok">
+ <property name="label" translatable="yes">_Add</property>
+ <property name="use_underline">True</property>
+ <style>
+ <class name="suggested-action" />
+ </style>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">button_assign_import</action-widget>
- <action-widget response="0">button_assign_cancel</action-widget>
- <action-widget response="0">button_assign_ok</action-widget>
+ <action-widget response="ok">button_assign_ok</action-widget>
</action-widgets>
</object>
<template class="CcColorPanel" parent="CcPanel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="dialog_scroll">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
- <object class="HdyClamp">
- <property name="visible">True</property>
+ <object class="AdwClamp">
<property name="margin_top">32</property>
<property name="margin_bottom">32</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<child>
<object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="hexpand">True</property>
<child>
<object class="GtkBox" id="hbox3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="spacing">9</property>
<child>
<object class="GtkLabel" id="label_intro">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Each device needs an up to date color
profile to be color managed.</property>
<property name="wrap">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkLabel" id="label_padding">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
<object class="GtkLinkButton" id="linkbutton_help">
<property name="label" translatable="yes">Learn more</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Learn more about color
management</property>
- <property name="relief">none</property>
- <property name="xalign">0.50999999046325684</property>
<property name="uri">help:gnome-help/color-whyimportant</property>
<accessibility>
- <relation type="labelled-by" target="label_intro"/>
+ <relation name="labelled-by">label_intro</relation>
</accessibility>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
<object class="GtkBox" id="box_devices">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkFrame" id="frame_devices">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
+ <object class="GtkListBox" id="list_box">
+ <property name="activate-on-single-click">False</property>
+ <property name="selection-mode">single</property>
+ <style>
+ <class name="content" />
+ </style>
</object>
</child>
<child>
- <object class="GtkToolbar" id="toolbar_devices">
- <property name="can_focus">True</property>
- <property name="show_arrow">False</property>
- <property name="icon_size">1</property>
+ <object class="GtkBox" id="toolbar_devices">
+ <property name="visible">False</property>
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <property name="margin_start">6</property>
+ <property name="margin_end">6</property>
<child>
- <object class="GtkToolItem" id="left_button_group">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <object class="GtkBox" id="left_button_group_box">
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <style>
+ <class name="linked" />
+ </style>
+ <child>
+ <object class="GtkButton" id="toolbutton_device_default">
+ <property name="label" translatable="yes">_Set for all users</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Set this profile for all
users on this computer</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
<child>
- <object class="GtkBox" id="left_button_group_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkButton" id="toolbutton_device_default">
- <property name="label" translatable="yes">_Set for all users</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">Set this profile for
all users on this computer</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="toolbutton_device_enable">
- <property name="label" translatable="yes">_Enable</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Set this profile for
all users on this computer</property>
- <property name="tooltip_text" translatable="yes">Set this profile for
all users on this computer</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <object class="GtkButton" id="toolbutton_device_enable">
+ <property name="label" translatable="yes">_Enable</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Set this profile for all
users on this computer</property>
+ <property name="tooltip_text" translatable="yes">Set this profile for all
users on this computer</property>
+ <property name="use_underline">True</property>
</object>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- </packing>
</child>
<child>
- <object class="GtkToolItem" id="right_button_group">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <object class="GtkBox" id="right_button_group_box">
+ <style>
+ <class name="linked" />
+ </style>
+ <child>
+ <object class="GtkButton" id="toolbutton_profile_add">
+ <property name="label" translatable="yes">_Add profile</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="toolbutton_device_calibrate">
+ <property name="label" translatable="yes">_Calibrate…</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Calibrate the
device</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="toolbutton_profile_remove">
+ <property name="label" translatable="yes">_Remove profile</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
<child>
- <object class="GtkBox" id="right_button_group_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkButton" id="toolbutton_profile_add">
- <property name="label" translatable="yes">_Add profile</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="toolbutton_device_calibrate">
- <property name="label" translatable="yes">_Calibrate…</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">Calibrate the
device</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="toolbutton_profile_remove">
- <property name="label" translatable="yes">_Remove profile</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="toolbutton_profile_view">
- <property name="label" translatable="yes">_View details</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
+ <object class="GtkButton" id="toolbutton_profile_view">
+ <property name="label" translatable="yes">_View details</property>
+ <property name="use_underline">True</property>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
<object class="GtkLabel" id="label_no_devices">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="label" translatable="yes">Unable to detect any devices that can be color
managed</property>
<style>
<class name="dim-label"/>
@@ -991,11 +586,6 @@
<attribute name="weight" value="bold"/>
</attributes>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
</child>
diff --git a/panels/color/cc-color-profile.c b/panels/color/cc-color-profile.c
index 9528d3c6a..65cb99f71 100644
--- a/panels/color/cc-color-profile.c
+++ b/panels/color/cc-color-profile.c
@@ -435,10 +435,10 @@ cc_color_profile_init (CcColorProfile *color_profile)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 9);
/* default tick */
- color_profile->widget_image = gtk_image_new_from_icon_name ("object-select-symbolic", GTK_ICON_SIZE_MENU);
+ color_profile->widget_image = gtk_image_new_from_icon_name ("object-select-symbolic");
gtk_widget_set_margin_start (color_profile->widget_image, IMAGE_WIDGET_PADDING);
gtk_widget_set_margin_end (color_profile->widget_image, IMAGE_WIDGET_PADDING);
- gtk_box_pack_start (GTK_BOX (box), color_profile->widget_image, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), color_profile->widget_image);
/* description */
color_profile->widget_description = gtk_label_new ("");
@@ -447,18 +447,18 @@ cc_color_profile_init (CcColorProfile *color_profile)
gtk_widget_set_halign (color_profile->widget_description, GTK_ALIGN_START);
gtk_label_set_ellipsize (GTK_LABEL (color_profile->widget_description), PANGO_ELLIPSIZE_END);
gtk_label_set_xalign (GTK_LABEL (color_profile->widget_description), 0);
- gtk_box_pack_start (GTK_BOX (box), color_profile->widget_description, TRUE, TRUE, 0);
- gtk_widget_show (color_profile->widget_description);
+ gtk_widget_set_hexpand (color_profile->widget_description, TRUE);
+ gtk_widget_set_vexpand (color_profile->widget_description, TRUE);
+ gtk_box_append (GTK_BOX (box), color_profile->widget_description);
/* profile warnings/info */
- color_profile->widget_info = gtk_image_new_from_icon_name ("dialog-information-symbolic",
GTK_ICON_SIZE_MENU);
+ color_profile->widget_info = gtk_image_new_from_icon_name ("dialog-information-symbolic");
gtk_widget_set_margin_start (color_profile->widget_info, IMAGE_WIDGET_PADDING);
gtk_widget_set_margin_end (color_profile->widget_info, IMAGE_WIDGET_PADDING);
- gtk_box_pack_start (GTK_BOX (box), color_profile->widget_info, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), color_profile->widget_info);
/* refresh */
- gtk_container_add (GTK_CONTAINER (color_profile), box);
- gtk_widget_set_visible (box, TRUE);
+ gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (color_profile), box);
}
GtkWidget *
diff --git a/panels/color/meson.build b/panels/color/meson.build
index 742caf67b..b8f429897 100644
--- a/panels/color/meson.build
+++ b/panels/color/meson.build
@@ -41,9 +41,9 @@ sources += gnome.compile_resources(
deps = common_deps + [
colord_dep,
- gnome_desktop_dep,
+ gnome_rr_dep,
m_dep,
- dependency('colord-gtk', version: '>= 0.1.24'),
+ dependency('colord-gtk4', version: '>= 0.1.24'),
dependency('libsoup-2.4')
]
diff --git a/panels/meson.build b/panels/meson.build
index 5e318abc7..52760cb1e 100644
--- a/panels/meson.build
+++ b/panels/meson.build
@@ -4,7 +4,7 @@ panels = [
'applications',
'background',
'camera',
-# 'color',
+ 'color',
'datetime',
'default-apps',
'diagnostics',
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index bb6ed1dcc..de804ff9a 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -36,7 +36,7 @@ extern GType cc_background_panel_get_type (void);
#ifdef BUILD_BLUETOOTH
extern GType cc_bluetooth_panel_get_type (void);
#endif /* BUILD_BLUETOOTH */
-//extern GType cc_color_panel_get_type (void);
+extern GType cc_color_panel_get_type (void);
extern GType cc_date_time_panel_get_type (void);
extern GType cc_default_apps_panel_get_type (void);
//extern GType cc_display_panel_get_type (void);
@@ -103,7 +103,7 @@ static CcPanelLoaderVtable default_panels[] =
PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type, NULL),
#endif
PANEL_TYPE("camera", cc_camera_panel_get_type, NULL),
- //PANEL_TYPE("color", cc_color_panel_get_type, NULL),
+ PANEL_TYPE("color", cc_color_panel_get_type, NULL),
PANEL_TYPE("datetime", cc_date_time_panel_get_type, NULL),
PANEL_TYPE("default-apps", cc_default_apps_panel_get_type, NULL),
PANEL_TYPE("diagnostics", cc_diagnostics_panel_get_type,
cc_diagnostics_panel_static_init_func),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]