summaryrefslogtreecommitdiff
path: root/src/nautilus-new-folder-dialog-controller.c
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2018-07-31 18:39:02 +0100
committerErnestas Kulik <ernestas.kulik@gmail.com>2018-08-02 11:40:32 +0000
commit1dfc03550ebc0844bc471effe40382a56e87155c (patch)
treedd64cf0821d4afd811e908811376f4a05c061554 /src/nautilus-new-folder-dialog-controller.c
parent5198b5e2104f7f7a538c6bd03a50f17561ec2ef7 (diff)
downloadnautilus-1dfc03550ebc0844bc471effe40382a56e87155c.tar.gz
file-name-widget: Warn when name exceeds size limit
An warning for names exceeding the size limit has been introduced in 122f201dcf356460a30a7b260730bcfc7246a614 for the rename popover. This would be useful for the compress and new folder dialogs as well. So, make all file name widget derivatives share this feature.
Diffstat (limited to 'src/nautilus-new-folder-dialog-controller.c')
-rw-r--r--src/nautilus-new-folder-dialog-controller.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nautilus-new-folder-dialog-controller.c b/src/nautilus-new-folder-dialog-controller.c
index 52b6e217b..99dcc2f23 100644
--- a/src/nautilus-new-folder-dialog-controller.c
+++ b/src/nautilus-new-folder-dialog-controller.c
@@ -64,6 +64,11 @@ nautilus_new_folder_dialog_controller_name_is_valid (NautilusFileNameWidgetContr
is_valid = FALSE;
*error_message = _("A folder cannot be called “..”.");
}
+ else if (nautilus_file_name_widget_controller_is_name_too_long (self, name))
+ {
+ is_valid = FALSE;
+ *error_message = _("Folder name is too long.");
+ }
if (is_valid && g_str_has_prefix (name, "."))
{