diff --git a/src/file_chooser_dialog.rs b/src/file_chooser_dialog.rs index 595a20cdc4..586c9411d5 100644 --- a/src/file_chooser_dialog.rs +++ b/src/file_chooser_dialog.rs @@ -42,24 +42,22 @@ impl FileChooserDialog { ) }, 1 => { - let first_button_text: Stash<*const c_char, str> = buttons[0].0.to_glib_none(); ffi::gtk_file_chooser_dialog_new( title.to_glib_none().0, parent.to_glib_none().0, action.to_glib(), - first_button_text.0, + buttons[0].0.to_glib_none().0, buttons[0].1.to_glib(), ptr::null::(), ) }, 2 => { - let first_button_text: Stash<*const c_char, str> = buttons[0].0.to_glib_none(); let second_button_text: Stash<*const c_char, str> = buttons[1].0.to_glib_none(); ffi::gtk_file_chooser_dialog_new( title.to_glib_none().0, parent.to_glib_none().0, action.to_glib(), - first_button_text.0, + buttons[0].0.to_glib_none().0, buttons[0].1.to_glib(), second_button_text.0, buttons[1].1.to_glib(), @@ -67,14 +65,13 @@ impl FileChooserDialog { ) }, 3 => { - let first_button_text: Stash<*const c_char, str> = buttons[0].0.to_glib_none(); let second_button_text: Stash<*const c_char, str> = buttons[1].0.to_glib_none(); let third_button_text: Stash<*const c_char, str> = buttons[2].0.to_glib_none(); ffi::gtk_file_chooser_dialog_new( title.to_glib_none().0, parent.to_glib_none().0, action.to_glib(), - first_button_text.0, + buttons[0].0.to_glib_none().0, buttons[0].1.to_glib(), second_button_text.0, buttons[1].1.to_glib(),