/[svn]/gigedit/trunk/src/regionchooser.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/regionchooser.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1114 by schoenebeck, Fri Mar 23 00:22:44 2007 UTC revision 1115 by schoenebeck, Sat Mar 24 00:22:13 2007 UTC
# Line 20  Line 20 
20  #include "regionchooser.h"  #include "regionchooser.h"
21  #include <gdkmm/cursor.h>  #include <gdkmm/cursor.h>
22  #include <gtkmm/stock.h>  #include <gtkmm/stock.h>
23    #include <gtkmm/spinbutton.h>
24    #include <gtkmm/dialog.h>
25  #include <libintl.h>  #include <libintl.h>
26    #include <math.h>
27    
28  #define _(String) gettext(String)  #define _(String) gettext(String)
29    
# Line 422  sigc::signal<void> RegionChooser::signal Line 425  sigc::signal<void> RegionChooser::signal
425    
426  void RegionChooser::show_region_properties()  void RegionChooser::show_region_properties()
427  {  {
428        if (!region) return;
429        Gtk::Dialog dialog("Region Properties", true /*modal*/);
430        // add "Keygroup" checkbox
431        Gtk::CheckButton checkBoxKeygroup("Member of a Keygroup (Exclusive Group)");
432        checkBoxKeygroup.set_active(region->KeyGroup);
433        dialog.get_vbox()->pack_start(checkBoxKeygroup);
434        checkBoxKeygroup.show();
435        // add "Keygroup" spinbox
436        Gtk::Adjustment adjustment(1, 1, pow(2,32));
437        Gtk::SpinButton spinBox(adjustment);
438        if (region->KeyGroup) spinBox.set_value(region->KeyGroup);
439        dialog.get_vbox()->pack_start(spinBox);
440        spinBox.show();
441        // add OK and CANCEL buttons to the dialog
442        dialog.add_button(Gtk::Stock::OK, 0);
443        dialog.add_button(Gtk::Stock::CANCEL, 1);
444        dialog.show_all_children();
445        if (!dialog.run()) { // OK selected ...
446            region->KeyGroup =
447                (checkBoxKeygroup.get_active()) ? spinBox.get_value_as_int() : 0;
448        }
449  }  }
450    
451  void RegionChooser::add_region()  void RegionChooser::add_region()

Legend:
Removed from v.1114  
changed lines
  Added in v.1115

  ViewVC Help
Powered by ViewVC