On Sat, Jul 28, 2012 at 11:23:08AM +0200, Hans de Goede wrote: > The USB errors passed into the error signal handlers are somewhat lowlevel > and quite detailed. Also they usually already contain a colon. so instead of > prefixing them with "USB redirection error", use USB Redirection Error as the > primary dialog text, and make the detailed message the secondary dialog text. > > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> > --- > src/virt-viewer-app.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c > index def52c5..47949d9 100644 > --- a/src/virt-viewer-app.c > +++ b/src/virt-viewer-app.c > @@ -1153,7 +1153,18 @@ static void virt_viewer_app_usb_failed(VirtViewerSession *session G_GNUC_UNUSED, > const gchar *msg, > VirtViewerApp *self) > { > - virt_viewer_app_simple_message_dialog(self, _("USB redirection error: %s"), msg); > + GtkWindow *window = GTK_WINDOW(virt_viewer_window_get_window(self->priv->main_window)); > + GtkWidget *dialog = gtk_message_dialog_new(window, > + GTK_DIALOG_MODAL | > + GTK_DIALOG_DESTROY_WITH_PARENT, > + GTK_MESSAGE_ERROR, > + GTK_BUTTONS_OK, > + _("USB Redirection Error")); > + > + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), > + "%s", msg); > + gtk_dialog_run(GTK_DIALOG(dialog)); > + gtk_widget_destroy(dialog); > } > > static void ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|