Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/ui/remmina_preferences.glade310
-rw-r--r--src/remmina_pref.c13
-rw-r--r--src/remmina_pref.h2
-rw-r--r--src/remmina_pref_dialog.c6
-rw-r--r--src/remmina_pref_dialog.h2
-rw-r--r--src/remmina_ssh_plugin.c41
-rw-r--r--src/remmina_ssh_plugin.h2
7 files changed, 249 insertions, 127 deletions
diff --git a/data/ui/remmina_preferences.glade b/data/ui/remmina_preferences.glade
index 8f2e6c2f8..4f05fd65b 100644
--- a/data/ui/remmina_preferences.glade
+++ b/data/ui/remmina_preferences.glade
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1
+<!-- Generated with glade 3.22.2
Remmina Preferences Dialog -
Copyright (C) Antenore Gatta & Giovanni Panozzo 2014-2020
@@ -43,7 +43,7 @@ Author: Antenore Gatta
<property name="type_hint">dialog</property>
<signal name="close" handler="remmina_pref_dialog_on_close_clicked" swapped="no"/>
<signal name="destroy" handler="remmina_pref_on_dialog_destroy" swapped="no"/>
- <child>
+ <child type="titlebar">
<placeholder/>
</child>
<child internal-child="vbox">
@@ -501,7 +501,7 @@ Author: Antenore Gatta
</property>
<property name="margin_right">18</property>
<property name="width_chars">25</property>
- <property name="placeholder_text" translatable="no">%G_%P_%N_%h</property>
+ <property name="placeholder_text">%G_%P_%N_%h</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1787,143 +1787,194 @@ Author: Antenore Gatta
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_terminal_foreground">
+ <object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">18</property>
- <property name="label" translatable="yes">Foreground colour</property>
+ <property name="label" translatable="yes">Use default system font</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">7</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_foreground">
+ <object class="GtkSwitch">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="halign">start</property>
- <property name="margin_right">18</property>
- <property name="title" translatable="yes">Foreground colour</property>
+ <signal name="activate" handler="remmina_pref_dialog_vte_font_on_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">7</property>
+ <property name="top_attach">1</property>
<property name="width">8</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_terminal_background">
+ <object class="GtkSwitch" id="switch_terminal_bold">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="halign">start</property>
- <property name="margin_left">18</property>
- <property name="label" translatable="yes">Background colour</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">8</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_terminal_cursor_color">
+ <object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">18</property>
- <property name="label" translatable="yes">Cursor colour</property>
+ <property name="label" translatable="yes">Allow bold text</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">9</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_terminal_normal_colors">
+ <object class="GtkLabel" id="label_color_chooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">18</property>
- <property name="label" translatable="yes">Normal colours</property>
+ <property name="margin_bottom">18</property>
+ <property name="label" translatable="yes">Colour theme</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">14</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_terminal_bright_colors">
+ <object class="GtkFileChooserButton" id="button_term_cs">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="margin_left">18</property>
- <property name="label" translatable="yes">Bright colours</property>
+ <property name="tooltip_text" translatable="yes">Choose a colour scheme file. Usually available in /usr/share/remmina/theme. https://github.com/mbadolato/iTerm2-Color-Schemes has more details.</property>
+ <property name="margin_right">18</property>
+ <property name="margin_bottom">18</property>
+ <property name="title" translatable="yes">Pick a terminal colouring file</property>
+ <signal name="file-set" handler="remmina_pref_on_color_scheme_selected" swapped="no"/>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">11</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">14</property>
+ <property name="width">8</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_color_chooser">
+ <object class="GtkLabel" id="label_terminal_bright_colors">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">18</property>
- <property name="margin_bottom">18</property>
- <property name="label" translatable="yes">Colour theme</property>
+ <property name="label" translatable="yes">Bright colours</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">12</property>
+ <property name="top_attach">13</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_background">
+ <object class="GtkColorButton" id="colorbutton_color8">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="halign">start</property>
- <property name="margin_right">18</property>
- <property name="title" translatable="yes">Background colour</property>
+ <property name="title" translatable="yes">Pick a light black colour</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">8</property>
- <property name="width">8</property>
+ <property name="top_attach">13</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_cursor">
+ <object class="GtkColorButton" id="colorbutton_color9">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="halign">start</property>
- <property name="margin_right">18</property>
- <property name="title" translatable="yes">Cursor colour</property>
+ <property name="title" translatable="yes">Pick a light red colour</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">9</property>
- <property name="width">8</property>
+ <property name="left_attach">2</property>
+ <property name="top_attach">13</property>
</packing>
</child>
<child>
- <object class="GtkFileChooserButton" id="button_term_cs">
+ <object class="GtkColorButton" id="colorbutton_color10">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Choose a colour scheme file. Usually available in /usr/share/remmina/theme. https://github.com/mbadolato/iTerm2-Color-Schemes has more details.</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="title" translatable="yes">Pick a bright green colour</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">13</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkColorButton" id="colorbutton_color11">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="title" translatable="yes">Pick a bright yellow colour</property>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="top_attach">13</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkColorButton" id="colorbutton_color12">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="title" translatable="yes">Pick a bright blue colour</property>
+ </object>
+ <packing>
+ <property name="left_attach">5</property>
+ <property name="top_attach">13</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkColorButton" id="colorbutton_color13">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="title" translatable="yes">Pick a light magenta colour</property>
+ </object>
+ <packing>
+ <property name="left_attach">6</property>
+ <property name="top_attach">13</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkColorButton" id="colorbutton_color14">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="title" translatable="yes">Pick a light cyan colour</property>
+ </object>
+ <packing>
+ <property name="left_attach">7</property>
+ <property name="top_attach">13</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkColorButton" id="colorbutton_color15">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
<property name="margin_right">18</property>
- <property name="margin_bottom">18</property>
- <property name="title" translatable="yes">Pick a terminal colouring file</property>
- <signal name="file-set" handler="remmina_pref_on_color_scheme_selected" swapped="no"/>
+ <property name="title" translatable="yes">Pick a light white colour</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">12</property>
- <property name="width">8</property>
+ <property name="left_attach">8</property>
+ <property name="top_attach">13</property>
</packing>
</child>
<child>
@@ -1935,7 +1986,7 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
@@ -1947,7 +1998,7 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">2</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
@@ -1959,7 +2010,7 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">3</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
@@ -1971,7 +2022,7 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">4</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
@@ -1983,7 +2034,7 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">5</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
@@ -1995,7 +2046,7 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">6</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
@@ -2007,7 +2058,7 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">7</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
@@ -2020,157 +2071,164 @@ Author: Antenore Gatta
</object>
<packing>
<property name="left_attach">8</property>
- <property name="top_attach">10</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color8">
+ <object class="GtkLabel" id="label_terminal_normal_colors">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="title" translatable="yes">Pick a light black colour</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">18</property>
+ <property name="label" translatable="yes">Normal colours</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">11</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">12</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color9">
+ <object class="GtkLabel" id="label_terminal_cursor_color">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="title" translatable="yes">Pick a light red colour</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">18</property>
+ <property name="label" translatable="yes">Cursor colour</property>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">11</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color10">
+ <object class="GtkColorButton" id="colorbutton_cursor">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="title" translatable="yes">Pick a bright green colour</property>
+ <property name="halign">start</property>
+ <property name="margin_right">18</property>
+ <property name="title" translatable="yes">Cursor colour</property>
</object>
<packing>
- <property name="left_attach">3</property>
+ <property name="left_attach">1</property>
<property name="top_attach">11</property>
+ <property name="width">8</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color11">
+ <object class="GtkLabel" id="label_terminal_background">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="title" translatable="yes">Pick a bright yellow colour</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">18</property>
+ <property name="label" translatable="yes">Background colour</property>
</object>
<packing>
- <property name="left_attach">4</property>
- <property name="top_attach">11</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">10</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color12">
+ <object class="GtkColorButton" id="colorbutton_background">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="title" translatable="yes">Pick a bright blue colour</property>
+ <property name="halign">start</property>
+ <property name="margin_right">18</property>
+ <property name="title" translatable="yes">Background colour</property>
</object>
<packing>
- <property name="left_attach">5</property>
- <property name="top_attach">11</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">10</property>
+ <property name="width">8</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color13">
+ <object class="GtkColorButton" id="colorbutton_foreground">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="title" translatable="yes">Pick a light magenta colour</property>
+ <property name="halign">start</property>
+ <property name="margin_right">18</property>
+ <property name="title" translatable="yes">Foreground colour</property>
</object>
<packing>
- <property name="left_attach">6</property>
- <property name="top_attach">11</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">9</property>
+ <property name="width">8</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color14">
+ <object class="GtkLabel" id="label_terminal_foreground">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="title" translatable="yes">Pick a light cyan colour</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">18</property>
+ <property name="label" translatable="yes">Foreground colour</property>
</object>
<packing>
- <property name="left_attach">7</property>
- <property name="top_attach">11</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">9</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="colorbutton_color15">
+ <object class="GtkLabel" id="label_keyboard_select_all2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="margin_right">18</property>
- <property name="title" translatable="yes">Pick a light white colour</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Increase font size</property>
</object>
<packing>
- <property name="left_attach">8</property>
- <property name="top_attach">11</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">7</property>
</packing>
</child>
<child>
- <object class="GtkLabel">
+ <object class="GtkLabel" id="label_keyboard_select_all3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="margin_left">18</property>
- <property name="label" translatable="yes">Use default system font</property>
+ <property name="label" translatable="yes">Decrease font size</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">8</property>
</packing>
</child>
<child>
- <object class="GtkSwitch">
+ <object class="GtkButton" id="button_keyboard_increase_font">
+ <property name="label">Increase</property>
+ <property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">(Host key +)</property>
<property name="halign">start</property>
- <signal name="activate" handler="remmina_pref_dialog_vte_font_on_toggled" swapped="no"/>
+ <signal name="clicked" handler="remmina_pref_dialog_on_key_chooser" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">7</property>
<property name="width">8</property>
</packing>
</child>
<child>
- <object class="GtkSwitch" id="switch_terminal_bold">
+ <object class="GtkButton" id="button_keyboard_decrease_font">
+ <property name="label">Decrease</property>
+ <property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">(Host key +)</property>
<property name="halign">start</property>
+ <signal name="clicked" handler="remmina_pref_dialog_on_key_chooser" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">8</property>
<property name="width">8</property>
</packing>
</child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="margin_left">18</property>
- <property name="label" translatable="yes">Allow bold text</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="position">6</property>
diff --git a/src/remmina_pref.c b/src/remmina_pref.c
index e62ebbba9..1e55faaa0 100644
--- a/src/remmina_pref.c
+++ b/src/remmina_pref.c
@@ -639,6 +639,19 @@ void remmina_pref_init(void)
else
remmina_pref.vte_shortcutkey_select_all = GDK_KEY_a;
+ if (g_key_file_has_key(gkeyfile, "remmina_pref", "vte_shortcutkey_increase_font", NULL))
+ remmina_pref.vte_shortcutkey_increase_font = g_key_file_get_integer(gkeyfile, "remmina_pref", "vte_shortcutkey_increase_font",
+ NULL);
+ else
+ remmina_pref.vte_shortcutkey_increase_font = GDK_KEY_Page_Up;
+
+ if (g_key_file_has_key(gkeyfile, "remmina_pref", "vte_shortcutkey_decrease_font", NULL))
+ remmina_pref.vte_shortcutkey_decrease_font = g_key_file_get_integer(gkeyfile, "remmina_pref", "vte_shortcutkey_decrease_font",
+ NULL);
+ else
+ remmina_pref.vte_shortcutkey_decrease_font = GDK_KEY_Page_Down;
+
+
/* If we have a color scheme file, we switch to it, GIO will merge it in the
* remmina.pref file */
if (g_file_test(remmina_colors_file, G_FILE_TEST_IS_REGULAR)) {
diff --git a/src/remmina_pref.h b/src/remmina_pref.h
index 2b3a32fb6..8f575829a 100644
--- a/src/remmina_pref.h
+++ b/src/remmina_pref.h
@@ -169,6 +169,8 @@ typedef struct _RemminaPref {
guint vte_shortcutkey_copy;
guint vte_shortcutkey_paste;
guint vte_shortcutkey_select_all;
+ guint vte_shortcutkey_increase_font;
+ guint vte_shortcutkey_decrease_font;
/* In View menu */
gboolean hide_toolbar;
gboolean small_toolbutton;
diff --git a/src/remmina_pref_dialog.c b/src/remmina_pref_dialog.c
index dd048358b..52be09225 100644
--- a/src/remmina_pref_dialog.c
+++ b/src/remmina_pref_dialog.c
@@ -346,6 +346,8 @@ void remmina_pref_on_dialog_destroy(GtkWidget *widget, gpointer user_data)
remmina_pref.vte_shortcutkey_copy = remmina_key_chooser_get_keyval(gtk_button_get_label(remmina_pref_dialog->button_keyboard_copy));
remmina_pref.vte_shortcutkey_paste = remmina_key_chooser_get_keyval(gtk_button_get_label(remmina_pref_dialog->button_keyboard_paste));
remmina_pref.vte_shortcutkey_select_all = remmina_key_chooser_get_keyval(gtk_button_get_label(remmina_pref_dialog->button_keyboard_select_all));
+ remmina_pref.vte_shortcutkey_increase_font = remmina_key_chooser_get_keyval(gtk_button_get_label(remmina_pref_dialog->button_keyboard_increase_font));
+ remmina_pref.vte_shortcutkey_decrease_font = remmina_key_chooser_get_keyval(gtk_button_get_label(remmina_pref_dialog->button_keyboard_decrease_font));
remmina_pref_save();
remmina_pref_init();
@@ -602,6 +604,8 @@ static void remmina_pref_dialog_init(void)
remmina_pref_dialog_set_button_label(remmina_pref_dialog->button_keyboard_copy, remmina_pref.vte_shortcutkey_copy);
remmina_pref_dialog_set_button_label(remmina_pref_dialog->button_keyboard_paste, remmina_pref.vte_shortcutkey_paste);
remmina_pref_dialog_set_button_label(remmina_pref_dialog->button_keyboard_select_all, remmina_pref.vte_shortcutkey_select_all);
+ remmina_pref_dialog_set_button_label(remmina_pref_dialog->button_keyboard_increase_font, remmina_pref.vte_shortcutkey_increase_font);
+ remmina_pref_dialog_set_button_label(remmina_pref_dialog->button_keyboard_decrease_font, remmina_pref.vte_shortcutkey_decrease_font);
remmina_plugin_manager_for_each_plugin(REMMINA_PLUGIN_TYPE_PREF, remmina_pref_dialog_add_pref_plugin, remmina_pref_dialog->dialog);
@@ -682,6 +686,8 @@ GtkDialog* remmina_pref_dialog_new(gint default_tab, GtkWindow *parent)
remmina_pref_dialog->button_keyboard_copy = GTK_BUTTON(GET_OBJECT("button_keyboard_copy"));
remmina_pref_dialog->button_keyboard_paste = GTK_BUTTON(GET_OBJECT("button_keyboard_paste"));
remmina_pref_dialog->button_keyboard_select_all = GTK_BUTTON(GET_OBJECT("button_keyboard_select_all"));
+ remmina_pref_dialog->button_keyboard_increase_font = GTK_BUTTON(GET_OBJECT("button_keyboard_increase_font"));
+ remmina_pref_dialog->button_keyboard_decrease_font = GTK_BUTTON(GET_OBJECT("button_keyboard_decrease_font"));
remmina_pref_dialog->label_terminal_foreground = GTK_LABEL(GET_OBJECT("label_terminal_foreground"));
remmina_pref_dialog->colorbutton_foreground = GTK_COLOR_BUTTON(GET_OBJECT("colorbutton_foreground"));
remmina_pref_dialog->label_terminal_background = GTK_LABEL(GET_OBJECT("label_terminal_background"));
diff --git a/src/remmina_pref_dialog.h b/src/remmina_pref_dialog.h
index 89d88aecb..e29fd79d5 100644
--- a/src/remmina_pref_dialog.h
+++ b/src/remmina_pref_dialog.h
@@ -111,6 +111,8 @@ typedef struct _RemminaPrefDialog {
GtkButton * button_keyboard_copy;
GtkButton * button_keyboard_paste;
GtkButton * button_keyboard_select_all;
+ GtkButton * button_keyboard_increase_font;
+ GtkButton * button_keyboard_decrease_font;
GtkLabel * label_terminal_cursor_color;
GtkLabel * label_terminal_normal_colors;
GtkLabel * label_terminal_bright_colors;
diff --git a/src/remmina_ssh_plugin.c b/src/remmina_ssh_plugin.c
index bf5d42f60..57d5982f0 100644
--- a/src/remmina_ssh_plugin.c
+++ b/src/remmina_ssh_plugin.c
@@ -58,11 +58,17 @@
#define REMMINA_PLUGIN_SSH_FEATURE_TOOL_COPY 1
#define REMMINA_PLUGIN_SSH_FEATURE_TOOL_PASTE 2
#define REMMINA_PLUGIN_SSH_FEATURE_TOOL_SELECT_ALL 3
+#define REMMINA_PLUGIN_SSH_FEATURE_TOOL_INCREASE_FONT 4
+#define REMMINA_PLUGIN_SSH_FEATURE_TOOL_DECREASE_FONT 5
#define GET_PLUGIN_DATA(gp) (RemminaPluginSshData *)g_object_get_data(G_OBJECT(gp), "plugin-data");
/** Palette colors taken from sakura */
#define PALETTE_SIZE 16
+/* Min fontsize and increase */
+#define FONT_SCALE 0.75
+#define SCALE_FACTOR 0.1
+#define FONT_MINIMAL_SIZE (PANGO_SCALE*6)
enum color_schemes { LINUX, TANGO, GRUVBOX, SOLARIZED_DARK, SOLARIZED_LIGHT, XTERM, CUSTOM };
@@ -408,6 +414,20 @@ remmina_plugin_ssh_vte_select_all(GtkMenuItem *menuitem, gpointer vte)
}
void
+remmina_plugin_ssh_vte_decrease_font(GtkMenuItem *menuitem, gpointer vte)
+{
+ TRACE_CALL(__func__);
+ vte_terminal_set_font_scale(VTE_TERMINAL(vte), vte_terminal_get_font_scale(VTE_TERMINAL(vte))-SCALE_FACTOR);
+}
+
+void
+remmina_plugin_ssh_vte_increase_font(GtkMenuItem *menuitem, gpointer vte)
+{
+ TRACE_CALL(__func__);
+ vte_terminal_set_font_scale(VTE_TERMINAL(vte), vte_terminal_get_font_scale(VTE_TERMINAL(vte))+SCALE_FACTOR);
+}
+
+void
remmina_plugin_ssh_vte_copy_clipboard(GtkMenuItem *menuitem, gpointer vte)
{
TRACE_CALL(__func__);
@@ -514,11 +534,15 @@ void remmina_plugin_ssh_popup_ui(RemminaProtocolWidget *gp)
GtkWidget *copy = gtk_menu_item_new_with_label(_("Copy (host + C)"));
GtkWidget *paste = gtk_menu_item_new_with_label(_("Paste (host + V)"));
GtkWidget *save = gtk_menu_item_new_with_label(_("Save session to file"));
+ GtkWidget *font_incr = gtk_menu_item_new_with_label(_("Increase font size (Host + Page_Up)"));
+ GtkWidget *font_decr = gtk_menu_item_new_with_label(_("Decrease font size (Host + Page_Down)"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), select_all);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), copy);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), paste);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), save);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), font_incr);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), font_decr);
g_signal_connect(G_OBJECT(gpdata->vte), "button_press_event",
G_CALLBACK(remmina_ssh_plugin_popup_menu), menu);
@@ -531,6 +555,10 @@ void remmina_plugin_ssh_popup_ui(RemminaProtocolWidget *gp)
G_CALLBACK(remmina_plugin_ssh_vte_paste_clipboard), gpdata->vte);
g_signal_connect(G_OBJECT(save), "activate",
G_CALLBACK(remmina_plugin_ssh_vte_save_session), gp);
+ g_signal_connect(G_OBJECT(font_incr), "activate",
+ G_CALLBACK(remmina_plugin_ssh_vte_increase_font), gpdata->vte);
+ g_signal_connect(G_OBJECT(font_decr), "activate",
+ G_CALLBACK(remmina_plugin_ssh_vte_decrease_font), gpdata->vte);
gtk_widget_show_all(menu);
}
@@ -912,6 +940,14 @@ remmina_plugin_ssh_call_feature(RemminaProtocolWidget *gp, const RemminaProtocol
case REMMINA_PLUGIN_SSH_FEATURE_TOOL_SELECT_ALL:
vte_terminal_select_all(VTE_TERMINAL(gpdata->vte));
return;
+ case REMMINA_PLUGIN_SSH_FEATURE_TOOL_INCREASE_FONT:
+ vte_terminal_set_font_scale(VTE_TERMINAL(gpdata->vte),
+ vte_terminal_get_font_scale(VTE_TERMINAL(gpdata->vte))+SCALE_FACTOR);
+ return;
+ case REMMINA_PLUGIN_SSH_FEATURE_TOOL_DECREASE_FONT:
+ vte_terminal_set_font_scale(VTE_TERMINAL(gpdata->vte),
+ vte_terminal_get_font_scale(VTE_TERMINAL(gpdata->vte))-SCALE_FACTOR);
+ return;
}
}
@@ -1000,6 +1036,8 @@ static RemminaProtocolFeature remmina_plugin_ssh_features[] =
{ REMMINA_PROTOCOL_FEATURE_TYPE_TOOL, REMMINA_PLUGIN_SSH_FEATURE_TOOL_COPY, N_("Copy"), N_("_Copy"), NULL },
{ REMMINA_PROTOCOL_FEATURE_TYPE_TOOL, REMMINA_PLUGIN_SSH_FEATURE_TOOL_PASTE, N_("Paste"), N_("_Paste"), NULL },
{ REMMINA_PROTOCOL_FEATURE_TYPE_TOOL, REMMINA_PLUGIN_SSH_FEATURE_TOOL_SELECT_ALL, N_("Select all"), N_("_Select all"), NULL },
+ { REMMINA_PROTOCOL_FEATURE_TYPE_TOOL, REMMINA_PLUGIN_SSH_FEATURE_TOOL_INCREASE_FONT, N_("Increase font size"), N_("_Increase font size"), NULL },
+ { REMMINA_PROTOCOL_FEATURE_TYPE_TOOL, REMMINA_PLUGIN_SSH_FEATURE_TOOL_DECREASE_FONT, N_("Decrease font size"), N_("_Decrease font size"), NULL },
{ REMMINA_PROTOCOL_FEATURE_TYPE_END, 0, NULL, NULL, NULL }
};
@@ -1205,7 +1243,8 @@ remmina_ssh_plugin_register(void)
remmina_plugin_ssh_features[0].opt3 = GUINT_TO_POINTER(remmina_pref.vte_shortcutkey_copy);
remmina_plugin_ssh_features[1].opt3 = GUINT_TO_POINTER(remmina_pref.vte_shortcutkey_paste);
remmina_plugin_ssh_features[2].opt3 = GUINT_TO_POINTER(remmina_pref.vte_shortcutkey_select_all);
- remmina_plugin_ssh_features[3].opt3 = GUINT_TO_POINTER(remmina_pref.vte_shortcutkey_select_all);
+ remmina_plugin_ssh_features[3].opt3 = GUINT_TO_POINTER(remmina_pref.vte_shortcutkey_increase_font);
+ remmina_plugin_ssh_features[4].opt3 = GUINT_TO_POINTER(remmina_pref.vte_shortcutkey_decrease_font);
remmina_plugin_service = &remmina_plugin_manager_service;
diff --git a/src/remmina_ssh_plugin.h b/src/remmina_ssh_plugin.h
index 18529da79..a933bab20 100644
--- a/src/remmina_ssh_plugin.h
+++ b/src/remmina_ssh_plugin.h
@@ -59,6 +59,8 @@ void remmina_plugin_ssh_vte_terminal_set_encoding_and_pty(VteTerminal *terminal,
void remmina_plugin_ssh_vte_select_all(GtkMenuItem *menuitem, gpointer vte);
void remmina_plugin_ssh_vte_copy_clipboard(GtkMenuItem *menuitem, gpointer vte);
void remmina_plugin_ssh_vte_paste_clipboard(GtkMenuItem *menuitem, gpointer vte);
+void remmina_plugin_ssh_vte_decrease_font(GtkMenuItem *menuitem, gpointer vte);
+void remmina_plugin_ssh_vte_increase_font(GtkMenuItem *menuitem, gpointer vte);
gboolean remmina_ssh_plugin_popup_menu(GtkWidget *widget, GdkEvent *event, GtkWidget *menu);
#endif