Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.2.2

- Simplified the large PDF/XPS export choice to one short explanation and three clear actions.
- Made the whole-notebook option a full-size neutral button and removed persuasive wording.

## 1.2.1

- Enlarged the large PDF/XPS export dialog so every export option is fully visible.
Expand Down
1 change: 0 additions & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ private async Task<bool> ConvertNotebookJobsToSectionsAsync(

var warningWindow = new RenderedExportWarningWindow(
format,
notebookJobs.Count,
sectionJobs.Count > 0)
{
Owner = this
Expand Down
2 changes: 1 addition & 1 deletion OneNoteExporter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<AssemblyName>OneNoteExporter</AssemblyName>
<RootNamespace>OneNoteExporter</RootNamespace>
<Version>1.2.1</Version>
<Version>1.2.2</Version>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
A Windows desktop application to export OneNote notebooks to portable formats.
Talks directly to OneNote Desktop via the COM API.

![version](https://img.shields.io/badge/version-1.2.1-blueviolet?style=flat-square)
![version](https://img.shields.io/badge/version-1.2.2-blueviolet?style=flat-square)
![platform](https://img.shields.io/badge/platform-Windows%2010%2F11-0078D7?style=flat-square&logo=windows&logoColor=white)
![license](https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square)
![built with](https://img.shields.io/badge/built%20with-.NET%2010%20%2F%20WPF-512BD4?style=flat-square&logo=dotnet&logoColor=white)
Expand Down Expand Up @@ -40,7 +40,7 @@ checksum are available as workflow artifacts for 14 days.
To publish a release:

1. Update `<Version>` in `OneNoteExporter.csproj` and commit the change.
2. Create and push a matching tag, for example `v1.2.1`.
2. Create and push a matching tag, for example `v1.2.2`.
3. GitHub Actions builds the installer, creates the GitHub release with generated notes, and
uploads the installer plus checksum automatically.

Expand Down
75 changes: 27 additions & 48 deletions RenderedExportWarningWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Icon="icon.ico"
Title="Large PDF/XPS export"
Width="700" Height="555"
MinWidth="620" MinHeight="520"
Title="PDF/XPS export"
Width="640" Height="430"
MinWidth="580" MinHeight="400"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
Expand All @@ -18,7 +18,6 @@
CornerRadius="8">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
Expand All @@ -27,81 +26,61 @@

<TextBlock Grid.Row="0"
x:Name="TitleText"
FontSize="18"
FontSize="20"
FontWeight="Bold"
TextWrapping="Wrap"
Foreground="{StaticResource PrimaryBlue}"/>

<TextBlock Grid.Row="1"
x:Name="ExplanationText"
Margin="0,10,0,14"
Margin="0,10,0,0"
TextWrapping="Wrap"
FontSize="13"
LineHeight="19"
FontSize="14"
LineHeight="21"
Foreground="{StaticResource TextPrimary}"/>

<Border Grid.Row="2"
Padding="12,10"
Background="{StaticResource WarningBg}"
BorderBrush="{StaticResource WarningBorder}"
BorderThickness="1"
CornerRadius="5">
<TextBlock Text="OneNote does not report a notebook's size through its COM interface, so the app cannot reliably detect a 300 MB notebook before export."
TextWrapping="Wrap"
FontSize="12"
Foreground="{StaticResource WarningFg}"/>
</Border>

<ScrollViewer Grid.Row="3"
Margin="0,16,0,0"
<ScrollViewer Grid.Row="2"
Margin="0,20,0,0"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled">
<StackPanel>
<Button x:Name="SectionsButton"
Style="{StaticResource PrimaryButtonStyle}"
IsDefault="True"
HorizontalContentAlignment="Left"
Padding="14,10"
Padding="16,12"
Click="SectionsButton_Click">
<StackPanel>
<TextBlock Text="Recommended: Export as individual sections"
FontWeight="SemiBold"/>
<TextBlock x:Name="SectionsDescriptionText"
Margin="0,3,0,0"
FontSize="11"
FontWeight="Normal"
TextWrapping="Wrap"/>
</StackPanel>
<TextBlock Text="Export individual sections (recommended)"
FontSize="14"
TextWrapping="Wrap"
TextAlignment="Center"/>
</Button>

<Button x:Name="OneNotePackageButton"
Style="{StaticResource GrayButtonStyle}"
Margin="0,8,0,0"
HorizontalContentAlignment="Left"
Padding="14,9"
Margin="0,10,0,0"
Padding="16,12"
Click="OneNotePackageButton_Click">
<TextBlock x:Name="OneNotePackageButtonText"
Text="Create a complete OneNote package (.onepkg) instead"
TextWrapping="Wrap"/>
Text="Create a complete OneNote package (.onepkg)"
FontSize="14"
TextWrapping="Wrap"
TextAlignment="Center"/>
</Button>

<Button x:Name="WholeNotebookButton"
Margin="0,8,0,0"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Padding="0"
Background="Transparent"
BorderThickness="0"
Foreground="{StaticResource TextSecondary}"
Cursor="Hand"
Style="{StaticResource GrayButtonStyle}"
Margin="0,10,0,0"
Padding="16,12"
Click="WholeNotebookButton_Click">
<TextBlock x:Name="WholeNotebookButtonText"
TextWrapping="Wrap"/>
FontSize="14"
TextWrapping="Wrap"
TextAlignment="Center"/>
</Button>
</StackPanel>
</ScrollViewer>

<Button Grid.Row="4"
<Button Grid.Row="3"
Content="Cancel"
Style="{StaticResource SmallButtonStyle}"
Width="90"
Expand Down
20 changes: 5 additions & 15 deletions RenderedExportWarningWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,26 @@ public partial class RenderedExportWarningWindow : Window

public RenderedExportWarningWindow(
string exportFormat,
int notebookCount,
bool hasSelectedSections)
{
InitializeComponent();

string formatName = exportFormat.Equals("pdf", StringComparison.OrdinalIgnoreCase)
? "PDF"
: "XPS";
string notebookLabel = notebookCount == 1
? "the selected notebook"
: $"the {notebookCount} selected notebooks";

TitleText.Text = $"Whole-notebook {formatName} exports can fail when they are large";
TitleText.Text = $"Large {formatName} exports may fail";
ExplanationText.Text =
$"OneNote Desktop must render {notebookLabel} through its own {formatName} engine. " +
"For large notebooks this engine can time out or disconnect from the app.";
SectionsDescriptionText.Text =
$"The app loads all exportable sections automatically and creates one {formatName} " +
"file per section. Locked sections are not included. " +
"Smaller render jobs are significantly more reliable.";
"This is a limitation of OneNote's export engine. Choose how you want to export:";
WholeNotebookButtonText.Text =
$"Try the whole {formatName} export anyway (may fail for large notebooks)";
$"Export the whole notebook as one {formatName} file";

if (hasSelectedSections)
{
OneNotePackageButton.IsEnabled = false;
OneNotePackageButtonText.Text =
"OneNote package requires no individually selected sections";
"OneNote package unavailable with selected sections";
OneNotePackageButton.ToolTip =
"Cancel, deselect the individual sections, and try again to create a complete package.";
"Available when whole notebooks are selected.";
}
}

Expand Down
2 changes: 1 addition & 1 deletion innosetup.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define MyAppName "OneNoteBackupExporter"
#ifndef MyAppVersion
#define MyAppVersion "1.2.1"
#define MyAppVersion "1.2.2"
#endif
#define MyAppPublisher "JLI Software"
#define MyAppURL "https://github.com/jli-software/OneNoteBackupExporter"
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -euo pipefail

if [[ $# -ne 1 ]]; then
echo "Usage: $0 <version> (for example: $0 1.2.1)"
echo "Usage: $0 <version> (for example: $0 1.2.2)"
exit 1
fi

Expand Down
Loading