X-Git-Url: https://git.llucax.com/z.facultad/75.42/figuras.git/blobdiff_plain/ce35126c907f5ef33b80346d2ab5d6550b3abfaa..22d59b32c46e38bfd1937377a470a3ef45c9fc5c:/callbacks.cpp diff --git a/callbacks.cpp b/callbacks.cpp index e07c572..1dedd96 100644 --- a/callbacks.cpp +++ b/callbacks.cpp @@ -133,8 +133,6 @@ void on_button_agregar_clicked(GtkButton* button, gpointer user_data) { } // Agrego la figura nueva al dibujo. win->dibujo.agregar_figura(figura); - // Indico que se debe redibujar para que se vean los cambios. - gtk_widget_queue_draw(GTK_WIDGET(win->drawingarea)); } gboolean on_window_delete_event(GtkWidget* widget, GdkEvent* event, @@ -155,13 +153,13 @@ void on_radiobutton_linea_toggled(GtkToggleButton* togglebutton, #endif // Activo y desactivos los campos necesarios. TP5Window* win = static_cast(user_data); - gtk_widget_set_sensitive(win->spinbutton_inicio_x, true); - gtk_widget_set_sensitive(win->spinbutton_inicio_y, true); - gtk_widget_set_sensitive(win->spinbutton_fin_x, true); - gtk_widget_set_sensitive(win->spinbutton_fin_y, true); - gtk_widget_set_sensitive(win->spinbutton_alto, false); - gtk_widget_set_sensitive(win->spinbutton_ancho, false); - gtk_widget_set_sensitive(win->spinbutton_radio, false); + gtk_widget_set_sensitive(win->spinbutton_inicio_x, TRUE); + gtk_widget_set_sensitive(win->spinbutton_inicio_y, TRUE); + gtk_widget_set_sensitive(win->spinbutton_fin_x, TRUE); + gtk_widget_set_sensitive(win->spinbutton_fin_y, TRUE); + gtk_widget_set_sensitive(win->spinbutton_alto, FALSE); + gtk_widget_set_sensitive(win->spinbutton_ancho, FALSE); + gtk_widget_set_sensitive(win->spinbutton_radio, FALSE); } void on_radiobutton_cuadrado_toggled(GtkToggleButton* togglebutton, @@ -171,13 +169,13 @@ void on_radiobutton_cuadrado_toggled(GtkToggleButton* togglebutton, #endif // Activo y desactivos los campos necesarios. TP5Window* win = static_cast(user_data); - gtk_widget_set_sensitive(win->spinbutton_inicio_x, false); - gtk_widget_set_sensitive(win->spinbutton_inicio_y, false); - gtk_widget_set_sensitive(win->spinbutton_fin_x, false); - gtk_widget_set_sensitive(win->spinbutton_fin_y, false); - gtk_widget_set_sensitive(win->spinbutton_alto, true); - gtk_widget_set_sensitive(win->spinbutton_ancho, false); - gtk_widget_set_sensitive(win->spinbutton_radio, false); + gtk_widget_set_sensitive(win->spinbutton_inicio_x, FALSE); + gtk_widget_set_sensitive(win->spinbutton_inicio_y, FALSE); + gtk_widget_set_sensitive(win->spinbutton_fin_x, FALSE); + gtk_widget_set_sensitive(win->spinbutton_fin_y, FALSE); + gtk_widget_set_sensitive(win->spinbutton_alto, TRUE); + gtk_widget_set_sensitive(win->spinbutton_ancho, FALSE); + gtk_widget_set_sensitive(win->spinbutton_radio, FALSE); } void on_radiobutton_rectangulo_toggled(GtkToggleButton* togglebutton, @@ -187,13 +185,13 @@ void on_radiobutton_rectangulo_toggled(GtkToggleButton* togglebutton, #endif // Activo y desactivos los campos necesarios. TP5Window* win = static_cast(user_data); - gtk_widget_set_sensitive(win->spinbutton_inicio_x, false); - gtk_widget_set_sensitive(win->spinbutton_inicio_y, false); - gtk_widget_set_sensitive(win->spinbutton_fin_x, false); - gtk_widget_set_sensitive(win->spinbutton_fin_y, false); - gtk_widget_set_sensitive(win->spinbutton_alto, true); - gtk_widget_set_sensitive(win->spinbutton_ancho, true); - gtk_widget_set_sensitive(win->spinbutton_radio, false); + gtk_widget_set_sensitive(win->spinbutton_inicio_x, FALSE); + gtk_widget_set_sensitive(win->spinbutton_inicio_y, FALSE); + gtk_widget_set_sensitive(win->spinbutton_fin_x, FALSE); + gtk_widget_set_sensitive(win->spinbutton_fin_y, FALSE); + gtk_widget_set_sensitive(win->spinbutton_alto, TRUE); + gtk_widget_set_sensitive(win->spinbutton_ancho, TRUE); + gtk_widget_set_sensitive(win->spinbutton_radio, FALSE); } void on_radiobutton_circulo_toggled(GtkToggleButton* togglebutton, @@ -203,12 +201,12 @@ void on_radiobutton_circulo_toggled(GtkToggleButton* togglebutton, #endif // Activo y desactivos los campos necesarios. TP5Window* win = static_cast(user_data); - gtk_widget_set_sensitive(win->spinbutton_inicio_x, false); - gtk_widget_set_sensitive(win->spinbutton_inicio_y, false); - gtk_widget_set_sensitive(win->spinbutton_fin_x, false); - gtk_widget_set_sensitive(win->spinbutton_fin_y, false); - gtk_widget_set_sensitive(win->spinbutton_alto, false); - gtk_widget_set_sensitive(win->spinbutton_ancho, false); - gtk_widget_set_sensitive(win->spinbutton_radio, true); + gtk_widget_set_sensitive(win->spinbutton_inicio_x, FALSE); + gtk_widget_set_sensitive(win->spinbutton_inicio_y, FALSE); + gtk_widget_set_sensitive(win->spinbutton_fin_x, FALSE); + gtk_widget_set_sensitive(win->spinbutton_fin_y, FALSE); + gtk_widget_set_sensitive(win->spinbutton_alto, FALSE); + gtk_widget_set_sensitive(win->spinbutton_ancho, FALSE); + gtk_widget_set_sensitive(win->spinbutton_radio, TRUE); }