set "close-button" data on Tabbable contents.
I tried doing this in the constructor and got a segfault for reasons I don't understand but probably should
This commit is contained in:
parent
5e0337a4a3
commit
d4664434f7
@ -42,6 +42,7 @@ Tabbable::Tabbable (Widget& w, const string& name)
|
||||
/* 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);
|
||||
@ -243,6 +244,7 @@ Tabbable::attach ()
|
||||
}
|
||||
|
||||
_parent_notebook->append_page (_contents, _tab_box);
|
||||
_contents.set_data ("close-button", &tab_close_image);
|
||||
_parent_notebook->set_tab_detachable (_contents);
|
||||
_parent_notebook->set_tab_reorderable (_contents);
|
||||
_parent_notebook->set_current_page (_parent_notebook->page_num (_contents));
|
||||
|
Loading…
Reference in New Issue
Block a user