diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2006-05-22 09:32:22 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2006-05-22 09:32:22 +0000 |
| commit | cb8e0d601ac3cffc473fb8b8ec612c1595e94ff2 (patch) | |
| tree | 5450d1abddb9c451f9fc019388f364fe2bc29c6f /src | |
| parent | * Re-add pointer/keyb grabbing for font list popdown in the text toolbar (was... (diff) | |
| download | inkscape-cb8e0d601ac3cffc473fb8b8ec612c1595e94ff2.tar.gz inkscape-cb8e0d601ac3cffc473fb8b8ec612c1595e94ff2.zip | |
Removed panel menu unless requested. Fixes bug #1492597
(bzr r940)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dialogs/swatches.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/panel.cpp | 31 | ||||
| -rw-r--r-- | src/ui/widget/panel.h | 5 |
3 files changed, 23 insertions, 15 deletions
diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index 5af23f95e..31e91562b 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -916,7 +916,7 @@ SwatchesPanel& SwatchesPanel::getInstance() * Constructor */ SwatchesPanel::SwatchesPanel() : - Inkscape::UI::Widget::Panel ("dialogs.swatches"), + Inkscape::UI::Widget::Panel( "dialogs.swatches", true ), _holder(0) { _holder = new PreviewHolder(); diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index f00d736ae..2112ea7b2 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -31,8 +31,9 @@ namespace Widget { * \param label Label. */ -Panel::Panel(const gchar *prefs_path) : +Panel::Panel( const gchar *prefs_path, bool menuDesired ) : _prefs_path(NULL), + _menuDesired(menuDesired), _tempArrow( Gtk::ARROW_LEFT, Gtk::SHADOW_ETCHED_OUT ), menu(0), _fillable(0) @@ -43,6 +44,7 @@ Panel::Panel(const gchar *prefs_path) : Panel::Panel() : _prefs_path(NULL), + _menuDesired(false), _tempArrow( Gtk::ARROW_LEFT, Gtk::SHADOW_ETCHED_OUT ), menu(0), _fillable(0) @@ -50,8 +52,9 @@ Panel::Panel() : init(); } -Panel::Panel(Glib::ustring const &label) : +Panel::Panel( Glib::ustring const &label, bool menuDesired ) : _prefs_path(NULL), + _menuDesired(menuDesired), _tempArrow( Gtk::ARROW_LEFT, Gtk::SHADOW_ETCHED_OUT ), menu(0), _fillable(0) @@ -137,12 +140,14 @@ void Panel::init() //topBar.pack_end(closeButton, false, false); - topBar.pack_end(menuPopper, false, false); - Gtk::Frame* outliner = manage(new Gtk::Frame()); - outliner->set_shadow_type( Gtk::SHADOW_ETCHED_IN ); - outliner->add( _tempArrow ); - menuPopper.add( *outliner ); - menuPopper.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &Panel::_popper) ); + if ( _menuDesired ) { + topBar.pack_end(menuPopper, false, false); + Gtk::Frame* outliner = manage(new Gtk::Frame()); + outliner->set_shadow_type( Gtk::SHADOW_ETCHED_IN ); + outliner->add( _tempArrow ); + menuPopper.add( *outliner ); + menuPopper.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &Panel::_popper) ); + } pack_start( topBar, false, false ); @@ -175,10 +180,12 @@ void Panel::setOrientation( Gtk::AnchorType how ) case Gtk::ANCHOR_NORTH: case Gtk::ANCHOR_SOUTH: { - menuPopper.reference(); - topBar.remove(menuPopper); - rightBar.pack_start(menuPopper, false, false); - menuPopper.unreference(); + if ( _menuDesired ) { + menuPopper.reference(); + topBar.remove(menuPopper); + rightBar.pack_start(menuPopper, false, false); + menuPopper.unreference(); + } topBar.remove(tabTitle); } diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h index 8fb4b517a..cf201d6da 100644 --- a/src/ui/widget/panel.h +++ b/src/ui/widget/panel.h @@ -34,8 +34,8 @@ class Panel : public Gtk::VBox public: Panel(); virtual ~Panel(); - Panel(Glib::ustring const &label); - Panel(const gchar *prefs_path); + Panel(Glib::ustring const &label, bool menuDesired = false ); + Panel(const gchar *prefs_path, bool menuDesired = false ); void setLabel(Glib::ustring const &label); Glib::ustring const &getLabel() const; @@ -51,6 +51,7 @@ protected: void _regItem( Gtk::MenuItem* item, int group, int id ); virtual void _handleAction( int setId, int itemId ); + bool _menuDesired; Gtk::AnchorType _anchor; |
