This commit is contained in:
Julian Ospald 2017-07-10 21:32:49 +02:00
parent c04a975edf
commit 932fd7180e
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
3 changed files with 17 additions and 26 deletions

View File

@ -9,12 +9,9 @@ use ui_entry::Gui;
#[cfg(feature = "notify")]
use notif::*;
// TODO: notify popups
// TODO: destructors
// TODO: glade stuff, config, alsacard
pub struct AppS {
_cant_construct: (),
pub gui: Gui,

View File

@ -1,28 +1,28 @@
use app_state::*;
use audio::*;
use errors::*;
use glib::Variant;
use glib::prelude::*;
use gtk::DialogExt;
use gtk::MessageDialogExt;
use gtk::WidgetExt;
use gtk::WindowExt;
use gtk;
use gtk_sys::{GTK_DIALOG_DESTROY_WITH_PARENT, GTK_RESPONSE_YES};
use libnotify;
use prefs::*;
use std::cell::Cell;
use std::cell::RefCell;
use std::rc::Rc;
use std::thread;
use std::time::Duration;
use support_audio::*;
use support_ui::*;
use ui_popup_menu::*;
use ui_popup_window::*;
use ui_prefs_dialog::*;
use ui_tray_icon::*;
use errors::*;
use libnotify;
use std::thread;
use std::time::Duration;
use glib::Variant;
use glib::prelude::*;
pub struct Notif {
@ -136,6 +136,7 @@ pub fn init_notify(appstate: Rc<AppS>) {
(notif.from_popup.get(),
notif.from_tray.get(),
notif.from_external.get())) {
// TODO
(AudioSignal::CardDisconnected, _, _) => (),
(AudioSignal::CardError, _, _) => (),
(AudioSignal::ValuesChanged,

View File

@ -8,11 +8,6 @@ use gtk;
use prefs::*;
use std::rc::Rc;
use support_alsa::*;
use support_audio::*;
// TODO: reference count leak
@ -153,18 +148,16 @@ impl PrefsDialog {
/* NotifyPrefs */
#[cfg(feature = "notify")]
self.noti_enable_check
.set_active(prefs.notify_prefs.enable_notifications);
#[cfg(feature = "notify")]
self.noti_timeout_spin
.set_value(prefs.notify_prefs.notifcation_timeout as f64);
#[cfg(feature = "notify")]
self.noti_mouse_check
.set_active(prefs.notify_prefs.notify_mouse_scroll);
#[cfg(feature = "notify")]
self.noti_popup_check.set_active(prefs.notify_prefs.notify_popup);
#[cfg(feature = "notify")]
self.noti_ext_check.set_active(prefs.notify_prefs.notify_external);
{
self.noti_enable_check
.set_active(prefs.notify_prefs.enable_notifications);
self.noti_timeout_spin
.set_value(prefs.notify_prefs.notifcation_timeout as f64);
self.noti_mouse_check
.set_active(prefs.notify_prefs.notify_mouse_scroll);
self.noti_popup_check.set_active(prefs.notify_prefs.notify_popup);
self.noti_ext_check.set_active(prefs.notify_prefs.notify_external);
}
}