From: John Melton g0orx/n6lyt Date: Mon, 2 May 2016 08:11:07 +0000 (+0000) Subject: fixed bug saving state on exit X-Git-Url: https://git.rkrishnan.org/pf/components//%22%22.?a=commitdiff_plain;h=e1ff7e93921cff14bcfa08a5b744e32367ef7969;p=pihpsdr.git fixed bug saving state on exit --- diff --git a/main.c b/main.c index b5bbb6f..3890f2c 100644 --- a/main.c +++ b/main.c @@ -671,6 +671,7 @@ gboolean main_delete (GtkWidget *widget) { } else { new_protocol_stop(); } + radioSaveState(); _exit(0); } diff --git a/menu.c b/menu.c index 259de95..eab5a0b 100644 --- a/menu.c +++ b/menu.c @@ -219,6 +219,7 @@ static gboolean exit_pressed_event_cb (GtkWidget *widget, } else { new_protocol_stop(); } + radioSaveState(); _exit(0); } @@ -234,6 +235,7 @@ static gboolean reboot_pressed_event_cb (GtkWidget *widget, } else { new_protocol_stop(); } + radioSaveState(); system("reboot"); _exit(0); } @@ -250,6 +252,7 @@ static gboolean shutdown_pressed_event_cb (GtkWidget *widget, } else { new_protocol_stop(); } + radioSaveState(); system("shutdown -h -P now"); _exit(0); } diff --git a/pihpsdr b/pihpsdr index 86678a9..f100b70 100755 Binary files a/pihpsdr and b/pihpsdr differ diff --git a/release/pihpsdr.tar b/release/pihpsdr.tar index 185f238..cdb136b 100644 Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ diff --git a/release/pihpsdr/pihpsdr b/release/pihpsdr/pihpsdr index 86678a9..f100b70 100755 Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ diff --git a/sliders.c b/sliders.c index 3ed778c..4a76e19 100644 --- a/sliders.c +++ b/sliders.c @@ -81,7 +81,7 @@ fprintf(stderr,"scale_timeout_cb\n"); } static void attenuation_value_changed_cb(GtkWidget *widget, gpointer data) { - attenuation=gtk_range_get_value(GTK_RANGE(attenuation_scale)); + attenuation=(int)gtk_range_get_value(GTK_RANGE(attenuation_scale)); set_attenuation(attenuation); }