Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4bd28b22c | |||
| 335ded4752 | |||
| d40eb1886e | |||
| de06e449be |
2
core/Cargo.lock
generated
2
core/Cargo.lock
generated
@@ -1274,7 +1274,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kordophoned"
|
name = "kordophoned"
|
||||||
version = "1.0.1"
|
version = "1.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kordophoned"
|
name = "kordophoned"
|
||||||
version = "1.0.1"
|
version = "1.3.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
description = "Client daemon for the Kordophone chat protocol"
|
description = "Client daemon for the Kordophone chat protocol"
|
||||||
|
|||||||
@@ -5,11 +5,12 @@ all: setup
|
|||||||
setup: build/
|
setup: build/
|
||||||
meson build
|
meson build
|
||||||
|
|
||||||
VER := 1.0.2
|
VER_RAW := $(shell git -C .. describe --tags --abbrev=0 2>/dev/null || git -C .. describe --tags 2>/dev/null || printf '0.0.0')
|
||||||
|
VER := $(patsubst v%,%,$(VER_RAW))
|
||||||
TMP := $(shell mktemp -d)
|
TMP := $(shell mktemp -d)
|
||||||
rpm:
|
rpm:
|
||||||
git -C .. archive --format=tar.gz --prefix=kordophone/ -o $(TMP)/v$(VER).tar.gz HEAD
|
git -C .. archive --format=tar.gz --prefix=kordophone/ -o $(TMP)/v$(VER).tar.gz HEAD
|
||||||
rpmbuild -ba dist/rpm/kordophone.spec --define "_sourcedir $(TMP)"
|
rpmbuild -ba dist/rpm/kordophone.spec --define "_sourcedir $(TMP)" --define "app_version $(VER)"
|
||||||
|
|
||||||
deb:
|
deb:
|
||||||
./dist/deb/build-deb.sh $(VER)
|
./dist/deb/build-deb.sh $(VER)
|
||||||
|
|||||||
2
gtk/dist/deb/build-deb.sh
vendored
2
gtk/dist/deb/build-deb.sh
vendored
@@ -37,7 +37,7 @@ Priority: optional
|
|||||||
Architecture: ${ARCH}
|
Architecture: ${ARCH}
|
||||||
Maintainer: James Magahern <james@magahern.com>
|
Maintainer: James Magahern <james@magahern.com>
|
||||||
Installed-Size: ${INSTALLED_SIZE_KB}
|
Installed-Size: ${INSTALLED_SIZE_KB}
|
||||||
Depends: libgtk-4-1, libadwaita-1-0, libglib2.0-0, libgee-0.8-2, libsecret-1-0, kordophoned (>= 1.0.0)
|
Depends: libgtk-4-1, libadwaita-1-0, libglib2.0-0, libgee-0.8-2, libsecret-1-0, kordophoned (>= 1.3.0)
|
||||||
Description: GTK4/Libadwaita client for Kordophone
|
Description: GTK4/Libadwaita client for Kordophone
|
||||||
A GTK4/Libadwaita Linux client for the Kordophone client daemon.
|
A GTK4/Libadwaita Linux client for the Kordophone client daemon.
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
6
gtk/dist/rpm/kordophone.spec
vendored
6
gtk/dist/rpm/kordophone.spec
vendored
@@ -1,5 +1,6 @@
|
|||||||
|
%global app_version %{!?app_version:1.3.0}
|
||||||
Name: kordophone
|
Name: kordophone
|
||||||
Version: 1.0.2
|
Version: %{app_version}
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: GTK4/Libadwaita client for Kordophone
|
Summary: GTK4/Libadwaita client for Kordophone
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@ Requires: libadwaita
|
|||||||
Requires: glib2
|
Requires: glib2
|
||||||
Requires: libgee
|
Requires: libgee
|
||||||
Requires: libsecret
|
Requires: libsecret
|
||||||
Requires: kordophoned >= 1.0.0
|
Requires: kordophoned >= 1.3.0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A GTK4/Libadwaita Linux Client for the Kordophone client daemon.
|
A GTK4/Libadwaita Linux Client for the Kordophone client daemon.
|
||||||
@@ -49,4 +50,3 @@ popd
|
|||||||
%changelog
|
%changelog
|
||||||
* Fri Aug 8 2025 James Magahern <james@magahern.com>
|
* Fri Aug 8 2025 James Magahern <james@magahern.com>
|
||||||
- Updated rpmspec
|
- Updated rpmspec
|
||||||
|
|
||||||
|
|||||||
@@ -60,22 +60,31 @@ private class ImageBubbleLayout : BubbleLayout
|
|||||||
this.is_downloaded = false;
|
this.is_downloaded = false;
|
||||||
this.cached_texture = TextureCache.get_instance().get_texture(attachment_guid);
|
this.cached_texture = TextureCache.get_instance().get_texture(attachment_guid);
|
||||||
|
|
||||||
|
if (this.cached_texture != null) {
|
||||||
|
this.image_size = Graphene.Size() {
|
||||||
|
width = (float)this.cached_texture.get_width(),
|
||||||
|
height = (float)this.cached_texture.get_height()
|
||||||
|
};
|
||||||
|
SizeCache.get_instance().set_size(attachment_guid, this.image_size);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate image dimensions for layout
|
// Calculate image dimensions for layout
|
||||||
calculate_image_dimensions(image_size);
|
calculate_image_dimensions(image_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calculate_image_dimensions(Graphene.Size? image_size) {
|
private void calculate_image_dimensions(Graphene.Size? image_size) {
|
||||||
if (image_size != null) {
|
|
||||||
this.image_size = image_size;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var cached_size = SizeCache.get_instance().get_size(attachment_guid);
|
var cached_size = SizeCache.get_instance().get_size(attachment_guid);
|
||||||
if (cached_size != null) {
|
if (cached_size != null) {
|
||||||
this.image_size = cached_size;
|
this.image_size = cached_size;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (image_size != null) {
|
||||||
|
this.image_size = image_size;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.image_size = Graphene.Size() { width = 200.0f, height = 150.0f };
|
this.image_size = Graphene.Size() { width = 200.0f, height = 150.0f };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -328,6 +328,7 @@ private class TranscriptDrawingArea : Widget
|
|||||||
private void recompute_message_layouts() {
|
private void recompute_message_layouts() {
|
||||||
var container_width = get_width();
|
var container_width = get_width();
|
||||||
float max_width = container_width * 0.90f;
|
float max_width = container_width * 0.90f;
|
||||||
|
float image_max_width = max_width * 0.75f;
|
||||||
|
|
||||||
DateTime? last_date = null;
|
DateTime? last_date = null;
|
||||||
string? last_sender = null;
|
string? last_sender = null;
|
||||||
@@ -371,7 +372,7 @@ private class TranscriptDrawingArea : Widget
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var image_layout = new ImageBubbleLayout(attachment.guid, message.from_me, this, max_width, image_size);
|
var image_layout = new ImageBubbleLayout(attachment.guid, message.from_me, this, image_max_width, image_size);
|
||||||
image_layout.id = @"image-$(attachment.guid)";
|
image_layout.id = @"image-$(attachment.guid)";
|
||||||
|
|
||||||
if (animate) {
|
if (animate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user