[Xfce4-commits] [apps/xfce4-terminal] 01/01: Fix font setting load

noreply at xfce.org noreply at xfce.org
Sun May 14 18:32:32 CEST 2017


This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit 5a54779dd6ae40393a3d94a50326b8d8b43636ee
Author: Igor <f2404 at yandex.ru>
Date:   Sun May 14 12:32:08 2017 -0400

    Fix font setting load
    
    https://bugzilla.xfce.org/show_bug.cgi?id=13574
---
 terminal/terminal-screen.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index d670c4f..3507dcc 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -2377,9 +2377,6 @@ terminal_screen_update_font (TerminalScreen *screen)
   terminal_return_if_fail (TERMINAL_IS_PREFERENCES (screen->preferences));
   terminal_return_if_fail (VTE_IS_TERMINAL (screen->terminal));
 
-  if (!TERMINAL_IS_WINDOW (toplevel))
-    return;
-
   g_object_get (G_OBJECT (screen->preferences),
                 "font-use-system", &font_use_system,
                 "font-allow-bold", &font_allow_bold,
@@ -2394,14 +2391,17 @@ terminal_screen_update_font (TerminalScreen *screen)
   else
     g_object_get (G_OBJECT (screen->preferences), "font-name", &font_name, NULL);
 
-  if (TERMINAL_WINDOW (toplevel)->font)
+  if (TERMINAL_IS_WINDOW (toplevel))
     {
-      g_free (font_name);
-      font_name = g_strdup (TERMINAL_WINDOW (toplevel)->font);
-    }
+      if (TERMINAL_WINDOW (toplevel)->font)
+        {
+          g_free (font_name);
+          font_name = g_strdup (TERMINAL_WINDOW (toplevel)->font);
+        }
 
-  if (TERMINAL_WINDOW (toplevel)->zoom != TERMINAL_ZOOM_LEVEL_DEFAULT)
-    font_name = terminal_screen_zoom_font (screen, font_name, TERMINAL_WINDOW (toplevel)->zoom);
+      if (TERMINAL_WINDOW (toplevel)->zoom != TERMINAL_ZOOM_LEVEL_DEFAULT)
+        font_name = terminal_screen_zoom_font (screen, font_name, TERMINAL_WINDOW (toplevel)->zoom);
+    }
 
   if (gtk_widget_get_realized (GTK_WIDGET (screen)))
     terminal_screen_get_size (screen, &grid_w, &grid_h);
@@ -2416,7 +2416,7 @@ terminal_screen_update_font (TerminalScreen *screen)
     }
 
   /* update window geometry it required (not needed for drop-down) */
-  if (!TERMINAL_WINDOW (toplevel)->drop_down && grid_w > 0 && grid_h > 0)
+  if (TERMINAL_IS_WINDOW (toplevel) && !TERMINAL_WINDOW (toplevel)->drop_down && grid_w > 0 && grid_h > 0)
     terminal_screen_force_resize_window (screen, GTK_WINDOW (toplevel), grid_w, grid_h);
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list