Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
45901c9
All: Update dependencies & Fix GObject Error
JoseBritto Dec 28, 2024
807258c
Flatpak: Bump gnome platform to 47
JoseBritto Dec 28, 2024
57c879e
Update changelog
JoseBritto Dec 28, 2024
6ca5589
All - Upgrade to dotnet9 and update nuget sources
JoseBritto Jan 14, 2025
604c730
nuget-sources.json: Use cake 4.0
JoseBritto Jan 15, 2025
8774ced
snap: use dotnet 9
JoseBritto Jan 15, 2025
9e0b973
workflows: use dotnet 9
JoseBritto Jan 15, 2025
2fee46d
Tests: Use dotnet 9
JoseBritto Jan 15, 2025
07313f5
Attempt to fix snap and flatpak failing due to yelp/bg not found
JoseBritto Jan 15, 2025
31ff2bf
Resources: Rename resources-symbolic.svg
JoseBritto Mar 3, 2025
531fe4d
Shared: Delete outdated repeated transactions immediately when date o…
JoseBritto Mar 4, 2025
89ce7cb
CI: Update dependency versions
JoseBritto Mar 4, 2025
ad7c803
codespell: Transaction.cs - Fix spelling
JoseBritto Mar 4, 2025
80ecb2d
Update changelog
JoseBritto Mar 4, 2025
5d6129a
Bump version to 2025.3.0
JoseBritto Mar 5, 2025
95a5014
Update SQlite QuestPDF and SQLitePCLRaw.bundle_e_sqlcipher
JoseBritto Mar 5, 2025
bfcadc4
Upgrade Gir.Core
JoseBritto Mar 11, 2025
8297dd2
Updrade SixLabors.ImageSharp & SQLitePCLRaw.bundle_e_sqlcipher
JoseBritto Mar 11, 2025
48bc8e7
Update nuget sources
JoseBritto Mar 11, 2025
7432ea7
GNOME: Remove C interop methods for Gtk Calendar
JoseBritto Mar 11, 2025
172e3d3
Gnome: TransactionDialog - Remove C interop
JoseBritto Mar 11, 2025
299b165
GNOME: Replace GetExtRGBA with GetRGBA
JoseBritto Mar 11, 2025
6ed0692
GNOME: Remove Gdk & Gtk Helpers
JoseBritto Mar 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login != 'weblate' }}
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-45
image: bilelmoussaoui/flatpak-github-actions:gnome-47
options: --privileged
strategy:
matrix:
arch: [x86_64]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6.4
with:
bundle: org.nickvision.money.flatpak
manifest-path: flatpak/org.nickvision.money.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '8.0.x' ]
dotnet-version: [ '9.0.x' ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3.2.0
with:
Expand Down
2 changes: 1 addition & 1 deletion NickvisionMoney.GNOME/Blueprints/window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Adw.ApplicationWindow _root {

[end]
Gtk.ToggleButton _dashboardButton {
icon-name: "resources-symbolic";
icon-name: "resources2-symbolic";
tooltip-text: _("Dashboard");
visible: false;
}
Expand Down
5 changes: 3 additions & 2 deletions NickvisionMoney.GNOME/Controls/AutocompleteBox.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using NickvisionMoney.GNOME.Helpers;
using System;
using System.Collections.Generic;
using Gtk.Internal;
using Builder = NickvisionMoney.GNOME.Helpers.Builder;

namespace NickvisionMoney.GNOME.Controls;

Expand All @@ -24,7 +25,7 @@ public class AutocompleteBox<T> : Gtk.Box
/// </summary>
/// <param name="builder">Gtk.Builder</param>
/// <param name="parent">Adw.EntryRow</param>
private AutocompleteBox(Gtk.Builder builder, Adw.EntryRow parent) : base(builder.GetPointer("_root"), false)
private AutocompleteBox(Gtk.Builder builder, Adw.EntryRow parent) : base(builder.GetObject("_root").Handle as BoxHandle)
{
_parent = parent;
_rows = new List<Gtk.Widget>();
Expand Down
3 changes: 2 additions & 1 deletion NickvisionMoney.GNOME/Controls/CurrencyConverterDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Adw.Internal;
using static Nickvision.Aura.Localization.Gettext;

namespace NickvisionMoney.GNOME.Controls;
Expand All @@ -31,7 +32,7 @@ public class CurrencyConverterDialog : Adw.Window
/// <param name="parent">Gtk.Window</param>
/// <param name="iconName">The name of the icon for the dialog</param>
/// <param name="useNativeDigits">Whether or not to use native digits when displaying the result amount</param>
private CurrencyConverterDialog(Gtk.Builder builder, Gtk.Window parent, string iconName, bool useNativeDigits) : base(builder.GetPointer("_root"), false)
private CurrencyConverterDialog(Gtk.Builder builder, Gtk.Window parent, string iconName, bool useNativeDigits) : base(builder.GetObject("_root").Handle as WindowHandle)
{
_iconName = iconName;
_useNativeDigits = useNativeDigits;
Expand Down
16 changes: 9 additions & 7 deletions NickvisionMoney.GNOME/Controls/GroupRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using NickvisionMoney.Shared.Models;
using System;
using System.Globalization;
using Adw.Internal;

namespace NickvisionMoney.GNOME.Controls;

Expand Down Expand Up @@ -37,7 +38,7 @@ public partial class GroupRow : Adw.ActionRow
/// </summary>
public event EventHandler<uint>? EditTriggered;

private GroupRow(Gtk.Builder builder, Group group, CultureInfo cultureAmount, bool useNativeDigits, bool filterActive, string defaultColor) : base(builder.GetPointer("_root"), false)
private GroupRow(Gtk.Builder builder, Group group, CultureInfo cultureAmount, bool useNativeDigits, bool filterActive, string defaultColor) : base(builder.GetObject("_root").Handle as ActionRowHandle)
{
_cultureAmount = cultureAmount;
_defaultColor = defaultColor;
Expand Down Expand Up @@ -105,24 +106,25 @@ public void UpdateRow(Group group, string defaultColor, CultureInfo cultureAmoun
_filterActive = filterActive;
_cultureAmount = cultureAmount;
//Color
if (!GdkHelpers.RGBA.Parse(out var color, _group.RGBA))
var color = new Gdk.RGBA();
if (!color.Parse(_group.RGBA))
{
GdkHelpers.RGBA.Parse(out color, _defaultColor);
color.Parse(_defaultColor);
}
//Row Settings
SetTitle(_group.Name);
SetSubtitle(_group.Description);
//Filter Checkbox
var red = (int)(color!.Value.Red * 255);
var green = (int)(color.Value.Green * 255);
var blue = (int)(color.Value.Blue * 255);
var red = (int)(color.Red * 255);
var green = (int)(color.Green * 255);
var blue = (int)(color.Blue * 255);
using var pixbuf = GdkPixbuf.Pixbuf.New(GdkPixbuf.Colorspace.Rgb, false, 8, 1, 1);
if (uint.TryParse(red.ToString("X2") + green.ToString("X2") + blue.ToString("X2") + "FF", NumberStyles.HexNumber, null, out var colorPixbuf))
{
pixbuf.Fill(colorPixbuf);
_filterCheckBackground.SetFromPixbuf(pixbuf);
}
var luma = color.Value.Red * 0.2126 + color.Value.Green * 0.7152 + color.Value.Blue * 0.0722;
var luma = color.Red * 0.2126 + color.Green * 0.7152 + color.Blue * 0.0722;
_filterCheckButton.AddCssClass(luma > 0.5 ? "group-filter-check-dark" : "group-filter-check-light");
_filterCheckButton.RemoveCssClass(luma > 0.5 ? "group-filter-check-light" : "group-filter-check-dark");
_filterCheckButton.SetActive(_filterActive);
Expand Down
3 changes: 2 additions & 1 deletion NickvisionMoney.GNOME/Controls/NewPasswordDialog.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using NickvisionMoney.GNOME.Helpers;
using System.Threading.Tasks;
using Adw.Internal;

namespace NickvisionMoney.GNOME.Controls;

Expand All @@ -13,7 +14,7 @@ public partial class NewPasswordDialog : Adw.Window
[Gtk.Connect] private readonly Adw.PasswordEntryRow _confirmPasswordEntry;
[Gtk.Connect] private readonly Gtk.Button _addButton;

private NewPasswordDialog(Gtk.Builder builder, Gtk.Window parent, string title, TaskCompletionSource<string?> tcs) : base(builder.GetPointer("_root"), false)
private NewPasswordDialog(Gtk.Builder builder, Gtk.Window parent, string title, TaskCompletionSource<string?> tcs) : base(builder.GetObject("_root").Handle as WindowHandle)
{
var setPassword = false;
builder.Connect(this);
Expand Down
3 changes: 2 additions & 1 deletion NickvisionMoney.GNOME/Controls/PasswordDialog.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using NickvisionMoney.GNOME.Helpers;
using System.Threading.Tasks;
using Adw.Internal;

namespace NickvisionMoney.GNOME.Controls;

Expand All @@ -12,7 +13,7 @@ public partial class PasswordDialog : Adw.Window
[Gtk.Connect] private readonly Adw.PasswordEntryRow _passwordEntry;
[Gtk.Connect] private readonly Gtk.Button _unlockButton;

private PasswordDialog(Gtk.Builder builder, Gtk.Window parent, string accountTitle, TaskCompletionSource<string?> tcs) : base(builder.GetPointer("_root"), false)
private PasswordDialog(Gtk.Builder builder, Gtk.Window parent, string accountTitle, TaskCompletionSource<string?> tcs) : base(builder.GetObject("_root").Handle as WindowHandle)
{
var unlock = false;
builder.Connect(this);
Expand Down
9 changes: 5 additions & 4 deletions NickvisionMoney.GNOME/Controls/RecentAccountRow.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using NickvisionMoney.GNOME.Helpers;
using NickvisionMoney.Shared.Models;
using System;
using Adw.Internal;
using static Nickvision.Aura.Localization.Gettext;

namespace NickvisionMoney.GNOME.Controls;
Expand All @@ -11,7 +12,7 @@ namespace NickvisionMoney.GNOME.Controls;
public partial class RecentAccountRow : Adw.ActionRow
{
private readonly RecentAccount _recentAccount;
private readonly GdkHelpers.RGBA _color;
private readonly Gdk.RGBA _color;

[Gtk.Connect] private readonly Gtk.Image _prefixColor;
[Gtk.Connect] private readonly Gtk.Button _prefixButton;
Expand All @@ -30,7 +31,7 @@ public partial class RecentAccountRow : Adw.ActionRow
/// <param name="colorString">The color string of the recent account</param>
/// <param name="onStartScreen">Whether or not the row is being shown on the start screen</param>
/// <param name="canRemove">Whether or not the recent account can be removed</param>
private RecentAccountRow(Gtk.Builder builder, RecentAccount account, string colorString, bool onStartScreen, bool canRemove) : base(builder.GetPointer("_root"), false)
private RecentAccountRow(Gtk.Builder builder, RecentAccount account, string colorString, bool onStartScreen, bool canRemove) : base(builder.GetObject("_root").Handle as ActionRowHandle)
{
_recentAccount = account;
builder.Connect(this);
Expand All @@ -39,8 +40,8 @@ private RecentAccountRow(Gtk.Builder builder, RecentAccount account, string colo
_prefixButton.OnClicked += (sender, e) => Selected?.Invoke(this, _recentAccount);
_removeButton.SetVisible(canRemove);
_removeButton.OnClicked += (sender, e) => RemoveRequested?.Invoke(this, _recentAccount);
GdkHelpers.RGBA.Parse(out var color, colorString);
_color = color!.Value;
_color = new Gdk.RGBA();
_color.Parse(colorString);
var luma = _color.Red * 0.2126 + _color.Green * 0.7152 + _color.Blue * 0.0722;
if (onStartScreen)
{
Expand Down
3 changes: 2 additions & 1 deletion NickvisionMoney.GNOME/Controls/RemindersDialog.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

using NickvisionMoney.GNOME.Helpers;
using System.Collections.Generic;
using Adw.Internal;

namespace NickvisionMoney.GNOME.Controls;

Expand All @@ -22,7 +23,7 @@ public partial class RemindersDialog : Adw.Window
/// <param name="iconName">Icon name for the window</param>
/// <param name="description">The description of the reminders</param>
/// <param name="reminders">The list of reminders</param>
private RemindersDialog(Gtk.Builder builder, Gtk.Window parent, string iconName, string description, List<(string Title, string Subtitle)> reminders) : base(builder.GetPointer("_root"), false)
private RemindersDialog(Gtk.Builder builder, Gtk.Window parent, string iconName, string description, List<(string Title, string Subtitle)> reminders) : base(builder.GetObject("_root").Handle as WindowHandle)
{
builder.Connect(this);
//Dialog Settings
Expand Down
17 changes: 10 additions & 7 deletions NickvisionMoney.GNOME/Controls/TransactionId.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using NickvisionMoney.GNOME.Helpers;
using System.Globalization;
using Gtk.Internal;
using Builder = NickvisionMoney.GNOME.Helpers.Builder;

namespace NickvisionMoney.GNOME.Controls;

Expand All @@ -15,7 +17,7 @@ public partial class TransactionId : Gtk.Overlay
[Gtk.Connect] private readonly Gtk.Image _colorImage;
[Gtk.Connect] private readonly Gtk.Label _idLabel;

private TransactionId(Gtk.Builder builder, uint id) : base(builder.GetPointer("_root"), false)
private TransactionId(Gtk.Builder builder, uint id) : base(builder.GetObject("_root").Handle as OverlayHandle)
{
_id = id;
builder.Connect(this);
Expand All @@ -41,13 +43,14 @@ public TransactionId(uint id) : this(Builder.FromFile("transaction_id.ui"), id)
/// <param name="defaultColor">A default color</param>
public void UpdateColor(string colorString, string defaultColor, bool useNativeDigits)
{
if (!GdkHelpers.RGBA.Parse(out var color, colorString))
var color = new Gdk.RGBA();
if (!color.Parse(colorString))
{
GdkHelpers.RGBA.Parse(out color, defaultColor);
color.Parse(defaultColor);
}
var red = (int)(color!.Value.Red * 255);
var green = (int)(color.Value.Green * 255);
var blue = (int)(color.Value.Blue * 255);
var red = (int)(color.Red * 255);
var green = (int)(color.Green * 255);
var blue = (int)(color.Blue * 255);
var idString = _id.ToString();
var nativeDigits = CultureInfo.CurrentCulture.NumberFormat.NativeDigits;
if (useNativeDigits && "0" != nativeDigits[0])
Expand All @@ -63,7 +66,7 @@ public void UpdateColor(string colorString, string defaultColor, bool useNativeD
.Replace("8", nativeDigits[8])
.Replace("9", nativeDigits[9]);
}
var luma = color.Value.Red * 0.2126 + color.Value.Green * 0.7152 + color.Value.Blue * 0.0722;
var luma = color.Red * 0.2126 + color.Green * 0.7152 + color.Blue * 0.0722;
var fgcolor = luma > 0.5 ? "#000000cc" : "#ffffff";
_idLabel.SetLabel($"<span size=\"10pt\" weight=\"bold\" color=\"{fgcolor}\">{idString}</span>");
if (uint.TryParse(red.ToString("X2") + green.ToString("X2") + blue.ToString("X2") + "FF", System.Globalization.NumberStyles.HexNumber, null, out var colorPixbuf))
Expand Down
5 changes: 3 additions & 2 deletions NickvisionMoney.GNOME/Controls/TransactionRow.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using NickvisionMoney.GNOME.Helpers;
using NickvisionMoney.Shared.Helpers;
using NickvisionMoney.Shared.Models;
using System;
using System.Collections.Generic;
using System.Globalization;
using Gtk.Internal;
using static Nickvision.Aura.Localization.Gettext;
using Builder = NickvisionMoney.GNOME.Helpers.Builder;

namespace NickvisionMoney.GNOME.Controls;

Expand Down Expand Up @@ -45,7 +46,7 @@ public partial class TransactionRow : Gtk.FlowBoxChild
/// <param name="cultureAmount">The CultureInfo to use for the amount string</param>
/// <param name="useNativeDigits">Whether to use native digits</param>
/// <param name="defaultColor">Default transaction color</param>
private TransactionRow(Gtk.Builder builder, Transaction transaction, Dictionary<uint, Group> groups, CultureInfo cultureAmount, bool useNativeDigits, string defaultColor) : base(builder.GetPointer("_root"), false)
private TransactionRow(Gtk.Builder builder, Transaction transaction, Dictionary<uint, Group> groups, CultureInfo cultureAmount, bool useNativeDigits, string defaultColor) : base(builder.GetObject("_root").Handle as FlowBoxChildHandle)
{
_transaction = transaction;
_defaultColor = defaultColor;
Expand Down
62 changes: 0 additions & 62 deletions NickvisionMoney.GNOME/Helpers/GdkHelpers.Cs

This file was deleted.

Loading