File tree Expand file tree Collapse file tree 3 files changed +7
-22
lines changed Expand file tree Collapse file tree 3 files changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -1157,21 +1157,6 @@ status = "generate"
1157
1157
name = " state"
1158
1158
# value glib::VariantTy
1159
1159
ignore = true
1160
- [[object .function ]]
1161
- name = " new_stateful"
1162
- [[object .function .parameter ]]
1163
- name = " state"
1164
- move = true
1165
- [[object .function ]]
1166
- name = " set_state"
1167
- [[object .function .parameter ]]
1168
- name = " value"
1169
- move = true
1170
- [[object .function ]]
1171
- name = " set_state_hint"
1172
- [[object .function .parameter ]]
1173
- name = " state_hint"
1174
- move = true
1175
1160
1176
1161
[[object ]]
1177
1162
name = " Gio.SimpleIOStream"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ impl<O: IsA<ActionMap>> ActionMapExtManual for O {
15
15
fn add_action_entries ( & self , entries : impl IntoIterator < Item = ActionEntry < Self > > ) {
16
16
for entry in entries. into_iter ( ) {
17
17
let action = if let Some ( state) = entry. state ( ) {
18
- SimpleAction :: new_stateful ( entry. name ( ) , entry. parameter_type ( ) , state. clone ( ) )
18
+ SimpleAction :: new_stateful ( entry. name ( ) , entry. parameter_type ( ) , state)
19
19
} else {
20
20
SimpleAction :: new ( entry. name ( ) , entry. parameter_type ( ) )
21
21
} ;
Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ impl SimpleAction {
34
34
pub fn new_stateful (
35
35
name : & str ,
36
36
parameter_type : Option < & glib:: VariantTy > ,
37
- state : glib:: Variant ,
37
+ state : & glib:: Variant ,
38
38
) -> SimpleAction {
39
39
unsafe {
40
40
from_glib_full ( ffi:: g_simple_action_new_stateful (
41
41
name. to_glib_none ( ) . 0 ,
42
42
parameter_type. to_glib_none ( ) . 0 ,
43
- state. into_glib_ptr ( ) ,
43
+ state. to_glib_none ( ) . 0 ,
44
44
) )
45
45
}
46
46
}
@@ -53,16 +53,16 @@ impl SimpleAction {
53
53
}
54
54
55
55
#[ doc( alias = "g_simple_action_set_state" ) ]
56
- pub fn set_state ( & self , value : glib:: Variant ) {
56
+ pub fn set_state ( & self , value : & glib:: Variant ) {
57
57
unsafe {
58
- ffi:: g_simple_action_set_state ( self . to_glib_none ( ) . 0 , value. into_glib_ptr ( ) ) ;
58
+ ffi:: g_simple_action_set_state ( self . to_glib_none ( ) . 0 , value. to_glib_none ( ) . 0 ) ;
59
59
}
60
60
}
61
61
62
62
#[ doc( alias = "g_simple_action_set_state_hint" ) ]
63
- pub fn set_state_hint ( & self , state_hint : Option < glib:: Variant > ) {
63
+ pub fn set_state_hint ( & self , state_hint : Option < & glib:: Variant > ) {
64
64
unsafe {
65
- ffi:: g_simple_action_set_state_hint ( self . to_glib_none ( ) . 0 , state_hint. into_glib_ptr ( ) ) ;
65
+ ffi:: g_simple_action_set_state_hint ( self . to_glib_none ( ) . 0 , state_hint. to_glib_none ( ) . 0 ) ;
66
66
}
67
67
}
68
68
You can’t perform that action at this time.
0 commit comments