Rules : premiere liste de conditions (premier bouton sous l'image 'before')
This commit is contained in:
parent
f22ecd890e
commit
b4100e31c6
|
@ -32,15 +32,39 @@
|
||||||
#include "../../../include/signal.h"
|
#include "../../../include/signal.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void *get_btt_conditions_list()
|
||||||
|
{
|
||||||
|
GtkWidget* list_box = gtk_list_box_new();
|
||||||
|
GtkWidget *label_A = GTK_WIDGET (gtk_label_new("if (value (0,0,1,3) == 2)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_A);
|
||||||
|
GtkWidget *label_B = GTK_WIDGET (gtk_label_new("if (value (0,1,1,0) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_B);
|
||||||
|
GtkWidget *label_C = GTK_WIDGET (gtk_label_new("if (value (0,1,1,2) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_C);
|
||||||
|
GtkWidget *label_D = GTK_WIDGET (gtk_label_new("if (value (1,0,1,2) == 1)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_D);
|
||||||
|
GtkWidget *label_E = GTK_WIDGET (gtk_label_new("if (value (1,1,1,0) == 0)")); gtk_list_box_append (GTK_LIST_BOX (list_box), label_E);
|
||||||
|
|
||||||
|
|
||||||
|
GtkWidget *pop = gtk_popover_new ();
|
||||||
|
gtk_popover_set_child (GTK_POPOVER (pop), list_box);
|
||||||
|
gtk_popover_present (GTK_POPOVER (pop));
|
||||||
|
gtk_popover_set_autohide (GTK_POPOVER (pop), FALSE);
|
||||||
|
gtk_popover_set_cascade_popdown (GTK_POPOVER (pop), TRUE);
|
||||||
|
|
||||||
|
GtkMenuButton *conditions = GTK_MENU_BUTTON (gtk_menu_button_new ());
|
||||||
|
const char *condition_text_1 = "conditions list";
|
||||||
|
gtk_menu_button_set_label (GTK_MENU_BUTTON (conditions), condition_text_1);
|
||||||
|
gtk_menu_button_set_always_show_arrow (conditions, TRUE);
|
||||||
|
gtk_menu_button_set_popover (conditions, GTK_WIDGET (pop));
|
||||||
|
gtk_widget_set_halign (GTK_WIDGET (conditions), GTK_ALIGN_START);
|
||||||
|
|
||||||
|
return conditions;
|
||||||
|
}
|
||||||
|
|
||||||
static void *get_conditions_actions_names_box()
|
static void *get_conditions_actions_names_box()
|
||||||
{
|
{
|
||||||
GtkBox *conditions_actions_names_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
GtkBox *conditions_actions_names_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
GtkLayoutManager *conditions_actions_names_layout = gtk_box_layout_new (GTK_ORIENTATION_HORIZONTAL);
|
GtkLayoutManager *conditions_actions_names_layout = gtk_box_layout_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_box_layout_set_spacing (GTK_BOX_LAYOUT (conditions_actions_names_layout), 100); // << TODO
|
gtk_box_layout_set_spacing (GTK_BOX_LAYOUT (conditions_actions_names_layout), 100); // << TODO
|
||||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (conditions_actions_names_layout));
|
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (conditions_actions_names_layout));
|
||||||
GtkButton *conditions = GTK_BUTTON (gtk_button_new_with_label ("\n conditions list\n"));
|
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (get_btt_conditions_list ()));
|
||||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (conditions));
|
|
||||||
gtk_widget_set_halign (GTK_WIDGET (conditions), GTK_ALIGN_START);
|
|
||||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_VERTICAL)));
|
||||||
GtkButton *actions = GTK_BUTTON (gtk_button_new_with_label ("\n actions list\n"));
|
GtkButton *actions = GTK_BUTTON (gtk_button_new_with_label ("\n actions list\n"));
|
||||||
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (actions));
|
gtk_box_append (conditions_actions_names_box, GTK_WIDGET (actions));
|
||||||
|
|
Loading…
Reference in New Issue