-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gtk: manually implement PrintSettings::set_page_ranges
- Loading branch information
1 parent
335ff84
commit c35b474
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Take a look at the license at the top of the repository in the LICENSE file. | ||
|
||
use crate::{PageRange, PrintSettings}; | ||
use glib::translate::*; | ||
|
||
impl PrintSettings { | ||
#[doc(alias = "gtk_print_settings_set_page_ranges")] | ||
pub fn set_page_ranges(&self, page_ranges: &[PageRange]) { | ||
let num_ranges = page_ranges.len() as i32; | ||
unsafe { | ||
ffi::gtk_print_settings_set_page_ranges( | ||
self.to_glib_none().0, | ||
mut_override(page_ranges.to_glib_none().0), | ||
num_ranges, | ||
); | ||
} | ||
} | ||
} |