mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
add beep signal on send button inactive, fix namespaces
This commit is contained in:
parent
62d48015ad
commit
f0877e0553
1 changed files with 3 additions and 2 deletions
|
|
@ -4,14 +4,13 @@ mod title;
|
||||||
|
|
||||||
use control::Control;
|
use control::Control;
|
||||||
use form::Form;
|
use form::Form;
|
||||||
use sourceview::prelude::ActionExt;
|
|
||||||
use title::Title;
|
use title::Title;
|
||||||
|
|
||||||
use super::ItemAction;
|
use super::ItemAction;
|
||||||
use gtk::{
|
use gtk::{
|
||||||
gio::SimpleAction,
|
gio::SimpleAction,
|
||||||
glib::{uuid_string_random, Uri, UriHideFlags},
|
glib::{uuid_string_random, Uri, UriHideFlags},
|
||||||
prelude::{BoxExt, WidgetExt},
|
prelude::{ActionExt, BoxExt, DisplayExt, WidgetExt},
|
||||||
Box, Label, Orientation, TextView,
|
Box, Label, Orientation, TextView,
|
||||||
};
|
};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
@ -105,6 +104,8 @@ impl Response for Box {
|
||||||
.action(>k::CallbackAction::new(move |_, _| {
|
.action(>k::CallbackAction::new(move |_, _| {
|
||||||
if control.send.is_sensitive() {
|
if control.send.is_sensitive() {
|
||||||
action_send.activate(None);
|
action_send.activate(None);
|
||||||
|
} else {
|
||||||
|
control.send.display().beep();
|
||||||
}
|
}
|
||||||
gtk::glib::Propagation::Stop
|
gtk::glib::Propagation::Stop
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue