WIP: cleaning on_updating_objects_transparencies()

This commit is contained in:
Jean Sirmai 2024-07-23 23:15:03 +02:00
parent 61c04cf6a7
commit 008f67f745
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 13 additions and 23 deletions

View File

@ -156,6 +156,7 @@ static void debug_printing (int value, int sub_automaton)
case (2) : printf("fsm_restore_all_objects_transparencies_from_mem\n"); break;
case (3) : printf("fsm_store_all_objects_transparencies_current_values\n"); break;
case (4) : printf("fsm_reset_all_objects_transparencies_at_value\n"); break;
case (5) : printf("fsm_set_situations_box_reset_value : %3d > %3d\n",
fsm_get_situations_box_reset_value(), value);
break;

View File

@ -299,27 +299,16 @@ void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data)
}
static void switch_restore_store_reset()
// ---------------------------- O B J E C T S --------------------------- //
static void switch_store_restore_reset()
{
switch (fsm_get_objects_box_reset_value()) {
case (-1) :
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_get_state_page()));
break;
case (-2) :
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_get_rules_page()));
break;
case (DATA) :
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_get_stock_page()));
break;
default :
printf("default in signal.on_toggle_state_rule_data()\n");
case (-1) : break;
case (-2) : break;
case (-3) : break;
default : printf("default in signal.switch_store_restore_reset()\n");
}
}
@ -328,11 +317,11 @@ void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *re
const char *btt_name = gtk_button_get_icon_name (GTK_BUTTON (btt_source));
GtkAdjustment *adj_obj = gtk_scrollbar_get_adjustment (reset_scrollbar);
if (strcmp (btt_name, "view-restore-symbolic"))
if ( ! strcmp (btt_name, "view-restore-symbolic")) // printf("restore\n");
fsm_restore_all_objects_transparencies_from_mem (gtk_adjustment_get_value (adj_obj));
if (strcmp (btt_name, "view-fullscreen-symbolic"))
if ( ! strcmp (btt_name, "view-fullscreen-symbolic")) // printf("fullscreen\n");
fsm_store_all_objects_transparencies_current_values (gtk_adjustment_get_value (adj_obj));
if (strcmp (btt_name, "view-refresh-symbolic"))
if ( ! strcmp (btt_name, "view-refresh-symbolic")) // printf("refresh\n");
fsm_reset_all_objects_transparencies_at_value (gtk_adjustment_get_value (adj_obj));
}