From 2d9f45f4bd6dd8debfae76483432701595594f04 Mon Sep 17 00:00:00 2001
From: inso <insomniak.fr@gmaiL.com>
Date: Tue, 17 May 2016 20:40:45 +0200
Subject: [PATCH] Edit account should be explicit

---
 res/ui/account_cfg.ui                | 2 +-
 src/sakia/gui/process_cfg_account.py | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/res/ui/account_cfg.ui b/res/ui/account_cfg.ui
index bae5dd52..6454c71d 100644
--- a/res/ui/account_cfg.ui
+++ b/res/ui/account_cfg.ui
@@ -46,7 +46,7 @@
           <item>
            <layout class="QHBoxLayout" name="horizontalLayout">
             <item>
-             <widget class="QLabel" name="label">
+             <widget class="QLabel" name="label_action">
               <property name="text">
                <string>Account name (uid)</string>
               </property>
diff --git a/src/sakia/gui/process_cfg_account.py b/src/sakia/gui/process_cfg_account.py
index b65ed106..401c229a 100644
--- a/src/sakia/gui/process_cfg_account.py
+++ b/src/sakia/gui/process_cfg_account.py
@@ -165,10 +165,13 @@ class ProcessConfigureAccount(QDialog, Ui_AccountConfigurationDialog):
             self.setWindowTitle(self.tr("New account"))
             self.button_delete.hide()
         else:
+            self.label_action.setText("Edit account uid")
+            self.edit_account_name.setPlaceholderText(self.account.name)
             self.stacked_pages.removeWidget(self.stacked_pages.widget(1))
             step_init.next_step = step_communities
             self.button_next.setEnabled(True)
             self.stacked_pages.currentWidget()
+
             self.setWindowTitle(self.tr("Configure {0}".format(self.account.name)))
 
     def open_process_add_community(self):
@@ -221,10 +224,10 @@ class ProcessConfigureAccount(QDialog, Ui_AccountConfigurationDialog):
     @asyncify
     async def action_delete_account(self, checked=False):
         reply = await QAsyncMessageBox.question(self, self.tr("Warning"),
-                                     self.tr("""This action will delete your account locally.
+                                     self.tr("""This action will delete your account ({0}) locally.
 Please note your key parameters (salt and password) if you wish to recover it later.
 Your account won't be removed from the networks it joined.
-Are you sure ?"""))
+Are you sure ?""").format(self.app.current_account.name))
         if reply == QMessageBox.Yes:
             account = self.app.current_account
             await self.app.delete_account(account)
-- 
GitLab