-- Leo's gemini proxy

-- Connecting to typed-hole.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

commit 5371daff2032c486995062a29a37c9d3da47869b

Author: Case Duckworth <acdw@acdw.net>

Date: Fri May 1 18:20:19 2020 -0500


Set TextView pointer to 'default' (Fix #9)


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;

extern crate lazy_static;




---

Served by Pollux Gemini Server.

-- Response ended

-- Page fetched on Sun May 19 03:48:35 2024