After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658060 - Improve user interaction during web application creation
Improve user interaction during web application creation
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-02 14:55 UTC by Claudio Saavedra
Modified: 2011-09-05 20:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ask the user for confirmation before overwriting web applications (6.74 KB, patch)
2011-09-02 14:55 UTC, Claudio Saavedra
committed Details | Review
Display a notification if the web application saving fails (2.17 KB, patch)
2011-09-02 14:55 UTC, Claudio Saavedra
committed Details | Review

Description Claudio Saavedra 2011-09-02 14:55:35 UTC
Two things are currently not handled nicely:

- If a web application name is already used, the user is not warned and bad things happen.
- If the web application saving process fails, there are no messages to the user.

The two patches below fix this.
Comment 1 Claudio Saavedra 2011-09-02 14:55:37 UTC
Created attachment 195484 [details] [review]
Ask the user for confirmation before overwriting web applications

Show a confirmation dialog and, in case the user confirms, delete the
old application before saving a new one.
Comment 2 Claudio Saavedra 2011-09-02 14:55:41 UTC
Created attachment 195485 [details] [review]
Display a notification if the web application saving fails
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2011-09-04 19:30:40 UTC
Review of attachment 195484 [details] [review]:

Looks good to my not so demanding eyes.

::: embed/ephy-web-view.c
@@ +49,3 @@
 #include "ephy-settings.h"
 #include "ephy-string.h"
+#include "ephy-web-app-utils.h"

used?
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2011-09-04 19:34:32 UTC
Review of attachment 195485 [details] [review]:

Shouldn't this warning be inside Epiphany instead of in the shell?

We are notifying of success in the shell because the web-app is a new application to all effects, but if it failed to be created I think that "conceptually" the action never left Epiphany's domain.
Comment 5 Xan Lopez 2011-09-04 22:07:40 UTC
Review of attachment 195484 [details] [review]:

You can commit if you at least change the Yes/No thing :)

::: embed/ephy-web-view.c
@@ +49,3 @@
 #include "ephy-settings.h"
 #include "ephy-string.h"
+#include "ephy-web-app-utils.h"

As Diego said this seems unused.

::: src/window-commands.c
@@ +528,3 @@
+  dialog = gtk_message_dialog_new (parent, 0,
+                                   GTK_MESSAGE_QUESTION,
+                                   GTK_BUTTONS_YES_NO,

Yes/No dialogs are evil. Let's do Overwrite/Cancel ?

@@ +560,3 @@
+				ephy_delete_web_application (gtk_entry_get_text (GTK_ENTRY (data->entry)));
+			} else {
+				g_free (profile_dir);

Nitpick: you can save the return value of g_file_test and free the string right after.
Comment 6 Xan Lopez 2011-09-05 18:39:49 UTC
Review of attachment 195485 [details] [review]:

I think it's fine to use a shell notification in both cases, to keep symmetry.
Comment 7 Claudio Saavedra 2011-09-05 20:05:50 UTC
(In reply to comment #3)
> Review of attachment 195484 [details] [review]:
> 
> Looks good to my not so demanding eyes.
> 
> ::: embed/ephy-web-view.c
> @@ +49,3 @@
>  #include "ephy-settings.h"
>  #include "ephy-string.h"
> +#include "ephy-web-app-utils.h"
> 
> used?

Now it is :)
Comment 8 Claudio Saavedra 2011-09-05 20:38:42 UTC
Thank you both for reviewing!

Attachment 195484 [details] pushed as 7e16cb6 - Ask the user for confirmation before overwriting web applications
Attachment 195485 [details] pushed as aada5fc - Display a notification if the web application saving fails