GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit a919e618 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

[shell] Update window icon too when the inverted colors option is active

parent 26c2ea84
......@@ -1136,6 +1136,8 @@ ev_window_set_icon_from_thumbnail (EvJobThumbnail *job,
EvWindow *ev_window)
{
if (job->thumbnail) {
if (ev_document_model_get_inverted_colors (ev_window->priv->model))
ev_document_misc_invert_pixbuf (job->thumbnail);
gtk_window_set_icon (GTK_WINDOW (ev_window),
job->thumbnail);
}
......@@ -4167,6 +4169,21 @@ ev_window_rotation_changed_cb (EvDocumentModel *model,
ev_window_refresh_window_thumbnail (window, rotation);
}
static void
ev_window_inverted_colors_changed_cb (EvDocumentModel *model,
GParamSpec *pspec,
EvWindow *window)
{
gboolean inverted_colors = ev_document_model_get_inverted_colors (model);
gint rotation = ev_document_model_get_rotation (model);
if (window->priv->metadata && !ev_window_is_empty (window))
ev_metadata_set_boolean (window->priv->metadata, "inverted-colors",
inverted_colors);
ev_window_refresh_window_thumbnail (window, rotation);
}
static void
ev_window_has_selection_changed_cb (EvView *view, GParamSpec *pspec, EvWindow *window)
{
......@@ -6333,6 +6350,10 @@ ev_window_init (EvWindow *ev_window)
ev_window);
/* Connect to view signals */
g_signal_connect (ev_window->priv->model,
"notify::inverted-colors",
G_CALLBACK (ev_window_inverted_colors_changed_cb),
ev_window);
g_signal_connect (ev_window->priv->view,
"notify::has-selection",
G_CALLBACK (ev_window_has_selection_changed_cb),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment