Make gdmap compile with newer gtk
svn path=/nixpkgs/branches/x-updates/; revision=25922
This commit is contained in:
parent
52787275a4
commit
dae53e0ea6
@ -1,16 +1,19 @@
|
||||
{ stdenv, fetchurl, gtk, pkgconfig, libxml2, intltool, gettext }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gdmap-0.8.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://downloads.sourceforge.net/gdmap/gdmap-0.8.1.tar.gz;
|
||||
url = "mirror://sourceforge/gdmap/${name}.tar.gz";
|
||||
sha256 = "0nr8l88cg19zj585hczj8v73yh21k7j13xivhlzl8jdk0j0cj052";
|
||||
};
|
||||
|
||||
buildInputs = [ gtk pkgconfig libxml2 intltool gettext ];
|
||||
|
||||
patches = [ ./get_sensitive.patch ./set_flags.patch ];
|
||||
|
||||
meta = {
|
||||
homepage = http://gdmap.sourceforge.net;
|
||||
description = "Recursive rectangle map of disk usage";
|
||||
};
|
||||
}
|
||||
|
34
pkgs/tools/system/gdmap/get_sensitive.patch
Normal file
34
pkgs/tools/system/gdmap/get_sensitive.patch
Normal file
@ -0,0 +1,34 @@
|
||||
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
|
||||
|
25
pkgs/tools/system/gdmap/set_flags.patch
Normal file
25
pkgs/tools/system/gdmap/set_flags.patch
Normal file
@ -0,0 +1,25 @@
|
||||
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
|
||||
|
@ -657,7 +657,7 @@ let
|
||||
gawk = callPackage ../tools/text/gawk { };
|
||||
|
||||
gdmap = callPackage ../tools/system/gdmap {
|
||||
inherit (gtkLibs216) gtk;
|
||||
inherit (pkgs.gtkLibs) gtk;
|
||||
};
|
||||
|
||||
genext2fs = callPackage ../tools/filesystems/genext2fs { };
|
||||
|
Loading…
Reference in New Issue
Block a user