~julienxx/castor

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 3

[PATCH castor 0/1] fix issue #9

Details
Message ID
<158837726337.20255.7424365254243335669-0@git.sr.ht>
DKIM signature
missing
Download raw message
I added a hook into the connect_motion_notify_event of the content_view
to change its pointer. This is one of the first contributions I've made
in Rust, so please let me know anything I need to do to fix my patch.

Case Duckworth (1):
  Set TextView pointer to 'default' (Fix #9)

 src/gui.rs  | 7 +++++++
 src/main.rs | 1 +
 2 files changed, 8 insertions(+)

-- 
2.24.3

[PATCH castor 1/1] Set TextView pointer to 'default' (Fix #9)

Details
Message ID
<158837726337.20255.7424365254243335669-1@git.sr.ht>
In-Reply-To
<158837726337.20255.7424365254243335669-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +8 -0
From: Case Duckworth <acdw@acdw.net>

---
 src/gui.rs  | 7 +++++++
 src/main.rs | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/gui.rs b/src/gui.rs
index 97e1332..719faa1 100644
--- a/src/gui.rs
+++ b/src/gui.rs
@@ -1,6 +1,8 @@
use gtk::prelude::*;
use gtk::{ApplicationWindow, Button, Entry, TextView};

use gdk::WindowExt;


pub struct Gui {
    window: ApplicationWindow,
@@ -39,6 +41,11 @@ impl Gui {
        glib::set_application_name("Castor Browser");
        self.window.set_role("Castor Browser");
        self.window.connect_delete_event(|_, _| { gtk::main_quit(); Inhibit(false) });
        self.content_view.connect_motion_notify_event(|win, _| {
            let w = gtk::TextViewExt::get_window(win, gtk::TextWindowType::Text).unwrap();
            w.set_cursor(gdk::Cursor::new_from_name(&w.get_display(), "default").as_ref());
            Inhibit(false)
        });
        self.window.show_all();
    }

diff --git a/src/main.rs b/src/main.rs
index b8158e8..93defcc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,7 @@
extern crate gio;
extern crate glib;
extern crate gtk;
extern crate gdk;
#[macro_use]
extern crate lazy_static;

-- 
2.24.3

Re: [PATCH castor 1/1] Set TextView pointer to 'default' (Fix #9)

Details
Message ID
<c0c21e3c-0983-e210-c9d5-9fa313a0245b@typed-hole.org>
In-Reply-To
<158837726337.20255.7424365254243335669-1@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Thanks a lot! I've been searching how to do it but never found the 
solution, this is awesome!

Re: [PATCH castor 1/1] Set TextView pointer to 'default' (Fix #9)

Details
Message ID
<74e05533-9eb0-4772-9a3c-fdb4044434ac@www.fastmail.com>
In-Reply-To
<c0c21e3c-0983-e210-c9d5-9fa313a0245b@typed-hole.org> (view parent)
DKIM signature
missing
Download raw message
I'm happy to help!
Reply to thread Export thread (mbox)