3 Commits
Author SHA1 Message Date
rogierandCursor 9b9ac36261 1.1.2
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 00:38:41 +01:00
rogier ceec9ecdc0 Toon alleen de laatste versie. 2026-11-09 00:26:57 +01:00
rogierandCursor eb1fc40534 1.1.1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 00:18:46 +01:00
8 changed files with 143 additions and 15 deletions

No files matched your search

+16
View File
@@ -2,6 +2,22 @@
Alle noemenswaardige wijzigingen in kniip staan in dit bestand. De nieuwste versie staat bovenaan.
## 1.1.2 - 2026-11-09
### Opgelost
- **Link kopiëren na uploaden.** Na het uploaden kon kniip de link soms niet op het klembord zetten en meldde dan dat het klembord bezet was. Dat gebeurde vooral als de klembordgeschiedenis van Windows (Win+V) of een ander klembordprogramma actief is. kniip zet de link nu op een directere manier op het klembord en probeert het langer opnieuw. Dit geldt ook voor het uploaden van screencasts en de test-upload in de instellingen.
## 1.1.1 - 2026-11-09
### Gewijzigd
- **Instellingen zonder scrollbalk.** Het instellingenvenster is iets hoger geworden, zodat elke tab, ook **Opslaan** met de nieuwe naamvelden, in één keer past. De changelog in de tab **Update** heeft daardoor ook meer ruimte.
### Opgelost
- De downloadlinks in de handleiding (README) wezen naar een verkeerde tag en gaven een foutmelding.
## 1.1.0 - 2026-11-09
### Nieuw
+5 -5
View File
@@ -24,9 +24,9 @@ kniip is een annotatie-editor die naast het Windows Knipprogramma werkt. Maak ee
| Versie | Installer |
| ------ | --------- |
| Nieuwste versie | [Alle releases](https://git.hibbit.net/rogier/kniip/releases) |
| 1.1.0 | [Kniip-Setup-1.1.0.exe](https://git.hibbit.net/rogier/kniip/releases/download/v1.1.0/Kniip-Setup-1.1.0.exe) |
| 1.0.0 | [Kniip-Setup-1.0.0.exe](https://git.hibbit.net/rogier/kniip/releases/download/v1.0.0/Kniip-Setup-1.0.0.exe) |
| 1.1.2 | [Kniip-Setup-1.1.2.exe](https://git.hibbit.net/rogier/kniip/releases/download/1.1.2/Kniip-Setup-1.1.2.exe) |
Oudere versies vind je bij [alle releases](https://git.hibbit.net/rogier/kniip/releases).
## Installeren
@@ -70,7 +70,7 @@ Vereisten:
Bouwen:
```powershell
.\build.ps1 # versie 1.1.0
.\build.ps1 # versie 1.1.2
.\build.ps1 -Version 1.2.0 # andere versie
```
@@ -85,7 +85,7 @@ Het script levert op:
1. Bouw met `.\build.ps1 -Version <versie>`.
2. Maak op [git.hibbit.net](https://git.hibbit.net/rogier/kniip/releases) een release met tag `v<versie>` en voeg `artifacts\Kniip-Setup-<versie>.exe` toe als bijlage.
3. Schrijf de wijzigingen in markdown in de beschrijving van de release. kniip toont die als changelog onder **Instellingen > Update**.
4. Voeg de nieuwe versie toe aan de tabel onder [Downloaden](#downloaden).
4. Vervang de versie en de link in de tabel onder [Downloaden](#downloaden) door de nieuwe versie.
### Updaten vanuit kniip
+1 -1
View File
@@ -7,7 +7,7 @@
# .\build.ps1 -Version 1.2.0
param(
[string]$Version = "1.1.0",
[string]$Version = "1.1.2",
[string]$Runtime = "win-x64"
)
+1 -1
View File
@@ -5,7 +5,7 @@
#define AppName "kniip"
#define AppExe "Kniip.exe"
#ifndef AppVersion
#define AppVersion "1.1.0"
#define AppVersion "1.1.2"
#endif
#ifndef PublishDir
#define PublishDir "..\artifacts\publish"
+84
View File
@@ -4,9 +4,11 @@ using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Kniip.Capture;
using Kniip.Interop;
namespace Kniip.Editor;
@@ -68,13 +70,95 @@ internal static class ClipboardWriter
return TrySet(data);
}
/// <summary>
/// Tekst gaat rechtstreeks via Win32 op het klembord. De OLE-route van WPF moet het klembord
/// daarna nog leegspoelen, en dat mislukt zodra een klembordbeheerder het meteen opent.
/// </summary>
public static bool SetText(string text)
{
if (TrySetUnicodeText(text))
{
return true;
}
var data = new DataObject();
data.SetText(text);
return TrySet(data);
}
private static HwndSource? _owner;
private static IntPtr OwnerHandle
{
get
{
// Een venster als eigenaar is verplicht: zonder eigenaar weigert SetClipboardData na EmptyClipboard.
_owner ??= new HwndSource(new HwndSourceParameters("KniipClipboardWriter")
{
ParentWindow = NativeMethods.HWND_MESSAGE,
WindowStyle = 0
});
return _owner.Handle;
}
}
private static bool TrySetUnicodeText(string text)
{
IntPtr owner = OwnerHandle;
for (int attempt = 0; attempt < 20; attempt++)
{
if (NativeMethods.OpenClipboard(owner))
{
try
{
return NativeMethods.EmptyClipboard() && PutUnicodeText(text);
}
finally
{
NativeMethods.CloseClipboard();
}
}
Thread.Sleep(50);
}
return false;
}
private static bool PutUnicodeText(string text)
{
IntPtr handle = NativeMethods.GlobalAlloc(NativeMethods.GMEM_MOVEABLE, (UIntPtr)((text.Length + 1) * 2));
if (handle == IntPtr.Zero)
{
return false;
}
IntPtr target = NativeMethods.GlobalLock(handle);
if (target == IntPtr.Zero)
{
NativeMethods.GlobalFree(handle);
return false;
}
try
{
Marshal.Copy(text.ToCharArray(), 0, target, text.Length);
Marshal.WriteInt16(target, text.Length * 2, 0);
}
finally
{
NativeMethods.GlobalUnlock(handle);
}
if (NativeMethods.SetClipboardData(NativeMethods.CF_UNICODETEXT, handle) == IntPtr.Zero)
{
NativeMethods.GlobalFree(handle);
return false;
}
return true;
}
private static bool TrySet(DataObject data)
{
for (int attempt = 0; attempt < 5; attempt++)
+31
View File
@@ -26,6 +26,37 @@ internal static class NativeMethods
[DllImport("user32.dll")]
public static extern uint GetClipboardSequenceNumber();
public const uint CF_UNICODETEXT = 13;
public const uint GMEM_MOVEABLE = 0x0002;
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool OpenClipboard(IntPtr hWndNewOwner);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool CloseClipboard();
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EmptyClipboard();
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr SetClipboardData(uint format, IntPtr hMem);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr GlobalAlloc(uint flags, UIntPtr bytes);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr GlobalLock(IntPtr hMem);
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GlobalUnlock(IntPtr hMem);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr GlobalFree(IntPtr hMem);
[DllImport("user32.dll")]
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
+1 -1
View File
@@ -18,7 +18,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<Product>kniip</Product>
<Description>Annotatie-editor naast het Windows Knipprogramma</Description>
<Version>1.1.0</Version>
<Version>1.1.2</Version>
<SatelliteResourceLanguages>nl;en</SatelliteResourceLanguages>
<!-- WPF regelt DPI via app.manifest; de WinForms-analyzer is hier niet van toepassing. -->
<NoWarn>$(NoWarn);WFAC010</NoWarn>
+4 -7
View File
@@ -1,7 +1,7 @@
<Window x:Class="Kniip.Settings.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="kniip instellingen" Width="720" Height="540" ResizeMode="NoResize"
Title="kniip instellingen" Width="720" Height="600" ResizeMode="NoResize"
WindowStartupLocation="CenterScreen" Background="{StaticResource WindowBrush}"
FontFamily="Segoe UI" FontSize="13" Icon="pack://application:,,,/AppIcon.ico">
<Window.Resources>
@@ -70,11 +70,8 @@
</Grid.ColumnDefinitions>
<TabPanel Grid.Column="0" IsItemsHost="True" VerticalAlignment="Top" Background="Transparent" />
<Border Grid.Column="1" Background="White" BorderBrush="#E5E5E5" BorderThickness="1"
CornerRadius="6" SnapsToDevicePixels="True">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
Padding="16,14">
<ContentPresenter ContentSource="SelectedContent" />
</ScrollViewer>
CornerRadius="6" SnapsToDevicePixels="True" Padding="16,14">
<ContentPresenter ContentSource="SelectedContent" />
</Border>
</Grid>
</ControlTemplate>
@@ -267,7 +264,7 @@
</StackPanel>
<ProgressBar x:Name="DownloadProgress" Height="4" Minimum="0" Maximum="1" Margin="0,0,0,8"
Foreground="{StaticResource AccentBrush}" Visibility="Collapsed" />
<Border BorderBrush="{StaticResource DividerBrush}" BorderThickness="1" CornerRadius="4" Height="270">
<Border BorderBrush="{StaticResource DividerBrush}" BorderThickness="1" CornerRadius="4" Height="300">
<FlowDocumentScrollViewer x:Name="ChangelogViewer" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled" IsToolBarVisible="False"
Zoom="100" MinZoom="100" MaxZoom="100" Focusable="False" />