Re: Needed information regarding solving File Renaming Bug



Hi David,

I wanted to ask you some things about the review of the patch:
https://bugzilla.gnome.org/attachment.cgi?id=322800&action="">


@@ +680,3 @@
+                    else if(error->code == G_FILE_ERROR_NAMETOOLONG && !multiple_files)
+                    {
+                        msgdialog = gtk_message_dialog_new (GTK_WINDOW (MainWindow),

How can the user resolve the dialogue? It informs the user that the filename is too long but does not give the user an opportunity to resolve the problem. Additionally, the user is not given the name of the problematic file.

Should we create here a dialog with a text box for the user to enter a new filename ? what do you think will be better here.
  
@@ +1853,3 @@
+void ET_File_Name_Check_Length (ET_File *ETFile, gchar *filename_utf8)
+{
+ ET_File_Description *ETFileDescription; There's not much need to have this as a variable, as it is never modified and used only once.
 
we will need a variable here as we need to use it in the switch case to decide the file type.
correct me if I am wrong regarding this.

@@ +1875,3 @@
+#endif
+ default:
+ if ( (exceed_size = (strlen(basename) - 251)) > 0 ) // 255 - 4 (extension) Are all filename extensions 4 characters (3 characters for the extension plus a full stop)?
 
yes. we will need to have seperate cases for flac, opus which have 5 characters including dot.

Regards,
Pranav


On Tue, Mar 1, 2016 at 8:40 PM, David King <amigadave amigadave com> wrote:
Hi Pranav

On 2016-03-01 17:52, Pranav Ganorkar <pranavg189 gmail com> wrote:
If you are renaming several hundred files, do you think that the user
should be prompted to enter a new filename for each one?

Yes, that can be a concern. then in my opinion, automatically truncating
the filename could help. But I want to know why the previous implemention
failed in doing this ? Why was it removed ?

The previous implementation was not used. I have no idea why, as EasyTAG did not use a revision control system, but every place that called into it was commented out.

Something to think about is the difference in behaviour between automatically renaming files (for example, a whole album or more with the scanner dialog) or a single rename (such as renaming a directory or an individual file based on user input).

For the "single" rename case, you could give immediate feedback as to whether the name would be too long, while for the "multiple" (or automatic) case you would probably just truncate the name until the length was the maximum. There might be some other cases, and automated renaming with only a few files could justify confirmation for each file (especially if only a subset of files had names that were too long).

--
http://amigadave.com/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]