diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-11-18 23:03:16 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:25 -0500 |
commit | 1e537cb53905509eead1c552d012d99982619ec3 (patch) | |
tree | 6101174fa22ca4298a62e80d04c37235e541d0de /libs | |
parent | 51879285c5ec92f981c1e7bd0c9a38659b7d9a9f (diff) |
remove tab-related code for tabbed notebook, add tooltips to new buttons
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/tabbable.h | 3 | ||||
-rw-r--r-- | libs/gtkmm2ext/tabbable.cc | 30 |
2 files changed, 2 insertions, 31 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/tabbable.h b/libs/gtkmm2ext/gtkmm2ext/tabbable.h index a622cf1ef1..9df2800d97 100644 --- a/libs/gtkmm2ext/gtkmm2ext/tabbable.h +++ b/libs/gtkmm2ext/gtkmm2ext/tabbable.h @@ -85,9 +85,6 @@ class LIBGTKMM2EXT_API Tabbable : public WindowProxy { Gtk::Notebook _own_notebook; Gtk::Notebook* _parent_notebook; std::string _tab_title; - Gtk::HBox _tab_box; - Gtk::Label _tab_label; - CairoIcon tab_close_image; bool tab_requested_by_state; void show_tab (); diff --git a/libs/gtkmm2ext/tabbable.cc b/libs/gtkmm2ext/tabbable.cc index 4344f39749..928e501751 100644 --- a/libs/gtkmm2ext/tabbable.cc +++ b/libs/gtkmm2ext/tabbable.cc @@ -39,18 +39,8 @@ Tabbable::Tabbable (Widget& w, const string& name) : WindowProxy (name) , _contents (w) , _parent_notebook (0) - , tab_close_image (ArdourIcon::CloseCross, 0xffffffff) , tab_requested_by_state (true) { - /* sizes will be scaled during rendering */ - tab_close_image.set_size_request (15,15); - - _tab_box.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); - _tab_box.set_spacing (2); - _tab_box.pack_start (_tab_label, true, true); - _tab_box.pack_start (tab_close_image, false, false); - - tab_close_image.signal_button_release_event().connect (sigc::mem_fun (*this, &Tabbable::tab_close_clicked)); } Tabbable::~Tabbable () @@ -61,20 +51,10 @@ Tabbable::~Tabbable () } } -bool -Tabbable::tab_close_clicked (GdkEventButton*) -{ - hide_tab (); - return true; -} - void Tabbable::add_to_notebook (Notebook& notebook, const string& tab_title) { _parent_notebook = ¬ebook; - _tab_title = tab_title; - _tab_label.set_text (tab_title); - _tab_box.show_all (); if (tab_requested_by_state) { attach (); @@ -91,7 +71,7 @@ Tabbable::use_own_window (bool and_pack_it) if (parent) { parent->remove (_contents); } - _own_notebook.append_page (_contents, _tab_box); + _own_notebook.append_page (_contents); } return win; @@ -248,17 +228,11 @@ Tabbable::attach () _window->hide (); } - _parent_notebook->append_page (_contents, _tab_box); - _contents.set_data ("close-button", &tab_close_image); + _parent_notebook->append_page (_contents); _parent_notebook->set_tab_detachable (_contents); _parent_notebook->set_tab_reorderable (_contents); _parent_notebook->set_current_page (_parent_notebook->page_num (_contents)); - Gtkmm2ext::UI::instance()->set_tip (_tab_label, - string_compose (_("Drag this tab to the desktop to show %1 in its own window\n\n" - "To put the window back, use the Window > %1 > Attach menu action"), _tab_title)); - - /* have to force this on, which is semantically correct, since * the user has effectively asked for it. */ |