@@ -1798,6 +1798,10 @@ impl WindowImpl for MainWindow {
1798
1798
*
1799
1799
*/
1800
1800
fn close_request ( & self , window : & Self :: Type ) -> Inhibit {
1801
+ /*
1802
+ //NOTE: this was meant for saving to json, probably unecessary now that i'm not using it..
1803
+
1804
+
1801
1805
// Create vector for final saving
1802
1806
let mut save_data: Vec<Vec<(String, String)>> = vec![];
1803
1807
//let mut save_data: gio::ListStore;
@@ -1828,36 +1832,16 @@ impl WindowImpl for MainWindow {
1828
1832
//save_data.append(&test_s);
1829
1833
}
1830
1834
1831
- // Create collection to store in json
1832
1835
// TEST OUTPUT
1833
1836
for gpu in save_data {
1834
1837
for stat in gpu {
1835
1838
println!("STAT NAME: `{}` STAT VALUE: `{}`", stat.0, stat.1);
1836
1839
}
1837
1840
}
1838
- // let qq = save_data
1839
- // .snapshot() //?
1840
- // .iter()
1841
- // .filter_map(Cast::downcast_ref::<TaskObject>)
1842
- // .map(TaskObject::task_data)
1843
- // .collect();
1844
-
1845
- // let gpu_data: Vec<TaskData> = current_page
1846
- // .tasks() // change to "items" and grab all statistic pairs/objects
1847
- // .snapshot() //?
1848
- // .iter()
1849
- // .filter_map(Cast::downcast_ref::<TaskObject>)
1850
- // .map(TaskObject::task_data)
1851
- // .collect();
1852
-
1853
- // Store in json
1854
- // Create json file object
1855
- //let file = File::create(data_path()).expect("Could not create json file.");
1856
-
1857
- // Write json file
1858
- // serde_json::to_writer(file, &gpu_data)
1859
- // .expect("Could not write data to json file");
1841
+ */
1860
1842
1843
+ //NOTE: This doesn't work for some reason, but seems to be to do with
1844
+ // nvidia-settings or the Cancellable implementation in the rust bindings..
1861
1845
// Cancel any under-way sub processes
1862
1846
// if let Some(control) = Cancellable::current() {
1863
1847
// println!("Closing open windows..");
0 commit comments