From 44459c93a86e9e501be303767592c5a16d019142 Mon Sep 17 00:00:00 2001 From: joncruz Date: Tue, 19 Feb 2008 09:13:22 +0000 Subject: [PATCH] New submenu for tuning swatch appearance --- src/ui/widget/panel.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 9b9b20530..e6b24c14a 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -157,12 +157,36 @@ void Panel::_init() _non_vertical.push_back(check); check->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &Panel::_wrapToggled), check)); + } + + { + Glib::ustring type_label(_("Shape")); + + Glib::ustring shape_1_label(_("Tall")); + Glib::ustring shape_2_label(_("Square")); + Glib::ustring shape_3_label(_("Wide")); + + Gtk::MenuItem *item = manage( new Gtk::MenuItem(type_label)); + Gtk::Menu *type_menu = manage(new Gtk::Menu()); + item->set_submenu(*type_menu); + _menu->append(*item); - sep = manage(new Gtk::SeparatorMenuItem()); - _menu->append(*sep); - _non_vertical.push_back(sep); + Gtk::RadioMenuItem::Group shapeGroup; + + Gtk::RadioMenuItem *shape_1 = manage(new Gtk::RadioMenuItem(shapeGroup, shape_1_label)); + Gtk::RadioMenuItem *shape_2 = manage(new Gtk::RadioMenuItem(shapeGroup, shape_2_label)); + Gtk::RadioMenuItem *shape_3 = manage(new Gtk::RadioMenuItem(shapeGroup, shape_3_label)); + + type_menu->append(*shape_1); + type_menu->append(*shape_2); + type_menu->append(*shape_3); + + shape_2->set_active(true); } + sep = manage(new Gtk::SeparatorMenuItem()); + _menu->append(*sep); + _menu->show_all_children(); for ( std::vector::iterator iter = _non_vertical.begin(); iter != _non_vertical.end(); ++iter ) { (*iter)->hide(); -- 2.30.2