From 37fdaa7dfa1a18eebea73e465d2fd40df151aacd Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Fri, 2 Aug 2024 13:25:23 +0200 Subject: [PATCH] WIP: cleaning a little bit more (it's easy, now) --- include/widget.h | 10 ++++++---- src/widget/data/dispatch.c | 2 +- src/widget/{init.c => dispatch.c} | 0 src/widget/rules/tree_tools/compare.c | 2 +- src/widget/rules/tree_tools/pilot_box.c | 2 +- src/widget/topbar/dispatch.c | 2 +- src/widget/topbar/left.c | 6 +++--- 7 files changed, 13 insertions(+), 11 deletions(-) rename src/widget/{init.c => dispatch.c} (100%) diff --git a/include/widget.h b/include/widget.h index 6b3be5d..490cc0f 100644 --- a/include/widget.h +++ b/include/widget.h @@ -49,9 +49,11 @@ void *widget_get_main_window(); void *widget_get_dialog_window(); void *widget_get_text_window(); -void *get_btt_state(); -void *get_btt_rules(); -void *get_btt_data(); +// functions are in topbar + +void *widget_get_btt_state(); +void *widget_get_btt_rules(); +void *widget_get_btt_data(); void window_header_bar_left (GtkWidget *header_bar); void window_header_bar_right (GtkWidget *header_bar); @@ -146,7 +148,7 @@ char *widget_get_text_address_any (); // images in : data / image / // used by : widget / rules.c -void *get_an_impression_of_what_a_rules_comparator_could_be(); +void *widget_get_an_impression_of_what_a_rules_comparator_could_be(); /******************************************************************************/ /* L A B O */ diff --git a/src/widget/data/dispatch.c b/src/widget/data/dispatch.c index 8f879e9..4ff1ae5 100644 --- a/src/widget/data/dispatch.c +++ b/src/widget/data/dispatch.c @@ -33,5 +33,5 @@ void *widget_get_data_page() { - widget_get_stock_page(); + return widget_get_stock_page(); } diff --git a/src/widget/init.c b/src/widget/dispatch.c similarity index 100% rename from src/widget/init.c rename to src/widget/dispatch.c diff --git a/src/widget/rules/tree_tools/compare.c b/src/widget/rules/tree_tools/compare.c index 07a49b2..fd604cf 100644 --- a/src/widget/rules/tree_tools/compare.c +++ b/src/widget/rules/tree_tools/compare.c @@ -144,7 +144,7 @@ static GtkWidget *peek(Stack *stack) static void *push_images_onto_stack (Stack stack_b); static GtkWidget *do_rtfd (Stack stack_b); -void *get_an_impression_of_what_a_rules_comparator_could_be(){ +void *widget_get_an_impression_of_what_a_rules_comparator_could_be(){ GtkBox *compare_left = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); gtk_widget_set_size_request (GTK_WIDGET (compare_left), W_IMAGE_ABSURD, H_IMAGE_ABSURD); diff --git a/src/widget/rules/tree_tools/pilot_box.c b/src/widget/rules/tree_tools/pilot_box.c index 8f1bda3..0ad0192 100644 --- a/src/widget/rules/tree_tools/pilot_box.c +++ b/src/widget/rules/tree_tools/pilot_box.c @@ -52,7 +52,7 @@ void *widget_get_rules_tree_tools () GtkBox *rules_tree_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0)); gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_user_rules_tree())); gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_rules_use ())); - gtk_box_append (rules_tree_box, GTK_WIDGET (get_an_impression_of_what_a_rules_comparator_could_be())); + gtk_box_append (rules_tree_box, GTK_WIDGET (widget_get_an_impression_of_what_a_rules_comparator_could_be())); return GTK_WIDGET (rules_tree_box); } diff --git a/src/widget/topbar/dispatch.c b/src/widget/topbar/dispatch.c index ee83081..a2f6308 100644 --- a/src/widget/topbar/dispatch.c +++ b/src/widget/topbar/dispatch.c @@ -53,7 +53,7 @@ void widget_design_main_window (GtkWindow *main_window) // it triggers <=> signal.on_toggle_state_rule_data (a btt_NAME) // gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_STATE), TRUE); - gtk_check_button_set_active (GTK_CHECK_BUTTON (get_btt_rules()), TRUE); + gtk_check_button_set_active (GTK_CHECK_BUTTON (widget_get_btt_rules()), TRUE); gtk_window_present (GTK_WINDOW (main_window)); } diff --git a/src/widget/topbar/left.c b/src/widget/topbar/left.c index 9f3ac66..991be98 100644 --- a/src/widget/topbar/left.c +++ b/src/widget/topbar/left.c @@ -38,9 +38,9 @@ /******************************************************************************/ static GtkButton *btt_STATE, *btt_RULES, *btt_DATA; -void *get_btt_state () {return btt_STATE;} -void *get_btt_rules () {return btt_RULES;} -void *get_btt_data () {return btt_DATA;} +void *widget_get_btt_state () {return btt_STATE;} +void *widget_get_btt_rules () {return btt_RULES;} +void *widget_get_btt_data () {return btt_DATA;} void window_header_bar_left (GtkWidget *header_bar) {