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.glade74
-rw-r--r--data/ui/remmina_unlock.glade116
-rw-r--r--src/remmina_pref.c6
-rw-r--r--src/remmina_pref.h1
-rw-r--r--src/remmina_pref_dialog.c2
-rw-r--r--src/remmina_pref_dialog.h1
6 files changed, 146 insertions, 54 deletions
diff --git a/data/ui/remmina_preferences.glade b/data/ui/remmina_preferences.glade
index 3fdb949ff..1a7b5ffc0 100644
--- a/data/ui/remmina_preferences.glade
+++ b/data/ui/remmina_preferences.glade
@@ -1320,52 +1320,12 @@ Author: Antenore Gatta
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkSwitch">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">start</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</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="hexpand">True</property>
- <property name="label" translatable="yes">Use master password</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="change-master-password">
- <property name="label" translatable="yes">Change master password</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">You can set a master password that will act like a screensaver.</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</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="hexpand">True</property>
- <property name="label" translatable="yes">Passwords and encryption</property>
+ <property name="label" translatable="yes">Master password</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -1377,43 +1337,49 @@ Author: Antenore Gatta
</packing>
</child>
<child>
- <object class="GtkSwitch">
+ <object class="GtkSwitch" id="switch_security_use_master_password">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">When activated, some widget will require you to authenticate with your operating system password</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">When activated, some widget will require you to authenticate with your operating system password</property>
<property name="halign">start</property>
+ <property name="margin_left">16</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes">Auto lock after defined timout</property>
+ <property name="label" translatable="yes">Use master password</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="password-timeout">
+ <object class="GtkLabel">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Seconds before to lock Remmina</property>
- <property name="halign">end</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="placeholder_text" translatable="yes">120</property>
- <property name="input_purpose">digits</property>
+ <property name="label" translatable="yes">File encryption</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
+ <property name="width">3</property>
</packing>
</child>
</object>
diff --git a/data/ui/remmina_unlock.glade b/data/ui/remmina_unlock.glade
new file mode 100644
index 000000000..5ff83b01c
--- /dev/null
+++ b/data/ui/remmina_unlock.glade
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkDialog">
+ <property name="can_focus">False</property>
+ <property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="vbox">
+ <object class="GtkBox">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button_unlock_cancel">
+ <property name="label" translatable="yes">Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button_unlock">
+ <property name="label" translatable="yes">Unlock</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <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="hexpand">True</property>
+ <property name="label" translatable="yes">Unlock Remmina</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">18</property>
+ <property name="margin_right">6</property>
+ <property name="label" translatable="yes">Password</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="entry_unlock">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Unix account password</property>
+ <property name="halign">start</property>
+ <property name="margin_left">6</property>
+ <property name="hexpand">False</property>
+ <property name="visibility">False</property>
+ <property name="invisible_char">•</property>
+ <property name="input_purpose">password</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/src/remmina_pref.c b/src/remmina_pref.c
index a3a3e25c8..94c372b97 100644
--- a/src/remmina_pref.c
+++ b/src/remmina_pref.c
@@ -281,6 +281,11 @@ void remmina_pref_init(void)
else
remmina_pref.save_view_mode = TRUE;
+ if (g_key_file_has_key(gkeyfile, "remmina_pref", "use_master_password", NULL))
+ remmina_pref.use_master_password = g_key_file_get_boolean(gkeyfile, "remmina_pref", "use_master_password", NULL);
+ else
+ remmina_pref.use_master_password = TRUE;
+
if (g_key_file_has_key(gkeyfile, "remmina_pref", "fullscreen_on_auto", NULL))
remmina_pref.fullscreen_on_auto = g_key_file_get_boolean(gkeyfile, "remmina_pref", "fullscreen_on_auto", NULL);
else
@@ -671,6 +676,7 @@ gboolean remmina_pref_save(void)
g_key_file_set_string(gkeyfile, "remmina_pref", "remmina_file_name", remmina_pref.remmina_file_name);
g_key_file_set_boolean(gkeyfile, "remmina_pref", "deny_screenshot_clipboard", remmina_pref.deny_screenshot_clipboard);
g_key_file_set_boolean(gkeyfile, "remmina_pref", "save_view_mode", remmina_pref.save_view_mode);
+ g_key_file_set_boolean(gkeyfile, "remmina_pref", "use_master_password", remmina_pref.use_master_password);
g_key_file_set_integer(gkeyfile, "remmina_pref", "floating_toolbar_placement", remmina_pref.floating_toolbar_placement);
g_key_file_set_integer(gkeyfile, "remmina_pref", "toolbar_placement", remmina_pref.toolbar_placement);
g_key_file_set_boolean(gkeyfile, "remmina_pref", "prevent_snap_welcome_message", remmina_pref.prevent_snap_welcome_message);
diff --git a/src/remmina_pref.h b/src/remmina_pref.h
index ae6426f55..001a94066 100644
--- a/src/remmina_pref.h
+++ b/src/remmina_pref.h
@@ -116,6 +116,7 @@ typedef struct _RemminaPref {
gboolean deny_screenshot_clipboard;
const gchar *screenshot_name;
gboolean save_view_mode;
+ gboolean use_master_password;
gint default_action;
gint scale_quality;
gint auto_scroll_step;
diff --git a/src/remmina_pref_dialog.c b/src/remmina_pref_dialog.c
index f08b3717b..edbe8379a 100644
--- a/src/remmina_pref_dialog.c
+++ b/src/remmina_pref_dialog.c
@@ -166,6 +166,7 @@ void remmina_pref_on_dialog_destroy(GtkWidget *widget, gpointer user_data)
remmina_pref.screenshot_name = gtk_entry_get_text(remmina_pref_dialog->entry_options_screenshot_name);
remmina_pref.deny_screenshot_clipboard = gtk_switch_get_active(GTK_SWITCH(remmina_pref_dialog->switch_options_deny_screenshot_clipboard));
remmina_pref.save_view_mode = gtk_switch_get_active(GTK_SWITCH(remmina_pref_dialog->switch_options_remember_last_view_mode));
+ remmina_pref.use_master_password = gtk_switch_get_active(GTK_SWITCH(remmina_pref_dialog->switch_security_use_master_password));
remmina_pref.fullscreen_on_auto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remmina_pref_dialog->checkbutton_appearance_fullscreen_on_auto));
remmina_pref.always_show_tab = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remmina_pref_dialog->checkbutton_appearance_show_tabs));
remmina_pref.hide_connection_toolbar = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remmina_pref_dialog->checkbutton_appearance_hide_toolbar));
@@ -380,6 +381,7 @@ static void remmina_pref_dialog_init(void)
gtk_dialog_set_default_response(GTK_DIALOG(remmina_pref_dialog->dialog), GTK_RESPONSE_CLOSE);
gtk_switch_set_active(GTK_SWITCH(remmina_pref_dialog->switch_options_remember_last_view_mode), remmina_pref.save_view_mode);
+ gtk_switch_set_active(GTK_SWITCH(remmina_pref_dialog->switch_security_use_master_password), remmina_pref.use_master_password);
gtk_switch_set_active(GTK_SWITCH(remmina_pref_dialog->switch_options_deny_screenshot_clipboard), remmina_pref.deny_screenshot_clipboard);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remmina_pref_dialog->checkbutton_appearance_fullscreen_on_auto), remmina_pref.fullscreen_on_auto);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remmina_pref_dialog->checkbutton_appearance_show_tabs), remmina_pref.always_show_tab);
diff --git a/src/remmina_pref_dialog.h b/src/remmina_pref_dialog.h
index 8005df1d9..f12048fb8 100644
--- a/src/remmina_pref_dialog.h
+++ b/src/remmina_pref_dialog.h
@@ -54,6 +54,7 @@ typedef struct _RemminaPrefDialog {
GtkEntry *entry_options_screenshot_name;
GtkSwitch *switch_options_deny_screenshot_clipboard;
GtkSwitch *switch_options_remember_last_view_mode;
+ GtkSwitch *switch_security_use_master_password;
GtkCheckButton *checkbutton_options_save_settings;
GtkCheckButton *checkbutton_appearance_fullscreen_on_auto;
GtkCheckButton *checkbutton_appearance_show_tabs;