WIP: gtk_check_button_set_group() < to cast (in top.c 63, 72, 83, 94)
This commit is contained in:
parent
9566672636
commit
fe047b5c2f
|
@ -51,10 +51,6 @@ void fsm_set_exec_edit (int value);
|
||||||
void fsm_set_state_rules_data (int value);
|
void fsm_set_state_rules_data (int value);
|
||||||
void fsm_set_store_restore_reset (int target, int value);
|
void fsm_set_store_restore_reset (int target, int value);
|
||||||
|
|
||||||
void fsm_reset_all_objects_transparencies_at_value (int value);
|
|
||||||
void fsm_store_all_objects_transparencies_current_values (int value);
|
|
||||||
void fsm_restore_all_objects_transparencies_from_mem (int value);
|
|
||||||
|
|
||||||
void fsm_reset_all_situations_transparencies_at_value (int value);
|
void fsm_reset_all_situations_transparencies_at_value (int value);
|
||||||
|
|
||||||
|
|
||||||
|
|
24
src/signal.c
24
src/signal.c
|
@ -292,30 +292,14 @@ void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data)
|
||||||
|
|
||||||
// ---------------------------- O B J E C T S --------------------------- //
|
// ---------------------------- O B J E C T S --------------------------- //
|
||||||
|
|
||||||
/*static void switch_store_restore_reset(GtkScrollbar *reset_scrollbar)
|
|
||||||
{
|
|
||||||
GtkAdjustment *adj_obj = gtk_scrollbar_get_adjustment (reset_scrollbar);
|
|
||||||
|
|
||||||
switch (fsm_get_objects_box_reset_value()) {
|
|
||||||
case (STORE) : fsm_set_store_restore_reset (gtk_adjustment_get_value (adj_obj)); break;
|
|
||||||
case (RESTORE) : fsm_set_store_restore_reset (gtk_adjustment_get_value (adj_obj)); break;
|
|
||||||
case (RESET) : fsm_set_store_restore_reset (gtk_adjustment_get_value (adj_obj)); break;
|
|
||||||
default : printf("default in signal.switch_store_restore_reset()\n");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *reset_scrollbar)
|
void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *reset_scrollbar)
|
||||||
{
|
{
|
||||||
const char *btt_name = gtk_button_get_icon_name (GTK_BUTTON (btt_source));
|
const char *btt_name = gtk_button_get_icon_name (GTK_BUTTON (btt_source));
|
||||||
GtkAdjustment *adj_obj = gtk_scrollbar_get_adjustment (reset_scrollbar);
|
int value = gtk_adjustment_get_value (gtk_scrollbar_get_adjustment (reset_scrollbar));
|
||||||
int value = gtk_adjustment_get_value (adj_obj);
|
|
||||||
|
|
||||||
if ( ! strcmp (btt_name, "view-restore-symbolic")) // printf("restore\n");
|
if ( ! strcmp (btt_name, "view-restore-symbolic")) fsm_set_store_restore_reset (STORE, value);
|
||||||
fsm_set_store_restore_reset (STORE, value);
|
if ( ! strcmp (btt_name, "view-fullscreen-symbolic")) fsm_set_store_restore_reset (RESTORE, value);
|
||||||
if ( ! strcmp (btt_name, "view-fullscreen-symbolic")) // printf("fullscreen\n");
|
if ( ! strcmp (btt_name, "view-refresh-symbolic")) fsm_set_store_restore_reset (RESET, value);
|
||||||
fsm_set_store_restore_reset (RESTORE, value);
|
|
||||||
if ( ! strcmp (btt_name, "view-refresh-symbolic")) // printf("refresh\n");
|
|
||||||
fsm_set_store_restore_reset (RESET, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void *get_objects_box()
|
||||||
|
|
||||||
|
|
||||||
GtkBox *reset_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
GtkBox *reset_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
|
||||||
GtkCheckButton *group_transparencies = GTK_CHECK_BUTTON (gtk_check_button_new ());
|
// GtkCheckButton *group_transparencies = GTK_CHECK_BUTTON (gtk_check_button_new ());
|
||||||
|
|
||||||
GtkWidget *btt_store = gtk_toggle_button_new ();
|
GtkWidget *btt_store = gtk_toggle_button_new ();
|
||||||
const char *btt_store_tip = " store current transparencies values.\n\n\
|
const char *btt_store_tip = " store current transparencies values.\n\n\
|
||||||
|
@ -69,7 +69,7 @@ static void *get_objects_box()
|
||||||
sprintf(tooltip_text_for_btt_store, btt_store_tip);
|
sprintf(tooltip_text_for_btt_store, btt_store_tip);
|
||||||
gtk_widget_set_tooltip_text (GTK_WIDGET (btt_store), btt_store_tip);
|
gtk_widget_set_tooltip_text (GTK_WIDGET (btt_store), btt_store_tip);
|
||||||
gtk_button_set_icon_name (GTK_BUTTON (btt_store), "view-restore-symbolic");
|
gtk_button_set_icon_name (GTK_BUTTON (btt_store), "view-restore-symbolic");
|
||||||
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_store), group_transparencies);
|
// gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_store), group_transparencies);
|
||||||
g_signal_connect (btt_store, "toggled",
|
g_signal_connect (btt_store, "toggled",
|
||||||
G_CALLBACK (on_updating_objects_transparencies), reset_scrollbar);
|
G_CALLBACK (on_updating_objects_transparencies), reset_scrollbar);
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ static void *get_objects_box()
|
||||||
sprintf(tooltip_text_for_btt_restore, btt_restore_tip);
|
sprintf(tooltip_text_for_btt_restore, btt_restore_tip);
|
||||||
gtk_widget_set_tooltip_text (GTK_WIDGET (btt_restore), btt_restore_tip);
|
gtk_widget_set_tooltip_text (GTK_WIDGET (btt_restore), btt_restore_tip);
|
||||||
gtk_button_set_icon_name (GTK_BUTTON (btt_restore), "view-fullscreen-symbolic");
|
gtk_button_set_icon_name (GTK_BUTTON (btt_restore), "view-fullscreen-symbolic");
|
||||||
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_restore), group_transparencies);
|
// gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_restore), group_transparencies);
|
||||||
g_signal_connect (btt_restore, "toggled",
|
g_signal_connect (btt_restore, "toggled",
|
||||||
G_CALLBACK (on_updating_objects_transparencies), reset_scrollbar);
|
G_CALLBACK (on_updating_objects_transparencies), reset_scrollbar);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ static void *get_objects_box()
|
||||||
sprintf(tooltip_text_for_btt_reset, btt_reset_tip);
|
sprintf(tooltip_text_for_btt_reset, btt_reset_tip);
|
||||||
gtk_widget_set_tooltip_text (GTK_WIDGET (btt_reset), btt_reset_tip);
|
gtk_widget_set_tooltip_text (GTK_WIDGET (btt_reset), btt_reset_tip);
|
||||||
gtk_button_set_icon_name (GTK_BUTTON (btt_reset), "view-refresh-symbolic");
|
gtk_button_set_icon_name (GTK_BUTTON (btt_reset), "view-refresh-symbolic");
|
||||||
gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_reset), group_transparencies);
|
// gtk_check_button_set_group (GTK_CHECK_BUTTON (btt_reset), group_transparencies);
|
||||||
g_signal_connect (btt_reset, "toggled",
|
g_signal_connect (btt_reset, "toggled",
|
||||||
G_CALLBACK (on_updating_objects_transparencies), reset_scrollbar);
|
G_CALLBACK (on_updating_objects_transparencies), reset_scrollbar);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue