aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-09-04 15:23:00 +0200
committerThomas White <taw@bitwiz.org.uk>2012-09-04 15:23:00 +0200
commitda432b8ea95f5d783aede76c06afb5d3e3fb680b (patch)
treeed781790fd4db492f1c115d36b524337c9463f2b
parentfbe8b2e1cd1111b440b769eb62ffcd4711b24839 (diff)
hdfsee: Prevent silliness with menu toggles
-rw-r--r--src/dw-hdfsee.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c
index 54d0bdea..19aa6f35 100644
--- a/src/dw-hdfsee.c
+++ b/src/dw-hdfsee.c
@@ -1219,7 +1219,12 @@ static gint displaywindow_save(GtkWidget *widget, DisplayWindow *dw)
static gint displaywindow_set_colscale(GtkWidget *widget, DisplayWindow *dw)
{
- dw->show_col_scale = 1 - dw->show_col_scale;
+ GtkWidget *w;
+
+ w = gtk_ui_manager_get_widget(dw->ui,
+ "/ui/displaywindow/view/colscale");
+ dw->show_col_scale = gtk_check_menu_item_get_active(
+ GTK_CHECK_MENU_ITEM(w));
set_window_size(dw);
redraw_window(dw);
return 0;
@@ -1228,7 +1233,11 @@ static gint displaywindow_set_colscale(GtkWidget *widget, DisplayWindow *dw)
static gint displaywindow_set_peaks(GtkWidget *widget, DisplayWindow *dw)
{
- dw->show_peaks = 1 - dw->show_peaks;
+ GtkWidget *w;
+
+ w = gtk_ui_manager_get_widget(dw->ui,
+ "/ui/displaywindow/view/showpeaks");
+ dw->show_peaks = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w));
redraw_window(dw);
return 0;
}