-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gtk: Don't generate getter/setter for Calendar.[day|month|year]
As they have getters/setters in v4_14, so only generate a fallback getter/setter if that feature is not enabled
- Loading branch information
1 parent
d76619b
commit 62f9d66
Showing
4 changed files
with
47 additions
and
24 deletions.
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,43 @@ | ||
// Take a look at the license at the top of the repository in the LICENSE file. | ||
|
||
use crate::Calendar; | ||
#[cfg(not(feature = "v4_14"))] | ||
use glib::prelude::*; | ||
|
||
impl Calendar { | ||
#[cfg(not(feature = "v4_14"))] | ||
#[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] | ||
pub fn day(&self) -> i32 { | ||
ObjectExt::property(self, "day") | ||
} | ||
|
||
#[cfg(not(feature = "v4_14"))] | ||
#[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] | ||
pub fn set_day(&self, day: i32) { | ||
ObjectExt::set_property(self, "day", day) | ||
} | ||
|
||
#[cfg(not(feature = "v4_14"))] | ||
#[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] | ||
pub fn month(&self) -> i32 { | ||
ObjectExt::property(self, "month") | ||
} | ||
|
||
#[cfg(not(feature = "v4_14"))] | ||
#[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] | ||
pub fn set_month(&self, month: i32) { | ||
ObjectExt::set_property(self, "month", month) | ||
} | ||
|
||
#[cfg(not(feature = "v4_14"))] | ||
#[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] | ||
pub fn year(&self) -> i32 { | ||
ObjectExt::property(self, "year") | ||
} | ||
|
||
#[cfg(not(feature = "v4_14"))] | ||
#[cfg_attr(docsrs, doc(cfg(not(feature = "v4_14"))))] | ||
pub fn set_year(&self, year: i32) { | ||
ObjectExt::set_property(self, "year", year) | ||
} | ||
} |
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