Skip to content

Commit d5dc8a0

Browse files
authored
Merge branch 'master' into master
2 parents 81fa136 + 7b996f7 commit d5dc8a0

File tree

12 files changed

+144
-161
lines changed

12 files changed

+144
-161
lines changed

Cargo.lock

Lines changed: 73 additions & 120 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "geopard"
3-
version = "1.5.0"
3+
version = "1.6.0"
44
authors = ["ranfdev <[email protected]>"]
55
edition = "2021"
66

@@ -10,8 +10,8 @@ edition = "2021"
1010

1111
[dependencies.gtk]
1212
package = "gtk4"
13-
version = "0.8"
14-
features = ["v4_8"]
13+
version = "0.9"
14+
features = ["v4_12"]
1515

1616
[dependencies]
1717
gemini = { path = "gemini" }
@@ -26,4 +26,4 @@ toml = "0.5.6"
2626
serde = { version = "1.0.116", features = ["derive"] }
2727
env_logger = "0.8.1"
2828
log = "0.4.0"
29-
adw = { package = "libadwaita", version = "0.6", features = ["v1_5"]}
29+
adw = { package = "libadwaita", version = "0.7", features = ["v1_5"]}

build-aux/com.ranfdev.Geopard.Devel.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"app-id" : "com.ranfdev.Geopard.Devel",
33
"runtime" : "org.gnome.Platform",
4-
"runtime-version" : "46",
4+
"runtime-version" : "47",
55
"sdk" : "org.gnome.Sdk",
66
"sdk-extensions" : [
77
"org.freedesktop.Sdk.Extension.rust-stable",
8-
"org.freedesktop.Sdk.Extension.llvm16"
8+
"org.freedesktop.Sdk.Extension.llvm18"
99
],
1010
"command" : "geopard",
1111
"tags" : [
@@ -20,7 +20,7 @@
2020
"--filesystem=xdg-download"
2121
],
2222
"build-options" : {
23-
"append-path" : "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm16/bin",
23+
"append-path" : "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm18/bin",
2424
"build-args" : [
2525
"--share=network"
2626
],

data/com.ranfdev.Geopard.metainfo.xml.in.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@
8484
</custom>
8585

8686
<releases>
87+
<release version="1.6.0" date="2024-07-03">
88+
<description>
89+
<p>Various small fixes</p>
90+
</description>
91+
</release>
8792
<release version="1.5.0" date="2024-04-10">
8893
<description>
8994
<p>Updated to latest libadwaita and GTK to improve performance and compatibility,

gemini/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ futures = "0.3.5"
1212
log = "0.4.0"
1313
url = "2.1.1"
1414
thiserror = "1.0.20"
15-
glib = "0.19"
15+
glib = "0.20"
1616

1717
[dependencies.gio]
1818
package = "gio"
19-
version = "0.19"
19+
version = "0.20"
2020
features = ["v2_70"]

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'geopard',
33
'rust',
4-
version: '1.5.0',
4+
version: '1.6.0',
55
meson_version: '>= 0.59',
66
# license: MIT,
77
)

nix/geopard.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
stdenv.mkDerivation {
2424
pname = "geopard";
25-
version = "1.5.0";
25+
version = "1.6.0";
2626

2727
cargoDeps = rustPlatform.importCargoLock {
2828
lockFile = ../Cargo.lock;

src/common/mod.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use gtk::glib;
1+
use gtk::{glib, gio};
22
use once_cell::sync::Lazy;
33
use url::Url;
44

@@ -57,3 +57,20 @@ pub fn bookmarks_url() -> Url {
5757
pub fn glibctx() -> glib::MainContext {
5858
glib::MainContext::default()
5959
}
60+
61+
pub fn open_uri_externally(uri: &str) {
62+
gtk::UriLauncher::new(&uri).launch(None::<&gtk::Window>, None::<&gio::Cancellable>, |res| {
63+
if let Err(e) = res {
64+
log::error!("error opening external uri {:?}", e);
65+
}
66+
});
67+
}
68+
69+
pub fn open_file_externally(path: &std::path::Path) {
70+
let file = gio::File::for_path(path);
71+
gtk::FileLauncher::new(Some(&file)).launch(None::<&gtk::Window>, None::<&gio::Cancellable>, |res| {
72+
if let Err(e) = res {
73+
log::error!("error opening external file {:?}", e);
74+
}
75+
});
76+
}

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ macro_rules! self_action {
44
{
55
let this = &$self;
66
let action = gio::SimpleAction::new($name, None);
7-
action.connect_activate(clone!(@weak this => move |_,_| this.$method()));
7+
action.connect_activate(clone!(#[weak] this, move |_,_| this.$method()));
88
$self.add_action(&action);
99
action
1010
}

src/widgets/pages/hypertext.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,22 +237,22 @@ impl Hypertext {
237237
let motion_ctrl = gtk::EventControllerMotion::new();
238238

239239
left_click_ctrl.connect_released(
240-
clone!(@strong this => @default-panic, move |ctrl, _n_press, x, y| {
240+
clone!(#[strong] this, move |ctrl, _n_press, x, y| {
241241
if let Err(e) = this.handle_click(ctrl, x, y) {
242242
log::info!("{}", e);
243243
};
244244
}),
245245
);
246246

247247
right_click_ctrl.connect_pressed(
248-
clone!(@strong this => @default-panic, move |_ctrl, _n_press, x, y| {
248+
clone!(#[strong] this, move |_ctrl, _n_press, x, y| {
249249
if let Err(e) = this.handle_right_click(x, y) {
250250
log::info!("{}", e);
251251
};
252252
}),
253253
);
254254

255-
motion_ctrl.connect_motion(clone!(@strong this => @default-panic,move |_ctrl, x, y| {
255+
motion_ctrl.connect_motion(clone!(#[strong] this, move |_ctrl, x, y| {
256256
let _ = this.handle_motion(x, y);
257257
}));
258258

0 commit comments

Comments
 (0)