Commit dbf4454c authored by David's avatar David

Ajout de la fonction de reprise d'une connexion enregistré

parent 19f5e141
......@@ -1307,6 +1307,22 @@ Site : http://xsshfs.zici.fr
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="bouton_reprendre">
<property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_bouton_reprendre_clicked" swapped="no"/>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="bouton_monter_sav">
<property name="label">gtk-connect</property>
......@@ -1321,7 +1337,7 @@ Site : http://xsshfs.zici.fr
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
</widget>
......
......@@ -276,6 +276,21 @@ sub on_param_save_clicked{
$gladexml->get_widget('Param_Dialog')->hide;
&param_ini
}
sub on_bouton_reprendre_clicked {
my $nom_connexion_enregistree = $gladexml->get_widget('connexion_sav_combo')->entry->get_text();
if ($nom_connexion_enregistree ne $params->{comboSetText} && $nom_connexion_enregistree ne "") {
$gladexml->get_widget('user')->set_text($configData->{"$nom_connexion_enregistree"}->{user});
$gladexml->get_widget('host')->set_text($configData->{"$nom_connexion_enregistree"}->{host});
$gladexml->get_widget('dir')->set_text($configData->{"$nom_connexion_enregistree"}->{dir});
$gladexml->get_widget('mountpoint')->set_text($configData->{"$nom_connexion_enregistree"}->{mountpoint});
$gladexml->get_widget('port')->set_value($configData->{"$nom_connexion_enregistree"}->{port});
debug($configData->{"$nom_connexion_enregistree"}->{port});
if ($configData->{"$nom_connexion_enregistree"}->{keyssh}) {
$gladexml->get_widget('keyssh')->set_filename($configData->{"$nom_connexion_enregistree"}->{keyssh});
}
$gladexml->get_widget('options')->set_text($configData->{"$nom_connexion_enregistree"}->{options});
}
}
############
# Fonction / Action du progdefault valuesramme
############
......@@ -408,7 +423,7 @@ sub Enregistrer_connexion {
host => $gladexml->get_widget('host')->get_text(),
dir => $gladexml->get_widget('dir')->get_text(),
mountpoint => $gladexml->get_widget('mountpoint')->get_text(),
port => $gladexml->get_widget('port')->get_text(),
port => $gladexml->get_widget('port')->get_value(),
options => $gladexml->get_widget('options')->get_text(),
keyssh => $data_keyssh
};
......@@ -490,11 +505,7 @@ sub umount_sshfs {
}
# Vide le formulaire graphique
sub nettoyer_fomulaire {
$gladexml->get_widget('user')->set_text($ENV{ USER});
$gladexml->get_widget('host')->set_text("");
$gladexml->get_widget('dir')->set_text("");
$gladexml->get_widget('mountpoint')->set_text("");
$gladexml->get_widget('port')->set_text("22");
&param_ini
}
sub touch {
my $file = shift;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment