[blam] AddChannelDialog: make OK button sensitive when url comes from the clipboard
- From: Carlos Martín Nieto <cmartin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blam] AddChannelDialog: make OK button sensitive when url comes from the clipboard
- Date: Sat, 15 Jun 2013 20:48:39 +0000 (UTC)
commit 40297efd5e5b5df10a3ca6eb8c6831117b8eaecf
Author: Carlos Martín Nieto <cmn dwim me>
Date: Sat Jun 15 22:45:38 2013 +0200
AddChannelDialog: make OK button sensitive when url comes from the clipboard
The button needs to be sensitive if the text comes from the the
clipboard as well, instead of only when the user types something.
src/AddChannelDialog.cs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/AddChannelDialog.cs b/src/AddChannelDialog.cs
index 961ed4b..48bdb26 100644
--- a/src/AddChannelDialog.cs
+++ b/src/AddChannelDialog.cs
@@ -6,6 +6,11 @@ namespace Imendio.Blam
{
public partial class AddChannelDialog : Gtk.Dialog
{
+ bool OkSensitive()
+ {
+ return !string.IsNullOrEmpty(Url);
+ }
+
public AddChannelDialog(Gtk.Window window)
{
this.Build();
@@ -20,11 +25,12 @@ namespace Imendio.Blam
}
});
+ buttonOk.Sensitive = OkSensitive();
UrlEntry.Activated += OnEntryActivated;
UsernameEntry.Activated += OnEntryActivated;
PasswordEntry.Activated += OnEntryActivated;
- UrlEntry.Changed += (sender, e) => buttonOk.Sensitive = !String.IsNullOrEmpty(Url);
+ UrlEntry.Changed += (sender, e) => buttonOk.Sensitive = OkSensitive();
}
public string Username {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]