[dia] Don't use deprecated function gtk_spin_button_get_value_as_float().
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Subject: [dia] Don't use deprecated function gtk_spin_button_get_value_as_float().
- Date: Sun, 24 May 2009 07:19:39 -0400 (EDT)
commit cfd57815f217ab18061141a208b96f9137ed0872
Author: Adam Buchbinder <adam buchbinder gmail com>
Date: Mon May 4 12:49:56 2009 -0400
Don't use deprecated function gtk_spin_button_get_value_as_float().
Replaced gtk_spin_button_get_value_as_float() with gtk_spin_button_get_value():
http://library.gnome.org/devel/gtk/stable/GtkSpinButton.html#gtk-spin-button-get-value-as-float
Signed-off-by: Adam Buchbinder <adam buchbinder gmail com>
Signed-off-by: Hans Breuer <hans breuer org>
---
lib/widgets.c | 8 ++++----
objects/Database/table_dialog.c | 6 +++---
objects/SISSI/sissi_dialog.c | 8 ++++----
objects/UML/class_dialog.c | 14 +++++++-------
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/lib/widgets.c b/lib/widgets.c
index 2d5ba2a..abc089d 100644
--- a/lib/widgets.c
+++ b/lib/widgets.c
@@ -124,7 +124,7 @@ static void
dia_size_selector_adjust_width(DiaSizeSelector *ss)
{
real height =
- gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(ss->height));
+ gtk_spin_button_get_value(GTK_SPIN_BUTTON(ss->height));
if (fabs(ss->ratio) > 1e-6)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(ss->width), height*ss->ratio);
}
@@ -133,7 +133,7 @@ static void
dia_size_selector_adjust_height(DiaSizeSelector *ss)
{
real width =
- gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(ss->width));
+ gtk_spin_button_get_value(GTK_SPIN_BUTTON(ss->width));
if (fabs(ss->ratio) > 1e-6)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(ss->height), width/ss->ratio);
}
@@ -301,8 +301,8 @@ dia_size_selector_set_locked(DiaSizeSelector *ss, gboolean locked)
gboolean
dia_size_selector_get_size(DiaSizeSelector *ss, real *width, real *height)
{
- *width = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(ss->width));
- *height = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(ss->height));
+ *width = gtk_spin_button_get_value(GTK_SPIN_BUTTON(ss->width));
+ *height = gtk_spin_button_get_value(GTK_SPIN_BUTTON(ss->height));
return gtk_toggle_button_get_active(ss->aspect_locked);
}
diff --git a/objects/Database/table_dialog.c b/objects/Database/table_dialog.c
index 729243f..4e96e6c 100644
--- a/objects/Database/table_dialog.c
+++ b/objects/Database/table_dialog.c
@@ -433,11 +433,11 @@ general_page_props_to_object (Table * table, TablePropDialog * prop_dialog)
table->comment_font = dia_font_selector_get_font (prop_dialog->comment_font);
table->normal_font_height =
- gtk_spin_button_get_value_as_float (prop_dialog->normal_font_height);
+ gtk_spin_button_get_value (prop_dialog->normal_font_height);
table->name_font_height =
- gtk_spin_button_get_value_as_float (prop_dialog->name_font_height);
+ gtk_spin_button_get_value (prop_dialog->name_font_height);
table->comment_font_height =
- gtk_spin_button_get_value_as_float (prop_dialog->comment_font_height);
+ gtk_spin_button_get_value (prop_dialog->comment_font_height);
dia_color_selector_get_color (GTK_WIDGET (prop_dialog->text_color),
&table->text_color);
diff --git a/objects/SISSI/sissi_dialog.c b/objects/SISSI/sissi_dialog.c
index 7a8167a..8298332 100644
--- a/objects/SISSI/sissi_dialog.c
+++ b/objects/SISSI/sissi_dialog.c
@@ -279,9 +279,9 @@ static void properties_menaces_read_from_dialog(ObjetSISSI *object_sissi, SISSID
((SISSI_Property_Menace *)(g_list_nth(object_sissi->properties_menaces,i)->data))->comments = g_strdup(gtk_entry_get_text((GtkEntry *)(((SISSI_Property_Menace_Widget *)(g_list_nth(prop_dialog->properties_menaces,i)->data))->comments)));
- ((SISSI_Property_Menace *)(g_list_nth(object_sissi->properties_menaces,i)->data))->action = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(((SISSI_Property_Menace_Widget *)(g_list_nth(prop_dialog->properties_menaces,i)->data))->action));
- ((SISSI_Property_Menace *)(g_list_nth(object_sissi->properties_menaces,i)->data))->detection = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(((SISSI_Property_Menace_Widget *)(g_list_nth(prop_dialog->properties_menaces,i)->data))->detection));
- ((SISSI_Property_Menace *)(g_list_nth(object_sissi->properties_menaces,i)->data))->vulnerability = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(((SISSI_Property_Menace_Widget *)(g_list_nth(prop_dialog->properties_menaces,i)->data))->vulnerability));
+ ((SISSI_Property_Menace *)(g_list_nth(object_sissi->properties_menaces,i)->data))->action = gtk_spin_button_get_value(GTK_SPIN_BUTTON(((SISSI_Property_Menace_Widget *)(g_list_nth(prop_dialog->properties_menaces,i)->data))->action));
+ ((SISSI_Property_Menace *)(g_list_nth(object_sissi->properties_menaces,i)->data))->detection = gtk_spin_button_get_value(GTK_SPIN_BUTTON(((SISSI_Property_Menace_Widget *)(g_list_nth(prop_dialog->properties_menaces,i)->data))->detection));
+ ((SISSI_Property_Menace *)(g_list_nth(object_sissi->properties_menaces,i)->data))->vulnerability = gtk_spin_button_get_value(GTK_SPIN_BUTTON(((SISSI_Property_Menace_Widget *)(g_list_nth(prop_dialog->properties_menaces,i)->data))->vulnerability));
}
/* fprintf(stderr,"espion properties_menaces_read_from_dialog fin\n");*/
}
@@ -397,7 +397,7 @@ static void properties_others_read_from_dialog(ObjetSISSI *object_sissi, SISSIDi
object_sissi->disponibility_level = g_strdup((char *)strtol(gtk_entry_get_text(GTK_ENTRY(object_sissi->properties_dialog->disponibility_level)), NULL, 0));
}
- object_sissi->disponibility_value = gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(object_sissi->properties_dialog->disponibility_value));
+ object_sissi->disponibility_value = gtk_spin_button_get_value(GTK_SPIN_BUTTON(object_sissi->properties_dialog->disponibility_value));
/************ Entity list box*******************/
diff --git a/objects/UML/class_dialog.c b/objects/UML/class_dialog.c
index d8af5cb..5603792 100644
--- a/objects/UML/class_dialog.c
+++ b/objects/UML/class_dialog.c
@@ -316,7 +316,7 @@ class_read_from_dialog(UMLClass *umlclass, UMLClassDialog *prop_dialog)
umlclass->visible_comments = prop_dialog->comments_vis->active;
umlclass->suppress_attributes = prop_dialog->attr_supp->active;
umlclass->suppress_operations = prop_dialog->op_supp->active;
- umlclass->line_width = gtk_spin_button_get_value_as_float(prop_dialog->line_width);
+ umlclass->line_width = gtk_spin_button_get_value(prop_dialog->line_width);
dia_color_selector_get_color(GTK_WIDGET(prop_dialog->text_color), ¨class->text_color);
dia_color_selector_get_color(GTK_WIDGET(prop_dialog->line_color), ¨class->line_color);
dia_color_selector_get_color(GTK_WIDGET(prop_dialog->fill_color), ¨class->fill_color);
@@ -328,12 +328,12 @@ class_read_from_dialog(UMLClass *umlclass, UMLClassDialog *prop_dialog)
umlclass->abstract_classname_font = dia_font_selector_get_font (prop_dialog->abstract_classname_font);
umlclass->comment_font = dia_font_selector_get_font (prop_dialog->comment_font);
- umlclass->font_height = gtk_spin_button_get_value_as_float (prop_dialog->normal_font_height);
- umlclass->abstract_font_height = gtk_spin_button_get_value_as_float (prop_dialog->abstract_font_height);
- umlclass->polymorphic_font_height = gtk_spin_button_get_value_as_float (prop_dialog->polymorphic_font_height);
- umlclass->classname_font_height = gtk_spin_button_get_value_as_float (prop_dialog->classname_font_height);
- umlclass->abstract_classname_font_height = gtk_spin_button_get_value_as_float (prop_dialog->abstract_classname_font_height);
- umlclass->comment_font_height = gtk_spin_button_get_value_as_float (prop_dialog->comment_font_height);
+ umlclass->font_height = gtk_spin_button_get_value (prop_dialog->normal_font_height);
+ umlclass->abstract_font_height = gtk_spin_button_get_value (prop_dialog->abstract_font_height);
+ umlclass->polymorphic_font_height = gtk_spin_button_get_value (prop_dialog->polymorphic_font_height);
+ umlclass->classname_font_height = gtk_spin_button_get_value (prop_dialog->classname_font_height);
+ umlclass->abstract_classname_font_height = gtk_spin_button_get_value (prop_dialog->abstract_classname_font_height);
+ umlclass->comment_font_height = gtk_spin_button_get_value (prop_dialog->comment_font_height);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]