projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix discrepancy between different ways of measuring text extents under Mac.
[wxWidgets.git]
/
src
/
gtk
/
notebook.cpp
diff --git
a/src/gtk/notebook.cpp
b/src/gtk/notebook.cpp
index 60fe23a01fb76af158681a3910072fe2e37acdce..4802f31fcd7ec6dfc36be9593d97d486ef4a36c6 100644
(file)
--- a/
src/gtk/notebook.cpp
+++ b/
src/gtk/notebook.cpp
@@
-104,7
+104,7
@@
static void event_after(GtkNotebook* widget, GdkEvent*, wxNotebook* win)
// InsertChild callback for wxNotebook
//-----------------------------------------------------------------------------
// InsertChild callback for wxNotebook
//-----------------------------------------------------------------------------
-
static void wxInsertChildInNotebook(wxWindow* parent, wxWindow
* child)
+
void wxNotebook::AddChildGTK(wxWindowGTK
* child)
{
// Hack Alert! (Part I): This sets the notebook as the parent of the child
// widget, and takes care of some details such as updating the state and
{
// Hack Alert! (Part I): This sets the notebook as the parent of the child
// widget, and takes care of some details such as updating the state and
@@
-114,7
+114,7
@@
static void wxInsertChildInNotebook(wxWindow* parent, wxWindow* child)
// incorrect sizes since the widget's style context is not fully known.
// See bug #901694 for details
// (http://sourceforge.net/tracker/?func=detail&aid=901694&group_id=9863&atid=109863)
// incorrect sizes since the widget's style context is not fully known.
// See bug #901694 for details
// (http://sourceforge.net/tracker/?func=detail&aid=901694&group_id=9863&atid=109863)
- gtk_widget_set_parent(child->m_widget,
parent->
m_widget);
+ gtk_widget_set_parent(child->m_widget, m_widget);
// NOTE: This should be considered a temporary workaround until we can
// work out the details and implement delaying the setting of the initial
// NOTE: This should be considered a temporary workaround until we can
// work out the details and implement delaying the setting of the initial
@@
-160,8
+160,6
@@
bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
- m_insertCallback = wxInsertChildInNotebook;
-
if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
style |= wxBK_TOP;
if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
style |= wxBK_TOP;
@@
-359,7
+357,7
@@
wxNotebookPage *wxNotebook::DoRemovePage( size_t page )
wxGtkNotebookPage* p = GetNotebookPage(page);
m_pagesData.DeleteObject(p);
delete p;
wxGtkNotebookPage* p = GetNotebookPage(page);
m_pagesData.DeleteObject(p);
delete p;
-
+
return client;
}
return client;
}
@@
-375,9
+373,9
@@
bool wxNotebook::InsertPage( size_t position,
wxT("Can't add a page whose parent is not the notebook!") );
wxCHECK_MSG( position <= GetPageCount(), false,
wxT("Can't add a page whose parent is not the notebook!") );
wxCHECK_MSG( position <= GetPageCount(), false,
-
_
T("invalid page index in wxNotebookPage::InsertPage()") );
+
wx
T("invalid page index in wxNotebookPage::InsertPage()") );
- // Hack Alert! (Part II): See above in wx
InsertChildInNotebook callback
+ // Hack Alert! (Part II): See above in wx
Notebook::AddChildGTK
// why this has to be done.
gtk_widget_unparent(win->m_widget);
// why this has to be done.
gtk_widget_unparent(win->m_widget);
@@
-424,7
+422,7
@@
bool wxNotebook::InsertPage( size_t position,
gtk_notebook_insert_page(notebook, win->m_widget, pageData->m_box, position);
/* apply current style */
gtk_notebook_insert_page(notebook, win->m_widget, pageData->m_box, position);
/* apply current style */
- GtkRcStyle *style = CreateWidgetStyle();
+ GtkRcStyle *style =
GTK
CreateWidgetStyle();
if ( style )
{
gtk_widget_modify_style(pageData->m_label, style);
if ( style )
{
gtk_widget_modify_style(pageData->m_label, style);