gtkdatabox: add version 0.9.1.3
Patch submitted by Jan Malakhovski <oxij@oxij.org>.
This commit is contained in:
parent
07e94a8892
commit
2e1e7fcc4c
3 changed files with 220 additions and 0 deletions
24
pkgs/development/libraries/gtkdatabox/default.nix
Normal file
24
pkgs/development/libraries/gtkdatabox/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ stdenv, fetchurl, pkgconfig, gtk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gtkdatabox-0.9.1.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gtkdatabox/${name}.tar.gz";
|
||||
sha256 = "90ff9fc20ea1541dfe75ae04ff98e02c3aa7ad1735d8f0e3b3352910a3f7427c";
|
||||
};
|
||||
|
||||
patches = [ ./deprecated_GTK.patch ];
|
||||
|
||||
buildInputs = [ pkgconfig gtk ];
|
||||
|
||||
propagatedBuildInputs = [ gtk ];
|
||||
|
||||
meta = {
|
||||
description = "Gtk+ widget for displaying large amounts of numerical data";
|
||||
|
||||
license = "LGPLv2";
|
||||
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
194
pkgs/development/libraries/gtkdatabox/deprecated_GTK.patch
Normal file
194
pkgs/development/libraries/gtkdatabox/deprecated_GTK.patch
Normal file
|
@ -0,0 +1,194 @@
|
|||
# Fixes compilation errors. Stolen from Debian.
|
||||
Index: libgtkdatabox-0.9.1.1/examples/addremove.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/addremove.c 2011-05-21 12:39:01.703594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/addremove.c 2011-05-21 12:36:16.739594810 +0200
|
||||
@@ -203,7 +203,7 @@
|
||||
g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), GTK_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
Index: libgtkdatabox-0.9.1.1/examples/basics.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/basics.c 2011-05-21 12:39:02.075594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/basics.c 2011-05-21 12:36:16.759594820 +0200
|
||||
@@ -113,7 +113,7 @@
|
||||
g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), GTK_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), close_button, FALSE, FALSE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
gtk_widget_grab_focus (close_button);
|
||||
|
||||
Index: libgtkdatabox-0.9.1.1/examples/basics2.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/basics2.c 2011-05-21 12:39:01.911594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/basics2.c 2011-05-21 12:36:16.747594818 +0200
|
||||
@@ -225,7 +225,7 @@
|
||||
g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), GTK_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), close_button, FALSE, FALSE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
gtk_widget_grab_focus (close_button);
|
||||
|
||||
Index: libgtkdatabox-0.9.1.1/examples/colors.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/colors.c 2011-05-21 12:39:02.115594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/colors.c 2011-05-21 12:36:16.763594819 +0200
|
||||
@@ -194,7 +194,7 @@
|
||||
g_signal_connect (G_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), (gpointer) NULL);
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
|
||||
|
||||
Index: libgtkdatabox-0.9.1.1/examples/enable_disable.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/enable_disable.c 2011-05-21 12:39:01.787594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/enable_disable.c 2011-05-21 12:36:16.743594812 +0200
|
||||
@@ -145,7 +145,7 @@
|
||||
g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), GTK_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
for (i = 0; i < noEnableSets; ++i)
|
||||
{
|
||||
GtkWidget *vbox = gtk_vbox_new (FALSE, 10);
|
||||
Index: libgtkdatabox-0.9.1.1/examples/grid.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/grid.c 2011-05-21 12:39:01.995594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/grid.c 2011-05-21 12:36:16.755594821 +0200
|
||||
@@ -133,7 +133,7 @@
|
||||
G_CALLBACK (gtk_main_quit),
|
||||
GTK_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
Index: libgtkdatabox-0.9.1.1/examples/grid_array.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/grid_array.c 2011-05-21 12:39:01.951594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/grid_array.c 2011-05-21 12:36:16.751594821 +0200
|
||||
@@ -134,7 +134,7 @@
|
||||
G_CALLBACK (gtk_main_quit),
|
||||
GTK_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
Index: libgtkdatabox-0.9.1.1/examples/keycontrol.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/keycontrol.c 2011-05-21 12:39:02.155594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/keycontrol.c 2011-05-21 12:37:15.211595055 +0200
|
||||
@@ -133,7 +133,8 @@
|
||||
gtk_databox_create_box_with_scrollbars_and_rulers (&box, &table,
|
||||
TRUE, TRUE, TRUE, TRUE);
|
||||
gtk_widget_add_events (box, GDK_KEY_PRESS_MASK);
|
||||
- GTK_WIDGET_SET_FLAGS (box, GTK_CAN_FOCUS | GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_focus(box, GTK_CAN_FOCUS);
|
||||
+ gtk_widget_set_can_default(box, GTK_CAN_DEFAULT);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box1), table, TRUE, TRUE, 0);
|
||||
|
||||
Index: libgtkdatabox-0.9.1.1/examples/lissajous.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/lissajous.c 2011-05-21 12:39:02.035594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/lissajous.c 2011-05-21 12:36:16.759594820 +0200
|
||||
@@ -154,7 +154,7 @@
|
||||
G_CALLBACK (gtk_main_quit), G_OBJECT (box));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
lissajous_idle = g_idle_add ((GSourceFunc) lissajous_idle_func, box);
|
||||
|
||||
Index: libgtkdatabox-0.9.1.1/examples/logarithmic.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/logarithmic.c 2011-05-21 12:39:01.827594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/logarithmic.c 2011-05-21 12:36:16.743594812 +0200
|
||||
@@ -207,7 +207,7 @@
|
||||
g_signal_connect (GTK_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), close_button, FALSE, FALSE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
gtk_widget_grab_focus (close_button);
|
||||
|
||||
Index: libgtkdatabox-0.9.1.1/examples/markers.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/markers.c 2011-05-21 12:39:01.871594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/markers.c 2011-05-21 12:36:16.747594818 +0200
|
||||
@@ -220,7 +220,7 @@
|
||||
g_signal_connect_swapped (GTK_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), GTK_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
Index: libgtkdatabox-0.9.1.1/examples/signals.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/examples/signals.c 2011-05-21 12:39:01.751594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/examples/signals.c 2011-05-21 12:36:16.743594812 +0200
|
||||
@@ -287,7 +287,7 @@
|
||||
g_signal_connect_swapped (G_OBJECT (close_button), "clicked",
|
||||
G_CALLBACK (gtk_main_quit), G_OBJECT (box));
|
||||
gtk_box_pack_start (GTK_BOX (box2), close_button, TRUE, TRUE, 0);
|
||||
- GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
|
||||
+ gtk_widget_set_can_default(close_button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (close_button);
|
||||
|
||||
g_signal_connect (G_OBJECT (box), "zoomed",
|
||||
Index: libgtkdatabox-0.9.1.1/gtk/gtkdatabox.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/gtk/gtkdatabox.c 2011-05-21 12:39:01.583594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/gtk/gtkdatabox.c 2011-05-21 12:38:43.523595004 +0200
|
||||
@@ -453,7 +453,8 @@
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
- gdk_drawable_get_size (widget->window, &width, &height);
|
||||
+ width = gdk_window_get_width(widget->window);
|
||||
+ height = gdk_window_get_height(widget->window);
|
||||
x = MAX (0, MIN (width - 1, x));
|
||||
y = MAX (0, MIN (height - 1, y));
|
||||
|
||||
@@ -587,7 +588,7 @@
|
||||
gint attributes_mask;
|
||||
|
||||
box = GTK_DATABOX (widget);
|
||||
- GTK_WIDGET_SET_FLAGS (box, GTK_REALIZED);
|
||||
+ gtk_widget_set_realized(box, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.x = widget->allocation.x;
|
||||
Index: libgtkdatabox-0.9.1.1/gtk/gtkdatabox_ruler.c
|
||||
===================================================================
|
||||
--- libgtkdatabox-0.9.1.1.orig/gtk/gtkdatabox_ruler.c 2011-05-21 12:39:01.631594722 +0200
|
||||
+++ libgtkdatabox-0.9.1.1/gtk/gtkdatabox_ruler.c 2011-05-21 12:38:59.963594710 +0200
|
||||
@@ -842,7 +842,7 @@
|
||||
gint attributes_mask;
|
||||
|
||||
ruler = GTK_DATABOX_RULER (widget);
|
||||
- GTK_WIDGET_SET_FLAGS (ruler, GTK_REALIZED);
|
||||
+ gtk_widget_set_realized(ruler, GTK_REALIZED);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.x = widget->allocation.x;
|
|
@ -834,6 +834,8 @@ let
|
|||
|
||||
gt5 = callPackage ../tools/system/gt5 { };
|
||||
|
||||
gtkdatabox = callPackage ../development/libraries/gtkdatabox {};
|
||||
|
||||
gtkgnutella = callPackage ../tools/networking/p2p/gtk-gnutella { };
|
||||
|
||||
gtkvnc = callPackage ../tools/admin/gtk-vnc {};
|
||||
|
|
Loading…
Reference in a new issue