Skip to content

Commit

Permalink
GNOME - Fix DnD Not Working
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Jan 5, 2024
1 parent 85dcc6f commit bf637e5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
9 changes: 5 additions & 4 deletions NickvisionMoney.GNOME/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ public Program(string[] args)
_mainWindow = null;
_mainWindowController = new MainWindowController(args);
_mainWindowController.AppInfo.Changelog =
@"* Fixed an issue where the generated ids of new transactions were incorrect.
* Fixed an issue that caused sort to behave inconsistently.
* Fixed calendar not showing marks for transactions after pressing the ""Today"" button.
* Added more logging to help debug issues.
@"* Fixed an issue where the generated ids of new transactions were incorrect
* Fixed an issue that caused sort to behave inconsistently
* Fixed an issue where dragging and dropping an account file was not working
* Fixed calendar not showing marks for transactions after pressing the ""Today"" button
* Added more logging to help debug issues
* Updated and added translations (Thanks to everyone on Weblate)!";
_application.OnActivate += OnActivate;
if (File.Exists(Path.GetFullPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)) + "/org.nickvision.money.gresource"))
Expand Down
13 changes: 5 additions & 8 deletions NickvisionMoney.GNOME/Views/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,15 +494,12 @@ private void About(Gio.SimpleAction sender, EventArgs e)
/// <param name="e">Gtk.DropTarget.DropSignalArgs</param>
private bool OnDrop(Gtk.DropTarget sender, Gtk.DropTarget.DropSignalArgs e)
{
var obj = e.Value.GetObject();
if (obj is Gio.FileHelper file)
var file = new Gio.FileHlper(e.Value.GetObject()!.Handle, false);
var path = file.GetPath() ?? "";
if (File.Exists(path))
{
var path = file.GetPath() ?? "";
if (File.Exists(path))
{
_controller.AddAccountAsync(path).Wait();
return true;
}
Task.Run(async () => await _controller.AddAccountAsync(path));
return true;
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion NickvisionMoney.Shared/Controllers/MainWindowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public MainWindowController(string[] args)
Directory.Delete($"{UserDirectories.Config}{Path.DirectorySeparatorChar}Nickvision{Path.DirectorySeparatorChar}{AppInfo.Name}", true);
}
Aura.Active.SetConfig<Configuration>("config");
AppInfo.Version = "2023.12.0-next";
AppInfo.Version = "2024.1.0-next";
AppInfo.ShortName = _("Denaro");
AppInfo.Description = _("Manage your personal finances");
AppInfo.SourceRepo = new Uri("https://github.com/NickvisionApps/Denaro");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@
<mediatype>application/x-nmoney</mediatype>
</provides>
<releases>
<release version="2023.12.0-next" date="2023-12-01">
<release version="2024.1.0-next" date="2024-01-01">
<description translatable="no">
<p>- Fixed an issue where the generated ids of new transactions were incorrect.</p>
<p>- Fixed an issue that caused sort to behave inconsistently.</p>
<p>- Fixed calendar not showing marks for transactions after pressing the "Today" button.</p>
<p>- Added more logging to help debug issues. </p>
<p>- Fixed an issue where the generated ids of new transactions were incorrect</p>
<p>- Fixed an issue that caused sort to behave inconsistently</p>
<p>- Fixed an issue where dragging and dropping an account file was not working</p>
<p>- Fixed calendar not showing marks for transactions after pressing the "Today" button</p>
<p>- Added more logging to help debug issues</p>
<p>- Updated translations (Thanks to everyone on Weblate)!</p>
</description>
</release>
Expand Down

0 comments on commit bf637e5

Please sign in to comment.