mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-30 06:40:39 +00:00
Fix clone url validity check
This commit is contained in:
parent
a3cfb3d0da
commit
c65df17003
1 changed files with 5 additions and 1 deletions
|
@ -81,7 +81,9 @@ public class CloneDialog : Gtk.Dialog
|
|||
string ?tooltip_text = null;
|
||||
string ?icon_name = null;
|
||||
|
||||
if (d_entry_url.text != "")
|
||||
var is_valid = (d_entry_url.text != "");
|
||||
|
||||
if (!is_valid)
|
||||
{
|
||||
icon_name = "dialog-warning-symbolic";
|
||||
tooltip_text = _("The URL introduced is not supported");
|
||||
|
@ -89,6 +91,8 @@ public class CloneDialog : Gtk.Dialog
|
|||
|
||||
d_entry_url.set_icon_from_icon_name(Gtk.EntryIconPosition.SECONDARY, icon_name);
|
||||
d_entry_url.set_icon_tooltip_text(Gtk.EntryIconPosition.SECONDARY, tooltip_text);
|
||||
|
||||
set_response_sensitive(Gtk.ResponseType.OK, is_valid);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue