diff --git a/callback.c b/callback.c index eef1fe4..824197d 100644 --- a/callback.c +++ b/callback.c @@ -51,6 +51,7 @@ void ui_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, gpointer data) 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); } } @@ -62,7 +63,17 @@ void ui_toggle_model_exec (GtkWidget *btt_run_stop_model_exec, gpointer data) set_run_xor_stop_exec (0); } else { gtk_button_set_icon_name (GTK_BUTTON (btt_run_stop_model_exec), "media-playback-pause-symbolic"); +// gtk_button_set_icon_name (GTK_BUTTON (btt_run_stop_model_exec), "system-shutdown-symbolic"); +// I hesitate : The button should then toggle between activable xor inactivable states set_run_xor_stop_exec (1); } } +void ui_model_exec_depends_on_edition (GtkWidget *btt_run_stop_model_exec, gpointer data) +{ + if (get_run_xor_stop_exec() && get_exec_edit_mode()) { + gtk_button_set_icon_name (GTK_BUTTON (btt_run_stop_model_exec), "media-playback-start-symbolic"); +// set_run_xor_stop_exec (0); + } +} + diff --git a/callback.h b/callback.h index 19391b4..4ba19f2 100644 --- a/callback.h +++ b/callback.h @@ -10,8 +10,9 @@ void ui_disable_action (const char *name); // @see application . gem_graph_client_application_init (GemGraphClientApplication *self) { // g_action_map_add_action_entries (G_ACTION_MAP(self), app_actions, G_N_ELEMENTS(app_actions), self); ... -void ui_toggle_exec_edit (); -void ui_toggle_model_exec (); +void ui_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, gpointer data); +void ui_toggle_model_exec (GtkWidget *btt_run_stop_model_exec, gpointer data); +void ui_model_exec_depends_on_edition (GtkWidget *btt_run_stop_model_exec, gpointer data); void on_quit_action (GSimpleAction *action, GVariant *parameter, gpointer user_data); void on_about_action (GSimpleAction *action, GVariant *parameter, gpointer user_data); diff --git a/contain.c b/contain.c index 7d34115..e1baab8 100644 --- a/contain.c +++ b/contain.c @@ -287,6 +287,7 @@ void window_header_bar (GtkWindow *window, char *title){ gtk_button_set_icon_name (exec_xor_edit, "text-editor-symbolic"); gtk_button_set_icon_name (exec_xor_edit, "system-run-symbolic"); g_signal_connect (exec_xor_edit, "clicked", G_CALLBACK (ui_toggle_exec_edit), NULL); + g_signal_connect (exec_xor_edit, "clicked", G_CALLBACK (ui_model_exec_depends_on_edition), NULL); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (exec_xor_edit)); gtk_window_set_titlebar (window, header_bar); diff --git a/display.c b/display.c index 936c56c..32280dd 100644 --- a/display.c +++ b/display.c @@ -111,8 +111,8 @@ GtkBox *get_RUN_STOP_box(){ GtkBox *get_ZOOM_box(){ GtkBox *ZOOM_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0)); GtkWidget *ZOOM_Label = GTK_WIDGET (gtk_label_new (\ - "\n TOOLS\n ---\n zoom\n ---\n (space\n struct.)\n\ - ---\n (arrows\n struct.)\n")); + "\n TOOLS\n ---\n zoom\n ---\n space\n struct.\n\ + ---\n arrows\n struct.\n ---\n orient\n state\n in space\n")); gtk_widget_set_size_request (GTK_WIDGET (ZOOM_box), 10, 80); gtk_box_append (ZOOM_box, ZOOM_Label); return ZOOM_box;