about summary refs log tree commit diff
path: root/src/application.rs
diff options
context:
space:
mode:
authorRicky Kresslein <rk@lakoliu.com>2022-06-08 14:52:17 +0300
committerRicky Kresslein <rk@lakoliu.com>2022-06-08 14:52:17 +0300
commitd7099a4d98744481e8f7ecce4e9233e66af1fd44 (patch)
tree75edd112e2e92ae68c33f4d110789ec72255ff80 /src/application.rs
parent64bfc787cca62621963d3409befcf85f9b2c8dd9 (diff)
downloadFurtherance-d7099a4d98744481e8f7ecce4e9233e66af1fd44.tar.zst
Fix formatting
Diffstat (limited to 'src/application.rs')
-rwxr-xr-xsrc/application.rs34
1 files changed, 23 insertions, 11 deletions
diff --git a/src/application.rs b/src/application.rs
index fdc3637..157c432 100755
--- a/src/application.rs
+++ b/src/application.rs
@@ -23,9 +23,9 @@ use log::debug;
 use std::sync::Mutex;
 
 use crate::config;
-use crate::ui::{FurtheranceWindow, FurPreferencesWindow, FurReport};
 use crate::database;
 use crate::settings_manager;
+use crate::ui::{FurPreferencesWindow, FurReport, FurtheranceWindow};
 
 mod imp {
     use super::*;
@@ -74,8 +74,15 @@ mod imp {
 
             // Load style.css
             let css_file = gtk::CssProvider::new();
-            gtk::CssProvider::load_from_resource(&css_file, "/com/lakoliu/Furtherance/gtk/style.css");
-            gtk::StyleContext::add_provider_for_display(&gdk::Display::default().unwrap(), &css_file, 500);
+            gtk::CssProvider::load_from_resource(
+                &css_file,
+                "/com/lakoliu/Furtherance/gtk/style.css",
+            );
+            gtk::StyleContext::add_provider_for_display(
+                &gdk::Display::default().unwrap(),
+                &css_file,
+                500,
+            );
 
             // Ask the window manager/compositor to present the window
             window.present();
@@ -196,20 +203,27 @@ impl FurtheranceApplication {
             gtk::DialogFlags::MODAL,
             gtk::MessageType::Question,
             gtk::ButtonsType::None,
-            Some(&format!("<span size='x-large' weight='bold'>{}</span>", &gettext("Delete history?"))),
+            Some(&format!(
+                "<span size='x-large' weight='bold'>{}</span>",
+                &gettext("Delete history?")
+            )),
         );
         dialog.add_buttons(&[
             (&gettext("Cancel"), gtk::ResponseType::Reject),
-            (&gettext("Delete"), gtk::ResponseType::Accept)
+            (&gettext("Delete"), gtk::ResponseType::Accept),
         ]);
         dialog.set_default_response(gtk::ResponseType::Accept);
-        let delete_btn = dialog.widget_for_response(gtk::ResponseType::Accept).unwrap();
+        let delete_btn = dialog
+            .widget_for_response(gtk::ResponseType::Accept)
+            .unwrap();
         delete_btn.add_css_class("destructive-action");
 
         let message_area = dialog.message_area().downcast::<gtk::Box>().unwrap();
-        let explanation = gtk::Label::new(Some(&gettext("This will delete ALL of your task history.")));
-        let instructions = gtk::Label::new(Some(
-            &gettext("Type DELETE in the box below then click Delete to proceed.")));
+        let explanation =
+            gtk::Label::new(Some(&gettext("This will delete ALL of your task history.")));
+        let instructions = gtk::Label::new(Some(&gettext(
+            "Type DELETE in the box below then click Delete to proceed.",
+        )));
         let delete_entry = gtk::Entry::new();
         delete_entry.set_activates_default(true);
         message_area.append(&explanation);
@@ -308,5 +322,3 @@ impl Default for FurtheranceApplication {
             .unwrap()
     }
 }
-
-