equal
deleted
inserted
replaced
624 //create a dialog |
624 //create a dialog |
625 Gtk::Dialog dialog("Edit value", *parentwin, true); |
625 Gtk::Dialog dialog("Edit value", *parentwin, true); |
626 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); |
626 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); |
627 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_ACCEPT); |
627 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_ACCEPT); |
628 Gtk::VBox* vbox = dialog.get_vbox(); |
628 Gtk::VBox* vbox = dialog.get_vbox(); |
629 Gtk::Adjustment adj( |
629 Gtk::SpinButton spin(0.0, 4); |
630 (*mapstorage.edgemap_storage[edgemap_to_edit])[active_edge], |
630 spin.set_increments(1.0, 10.0); |
631 -1000000.0, |
631 spin.set_range(-1000000.0, 1000000.0); |
632 1000000.0, |
|
633 1.0, 5.0, 0.0); |
|
634 //TODO: find out why doesn't it work with |
|
635 //numeric_limits<double>::min/max |
|
636 Gtk::SpinButton spin(adj); |
|
637 spin.set_numeric(true); |
632 spin.set_numeric(true); |
638 spin.set_digits(4); |
|
639 vbox->add(spin); |
633 vbox->add(spin); |
640 spin.show(); |
634 spin.show(); |
641 switch (dialog.run()) |
635 switch (dialog.run()) |
642 { |
636 { |
643 case Gtk::RESPONSE_NONE: |
637 case Gtk::RESPONSE_NONE: |
717 //create a dialog |
711 //create a dialog |
718 Gtk::Dialog dialog("Edit value", *parentwin, true); |
712 Gtk::Dialog dialog("Edit value", *parentwin, true); |
719 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); |
713 dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); |
720 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_ACCEPT); |
714 dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_ACCEPT); |
721 Gtk::VBox* vbox = dialog.get_vbox(); |
715 Gtk::VBox* vbox = dialog.get_vbox(); |
722 Gtk::Adjustment adj( |
716 Gtk::SpinButton spin(0.0, 4); |
723 (*mapstorage.nodemap_storage[nodemap_to_edit])[active_node], |
717 spin.set_increments(1.0, 10.0); |
724 -1000000.0, |
718 spin.set_range(-1000000.0, 1000000.0); |
725 1000000.0, |
|
726 1.0, 5.0, 0.0); |
|
727 //TODO: find out why doesn't it work with |
|
728 //numeric_limits<double>::min/max |
|
729 Gtk::SpinButton spin(adj); |
|
730 spin.set_numeric(true); |
719 spin.set_numeric(true); |
731 spin.set_digits(4); |
|
732 vbox->add(spin); |
720 vbox->add(spin); |
733 spin.show(); |
721 spin.show(); |
734 switch (dialog.run()) |
722 switch (dialog.run()) |
735 { |
723 { |
736 case Gtk::RESPONSE_NONE: |
724 case Gtk::RESPONSE_NONE: |