Add the patch files

This commit is contained in:
Wolfgang Stöggl 2019-01-11 12:43:29 +01:00
parent c68ba5f9e8
commit b5f4c8d7f3
2 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,34 @@
From 2a5bf325a8f34ada801dca661ecb174d7dc0eb3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= <vaclav@slavik.io>
Date: Wed, 9 Jan 2019 20:20:55 +0100
Subject: [PATCH] Fix dark mode assert with wxGTK 3.0
wx 3.0 didn't support alpha channel in HTML exports, so just tweak the
dark mode color to not require it. It's not worth doing complicated
fixes for the old wx version.
Fixes #524.
---
src/colorscheme.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/colorscheme.cpp b/src/colorscheme.cpp
index 25e9cfa54a..393c8cbea7 100644
--- a/src/colorscheme.cpp
+++ b/src/colorscheme.cpp
@@ -106,7 +106,14 @@ wxColour ColorScheme::DoGet(Color color, Mode mode)
case Color::ItemContextFg:
return mode == Dark ? sRGB(180, 222, 254) : sRGB(70, 109, 137);
case Color::ItemContextBg:
- return mode == Dark ? sRGB(67, 94, 147, 0.6) : sRGB(217, 232, 242);
+ if (mode == Dark)
+ #if wxCHECK_VERSION(3,1,0)
+ return sRGB(67, 94, 147, 0.6);
+ #else // see https://github.com/vslavik/poedit/issues/524
+ return sRGB(67, 94, 147);
+ #endif
+ else
+ return sRGB(217, 232, 242);
case Color::ItemContextBgHighlighted:
#if defined(__WXMSW__)
return sRGB(255, 255, 255, 0.50);

View File

@ -0,0 +1,42 @@
From 11f4e0da464d9f261f0d237220e08525a20465fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= <vaclav@slavik.io>
Date: Wed, 9 Jan 2019 20:22:16 +0100
Subject: [PATCH] Fix Wayland incompatibility
Set prgname to match the .desktop file, otherwise app icon is not shown
correctly and other things probably break as well.
See https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
Fixes #538.
---
src/edapp.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/edapp.cpp b/src/edapp.cpp
index e345b7ecbd..1a9af1c33b 100644
--- a/src/edapp.cpp
+++ b/src/edapp.cpp
@@ -56,6 +56,10 @@
#include <winsparkle.h>
#endif
+#ifdef __WXGTK3__
+#include <glib.h>
+#endif
+
#include <unicode/uclean.h>
#include <unicode/putil.h>
@@ -334,6 +338,11 @@ bool PoeditApp::OnInit()
SetDllDirectory(L"");
#endif
+#ifdef __WXGTK3__
+ // Wayland compatibility, see https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
+ g_set_prgname("net.poedit.Poedit");
+#endif
+
SetVendorName("Vaclav Slavik");
SetAppName("Poedit");