GNOME Bugzilla – Bug 770160
file-conflict-dialog: separate file logic from UI management
Last modified: 2016-08-22 21:42:21 UTC
See patch.
Created attachment 333716 [details] [review] file-conflict-dialog: separate file logic from UI management In Nautilus, file conflicts are handled by a specific dialog. Previously, the dialog class managed both the UI and the related nautilus files. This lead to it being inflexible due to operation specific logic being mixed with the rest of the functionality. In order to change this, move file logic to a separate module and add methods for controlling the UI elements in the dialog. Create an operation-manager module to handle dialog controlling. Move anything related to Nautilus files from the dialog class to the new module.
Review of attachment 333716 [details] [review]: excellent ::: src/nautilus-file-operations.c @@ +52,3 @@ #include <gio/gio.h> #include <glib.h> +#include "nautilus-operations-ui-manager.h" if I'm not mistaken we could remove the conflict-dialog include right? ::: src/nautilus-operations-ui-manager.c @@ +40,3 @@ +{ + ContextInvokeData data; + /* Allow only one thread at a time to invoke a main context so we don't the main context @@ +59,3 @@ + &data); + + while (!data.completed) { Explain this please. It can be done either in the function header, which is probably the best place to do it, on how we make this thread sync and why @@ +125,3 @@ + if (source_is_directory) { + primary_text = g_strdup_printf + (_("Merge folder “%s”?"), don't multiline the first line @@ +128,3 @@ + destination_name); + + message_extra = don't multiline the first line
Created attachment 333823 [details] [review] file-conflict-dialog: separate file logic from UI management In Nautilus, file conflicts are handled by a specific dialog. Previously, the dialog class managed both the UI and the related nautilus files. This lead to it being inflexible due to operation specific logic being mixed with the rest of the functionality. In order to change this, move file logic to a separate module and add methods for controlling the UI elements in the dialog. Create an operation-manager module to handle dialog controlling. Move anything related to Nautilus files from the dialog class to the new module.
Created attachment 333824 [details] [review] file-conflict-dialog: separate file logic from UI management In Nautilus, file conflicts are handled by a specific dialog. Previously, the dialog class managed both the UI and the related nautilus files. This lead to it being inflexible due to operation specific logic being mixed with the rest of the functionality. In order to change this, move file logic to a separate module and add methods for controlling the UI elements in the dialog. Create an operation-manager module to handle dialog controlling. Move anything related to Nautilus files from the dialog class to the new module.
Review of attachment 333824 [details] [review]: ::: src/nautilus-operations-ui-manager.c @@ +77,3 @@ +} + +typedef struct FileConflictDialogData { it's enough with the last one, not need to put here FileConflictDialogData
Created attachment 333849 [details] [review] file-conflict-dialog: separate file logic from UI management In Nautilus, file conflicts are handled by a specific dialog. Previously, the dialog class managed both the UI and the related nautilus files. This lead to it being inflexible due to operation specific logic being mixed with the rest of the functionality. In order to change this, move file logic to a separate module and add methods for controlling the UI elements in the dialog. Create an operation-manager module to handle dialog controlling. Move anything related to Nautilus files from the dialog class to the new module.
Review of attachment 333849 [details] [review]: yep!
Attachment 333849 [details] pushed as fd01842 - file-conflict-dialog: separate file logic from UI management