The 'polygon', 'draw', 'sketch', and 'width' tools are disabled by default. This...
[synfig.git] / synfig-studio / trunk / src / gtkmm / app.cpp
index 26f2f30..e1d1a6e 100644 (file)
@@ -38,6 +38,7 @@
 #endif
 #include <gtkmm/fileselection.h>
 #include <gtkmm/dialog.h>
+#include <gtkmm/messagedialog.h>
 #include <gtkmm/label.h>
 #include <gtkmm/stock.h>
 #include <gtkmm/stockitem.h>
@@ -1223,17 +1224,15 @@ App::App(int *argc, char ***argv):
                
                state_manager->add_state(&state_zoom);
 
-               if(false) {
-                       // Disabled this tool because it should be
-                       // considered deprecated. Use the bline tool instead.
-                       state_manager->add_state(&state_polygon);
+               // Disabled this tool because it should be
+               // considered deprecated. Use the bline tool instead.
+               if(getenv("SYNFIG_ENABLE_POLYGON")) state_manager->add_state(&state_polygon);
        
-                       // These tools are disabled for now,
-                       // because they tend to confuse users.
-                       state_manager->add_state(&state_draw);
-                       state_manager->add_state(&state_sketch);
-                       state_manager->add_state(&state_width);
-               }
+               // These tools are disabled by default for now,
+               // because they tend to confuse users.
+               if(getenv("SYNFIG_ENABLE_DRAW"  )) state_manager->add_state(&state_draw);
+               if(getenv("SYNFIG_ENABLE_SKETCH")) state_manager->add_state(&state_sketch);
+               if(getenv("SYNFIG_ENABLE_WIDTH" )) state_manager->add_state(&state_width);
 
                studio_init_cb.task("Init ModPalette...");
                module_list_.push_back(new ModPalette()); module_list_.back()->start();
@@ -1942,18 +1941,9 @@ App::dialog_yes_no_cancel(const std::string &title, const std::string &message)
 void
 App::dialog_not_implemented()
 {
-       Gtk::Dialog dialog(
-               "Feature not available",                // Title
-               true,           // Modal
-               true            // use_separator
-       );
-       Gtk::Label label("Sorry, this feature has not yet been implemented.");
-       label.show();
-       
-       dialog.get_vbox()->pack_start(label);
-       dialog.add_button(Gtk::StockID("gtk-ok"),Gtk::RESPONSE_OK);
-       dialog.show();
-       dialog.run();
+       Gtk::MessageDialog dialog("Feature not available", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true);
+       dialog.set_secondary_text("Sorry, this feature has not yet been implemented.");
+       dialog.run(); 
 }
 
 bool