[geary/wip/765516-gtk-widget-conversation-viewer: 50/142] Silence a warning calling Use Gtk.Widget.get_window.



commit 0d7760466204b2d49cdaefbff256820306ed725f
Author: Michael James Gratton <mike vee net>
Date:   Fri Apr 22 15:55:54 2016 +1000

    Silence a warning calling Use Gtk.Widget.get_window.
    
    Just use Gtk.Widget.get_scale_factor instead.

 .../conversation-viewer/conversation-email.vala    |    2 +-
 .../conversation-viewer/conversation-message.vala  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-email.vala 
b/src/client/conversation-viewer/conversation-email.vala
index af40dc4..cc138ea 100644
--- a/src/client/conversation-viewer/conversation-email.vala
+++ b/src/client/conversation-viewer/conversation-email.vala
@@ -498,7 +498,7 @@ public class ConversationEmail : Gtk.Box {
         // pixbuf twice as large and blurry, so clamp it to 1 for now
         // - this at least gives is the correct size icons, but still
         // blurry.
-        //int window_scale = get_window().get_scale_factor();
+        //int window_scale = get_scale_factor();
         int window_scale = 1;
         try {
             // If the file is an image, use it. Otherwise get the icon
diff --git a/src/client/conversation-viewer/conversation-message.vala 
b/src/client/conversation-viewer/conversation-message.vala
index b17ba87..f18a553 100644
--- a/src/client/conversation-viewer/conversation-message.vala
+++ b/src/client/conversation-viewer/conversation-message.vala
@@ -219,7 +219,7 @@ public class ConversationMessage : Gtk.Box {
         // Soup.Session.queue_message.
         Geary.RFC822.MailboxAddress? primary = message.get_primary_originator();
         if (primary != null) {
-            int window_scale = get_window().get_scale_factor();
+            int window_scale = get_scale_factor();
             int pixel_size = header_avatar.get_pixel_size();
             Soup.Message message = new Soup.Message(
                 "GET",
@@ -329,7 +329,7 @@ public class ConversationMessage : Gtk.Box {
 
         if (avatar != null) {
             Gdk.Window window = get_window();
-            int window_scale = window.get_scale_factor();
+            int window_scale = get_scale_factor();
             int preview_size = preview_avatar.pixel_size * window_scale;
             preview_avatar.set_from_surface(
                 Gdk.cairo_surface_create_from_pixbuf(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]