diff --git a/data/ui/prefs-dialog.glade b/data/ui/prefs-dialog.glade
index f67e706b1..c074a2228 100644
--- a/data/ui/prefs-dialog.glade
+++ b/data/ui/prefs-dialog.glade
@@ -443,19 +443,6 @@
1
-
-
-
- 0
- 2
-
-
-
-
-
- 1
- 2
-
-
@@ -533,87 +505,6 @@
5
5
vertical
-
-
-
- False
- False
- 5
- 0
-
-
True
@@ -714,7 +605,7 @@
False
False
5
- 1
+ 0
@@ -749,7 +640,7 @@
False
False
5
- 2
+ 1
@@ -837,18 +728,6 @@
0
-
-
- True
- False
- start
- Fine Scroll Step:
-
-
- 0
- 1
-
-
True
@@ -865,22 +744,6 @@
0
-
-
- True
- True
- •
- False
- False
- fine_scroll_step_adjustment
- 2
- True
-
-
- 1
- 1
-
-
diff --git a/src/app_state.rs b/src/app_state.rs
index 3fb7c43d3..9fc19345d 100644
--- a/src/app_state.rs
+++ b/src/app_state.rs
@@ -1,22 +1,19 @@
use audio::Audio;
-use gdk;
+use errors::*;
use gtk;
-use gtk::ComboBoxTextExt;
-use gtk::ComboBoxExt;
-use gtk::ToggleButtonExt;
-use gtk::SpinButtonExt;
-use gtk::ColorChooserExt;
-use gtk::EntryExt;
use prefs::*;
-use ui_tray_icon::TrayIcon;
use std::cell::RefCell;
+use ui_entry::Gui;
+// TODO: notify popups
+
// TODO: destructors
// TODO: glade stuff, config, alsacard
pub struct AppS {
+ _cant_construct: (),
pub gui: Gui,
pub audio: Audio,
pub prefs: RefCell,
@@ -33,240 +30,22 @@ impl AppS {
Gui::new(builder_popup_window, builder_popup_menu, &prefs.borrow());
return AppS {
+ _cant_construct: (),
gui: gui,
audio: Audio::new(None, Some(String::from("Master")))
.unwrap(),
prefs: prefs,
};
}
-}
+ pub fn update_tray_icon(&self) -> Result<()> {
+ debug!("Update tray icon!");
+ return self.gui.tray_icon.update_all(&self.prefs.borrow(), &self.audio, None);
+ }
-pub struct Gui {
- pub tray_icon: TrayIcon,
- pub popup_window: PopupWindow,
- pub popup_menu: PopupMenu,
- /* prefs_dialog is dynamically created and destroyed */
- pub prefs_dialog: RefCell