journal cleaning signal on_topbar_right_measure_clicked()
This commit is contained in:
parent
b2c0a2f52a
commit
e8f22cd813
|
@ -128,7 +128,7 @@ void on_resetting_XYZ_in_state_page ();
|
||||||
|
|
||||||
void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data);
|
void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data);
|
||||||
void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box);
|
void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box);
|
||||||
void on_clicked_topbar_right_measure (GtkWidget *btt_measure, gpointer data);
|
void on_topbar_right_measure_clicked (GtkWidget *btt_measure, gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
16
src/signal.c
16
src/signal.c
|
@ -423,18 +423,22 @@ void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrol
|
||||||
/* M E A S U R E S */
|
/* M E A S U R E S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
void on_clicked_topbar_right_measure (GtkWidget *btt, gpointer data)
|
void on_topbar_right_measure_clicked (GtkWidget *btt, gpointer button_icon_name)
|
||||||
{
|
{
|
||||||
fsm_journal_event (DEBUG, BUTTON, "signal", "clicked topbar right measure()", "🧭️");
|
// ici, il faudrait surtout dire que: widget_get_measure_page
|
||||||
// fsm_measures_sorted_list_do something ();
|
// devient un enfant de: widget_get_main_window.
|
||||||
|
fsm_journal_event (DEBUG, BUTTON, "signal", "topbar right measure()",
|
||||||
|
concat ("clicked; icon = ", button_icon_name, NULL));
|
||||||
|
// fsm_measures_sorted_list_do something (); TODO
|
||||||
|
// ! WARNING ! ce qui suit n'est qu'une maquette: (... delenda est !)
|
||||||
|
// la 'logique' qui va des mesures aux résultats doit changer de forme TODO
|
||||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
GTK_WIDGET (widget_get_measure_page()));
|
GTK_WIDGET (widget_get_measure_page()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_start_new_measure (GtkWidget *btt, gpointer data)
|
void on_start_new_measure (GtkWidget *btt, gpointer btt_label)
|
||||||
{
|
{
|
||||||
fsm_journal_event (DEBUG, BUTTON, "signal", "start a new measure()",
|
fsm_journal_event (DEBUG, BUTTON, "signal", "start a new measure()", btt_label);
|
||||||
gtk_button_get_label (GTK_BUTTON (btt))); // gtk_label_get_text () ? TODO
|
|
||||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
GTK_WIDGET (widget_measure_do_select_rules_first()));
|
GTK_WIDGET (widget_measure_do_select_rules_first()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
|
||||||
|
#include "../../../include/util.h"
|
||||||
#include "../../../include/base.h"
|
#include "../../../include/base.h"
|
||||||
#include "../../../include/signal.h"
|
#include "../../../include/signal.h"
|
||||||
#include "../../../include/widget.h"
|
#include "../../../include/widget.h"
|
||||||
|
@ -295,21 +296,17 @@ void *widget_get_measure_page()
|
||||||
{
|
{
|
||||||
measure_page = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
measure_page = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
edit_a_new_measure_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
edit_a_new_measure_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
caliper = gtk_picture_new_for_filename
|
caliper = gtk_picture_new_for_filename ("./data/stamp/measure caliper icon.png"); // TODO icon
|
||||||
("./data/stamp/measure caliper icon.png");
|
char *btt_lab = "edit a new measure";
|
||||||
btt_edit_a_new_measure = gtk_toggle_button_new_with_label ("edit a new measure");
|
btt_edit_a_new_measure = gtk_toggle_button_new_with_label (btt_lab);
|
||||||
|
|
||||||
printf("gtk_button_get_label (btt_edit_a_new_measure) = %s <---\
|
|
||||||
\npourquoi est-ce que je n'arrive pas à afficher ce label dans le journal ? \n",
|
|
||||||
gtk_button_get_label (GTK_BUTTON (btt_edit_a_new_measure)));
|
|
||||||
// voir signal > void on_start_new_measure (GtkWidget *btt, gpointer data))
|
|
||||||
|
|
||||||
g_signal_connect (btt_edit_a_new_measure, "toggled",
|
g_signal_connect (btt_edit_a_new_measure, "toggled",
|
||||||
G_CALLBACK (on_start_new_measure), NULL);
|
G_CALLBACK (on_start_new_measure),
|
||||||
|
concat ("label = ", btt_lab, " (+/- caliper icon)", NULL));
|
||||||
gtk_box_append (edit_a_new_measure_box, GTK_WIDGET (caliper));
|
gtk_box_append (edit_a_new_measure_box, GTK_WIDGET (caliper));
|
||||||
gtk_box_append (edit_a_new_measure_box, GTK_WIDGET (btt_edit_a_new_measure));
|
gtk_box_append (edit_a_new_measure_box, GTK_WIDGET (btt_edit_a_new_measure));
|
||||||
gtk_box_append (measure_page, GTK_WIDGET (edit_a_new_measure_box));
|
gtk_box_append (measure_page, GTK_WIDGET (edit_a_new_measure_box));
|
||||||
|
fsm_journal_event (DEBUG, BUTTON, "widget/measure/dispatch", "widget_get_measure_page()",
|
||||||
|
concat ("creates: ", btt_lab, " in: measure_page", NULL));
|
||||||
|
|
||||||
return measure_page;
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,8 @@ static void display_widgets_at_the_right_side (GtkWidget *header_bar)
|
||||||
|
|
||||||
GtkButton *measure = GTK_BUTTON (gtk_button_new ());
|
GtkButton *measure = GTK_BUTTON (gtk_button_new ());
|
||||||
gtk_button_set_icon_name (measure, "color-select-symbolic");
|
gtk_button_set_icon_name (measure, "color-select-symbolic");
|
||||||
g_signal_connect (measure, "clicked", G_CALLBACK (on_clicked_topbar_right_measure), no_local_data);
|
g_signal_connect (measure, "clicked", G_CALLBACK (on_topbar_right_measure_clicked),
|
||||||
|
"color-select-symbolic");
|
||||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), GTK_WIDGET (measure));
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), GTK_WIDGET (measure));
|
||||||
|
|
||||||
list_box = gtk_list_box_new();
|
list_box = gtk_list_box_new();
|
||||||
|
|
Loading…
Reference in New Issue