antoyo / vte-rs

VTE bindings and wrappers for Rust
MIT License
7 stars 11 forks source link

Fix compilation and add spawn_sync method #1

Closed takluyver closed 6 years ago

takluyver commented 7 years ago

When I tried to build this, I got several errors similar to this:

error[E0308]: mismatched types
  --> src/terminal.rs:15:75
   |
15 |             ffi::vte_terminal_set_color_background(self.to_glib_none().0, background);
   |                                                                           ^^^^^^^^^^ expected struct `gdk_sys::GdkRGBA`, found struct `gdk::RGBA`
   |
   = note: expected type `*const gdk_sys::GdkRGBA`
   = note:    found type `&gdk::RGBA`

The first commit here fixes these errors, so that I can compile the crate.

The second commit adds the spawn_sync method, mostly as a copy of spawn_async; spawn_sync is available in older versions of vte, including the one on my computer.

I'm quite new to rust, so let me know if I've done anything wrong.

antoyo commented 7 years ago

Does it cause a warning to remove the feature attribute (when not compiling with this feature)? I'll try to take at look at this issue soon.

takluyver commented 7 years ago

I'm not quite sure what you mean about the feature. It compiles without any warnings on this branch when I don't use the v0_48 feature. I can't try with the feature enabled, because the version of libvte available in Fedora seems to be 0.46.

antoyo commented 7 years ago

Ok, I'll try then, but I suspect a warning will be emitted because of unused imports. That's why I added the feature attribute in the first place.

takluyver commented 7 years ago

It's likely to be a while before I get round to updating this; if you have time sooner, feel free to make the changes you want directly.

On 7 Jul 2017 11:18 p.m., "antoyo" notifications@github.com wrote:

@antoyo commented on this pull request.

In src/terminal.rs https://github.com/antoyo/vte-rs/pull/1#discussion_r126256731:

use glib_ffi; use Terminal;

+macro_rules! option_to_ptr {

We don't need this macro. Please use the toglib*() functions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/antoyo/vte-rs/pull/1#pullrequestreview-48730717, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUA9cdd-Mcj9emaF-uL_2mNneXaInIZks5sLq63gaJpZM4NtiqA .

antoyo commented 7 years ago

I stopped using this crate, so it's unlikely that I'll continue working on it soon. If you wish to maintain it, I'll be happy to add you as a collaborator.

takluyver commented 7 years ago

I'm also actually not using it at present. Maybe @oakes would be interested in maintaining it, though.

On 8 Jul 2017 12:00 a.m., "antoyo" notifications@github.com wrote:

I stopped using this crate, so it's unlikely that I'll continue working on it soon. If you wish to maintain it, I'll be happy to add you as a collaborator.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/antoyo/vte-rs/pull/1#issuecomment-313812139, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUA9Uvr5dfEtopFknN7B6DxfIF-kE4Aks5sLriFgaJpZM4NtiqA .

antoyo commented 6 years ago

I'm closing for now because no one is maintaining this crate. Please reopen when you find a maintainer.