g_idle_add(switch_action,a);
}
-#ifdef OLD_SWITCHES
-void sim_s1_pressed_cb(GtkWidget *widget, gpointer data) {
- ACTION *a=g_new(ACTION,1);
- a->action=switches[1].switch_function;
- a->val=0;
- g_idle_add(switch_action,a);
-/*
- switch(function) {
- case 0:
- band_cb(widget,data);
- break;
- case 1:
- lock_cb(widget,data);
- break;
- case 2:
- freq_cb(widget,data);
- break;
- case 3:
- freq_cb(widget,data);
- break;
- case 4:
- freq_cb(widget,data);
- break;
- case 5:
- full_tune=full_tune==1?0:1;
- if(full_tune) {
- set_button_text_color(sim_s2,"black");
- set_button_text_color(sim_s1,"red");
- } else {
- set_button_text_color(sim_s1,"black");
- }
- break;
- }
-*/
-}
-
-void sim_s1_released_cb(GtkWidget *widget, gpointer data) {
-/*
- switch(function) {
- case 0:
- break;
- case 1:
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- case 5:
- break;
- }
-*/
-}
-
-void sim_s2_pressed_cb(GtkWidget *widget, gpointer data) {
- ACTION *a=g_new(ACTION,1);
- a->action=switches[2].switch_function;
- a->val=0;
- g_idle_add(switch_action,a);
-/*
- switch(function) {
- case 0:
- bandstack_cb(widget,data);
- break;
- case 1:
- ctun_cb(widget,data);
- break;
- case 2:
- mem_cb(widget,data);
- break;
- case 3:
- mem_cb(widget,data);
- break;
- case 4:
- split_cb(widget,data);
- break;
- case 5:
- memory_tune=memory_tune==1?0:1;
- if(memory_tune) {
- set_button_text_color(sim_s1,"black");
- set_button_text_color(sim_s2,"red");
- } else {
- set_button_text_color(sim_s2,"black");
- }
- break;
- }
-*/
-}
-
-void sim_s2_released_cb(GtkWidget *widget, gpointer data) {
-/*
- switch(function) {
- case 0:
- break;
- case 1:
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- case 5:
- break;
- }
-*/
-}
-
-
-void sim_s3_pressed_cb(GtkWidget *widget, gpointer data) {
- SWITCH_ACTION *a=g_new(SWITCH_ACTION,1);
- a->action=switches[3].switch_function;
- a->state=PRESSED;
- g_idle_add(action,a);
-/*
- switch(function) {
- case 0:
- mode_cb(widget,data);
- break;
- case 1:
- // A>B
- atob_cb(widget,data);
- break;
- case 2:
- rit_enable_cb(widget,data);
- break;
- case 3:
- xit_enable_cb(widget,data);
- break;
- case 4:
- duplex_cb(widget,data);
- break;
- case 5:
- band_cb(widget,data);
- break;
- }
-*/
-}
-
-void sim_s3_released_cb(GtkWidget *widget, gpointer data) {
-/*
- switch(function) {
- case 0:
- break;
- case 1:
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- case 5:
- break;
- }
-*/
-}
-
-void sim_s4_pressed_cb(GtkWidget *widget, gpointer data) {
- SWITCH_ACTION *a=g_new(SWITCH_ACTION,1);
- a->action=switches[4].switch_function;
- a->state=PRESSED;
- g_idle_add(action,a);
-/*
- switch(function) {
- case 0:
- filter_cb(widget,data);
- break;
- case 1:
- // A<B
- btoa_cb(widget,data);
- break;
- case 2:
- if(rit_minus_timer==-1 && rit_plus_timer==-1) {
- rit_cb(widget,(void *)1);
- }
- break;
- case 3:
- if(xit_minus_timer==-1 && xit_plus_timer==-1) {
- xit_cb(widget,(void *)1);
- }
- break;
- case 4:
- sat_cb(widget,data);
- break;
- case 5:
- mode_cb(widget,data);
- break;
- }
-*/
-}
-
-void sim_s4_released_cb(GtkWidget *widget, gpointer data) {
-/*
- switch(function) {
- case 0:
- break;
- case 1:
- break;
- case 2:
- if(rit_plus_timer!=-1) {
- g_source_remove(rit_plus_timer);
- rit_plus_timer=-1;
- }
- break;
- case 3:
- if(xit_plus_timer!=-1) {
- g_source_remove(xit_plus_timer);
- xit_plus_timer=-1;
- }
- break;
- case 4:
- break;
- case 5:
- break;
- }
-*/
-}
-
-void sim_s5_pressed_cb(GtkWidget *widget, gpointer data) {
- SWITCH_ACTION *a=g_new(SWITCH_ACTION,1);
- a->action=switches[5].switch_function;
- a->state=PRESSED;
- g_idle_add(switch_action,a);
-/*
- switch(function) {
- case 0:
- noise_cb(widget,data);
- break;
- case 1:
- // A<>B
- aswapb_cb(widget,data);
- break;
- case 2:
- if(rit_minus_timer==-1 && rit_plus_timer==-1) {
- rit_cb(widget,(void *)-1);
- }
- break;
- case 3:
- if(xit_minus_timer==-1 && xit_plus_timer==-1) {
- xit_cb(widget,(void *)-1);
- }
- break;
- case 4:
- rsat_cb(widget,data);
- break;
- case 5:
- filter_cb(widget,data);
- break;
- }
-*/
-}
-
-void sim_s5_released_cb(GtkWidget *widget, gpointer data) {
-/*
- switch(function) {
- case 0:
- break;
- case 1:
- break;
- case 2:
- if(rit_minus_timer!=-1) {
- g_source_remove(rit_minus_timer);
- rit_minus_timer=-1;
- }
- break;
- case 3:
- if(xit_minus_timer!=-1) {
- g_source_remove(xit_minus_timer);
- xit_minus_timer=-1;
- }
- break;
- case 4:
- break;
- case 5:
- break;
- }
-*/
-}
-
-void sim_s6_pressed_cb(GtkWidget *widget, gpointer data) {
- SWITCH_ACTION *a=g_new(SWITCH_ACTION,1);
- a->action=switches[6].switch_function;
- a->state=PRESSED;
- g_idle_add(switch_action,a);
- switch(function) {
- case 0:
- agc_cb(widget,data);
- break;
- case 1:
- split_cb(widget,data);
- break;
- case 2:
- rit_clear_cb(widget,NULL);
- break;
- case 3:
- xit_clear_cb(widget,NULL);
- break;
- case 4:
- break;
- case 5:
- break;
- }
-}
-
-void sim_s6_released_cb(GtkWidget *widget, gpointer data) {
-/*
- switch(function) {
- case 0:
- break;
- case 1:
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- case 5:
- break;
- }
-*/
-}
-
-void sim_s0_cb(GtkWidget *widget, gpointer data) {
- SWITCH_ACTION *a=g_new(SWITCH_ACTION,1);
- a->action=switches[0].switch_function;
- a->state=PRESSED;
- g_idle_add(switch_action,a);
-/*
- switch(function) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- mox_cb((GtkWidget *)NULL, (gpointer)NULL);
- break;
- case 5:
- tune_cb((GtkWidget *)NULL, (gpointer)NULL);
- break;
- }
-*/
-}
-
-void sim_s7_cb(GtkWidget *widget, gpointer data) {
- SWITCH_ACTION *a=g_new(SWITCH_ACTION,1);
- a->action=switches[7].switch_function;
- a->state=PRESSED;
- g_idle_add(switch_action,a);
-/*
- g_idle_add(process_function_switch,NULL);
-*/
-}
-#endif
-
GtkWidget *toolbar_init(int my_width, int my_height, GtkWidget* parent) {
width=my_width;
height=my_height;