fixing panel selection
This commit is contained in:
parent
eaef475d7a
commit
b9d7b24730
@ -326,7 +326,7 @@ static int aio_panel_add( GawIoData *gawio, char *pline )
|
|||||||
UserData *ud = gawio->ud;
|
UserData *ud = gawio->ud;
|
||||||
int i ;
|
int i ;
|
||||||
|
|
||||||
msg_dbg("Fonction called %s", pline );
|
msg_dbg("Function called %s", pline );
|
||||||
char *tok = stu_token_next( &pline, " ", " " );
|
char *tok = stu_token_next( &pline, " ", " " );
|
||||||
if ( ! tok ) {
|
if ( ! tok ) {
|
||||||
gawio->msg = app_strdup(_("Expecting number") );
|
gawio->msg = app_strdup(_("Expecting number") );
|
||||||
|
@ -606,7 +606,10 @@ void aw_create_main_window ( UserData *ud )
|
|||||||
|
|
||||||
/* create 2 panels */
|
/* create 2 panels */
|
||||||
for (i = 0 ; i < ud->reqpanels ; i++) {
|
for (i = 0 ; i < ud->reqpanels ; i++) {
|
||||||
ap_panel_add_line(ud, NULL, 0);
|
WavePanel *n = ap_panel_add_line(ud, NULL, 0);
|
||||||
|
if (i == 0) {
|
||||||
|
pa_panel_set_selected( n, n->ud );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -345,7 +345,8 @@ static void aw_pop_add_panel_above_gaction (GSimpleAction *action, GVariant *par
|
|||||||
{
|
{
|
||||||
WavePanel *wp = (WavePanel *) user_data;
|
WavePanel *wp = (WavePanel *) user_data;
|
||||||
if ( wp ) {
|
if ( wp ) {
|
||||||
ap_panel_add_line( wp->ud, wp, 0);
|
WavePanel *n = ap_panel_add_line( wp->ud, wp, 0);
|
||||||
|
pa_panel_set_selected( n, n->ud );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,7 +355,8 @@ static void aw_pop_add_panel_below_gaction (GSimpleAction *action, GVariant *par
|
|||||||
{
|
{
|
||||||
WavePanel *wp = (WavePanel *) user_data;
|
WavePanel *wp = (WavePanel *) user_data;
|
||||||
if ( wp ) {
|
if ( wp ) {
|
||||||
ap_panel_add_line( wp->ud, wp, 1);
|
WavePanel *n = ap_panel_add_line( wp->ud, wp, 1);
|
||||||
|
pa_panel_set_selected( n, n->ud );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +364,8 @@ static void
|
|||||||
aw_add_panel_gaction (GSimpleAction *action, GVariant *param, gpointer user_data)
|
aw_add_panel_gaction (GSimpleAction *action, GVariant *param, gpointer user_data)
|
||||||
{
|
{
|
||||||
UserData *ud = (UserData *) user_data;
|
UserData *ud = (UserData *) user_data;
|
||||||
ap_panel_add_line(ud, NULL, 0);
|
WavePanel *n = ap_panel_add_line(ud, NULL, 0);
|
||||||
|
pa_panel_set_selected( n, n->ud );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -103,14 +103,14 @@ void az_zoom_in_gaction (GSimpleAction *action, GVariant *param, gpointer user_d
|
|||||||
az_cmd_zoom_absolute(ud, start, end );
|
az_cmd_zoom_absolute(ud, start, end );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
az_pop_zoom_in_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
az_pop_zoom_in_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
{
|
{
|
||||||
WavePanel *wp = (WavePanel *) user_data;
|
WavePanel *wp = (WavePanel *) user_data;
|
||||||
az_zoom_in_gaction (action, param, wp->ud);
|
az_zoom_in_gaction (action, param, wp->ud);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
az_zoom_out_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
az_zoom_out_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
{
|
{
|
||||||
UserData *ud = (UserData *) user_data;
|
UserData *ud = (UserData *) user_data;
|
||||||
@ -129,15 +129,13 @@ az_zoom_out_gaction (GSimpleAction *action, GVariant *param, gpointer user_data
|
|||||||
az_cmd_zoom_absolute(ud, start, end );
|
az_cmd_zoom_absolute(ud, start, end );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void az_pop_zoom_out_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
az_pop_zoom_out_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
|
||||||
{
|
{
|
||||||
WavePanel *wp = (WavePanel *) user_data;
|
WavePanel *wp = (WavePanel *) user_data;
|
||||||
az_zoom_out_gaction (action, param, wp->ud);
|
az_zoom_out_gaction (action, param, wp->ud);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void az_zoom_cursor0_centered_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
az_zoom_cursor0_centered_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
|
||||||
{
|
{
|
||||||
UserData *ud = (UserData *) user_data;
|
UserData *ud = (UserData *) user_data;
|
||||||
double start;
|
double start;
|
||||||
@ -183,7 +181,7 @@ void az_zoom_cursors_gaction (GSimpleAction *action, GVariant *param, gpointer u
|
|||||||
end = ud->cursors[0]->xval;
|
end = ud->cursors[0]->xval;
|
||||||
}
|
}
|
||||||
az_cmd_zoom_absolute(ud, start, end );
|
az_cmd_zoom_absolute(ud, start, end );
|
||||||
// cu_clear_cursors(ud);
|
// cu_clear_cursors(ud);
|
||||||
} else {
|
} else {
|
||||||
msg_info(_("\n\nThis function will zoom between the 2 cursors\n"
|
msg_info(_("\n\nThis function will zoom between the 2 cursors\n"
|
||||||
"But you need first set the cursor 0 by left click in DrawingArea\n"
|
"But you need first set the cursor 0 by left click in DrawingArea\n"
|
||||||
@ -191,7 +189,7 @@ void az_zoom_cursors_gaction (GSimpleAction *action, GVariant *param, gpointer u
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
az_pop_zoom_cursors_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
az_pop_zoom_cursors_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
{
|
{
|
||||||
WavePanel *wp = (WavePanel *) user_data;
|
WavePanel *wp = (WavePanel *) user_data;
|
||||||
@ -265,7 +263,7 @@ void az_pop_zoom_x_gaction (GSimpleAction *action, GVariant *param, gpointer use
|
|||||||
az_zoom_x_gaction (action, param, wp->ud);
|
az_zoom_x_gaction (action, param, wp->ud);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
az_zoom_y_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
az_zoom_y_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
{
|
{
|
||||||
UserData *ud = (UserData *) user_data;
|
UserData *ud = (UserData *) user_data;
|
||||||
@ -276,14 +274,14 @@ az_zoom_y_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
|||||||
GINT_TO_POINTER (GDK_TOP_SIDE) );
|
GINT_TO_POINTER (GDK_TOP_SIDE) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
az_pop_zoom_y_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
az_pop_zoom_y_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
{
|
{
|
||||||
WavePanel *wp = (WavePanel *) user_data;
|
WavePanel *wp = (WavePanel *) user_data;
|
||||||
az_zoom_y_gaction (action, param, wp->ud);
|
az_zoom_y_gaction (action, param, wp->ud);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
az_zoom_xy_area_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
az_zoom_xy_area_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
{
|
{
|
||||||
UserData *ud = (UserData *) user_data;
|
UserData *ud = (UserData *) user_data;
|
||||||
@ -307,7 +305,7 @@ typedef struct _ToggledData {
|
|||||||
} ToggledData;
|
} ToggledData;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
az_button_toggled_cb (GtkWidget *widget, ToggledData *pdata)
|
az_button_toggled_cb (GtkWidget *widget, ToggledData *pdata)
|
||||||
{
|
{
|
||||||
pdata->wp->man_yzoom = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
pdata->wp->man_yzoom = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
||||||
@ -319,7 +317,7 @@ az_button_toggled_cb (GtkWidget *widget, ToggledData *pdata)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
az_entry_changed_cb (GtkWidget *widget, gpointer pdata)
|
az_entry_changed_cb (GtkWidget *widget, gpointer pdata)
|
||||||
{
|
{
|
||||||
const gchar *text;
|
const gchar *text;
|
||||||
@ -329,8 +327,7 @@ az_entry_changed_cb (GtkWidget *widget, gpointer pdata)
|
|||||||
*val = str2val((char *) text);
|
*val = str2val((char *) text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void az_pop_zoom_dialog_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
az_pop_zoom_dialog_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
|
||||||
{
|
{
|
||||||
WavePanel *wp = (WavePanel *) user_data;
|
WavePanel *wp = (WavePanel *) user_data;
|
||||||
if ( ! wp ) {
|
if ( ! wp ) {
|
||||||
@ -539,8 +536,7 @@ az_pop_zoom_dialog_gaction (GSimpleAction *action, GVariant *param, gpointer use
|
|||||||
gtk_widget_destroy (dialog);
|
gtk_widget_destroy (dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void az_zoom_dialog_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
||||||
az_zoom_dialog_gaction (GSimpleAction *action, GVariant *param, gpointer user_data )
|
|
||||||
{
|
{
|
||||||
UserData *ud = (UserData *) user_data;
|
UserData *ud = (UserData *) user_data;
|
||||||
if ( ud->selected_panel == NULL) {
|
if ( ud->selected_panel == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user