[gitg] Use set_response_sensitive instead of directly use set_sensitive
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Use set_response_sensitive instead of directly use set_sensitive
- Date: Tue, 16 Apr 2013 13:39:45 +0000 (UTC)
commit f05ef258240cf5438d5c20bfd726bbe9cb7bc697
Author: Jose Manuel Pintor Freire <jmpintorfreire gmail com>
Date: Tue Apr 16 15:31:08 2013 +0200
Use set_response_sensitive instead of directly use set_sensitive
gitg/gitg-window.vala | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 522b2a7..3d3b02a 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -197,20 +197,18 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
"dialog-clone",
"entry-url",
"filechooserbutton-location",
- "checkbutton-bare-repository",
- "ok-button");
+ "checkbutton-bare-repository");
var dlg = ret["dialog-clone"] as Gtk.Dialog;
var entry_url = ret["entry-url"] as Gtk.Entry;
var chooser = ret["filechooserbutton-location"] as Gtk.FileChooserButton;
var bare = ret["checkbutton-bare-repository"] as Gtk.CheckButton;
- var ok_button = ret["ok-button"] as Gtk.Button;
dlg.modal = true;
dlg.set_transient_for(this);
entry_url.changed.connect((e) => {
- ok_button.set_sensitive(entry_url.text_length != 0);
+ dlg.set_response_sensitive(Gtk.ResponseType.OK, entry_url.text_length > 0);
});
dlg.response.connect((d, id) => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]