void-packages/srcpkgs/starplot/patches/02-fix-ftbfs-and-hrdiagram-...

90 lines
3.3 KiB
Diff

# Description: Fix the 'fail to build from source' problem.
# Author: Francisco Manuel Garcia Claramonte <francisco@debian.org>
# Last-Update: 26-06-2012
Index: starplot-0.95.5/src/gui/hrdiagram.cc
===================================================================
--- a/src/gui/hrdiagram.cc 2008-04-10 21:14:00.000000000 +0200
+++ b/src/gui/hrdiagram.cc 2012-06-26 21:16:14.000000000 +0200
@@ -29,7 +29,7 @@
/* Functions to make sure the HR Diagram window stays updated */
namespace globals {
- static GtkWidget *program_hr_window = NULL;
+ GtkWidget *program_hr_window = NULL;
static GdkPixmap *program_hr_pixmap = NULL;
}
@@ -88,6 +88,7 @@
delete globals::program_hr_viewer;
globals::program_hr_viewer = NULL;
gtk_widget_destroy(globals::program_hr_window);
+ globals::program_hr_window = NULL;
return;
}
@@ -254,8 +255,7 @@
hr_options_label_widgets[i] = item;
if ((GTK_CHECK_MENU_ITEM (options_label_widgets[i]))->active)
- set_item(&globals::chart_rules.StarLabels,
- globals::chart_rules.StarLabels, item, false);
+ set_label_item(globals::chart_rules.StarLabels, false);
}
for (unsigned int i = 0; i < OPTIONS_DIAMETER_MENU_SIZE; i++) {
@@ -265,8 +265,7 @@
hr_options_diameter_widgets[i] = item;
if ((GTK_CHECK_MENU_ITEM (options_diameter_widgets[i]))->active)
- set_item(&globals::chart_rules.StarDiameters,
- globals::chart_rules.StarDiameters, item, false);
+ set_diameter_item(globals::chart_rules.StarDiameters, false);
}
if (menubar) {
Index: starplot-0.95.5/src/gui/menuops.cc
===================================================================
--- a/src/gui/menuops.cc 2008-04-11 20:46:31.000000000 +0200
+++ b/src/gui/menuops.cc 2012-06-26 21:19:21.000000000 +0200
@@ -305,10 +305,12 @@
{
if (globals::chart_rules.StarLabels == l) return;
- if (globals::program_hr_viewer) {
+ if (globals::program_hr_window) {
set_item(&globals::chart_rules.StarLabels, l,
hr_options_label_widgets[l], false);
}
+
+ if (globals::chart_rules.StarLabels == l) return;
set_item(&globals::chart_rules.StarLabels, l,
options_label_widgets[l], redraw);
}
@@ -322,10 +324,12 @@
{
if (globals::chart_rules.StarDiameters == d) return;
- if (globals::program_hr_viewer) {
+ if (globals::program_hr_window) {
set_item(&globals::chart_rules.StarDiameters, d,
hr_options_diameter_widgets[d], false);
}
+
+ if (globals::chart_rules.StarDiameters == d) return;
set_item(&globals::chart_rules.StarDiameters, d,
options_diameter_widgets[d], redraw);
}
Index: starplot-0.95.5/src/gui/starplot.h
===================================================================
--- a/src/gui/starplot.h 2008-04-10 21:13:07.000000000 +0200
+++ b/src/gui/starplot.h 2012-06-26 21:20:31.000000000 +0200
@@ -134,6 +134,7 @@
extern GTKViewer *program_viewer; // The GTKViewer used by StarPlot
extern GtkWidget *program_canvas; // The GTK_DRAWING_AREA used
extern GdkPixmap *program_pixmap; // The backing pixmap
+ extern GtkWidget *program_hr_window; // HR Diagram GTK_WINDOW
extern GTKViewer *program_hr_viewer; // HR Diagram GTKViewer
extern GtkWidget *program_hr_canvas; // HR Diagram GTK_DRAWING_AREA
extern GdkPixbuf *program_icon; // used by the window manager