On Mon, Jan 23, 2017 at 05:01:34PM -0200, Eduardo Lima (Etrunko) wrote: > >> + > >> +static void > >> +fetch_iso_names_cb(OvirtForeignMenu *foreign_menu, > >> + GAsyncResult *result, > >> + RemoteViewerISOListDialog *self) > >> +{ > >> + RemoteViewerISOListDialogPrivate *priv = self->priv; > >> + GError *error = NULL; > >> + GList *iso_list; > >> + > >> + iso_list = ovirt_foreign_menu_fetch_iso_names_finish(foreign_menu, result, &error); > >> + > >> + if (!iso_list) { > >> + const gchar *msg = error ? error->message : _("Failed to fetch CD names"); > >> + gchar *markup = g_strdup_printf("<b>%s</b>", msg); > >> + > >> + gtk_label_set_markup(GTK_LABEL(priv->status), markup); > >> + gtk_spinner_stop(GTK_SPINNER(priv->spinner)); > >> + remote_viewer_iso_list_dialog_show_error(self, msg); > >> + gtk_dialog_set_response_sensitive(GTK_DIALOG(self), GTK_RESPONSE_NONE, TRUE); > >> + g_free(markup); > >> + g_clear_error(&error); > > > > I'd also close 'self' when the error message is dismissed (so you don't > > really need to set a label in the iso dialog). > > I would keep it like this, because it can be a temporary networking > problem, and user can hit the reload button right away, instead of going > to the main menu and opening the dialog again. This happened to me > during one of my tests, where I had a DNS query failure which did not > happen the second time. And for me it's useless as the most common error I get is a certificate error which is not transient, and I need to close 2 error dialogs instead of one. If the use case you want to promote is an easy way to retry in case there was a temporary network issue, why do we have a "dismiss" button to click first before hitting refresh, rather than having the dialog directly offer the option to retry? Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list