Skip to content
Open
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
1 change: 1 addition & 0 deletions quick-picture-viewer/forms/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public AboutForm()
else if (IntPtr.Size == 8) versionLabel.Text += " (x64)";

if (ThemeMan.isWindows10orLater()) makeDefaultBtn.Enabled = true;
if (MainForm.IsInstalledFromStore()) updatesBtn.Visible = false;
}

protected override void OnHandleCreated(EventArgs e)
Expand Down
12 changes: 11 additions & 1 deletion quick-picture-viewer/forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Timers;
using System.Windows.Forms;

Expand Down Expand Up @@ -38,6 +39,15 @@ public partial class MainForm : Form
public SelectionForm selForm = null;
private EditSelForm editSelForm = null;

[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
private static extern int GetCurrentPackageFullName(ref int packageFullNameLength, IntPtr packageFullName);

internal static bool IsInstalledFromStore()
{
int length = 0;
return GetCurrentPackageFullName(ref length, IntPtr.Zero) != 15700;
}

private string currentFolder;
private string recursiveFolder;
private string currentFile;
Expand Down Expand Up @@ -341,7 +351,7 @@ protected override void OnLoad(EventArgs e)
UpdateMan.UpdateFailed += UpdateMan_UpdateFailed;
UpdateMan.IsUpToDate += UpdateMan_IsUpToDate;
UpdateMan.UpdateSkipped += UpdateMan_UpdateSkipped;
if (Properties.Settings.Default.CheckForUpdates) UpdateMan.CheckForUpdates(false, TopMost, Handle);
if (Properties.Settings.Default.CheckForUpdates && !IsInstalledFromStore()) UpdateMan.CheckForUpdates(false, TopMost, Handle);

ReloadPlugins();

Expand Down
1 change: 1 addition & 0 deletions quick-picture-viewer/forms/SettingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public SettingsForm()
else if (mouseWheelAction == 2) mouseWheelActionRadio3.Checked = true;

updatesCheckBox.Checked = Properties.Settings.Default.CheckForUpdates;
if (MainForm.IsInstalledFromStore()) updatesCheckBox.Visible = false;
startupPasteCheckBox.Checked = Properties.Settings.Default.StartupPaste;
startupBoundsCheckBox.Checked = Properties.Settings.Default.StartupRestoreBounds;

Expand Down