Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-11-29 15:19:13 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-11-29 15:30:45 (GMT)
commita919e61801f30689700e3179b99d32b3f445f39e (patch)
tree17fd07753ad09d898cf9b3934b47274c13cbb2ee /shell
parent26c2ea8421ddd35f1539fd113ed7ff94de6ce390 (diff)
[shell] Update window icon too when the inverted colors option is active
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 1b82aa4..a07bea7 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -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);
}
@@ -4168,6 +4170,21 @@ ev_window_rotation_changed_cb (EvDocumentModel *model,
}
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)
{
ev_window_update_actions (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),