WIP: réorganisation widget/rules/

This commit is contained in:
Jean Sirmai 2024-09-09 23:22:31 +02:00
parent a26478ff8d
commit c6ed3c5c0f
Signed by: jean
GPG Key ID: FB3115C340E057E3
16 changed files with 24 additions and 18 deletions

View File

@ -170,7 +170,7 @@ void widget_state_XYZ_reset_all();
// def: widget / rules / selected / dispatch.c (= right)
void *widget_get_rules_tree_tools_pane();
void *widget_get_rules_selected_pane();
void *widget_get_single_selected_rule_pane();
// call: widget / rules / tree_tools / dispatch.c / widget_get_rules_tree_tools_pane()
@ -182,7 +182,7 @@ void *widget_get_rules_tree_tools(); // pilot_box.c
void *widget_get_rules_use(); // freq.c
// call: widget / rules / selected / dispatch.c / widget_get_rules_selected_pane()
// call: widget / rules / selected / dispatch.c / widget_get_single_selected_rule_pane()
// def: widget / rules / selected / dispatch.c
// def: widget / rules / selected / edit.c
// def: widget / rules / selected / enquire.c

View File

@ -45,6 +45,8 @@
/* */
/******************************************************************************/
/*
static void
setup_listitem_cb (GtkListItemFactory *factory,
GtkListItem *list_item)
@ -79,6 +81,8 @@ activate_cb (GtkListView *list,
g_app_info_launch (app_info, NULL, NULL, NULL);
g_object_unref (app_info);
}
*/
/*
static void

View File

@ -27,9 +27,9 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "../../../../../include/fsm.h"
#include "../../../../../include/widget.h"
#include "../../../../../include/signal.h"
#include "../../../../include/fsm.h"
#include "../../../../include/widget.h"
#include "../../../../include/signal.h"
void *widget_get_selected_rule_algebra()

View File

@ -34,14 +34,14 @@
void *widget_get_rules_page()
{
GtkPaned *tree_vs_selected = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
gtk_paned_set_start_child (tree_vs_selected, GTK_WIDGET (widget_get_rules_tree_tools_pane()));
gtk_paned_set_end_child (tree_vs_selected, GTK_WIDGET (widget_get_rules_selected_pane()));
gtk_paned_set_position (tree_vs_selected, 340); // WARNING : c'est une position "absolue"
gtk_paned_set_wide_handle (tree_vs_selected, TRUE);
gtk_paned_set_shrink_start_child (tree_vs_selected, FALSE);
gtk_paned_set_shrink_end_child (tree_vs_selected, FALSE);
GtkPaned *tree_vs_selected_one = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
gtk_paned_set_start_child (tree_vs_selected_one, GTK_WIDGET (widget_get_rules_tree_tools_pane()));
gtk_paned_set_end_child (tree_vs_selected_one, GTK_WIDGET (widget_get_single_selected_rule_pane()));
gtk_paned_set_position (tree_vs_selected_one, 340); // WARNING : c'est une position "absolue"
gtk_paned_set_wide_handle (tree_vs_selected_one, TRUE);
gtk_paned_set_shrink_start_child (tree_vs_selected_one, FALSE);
gtk_paned_set_shrink_end_child (tree_vs_selected_one, FALSE);
return GTK_WIDGET (tree_vs_selected);
return GTK_WIDGET (tree_vs_selected_one);
}

View File

@ -32,8 +32,8 @@
#include "../../../../include/signal.h"
void *widget_get_selected_rule() {
void *widget_get_selected_rule()
{
GtkBox *images_and_texts = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
gtk_box_append (images_and_texts, GTK_WIDGET (widget_get_selected_rule_geometry ()));
gtk_box_append (images_and_texts, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL)));
@ -42,7 +42,7 @@ void *widget_get_selected_rule() {
return GTK_WIDGET (images_and_texts);
}
void *widget_get_rules_selected_pane()
void *widget_get_single_selected_rule_pane()
{
GtkPaned *rule_itself_vs_explore_edit_pane = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_VERTICAL));
gtk_paned_set_start_child (rule_itself_vs_explore_edit_pane, GTK_WIDGET (widget_get_selected_rule()));
@ -59,3 +59,4 @@ void *widget_get_rules_selected_pane()
}

View File

@ -85,7 +85,7 @@ static void display_widgets_at_the_right_side (GtkWidget *header_bar)
// https://stackoverflow.com/questions/69135934/creating-a-simple-menubar-menu-and-menu-item-in-c-using-gtk4
static void callback_aa () {puts("callback_aa() > menu item A clicked.\n");}
//static void callback_aa () {puts("callback_aa() > menu item A clicked.\n");}
static void action_a (GSimpleAction *action, GVariant *parameter, gpointer app) {puts("menu item A clicked.\n");}
static void connect(GApplication *app, gpointer *data) { puts("Connect menu item clicked.\n"); }
@ -94,7 +94,7 @@ void window_design_topbar_right (GtkWidget *header_bar, GtkApplication *app)
display_widgets_at_the_right_side (header_bar);
GSimpleActionGroup *ga = g_simple_action_group_new ();
GtkShortcutAction *aa = gtk_named_action_new ("aa");
// GtkShortcutAction *aa = gtk_named_action_new ("aa");
gtk_widget_insert_action_group (btt_A, "aa", G_ACTION_GROUP (ga)); // GActionGroup* group
// GtkShortcutAction *act_aa = gtk_callback_action_new (callback_aa, NULL, NULL);
@ -140,3 +140,4 @@ void window_design_topbar_right (GtkWidget *header_bar, GtkApplication *app)
}