mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-10-15 00:02:24 -04:00
Now adjustments are saved as decimal values instead of doubles (glade--
* src/glade-editor-property.c, src/glade-property-class.c: Now adjustments are saved as decimal values instead of doubles (glade-- code generator didnt like doubles... we'll create adjustment objects anyway in the future builder).
This commit is contained in:
parent
d7785c4b69
commit
064c0fda01
@ -3,6 +3,11 @@
|
||||
* src/glade-command.c: Now you can paste widgets to your hearts content.
|
||||
(bug 345603)
|
||||
|
||||
* src/glade-editor-property.c, src/glade-property-class.c:
|
||||
Now adjustments are saved as decimal values instead of doubles
|
||||
(glade-- code generator didnt like doubles... we'll create
|
||||
adjustment objects anyway in the future builder).
|
||||
|
||||
2006-08-16 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||
|
||||
* src/glade-command.c: fixed bug 345604
|
||||
|
2
TODO
2
TODO
@ -1,8 +1,6 @@
|
||||
|
||||
3.0.1 Bugfix release menu:
|
||||
==========================
|
||||
- Adjustments should be in int format and not float (to conform
|
||||
to files generated by glade-2)
|
||||
- Interface signals
|
||||
- Need to order properties in the editor (part of bug 345893)
|
||||
- SHIFT-click on palette items should make them "stick" (bug 303679)
|
||||
|
@ -2855,30 +2855,27 @@ glade_eprop_adjustment_create_input (GladeEditorProperty *eprop)
|
||||
GladeEPropAdjustment *eprop_adj = GLADE_EPROP_ADJUSTMENT (eprop);
|
||||
GtkWidget *widget;
|
||||
GtkTable *table;
|
||||
|
||||
|
||||
/* No decimal precision as we are only putting integer values
|
||||
* in the glade file (older glade files do this, we'll just respect it).
|
||||
*/
|
||||
eprop_adj->value = gtk_spin_button_new_with_range (-G_MAXDOUBLE, G_MAXDOUBLE, 1);
|
||||
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (eprop_adj->value), 2);
|
||||
eprop_adj->ids.value = GLADE_EPROP_ADJUSTMENT_CONNECT (eprop_adj->value, value);
|
||||
eprop_adj->value_adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (eprop_adj->value));
|
||||
|
||||
eprop_adj->lower = gtk_spin_button_new_with_range (-G_MAXDOUBLE, G_MAXDOUBLE, 1);
|
||||
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (eprop_adj->lower), 2);
|
||||
eprop_adj->ids.lower = GLADE_EPROP_ADJUSTMENT_CONNECT (eprop_adj->lower, lower);
|
||||
|
||||
eprop_adj->upper = gtk_spin_button_new_with_range (-G_MAXDOUBLE, G_MAXDOUBLE, 1);
|
||||
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (eprop_adj->upper), 2);
|
||||
eprop_adj->ids.upper = GLADE_EPROP_ADJUSTMENT_CONNECT (eprop_adj->upper, upper);
|
||||
|
||||
eprop_adj->step_increment = gtk_spin_button_new_with_range (0, G_MAXDOUBLE, 1);
|
||||
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (eprop_adj->step_increment), 2);
|
||||
eprop_adj->ids.step_increment = GLADE_EPROP_ADJUSTMENT_CONNECT (eprop_adj->step_increment, step_increment);
|
||||
|
||||
eprop_adj->page_increment = gtk_spin_button_new_with_range (0, G_MAXDOUBLE, 1);
|
||||
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (eprop_adj->page_increment), 2);
|
||||
eprop_adj->ids.page_increment = GLADE_EPROP_ADJUSTMENT_CONNECT (eprop_adj->page_increment, page_increment);
|
||||
|
||||
eprop_adj->page_size = gtk_spin_button_new_with_range (0, G_MAXDOUBLE, 1);
|
||||
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (eprop_adj->page_size), 2);
|
||||
eprop_adj->ids.page_size = GLADE_EPROP_ADJUSTMENT_CONNECT (eprop_adj->page_size, page_size);
|
||||
|
||||
/* Eprop */
|
||||
|
@ -393,11 +393,13 @@ glade_property_class_make_string_from_object (GladePropertyClass *property_class
|
||||
else if (property_class->pspec->value_type == GTK_TYPE_ADJUSTMENT)
|
||||
{
|
||||
GtkAdjustment *adj = GTK_ADJUSTMENT (object);
|
||||
string = g_strdup_printf ("%lf %lf %lf %lf %lf %lf",
|
||||
adj->value, adj->lower, adj->upper,
|
||||
adj->step_increment,
|
||||
adj->page_increment,
|
||||
adj->page_size);
|
||||
|
||||
/* Glade format expects integers */
|
||||
string = g_strdup_printf ("%d %d %d %d %d %d",
|
||||
(gint)adj->value, (gint)adj->lower, (gint)adj->upper,
|
||||
(gint)adj->step_increment,
|
||||
(gint)adj->page_increment,
|
||||
(gint)adj->page_size);
|
||||
}
|
||||
else if ((gwidget = glade_widget_get_from_gobject (object)) != NULL)
|
||||
string = g_strdup (gwidget->name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user