diff --git a/data/resources/gtk/ui/main.ui b/data/resources/gtk/ui/main.ui
index 10221b5..79303f7 100644
--- a/data/resources/gtk/ui/main.ui
+++ b/data/resources/gtk/ui/main.ui
@@ -226,14 +226,13 @@
1
- 5
+ 6
+
+
+ edit_account_icon_error
+ True
+ False
+ 5
+ True
+ 0
+ False
+ 0
+
+
+ 1
+ 4
+
+
+
+
+
@@ -691,7 +700,7 @@
False
5
True
- 23
+ 0
False
0
diff --git a/data/resources/style.css b/data/resources/style.css
index 3673400..fc5f82e 100644
--- a/data/resources/style.css
+++ b/data/resources/style.css
@@ -7,13 +7,7 @@
border-color: @error_color;
}
-/*
-* Note: apparently pseudo class :indeterminate
-* works (also) with widget state StateFlags::INCONSISTENT.
-*
-* StateFlags::INDETERMINATE is deprecated.
-*/
-.edit_account_input_secret_frame:indeterminate {
+.edit_account_input_secret_frame.error {
border-color: @error_color;
}
@@ -90,7 +84,7 @@
font-size: 80%;
}
-#add_group_icon_error {
+#add_group_icon_error, #edit_account_icon_error {
color: @error_color;
}
diff --git a/po/en_GB.po b/po/en_GB.po
index f8ddbeb..fd01539 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -181,3 +181,9 @@ msgstr "Name of group"
msgid "Name of account"
msgstr "Name of account"
+
+msgid "Group name already exists"
+msgstr "Group name already exists"
+
+msgid "Account name already exists"
+msgstr "Account name already exists"
diff --git a/po/fr.po b/po/fr.po
index 49c0424..75d2cbd 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -181,3 +181,9 @@ msgstr "Nom du groupe"
msgid "Name of account"
msgstr "Nom du compte"
+
+msgid "Group name already exists"
+msgstr "Un groupe existe avec ce nom"
+
+msgid "Account name already exists"
+msgstr "Un compte existe avec ce nom"
\ No newline at end of file
diff --git a/src/helpers/database.rs b/src/helpers/database.rs
index 127ee5b..021e641 100644
--- a/src/helpers/database.rs
+++ b/src/helpers/database.rs
@@ -155,6 +155,23 @@ impl Database {
.map_err(RepositoryError::SqlError)
}
+ pub fn account_exists(connection: &Connection, name: &str, group_id: u32) -> Result