mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
make tray hide button toggle hidden state
This commit is contained in:
parent
54e17e76b1
commit
ba1aefcd49
1 changed files with 17 additions and 8 deletions
|
@ -861,16 +861,25 @@ handle_grid_button( GtkWidget* widget, GtkAppGlobals* globals )
|
||||||
static void
|
static void
|
||||||
handle_hide_button( GtkWidget* widget, GtkAppGlobals* globals )
|
handle_hide_button( GtkWidget* widget, GtkAppGlobals* globals )
|
||||||
{
|
{
|
||||||
if ( globals->cGlobals.params->trayOverlaps ) {
|
BoardCtxt* board;
|
||||||
globals->adjustment->page_size = MAX_ROWS;
|
XP_Bool draw = XP_FALSE;
|
||||||
globals->adjustment->value = 0.0;
|
|
||||||
|
|
||||||
gtk_signal_emit_by_name( GTK_OBJECT(globals->adjustment), "changed" );
|
if ( globals->cGlobals.params->trayOverlaps ) {
|
||||||
gtk_adjustment_value_changed( GTK_ADJUSTMENT(globals->adjustment) );
|
globals->adjustment->page_size = MAX_ROWS;
|
||||||
|
globals->adjustment->value = 0.0;
|
||||||
|
|
||||||
|
gtk_signal_emit_by_name( GTK_OBJECT(globals->adjustment), "changed" );
|
||||||
|
gtk_adjustment_value_changed( GTK_ADJUSTMENT(globals->adjustment) );
|
||||||
}
|
}
|
||||||
/* board_setTrayVisible( globals->board, XP_FALSE, XP_TRUE ); */
|
|
||||||
if ( board_hideTray( globals->cGlobals.game.board ) ) {
|
board = globals->cGlobals.game.board;
|
||||||
board_draw( globals->cGlobals.game.board );
|
if ( TRAY_REVEALED == board_getTrayVisState( board ) ) {
|
||||||
|
draw = board_hideTray( board );
|
||||||
|
} else {
|
||||||
|
draw = board_showTray( board );
|
||||||
|
}
|
||||||
|
if ( draw ) {
|
||||||
|
board_draw( board );
|
||||||
}
|
}
|
||||||
} /* handle_hide_button */
|
} /* handle_hide_button */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue