Merge pull request #289 from YuGiOhJCJ/gtk-warning-fix-1

Move a statement later to avoid a GTK warning
This commit is contained in:
zeromus 2019-07-28 02:27:24 -04:00 committed by GitHub
commit 9e6b4f128f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -3106,8 +3106,7 @@ common_gtk_main( class configured_features *my_config)
CommonSettings.fwConfig.language = my_config->firmware_language; CommonSettings.fwConfig.language = my_config->firmware_language;
} }
/* if the command line overriding is enabled /* if the command line overriding is enabled then use the language set on the GUI */
then use the language set on the GUI */
if(config.command_line_overriding_firmware_language) if(config.command_line_overriding_firmware_language)
CommonSettings.fwConfig.language = config.firmware_language; CommonSettings.fwConfig.language = config.firmware_language;
@ -3367,7 +3366,6 @@ common_gtk_main( class configured_features *my_config)
gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "cheatsearch"), FALSE); gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "cheatsearch"), FALSE);
nds_screen.gap_size = config.view_gap ? GAP_SIZE : 0; nds_screen.gap_size = config.view_gap ? GAP_SIZE : 0;
gtk_toggle_action_set_active((GtkToggleAction*)gtk_action_group_get_action(action_group, "gap"), config.view_gap);
nds_screen.swap = config.view_swap; nds_screen.swap = config.view_swap;
gtk_toggle_action_set_active((GtkToggleAction*)gtk_action_group_get_action(action_group, "orient_swapscreens"), config.view_swap); gtk_toggle_action_set_active((GtkToggleAction*)gtk_action_group_get_action(action_group, "orient_swapscreens"), config.view_swap);
@ -3396,6 +3394,10 @@ common_gtk_main( class configured_features *my_config)
/* Creating the place for showing DS screens */ /* Creating the place for showing DS screens */
pDrawingArea = gtk_drawing_area_new(); pDrawingArea = gtk_drawing_area_new();
/* This toggle action must not be set active before the pDrawingArea initialization to avoid a GTK warning */
gtk_toggle_action_set_active((GtkToggleAction*)gtk_action_group_get_action(action_group, "gap"), config.view_gap);
gtk_container_add (GTK_CONTAINER (pVBox), pDrawingArea); gtk_container_add (GTK_CONTAINER (pVBox), pDrawingArea);
gtk_widget_set_events(pDrawingArea, gtk_widget_set_events(pDrawingArea,