summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/flameshot-once/flameshot
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2024-12-23 23:24:59 +0100
committertv <tv@krebsco.de>2024-12-23 23:24:59 +0100
commit79f1d3c6e99987c93fe7196eec3b63ec5305e6bc (patch)
tree651ac654dd7ea491f957f0110a8bb5f8ae564dfa /krebs/5pkgs/simple/flameshot-once/flameshot
parent32e3b1071cfab6026795f44d38d496e6a7e8af8a (diff)
flameshot-once: RIPHEADmaster
Diffstat (limited to 'krebs/5pkgs/simple/flameshot-once/flameshot')
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/default.nix17
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch26
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.history.patch28
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.imgur.patch43
4 files changed, 0 insertions, 114 deletions
diff --git a/krebs/5pkgs/simple/flameshot-once/flameshot/default.nix b/krebs/5pkgs/simple/flameshot-once/flameshot/default.nix
deleted file mode 100644
index 43cfdb00d..000000000
--- a/krebs/5pkgs/simple/flameshot-once/flameshot/default.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ pkgs }:
-
-pkgs.flameshot.overrideAttrs (old: rec {
- name = "flameshot-${version}";
- version = "12.1.0-pre";
- src = pkgs.fetchFromGitHub {
- owner = "flameshot-org";
- repo = "flameshot";
- rev = "f7e41f4d708e50eeaec892408069da25a28e04a2";
- hash = "sha256-fZquXY0xSaN1hJgCh16MocIlvxHe1c2Nt+fGF2NIOVw=";
- };
- patches = old.patches or [] ++ [
- ./flameshot-12.imgur.patch
- ./flameshot-12.history.patch
- ./flameshot-12.applauncher.patch
- ];
-})
diff --git a/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch b/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch
deleted file mode 100644
index 6937c55b3..000000000
--- a/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/src/tools/launcher/applauncherwidget.cpp b/src/tools/launcher/applauncherwidget.cpp
-index 8a202c89..7427aeb9 100644
---- a/src/tools/launcher/applauncherwidget.cpp
-+++ b/src/tools/launcher/applauncherwidget.cpp
-@@ -20,6 +20,7 @@
- #include <QProcess>
- #include <QStandardPaths>
- #include <QTabWidget>
-+#include <stdlib.h>
-
- namespace {
- #if defined(Q_OS_WIN)
-@@ -66,7 +67,12 @@ AppLauncherWidget::AppLauncherWidget(const QPixmap& p, QWidget* parent)
- QDir appsDirLocal(dirLocal);
- m_parser.processDirectory(appsDirLocal);
-
-- QString dir = QStringLiteral("/usr/share/applications/");
-+ const char *USER = secure_getenv("USER");
-+ QString dirUser = "/etc/profiles/per-user/" + QString::fromUtf8(USER) + "/share/applications/";
-+ QDir appsDirUser(dirUser);
-+ m_parser.processDirectory(appsDirUser);
-+
-+ QString dir = QStringLiteral("/run/current-system/sw/share/applications/");
- QDir appsDir(dir);
- m_parser.processDirectory(appsDir);
- #endif
diff --git a/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.history.patch b/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.history.patch
deleted file mode 100644
index 66f28a661..000000000
--- a/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.history.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/src/utils/history.cpp b/src/utils/history.cpp
-index f3ee09d0..7c85c34b 100644
---- a/src/utils/history.cpp
-+++ b/src/utils/history.cpp
-@@ -76,9 +76,9 @@ const HistoryFileName& History::unpackFileName(const QString& fileNamePacked)
- int nPathIndex = fileNamePacked.lastIndexOf("/");
- QStringList unpackedFileName;
- if (nPathIndex == -1) {
-- unpackedFileName = fileNamePacked.split("-");
-+ unpackedFileName = fileNamePacked.split("|");
- } else {
-- unpackedFileName = fileNamePacked.mid(nPathIndex + 1).split("-");
-+ unpackedFileName = fileNamePacked.mid(nPathIndex + 1).split("|");
- }
-
- switch (unpackedFileName.length()) {
-@@ -109,9 +109,9 @@ const QString& History::packFileName(const QString& storageType,
- if (storageType.length() > 0) {
- if (deleteToken.length() > 0) {
- m_packedFileName =
-- storageType + "-" + deleteToken + "-" + m_packedFileName;
-+ storageType + "|" + deleteToken + "|" + m_packedFileName;
- } else {
-- m_packedFileName = storageType + "-" + m_packedFileName;
-+ m_packedFileName = storageType + "|" + m_packedFileName;
- }
- }
- return m_packedFileName;
diff --git a/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.imgur.patch b/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.imgur.patch
deleted file mode 100644
index b6c3f497a..000000000
--- a/krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.imgur.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff --git a/src/tools/imgupload/storages/imgur/imguruploader.cpp b/src/tools/imgupload/storages/imgur/imguruploader.cpp
-index d6748b5a..5bb8d7de 100644
---- a/src/tools/imgupload/storages/imgur/imguruploader.cpp
-+++ b/src/tools/imgupload/storages/imgur/imguruploader.cpp
-@@ -16,6 +16,7 @@
- #include <QNetworkRequest>
- #include <QShortcut>
- #include <QUrlQuery>
-+#include <stdlib.h>
-
- ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent)
- : ImgUploaderBase(capture, parent)
-@@ -70,7 +71,13 @@ void ImgurUploader::upload()
- QString description = FileNameHandler().parsedPattern();
- urlQuery.addQueryItem(QStringLiteral("description"), description);
-
-- QUrl url(QStringLiteral("https://api.imgur.com/3/image"));
-+ const char *IMGUR_CREATE_URL = secure_getenv("IMGUR_CREATE_URL");
-+ QString createUrlPattern =
-+ IMGUR_CREATE_URL != NULL
-+ ? QString::fromUtf8(IMGUR_CREATE_URL)
-+ : QStringLiteral("https://api.imgur.com/3/image")
-+ ;
-+ QUrl url(createUrlPattern);
- url.setQuery(urlQuery);
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader,
-@@ -87,8 +94,14 @@ void ImgurUploader::deleteImage(const QString& fileName,
- const QString& deleteToken)
- {
- Q_UNUSED(fileName)
-+ const char *IMGUR_DELETE_URL = secure_getenv("IMGUR_DELETE_URL");
-+ QString deleteImageURLPattern =
-+ IMGUR_DELETE_URL != NULL
-+ ? QString::fromUtf8(IMGUR_DELETE_URL)
-+ : QStringLiteral("https://imgur.com/delete/%1")
-+ ;
- bool successful = QDesktopServices::openUrl(
-- QUrl(QStringLiteral("https://imgur.com/delete/%1").arg(deleteToken)));
-+ QUrl(deleteImageURLPattern.arg(deleteToken)));
- if (!successful) {
- notification()->showMessage(tr("Unable to open the URL."));
- }