gdmap: 0.8.1 -> 1.2.0 (switching to GTK 3 port / fork)

This matches what Debian has decided to do, given that the official
gdmap upstream hasn't seen activity in over 10 years:
https://tracker.debian.org/pkg/gdmap
This commit is contained in:
sternenseemann
2025-02-27 12:13:30 +01:00
parent a286eea0b7
commit 3c6ef11418
3 changed files with 17 additions and 79 deletions
-34
View File
@@ -1,34 +0,0 @@
From 166de50914191303b232ec123cfbaadad521560c Mon Sep 17 00:00:00 2001
From: Alexander Myltsev <avm@altlinux.ru>
Date: Wed, 21 Apr 2010 22:43:14 +0400
Subject: [PATCH] GTK_WIDGET_SENSITIVE -> gtk_widget_get_sensitive
---
gdmap/src/gui_support.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gui_support.c b/src/gui_support.c
index 3027e29..45272d3 100644
--- a/src/gui_support.c
+++ b/src/gui_support.c
@@ -85,7 +85,7 @@ on_ebox_enter(GtkWidget* box, GdkEventCrossing* event, GtkLabel* label) {
const char* text;
(void)event;
- if (GTK_WIDGET_SENSITIVE(label)) {
+ if (gtk_widget_get_sensitive(GTK_WIDGET(label))) {
char* temp;
text = g_object_get_data(G_OBJECT(label), "label");
@@ -129,7 +129,7 @@ static void on_clear_label(GtkWidget* widget) {
void ui_event_label_set_sensitive(GtkWidget* ebox, gboolean set) {
gpointer callback = g_object_get_data(G_OBJECT(ebox), "callback");
GtkWidget* child = GTK_BIN(ebox)->child;
- if (GTK_WIDGET_SENSITIVE(child) == set) return;
+ if (gtk_widget_get_sensitive(child) == set) return;
if (set && !callback) return;
gtk_widget_set_sensitive(child, set);
--
1.7.3.3
+17 -20
View File
@@ -1,45 +1,42 @@
{
lib,
stdenv,
fetchurl,
gtk2,
fetchFromGitLab,
meson,
cairo,
gtk3,
ninja,
pkg-config,
libxml2,
intltool,
gettext,
}:
stdenv.mkDerivation rec {
pname = "gdmap";
version = "0.8.1";
version = "1.2.0";
src = fetchurl {
url = "mirror://sourceforge/gdmap/gdmap-${version}.tar.gz";
sha256 = "0nr8l88cg19zj585hczj8v73yh21k7j13xivhlzl8jdk0j0cj052";
src = fetchFromGitLab {
owner = "sjohannes";
repo = "gdmap";
tag = "v1.2.0";
sha256 = "1p96pps4yflj6a42g61pcqpllx7vcjlh417kwjy0b4mqp16vmrzr";
};
nativeBuildInputs = [
meson
ninja
pkg-config
intltool
];
buildInputs = [
gtk2
gtk3
cairo
libxml2
gettext
];
patches = [
./get_sensitive.patch
./set_flags.patch
];
hardeningDisable = [ "format" ];
NIX_LDFLAGS = "-lm";
meta = with lib; {
homepage = "https://gdmap.sourceforge.net";
description = "Recursive rectangle map of disk usage";
homepage = "https://gitlab.com/sjohannes/gdmap";
description = "A tool to visualize disk space (GTK 3 port of Original)";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
-25
View File
@@ -1,25 +0,0 @@
From 9a5537d2b0aba18438dd77a45354ac2e73eae23d Mon Sep 17 00:00:00 2001
From: Alexander Myltsev <avm@altlinux.ru>
Date: Mon, 13 Dec 2010 23:24:30 +0300
Subject: [PATCH] GTK_WIDGET_SET_FLAGS -> gtk_widget_set_can_focus
---
gdmap/src/gui_support.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gui_support.c b/src/gui_support.c
index 45272d3..ca02d72 100644
--- a/src/gui_support.c
+++ b/src/gui_support.c
@@ -164,7 +164,7 @@ GtkWidget* ui_create_event_label(const char* text, GCallback callback,
// GDK_FOCUS_CHANGE_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK);
- GTK_WIDGET_SET_FLAGS(ebox, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus(ebox, TRUE);
gtk_widget_show(ebox);
--
1.7.3.3