[gnome-terminal] window: Update the geometry when the font changes
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] window: Update the geometry when the font changes
- Date: Mon, 4 Mar 2013 18:53:28 +0000 (UTC)
commit 72c6555025d1fbcdb82daa153d459dd11d85fe77
Author: Christian Persch <chpe gnome org>
Date: Mon Mar 4 19:52:37 2013 +0100
window: Update the geometry when the font changes
Fixes regression introduced by commit f38b805cce31a2c2ceb2fd93c11e04f0c18e2242.
https://bugzilla.gnome.org/show_bug.cgi?id=691997
src/terminal-window.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index d94fd1a..3bc1250 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2195,6 +2195,22 @@ sync_screen_icon_title_set (TerminalScreen *screen,
/* Re-setting the right title will be done by the notify::title handler which comes after this one */
}
+static void
+screen_font_desc_changed_cb (TerminalScreen *screen,
+ GParamSpec *psepc,
+ TerminalWindow *window)
+{
+ TerminalWindowPrivate *priv = window->priv;
+
+ if (!gtk_widget_get_realized (GTK_WIDGET (window)))
+ return;
+
+ if (screen != priv->active_screen)
+ return;
+
+ terminal_window_update_size (window);
+}
+
/* MDI container callbacks */
static void
@@ -2509,6 +2525,8 @@ mdi_screen_added_cb (TerminalMdiContainer *container,
G_CALLBACK (sync_screen_icon_title), window);
g_signal_connect (screen, "notify::icon-title-set",
G_CALLBACK (sync_screen_icon_title_set), window);
+ g_signal_connect (screen, "notify::font-desc",
+ G_CALLBACK (screen_font_desc_changed_cb), window);
g_signal_connect (screen, "selection-changed",
G_CALLBACK (terminal_window_update_copy_sensitivity), window);
@@ -2581,6 +2599,10 @@ mdi_screen_removed_cb (TerminalMdiContainer *container,
window);
g_signal_handlers_disconnect_by_func (G_OBJECT (screen),
+ G_CALLBACK (screen_font_desc_changed_cb),
+ window);
+
+ g_signal_handlers_disconnect_by_func (G_OBJECT (screen),
G_CALLBACK (terminal_window_update_copy_sensitivity),
window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]