Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

GString support #745

Merged
merged 2 commits into from Jan 12, 2019
Merged

GString support #745

merged 2 commits into from Jan 12, 2019

Conversation

philn
Copy link
Contributor

@philn philn commented Dec 16, 2018

No description provided.

@philn
Copy link
Contributor Author

philn commented Jan 11, 2019

I suppose this one needs a rebase.

@sdroege
Copy link
Member

sdroege commented Jan 11, 2019

Yeah, but otherwise good to go. Not sure why it was not merged before. @GuillaumeGomez ?

@GuillaumeGomez
Copy link
Member

Never took the time to look at the monstruous diff (sorry....).

@philn
Copy link
Contributor Author

philn commented Jan 12, 2019

I did a fresh regen, and boom. 1483 errors, mostly:

   --> src/auto/list_store.rs:16:1                                                                                                                                                                  
    |                                                                                                                                                                                               
16  | / glib_wrapper! {                                                                                                                                                                             
17  | |     /// The `ListStore` object is a list model for use with a `TreeView`                                                                                                                    
18  | |     /// widget. It implements the `TreeModel` interface, and consequentialy,                                                                                                                
19  | |     /// can use all of the methods available there. It also implements the                                                                                                                  
...   |                                                                                                                                                                                             
162 | |     }                                                                                                                                                                                       
163 | | }                                                                                                                                                                                           
    | |_^ use of undeclared type or module `ptr`                                                                                                                                                    
    |                                                                                                                                                                                               
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)                                                   
                                                                                                                                                                                                    
error[E0433]: failed to resolve: use of undeclared type or module `mem`                                                                                                                             
   --> src/auto/list_store.rs:16:1                                                                                                                                                                  
    |                                                                                                                                                                                               
16  | / glib_wrapper! {                                                                                                                                                                             
17  | |     /// The `ListStore` object is a list model for use with a `TreeView`                                                                                                                    
18  | |     /// widget. It implements the `TreeModel` interface, and consequentialy,                                                                                                                
19  | |     /// can use all of the methods available there. It also implements the                                                                                                                  
...   |                                                                                                                                                                                             
162 | |     }                                                                                                                                                                                       
163 | | }                                                                                                                                                                                           
    | |_^ use of undeclared type or module `mem`                                                                                                                                                    
    |                                                                                                                                                                                               
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)                

@EPashkin
Copy link
Member

Maybe you use old glib?
Its builds fine for me after rebase.

@EPashkin
Copy link
Member

All I done as extra is removed unused in manual app_chooser.rs, border.rs, entry_buffer.rs

-use glib_ffi;
-use gobject_ffi;
-use std::ptr;
-use std::mem;

@philn
Copy link
Contributor Author

philn commented Jan 12, 2019

Ah yes, once again I forgot to cargo update :)

@EPashkin
Copy link
Member

Seems cargo build --features purge-lgpl-docs broken 😢
cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Urg. Well, I'll take a look when I can. :-/

@philn
Copy link
Contributor Author

philn commented Jan 12, 2019

Now without the lgpl docs, should make CI happier :)

/// knows the default and last-used application for a given content
/// type. The `AppChooserWidget` provides detailed control over
/// whether the shown list of applications should include default,
/// recommended or fallback applications.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here docs still present

/// `AppChooser` is an interface that can be implemented by widgets which
/// allow the user to choose an application (typically for the purpose of
/// opening a file). The main objects that implement this interface are
/// `AppChooserWidget`, `AppChooserDialog` and `AppChooserButton`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems it instead with LGLP docs

@philn
Copy link
Contributor Author

philn commented Jan 12, 2019

Yes I don't know why gir generate those. The config file specifies "normal" mode... looks like another bug in gir.

@EPashkin
Copy link
Member

Strange but cargo build --features purge-lgpl-docs works fine for me locally

@EPashkin
Copy link
Member

@philn seems you run cargo test --features embed-lgpl-docs after regen and in previous run too.
@GuillaumeGomez Oh, it standard error with inverted diff, don't worry: purge works fine.

@philn
Copy link
Contributor Author

philn commented Jan 12, 2019

Good to go now.

@EPashkin
Copy link
Member

@philn Seems you forgot to update gir submodule: https://travis-ci.org/gtk-rs/gtk/jobs/478798815#L739,
but at minimum docs check now passes.

@philn
Copy link
Contributor Author

philn commented Jan 12, 2019

It's updated there, eca9399 as part of this PR

@EPashkin
Copy link
Member

Submodule updated to c5498ac, but you used last master 11adffa to regen

@EPashkin
Copy link
Member

As it produce same code you can just change versions.txt to c5498ac if don't want do rebase

@philn
Copy link
Contributor Author

philn commented Jan 12, 2019

Rebased :)

@EPashkin
Copy link
Member

Thanks, clippy give errors: https://travis-ci.org/gtk-rs/gtk/jobs/478811268#L1372-L1378,
but IMHO we can ignore it in this PR as there other PRs planned.

error: casting from `*mut ffi::GtkRecentChooser` to a more-strictly-aligned pointer (`*mut gobject_ffi::GObject`)
   --> src/auto/recent_chooser.rs:329:25
    |
329 |             connect_raw(self.to_glib_none().0 as *mut _, b"notify::filter\0".as_ptr() as *const _,
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment

@EPashkin
Copy link
Member

Ok, CI ended, 2 travis jobs failed by clippy.
@GuillaumeGomez This PR IMHO ready for merge too

@GuillaumeGomez
Copy link
Member

I approve. Thanks @philn!

@GuillaumeGomez GuillaumeGomez merged commit e0e18b9 into gtk-rs:master Jan 12, 2019
vhdirk pushed a commit to vhdirk/gtk-rs that referenced this pull request Jan 16, 2019
alex179ohm pushed a commit to alex179ohm/gtk that referenced this pull request Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants