summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-08-03 11:32:13 +0200
committerraveit65 <[email protected]>2020-09-01 11:23:25 +0200
commit16e1a1f7f2387382c91ea5fb093c956378ac78e8 (patch)
tree7d194dd17334d2faa5f4f04ac39fb44d7048ecbc /src
parentb4e0423456c4d974bde57d9cd4f95c1fca623214 (diff)
downloadmate-terminal-16e1a1f7f2387382c91ea5fb093c956378ac78e8.tar.bz2
mate-terminal-16e1a1f7f2387382c91ea5fb093c956378ac78e8.tar.xz
Remove -Wfloat-conversion warnings
Diffstat (limited to 'src')
-rw-r--r--src/terminal-screen.c10
-rw-r--r--src/terminal-window.c8
2 files changed, 10 insertions, 8 deletions
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index ba30e39..01bec75 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1167,6 +1167,7 @@ terminal_screen_set_font (TerminalScreen *screen)
TerminalScreenPrivate *priv = screen->priv;
TerminalProfile *profile;
PangoFontDescription *desc;
+ int size;
profile = priv->profile;
@@ -1176,14 +1177,11 @@ terminal_screen_set_font (TerminalScreen *screen)
g_object_get (profile, TERMINAL_PROFILE_FONT, &desc, NULL);
g_assert (desc);
+ size = pango_font_description_get_size (desc);
if (pango_font_description_get_size_is_absolute (desc))
- pango_font_description_set_absolute_size (desc,
- priv->font_scale *
- pango_font_description_get_size (desc));
+ pango_font_description_set_absolute_size (desc, priv->font_scale * size);
else
- pango_font_description_set_size (desc,
- priv->font_scale *
- pango_font_description_get_size (desc));
+ pango_font_description_set_size (desc, (int)(priv->font_scale * size));
vte_terminal_set_font (VTE_TERMINAL (screen), desc);
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 66af860..c1cb230 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2936,7 +2936,9 @@ notebook_button_press_cb (GtkWidget *widget,
if ((event->type == GDK_BUTTON_PRESS && event->button == 2) &&
(g_settings_get_boolean (settings, "middle-click-closes-tabs")))
{
- tab_clicked = find_tab_num_at_pos (notebook, event->x_root, event->y_root);
+ tab_clicked = find_tab_num_at_pos (notebook,
+ (int)event->x_root,
+ (int)event->y_root);
if (tab_clicked >= 0)
{
before_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook));
@@ -2969,7 +2971,9 @@ notebook_button_press_cb (GtkWidget *widget,
(event->state & gtk_accelerator_get_default_mod_mask ()) != 0)
return FALSE;
- tab_clicked = find_tab_num_at_pos (notebook, event->x_root, event->y_root);
+ tab_clicked = find_tab_num_at_pos (notebook,
+ (int)event->x_root,
+ (int)event->y_root);
if (tab_clicked < 0)
return FALSE;