Commit 0c647ad3 authored by Florian Wagner's avatar Florian Wagner

Make "Start chat" buttons insensitive

parent 7373582c
Pipeline #9933 passed with stage
in 51 minutes and 4 seconds
......@@ -1726,6 +1726,10 @@ impl AppOp {
}
}
let btn = self.ui.builder
.get_object::<gtk::Button>("invite_user_button")
.expect("Can't find invite_user_button in ui file.");
btn.set_sensitive(false);
dialog.present();
scroll.hide();
}
......@@ -1769,6 +1773,10 @@ impl AppOp {
let dialog = self.ui.builder
.get_object::<gtk::Dialog>("new_room_dialog")
.expect("Can't find new_room_dialog in ui file.");
let btn = self.ui.builder
.get_object::<gtk::Button>("new_room_button")
.expect("Can't find new_room_button in ui file.");
btn.set_sensitive(false);
dialog.present();
}
......@@ -1802,6 +1810,10 @@ impl AppOp {
let dialog = self.ui.builder
.get_object::<gtk::Dialog>("join_room_dialog")
.expect("Can't find join_room_dialog in ui file.");
let btn = self.ui.builder
.get_object::<gtk::Button>("join_room_button")
.expect("Can't find new_room_button in ui file.");
btn.set_sensitive(false);
dialog.present();
}
......@@ -2608,6 +2620,9 @@ impl App {
entry.set_text("");
private.set_active(true);
}));
entry.connect_changed(clone!(confirm => move |entry| {
confirm.set_sensitive(entry.get_buffer().get_length() > 0);
}));
}
fn connect_join_room_dialog(&self) {
......@@ -2647,6 +2662,9 @@ impl App {
op.lock().unwrap().join_to_room();
entry.set_text("");
}));
entry.connect_changed(clone!(confirm => move |entry| {
confirm.set_sensitive(entry.get_buffer().get_length() > 0);
}));
}
fn connect_room_config(&self) {
......@@ -3163,6 +3181,9 @@ impl App {
invite.connect_clicked(clone!(op => move |_| {
op.lock().unwrap().start_chat();
}));
entry.connect_changed(clone!(invite => move |entry| {
invite.set_sensitive(entry.get_buffer().get_length() > 0);
}));
}
pub fn connect_roomlist_search(&self) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment