From 8478475d9353aa895c216005cd1b731d8e657d53 Mon Sep 17 00:00:00 2001 From: Gabriel Brand Date: Tue, 14 May 2024 13:19:33 +0200 Subject: CSV Export Dialog: Move export button below preferences - Remove AdwClamp --- src/gtk/csv_export_dialog.ui | 152 +++++++++++++++++++------------------------ src/ui/window.rs | 19 ++---- 2 files changed, 74 insertions(+), 97 deletions(-) (limited to 'src') diff --git a/src/gtk/csv_export_dialog.ui b/src/gtk/csv_export_dialog.ui index 7e37882..7fed989 100644 --- a/src/gtk/csv_export_dialog.ui +++ b/src/gtk/csv_export_dialog.ui @@ -2,109 +2,93 @@ Export as CSV + 450 - - false - false - - - _Cancel - true - - - - - _Export - true - false - - - - + - - 800 - 600 - true - false - fill - fill + + vertical + 24 + 12 + 12 + 12 + 12 - vertical - 24 - 12 - 12 - 12 - 12 + horizontal + 12 - - horizontal - 12 - - - - No File Selected - - true - start - start - - - - - - folder-open-symbolic - Select File - - + + - No File Selected - + true + start + start + + + + + + folder-open-symbolic + Select File + + + + + Export Preferences + fill - - Export Preferences - fill - - - Sort _By - true - - - - Start Time - Stop Time - Task Name - - - + + Sort _By + true + + + + Start Time + Stop Time + Task Name + - - - - Sort _Order - true - - - - Ascending - Descending - - - + + + + + + Sort _Order + true + + + + Ascending + Descending + - + + + + _Export + true + center + false + + + - + \ No newline at end of file diff --git a/src/ui/window.rs b/src/ui/window.rs index 9b49ed6..bf23729 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -911,20 +911,17 @@ impl FurtheranceWindow { pub fn open_csv_export_dialog(&self) { let builder = gtk::Builder::from_resource("/com/lakoliu/Furtherance/gtk/csv_export_dialog.ui"); let dialog = builder.object::("csv_export_dialog").unwrap(); - let tasksort_row = builder - .object::("tasksort_row") - .unwrap(); - let sortorder_row = builder - .object::("sortorder_row") + let selected_file_label = builder + .object::("selected_file_label") .unwrap(); let filechooser_button = builder .object::("filechooser_button") .unwrap(); - let selected_file_label = builder - .object::("selected_file_label") + let tasksort_row = builder + .object::("tasksort_row") .unwrap(); - let cancel_button = builder - .object::("cancel_button") + let sortorder_row = builder + .object::("sortorder_row") .unwrap(); let export_button = builder .object::("export_button") @@ -965,10 +962,6 @@ impl FurtheranceWindow { }), ); - cancel_button.connect_clicked(clone!(@weak dialog => move |_| { - dialog.close(); - })); - export_button.connect_clicked(clone!(@weak self as window, @weak dialog, @weak filechooser, @weak tasksort_row, @weak sortorder_row => move |_| { let sort = TaskSort::try_from(tasksort_row.selected()).unwrap_or_default(); let order = SortOrder::try_from(sortorder_row.selected()).unwrap_or_default(); -- cgit 1.4.1