[Xfce4-commits] [apps/xfce4-terminal] 01/01: Do not change drop-down window size when zooming in/out
noreply at xfce.org
noreply at xfce.org
Wed May 10 03:42:40 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 e9617c377e6de00b0a12518eca88e9a32a860782
Author: Igor <f2404 at yandex.ru>
Date: Tue May 9 21:42:32 2017 -0400
Do not change drop-down window size when zooming in/out
---
terminal/terminal-screen.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index d1c6078..d670c4f 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -2366,17 +2366,20 @@ terminal_screen_update_scrolling_bar (TerminalScreen *screen)
void
terminal_screen_update_font (TerminalScreen *screen)
{
+ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
gboolean font_use_system, font_allow_bold;
gchar *font_name;
PangoFontDescription *font_desc;
glong grid_w = 0, grid_h = 0;
- GtkWidget *toplevel;
GSettings *settings;
terminal_return_if_fail (TERMINAL_IS_SCREEN (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,
@@ -2391,18 +2394,15 @@ terminal_screen_update_font (TerminalScreen *screen)
else
g_object_get (G_OBJECT (screen->preferences), "font-name", &font_name, NULL);
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
- if (TERMINAL_IS_WINDOW (toplevel))
+ if (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);
+ 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 (gtk_widget_get_realized (GTK_WIDGET (screen)))
terminal_screen_get_size (screen, &grid_w, &grid_h);
@@ -2415,8 +2415,8 @@ terminal_screen_update_font (TerminalScreen *screen)
g_free (font_name);
}
- /* update window geometry it required */
- if (grid_w > 0 && grid_h > 0)
+ /* update window geometry it required (not needed for drop-down) */
+ if (!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