@@ -112,7 +112,7 @@ pub enum ValidateOrCancelResult {
112112/// dialogs::error("Error", "An error has occurred during the last operation");
113113/// ```
114114pub fn error ( title : & str , caption : & str ) {
115- let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: Ok , window:: Type :: Error ) ;
115+ let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: Ok , window:: Background :: Error ) ;
116116 w. show ( ) ;
117117}
118118
@@ -139,7 +139,7 @@ pub fn error(title: &str, caption: &str) {
139139/// }
140140/// ```
141141pub fn retry ( title : & str , caption : & str ) -> bool {
142- let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: RetryCancel , window:: Type :: Error ) ;
142+ let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: RetryCancel , window:: Background :: Error ) ;
143143 if let Some ( result) = w. show ( ) {
144144 return result == DialogResult :: Retry ;
145145 }
@@ -162,7 +162,7 @@ pub fn retry(title: &str, caption: &str) -> bool {
162162/// dialogs::alert("Warning", "Low disk space detected");
163163/// ```
164164pub fn alert ( title : & str , caption : & str ) {
165- let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: Ok , window:: Type :: Warning ) ;
165+ let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: Ok , window:: Background :: Warning ) ;
166166 w. show ( ) ;
167167}
168168
@@ -189,7 +189,7 @@ pub fn alert(title: &str, caption: &str) {
189189/// }
190190/// ```
191191pub fn proceed ( title : & str , caption : & str ) -> bool {
192- let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: YesNo , window:: Type :: Warning ) ;
192+ let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: YesNo , window:: Background :: Warning ) ;
193193 if let Some ( result) = w. show ( ) {
194194 return result == DialogResult :: Yes ;
195195 }
@@ -212,7 +212,7 @@ pub fn proceed(title: &str, caption: &str) -> bool {
212212/// dialogs::message("Success", "All files have been copied");
213213/// ```
214214pub fn message ( title : & str , caption : & str ) {
215- let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: Ok , window:: Type :: Notification ) ;
215+ let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: Ok , window:: Background :: Notification ) ;
216216 w. show ( ) ;
217217}
218218
@@ -239,7 +239,7 @@ pub fn message(title: &str, caption: &str) {
239239/// }
240240/// ```
241241pub fn validate ( title : & str , caption : & str ) -> bool {
242- let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: YesNo , window:: Type :: Notification ) ;
242+ let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: YesNo , window:: Background :: Notification ) ;
243243 if let Some ( result) = w. show ( ) {
244244 return result == DialogResult :: Yes ;
245245 }
@@ -275,7 +275,7 @@ pub fn validate(title: &str, caption: &str) -> bool {
275275/// }
276276/// ```
277277pub fn validate_or_cancel ( title : & str , caption : & str ) -> ValidateOrCancelResult {
278- let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: YesNoCancel , window:: Type :: Notification ) ;
278+ let w = GenericAlertDialog :: new ( title, caption, DialogButtons :: YesNoCancel , window:: Background :: Notification ) ;
279279 match w. show ( ) {
280280 Some ( DialogResult :: Yes ) => ValidateOrCancelResult :: Yes ,
281281 Some ( DialogResult :: No ) => ValidateOrCancelResult :: No ,
0 commit comments