Le bouton [exec_xor_edit] contrôle le bouton [run_stop_model_exec] (cleaning)
This commit is contained in:
parent
a4a5c24c1b
commit
aeaf4ada0b
13
callback.c
13
callback.c
|
@ -48,17 +48,18 @@ void ui_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, GtkWidget *btt_run_stop_
|
|||
{
|
||||
if (get_exec_edit_mode()) {
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_exec_xor_edit), "system-run-symbolic");
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_run_stop_model_exec), "media-playback-start-symbolic");
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (btt_run_stop_model_exec), TRUE);
|
||||
set_exec_edit_mode (0);
|
||||
} else {
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_exec_xor_edit), "document-edit-symbolic");
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_exec_xor_edit), "text-editor-symbolic"); // I hesitate
|
||||
set_exec_edit_mode (1);
|
||||
|
||||
if (! get_run_xor_stop_exec()) { // il faudra une pop-up window, ici, TODO
|
||||
// pour prévenir l'utilisateur du risque de perte des données de la simulation en cours
|
||||
set_run_xor_stop_exec (0);
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_run_stop_model_exec), "media-playback-pause-symbolic");
|
||||
}
|
||||
// Ici, il faudra prévenir l'utilisateur par une pop-up window : TODO (sauvegarde automatique sinon)
|
||||
// S'il ne prend pas la main, les données de la simulation en cours risquent d'être perdues
|
||||
gtk_button_set_icon_name (GTK_BUTTON (btt_run_stop_model_exec), "media-playback-pause-symbolic");
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (btt_run_stop_model_exec), FALSE);
|
||||
set_run_xor_stop_exec (0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue