This repository was archived by the owner on Jun 8, 2021. It is now read-only.
File tree 1 file changed +6
-12
lines changed
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -42,43 +42,37 @@ impl FileChooserDialog {
42
42
)
43
43
} ,
44
44
1 => {
45
- let first_button_text: Stash < * const c_char , str > = buttons[ 0 ] . 0 . to_glib_none ( ) ;
46
45
ffi:: gtk_file_chooser_dialog_new (
47
46
title. to_glib_none ( ) . 0 ,
48
47
parent. to_glib_none ( ) . 0 ,
49
48
action. to_glib ( ) ,
50
- first_button_text . 0 ,
49
+ buttons [ 0 ] . 0 . to_glib_none ( ) . 0 ,
51
50
buttons[ 0 ] . 1 . to_glib ( ) ,
52
51
ptr:: null :: < c_char > ( ) ,
53
52
)
54
53
} ,
55
54
2 => {
56
- let first_button_text: Stash < * const c_char , str > = buttons[ 0 ] . 0 . to_glib_none ( ) ;
57
- let second_button_text: Stash < * const c_char , str > = buttons[ 1 ] . 0 . to_glib_none ( ) ;
58
55
ffi:: gtk_file_chooser_dialog_new (
59
56
title. to_glib_none ( ) . 0 ,
60
57
parent. to_glib_none ( ) . 0 ,
61
58
action. to_glib ( ) ,
62
- first_button_text . 0 ,
59
+ buttons [ 0 ] . 0 . to_glib_none ( ) . 0 ,
63
60
buttons[ 0 ] . 1 . to_glib ( ) ,
64
- second_button_text . 0 ,
61
+ ( buttons [ 1 ] . 0 . to_glib_none ( ) as Stash < * const c_char , str > ) . 0 ,
65
62
buttons[ 1 ] . 1 . to_glib ( ) ,
66
63
ptr:: null :: < c_char > ( ) ,
67
64
)
68
65
} ,
69
66
3 => {
70
- let first_button_text: Stash < * const c_char , str > = buttons[ 0 ] . 0 . to_glib_none ( ) ;
71
- let second_button_text: Stash < * const c_char , str > = buttons[ 1 ] . 0 . to_glib_none ( ) ;
72
- let third_button_text: Stash < * const c_char , str > = buttons[ 2 ] . 0 . to_glib_none ( ) ;
73
67
ffi:: gtk_file_chooser_dialog_new (
74
68
title. to_glib_none ( ) . 0 ,
75
69
parent. to_glib_none ( ) . 0 ,
76
70
action. to_glib ( ) ,
77
- first_button_text . 0 ,
71
+ buttons [ 0 ] . 0 . to_glib_none ( ) . 0 ,
78
72
buttons[ 0 ] . 1 . to_glib ( ) ,
79
- second_button_text . 0 ,
73
+ ( buttons [ 1 ] . 0 . to_glib_none ( ) as Stash < * const c_char , str > ) . 0 ,
80
74
buttons[ 1 ] . 1 . to_glib ( ) ,
81
- third_button_text . 0 ,
75
+ ( buttons [ 2 ] . 0 . to_glib_none ( ) as Stash < * const c_char , str > ) . 0 ,
82
76
buttons[ 2 ] . 1 . to_glib ( ) ,
83
77
ptr:: null :: < c_char > ( ) ,
84
78
)
You can’t perform that action at this time.
0 commit comments