mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-29 00:15:15 +00:00
Clean-up spaces before/after URI in connection dialog
When starting remote-viewer with no argument, a connection dialog is shown. If the URI the user types in this dialog as trailing or leading spaces, then connection will fail because remote-viewer will keep them as if they were significant. This commit makes sure we remove spaces at the beginning/end of the URI before trying to use it. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1024199
This commit is contained in:
parent
39feb118b5
commit
69ffdb50b9
@ -918,6 +918,7 @@ connect_dialog(gchar **uri)
|
||||
gtk_widget_show_all(dialog);
|
||||
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
|
||||
*uri = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
|
||||
g_strstrip(*uri);
|
||||
retval = 0;
|
||||
} else {
|
||||
*uri = NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user