GTK_TOOLBAR_BOTH_HORIZ is GTK 2 only (it would have been nice if the patch mentioned this...)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-07-10 14:06:44 +00:00
parent 35cf1ec63c
commit 99e8cb505a
3 changed files with 20 additions and 10 deletions

View File

@ -48,7 +48,7 @@ of a "separator" is a vertical line under Windows95 vs. simple space under GTK e
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxTB\_FLAT}}
{Gives the toolbar a flat look (Windows and GTK 1.2 only).}
{Gives the toolbar a flat look (Windows and GTK only).}
\twocolitem{\windowstyle{wxTB\_DOCKABLE}}
{Makes the toolbar floatable and dockable (GTK only).}
\twocolitem{\windowstyle{wxTB\_HORIZONTAL}}
@ -67,7 +67,7 @@ of a "separator" is a vertical line under Windows95 vs. simple space under GTK e
{Specifies no alignment with the parent window (Windows only, not very useful).}
\twocolitem{\windowstyle{wxTB\_HORZ\_LAYOUT}}
{Show the text and the icons alongside, not vertically stacked (Windows and GTK
only). This style must be used with wxTB\_TEXT.}
2 only). This style must be used with wxTB\_TEXT.}
\twocolitem{\windowstyle{wxTB\_HORZ\_TEXT}}
{Combination of wxTB\_HORZ\_LAYOUT and wxTB\_TEXT.}
\end{twocollist}

View File

@ -57,8 +57,13 @@ static void GetGtkStyle(long style,
if ( style & wxTB_TEXT )
{
*gtkStyle = style & wxTB_NOICONS ? GTK_TOOLBAR_TEXT :
( style & wxTB_HORZ_LAYOUT ? GTK_TOOLBAR_BOTH_HORIZ: GTK_TOOLBAR_BOTH );
*gtkStyle = style & wxTB_NOICONS
? GTK_TOOLBAR_TEXT
: (
#ifdef __WXGTK20__
style & wxTB_HORZ_LAYOUT ? GTK_TOOLBAR_BOTH_HORIZ :
#endif // __WXGTK20__
GTK_TOOLBAR_BOTH);
}
else // no text, hence we must have the icons or what would we show?
{
@ -279,7 +284,7 @@ bool wxToolBar::Create( wxWindow *parent,
#ifdef __WXGTK20__
m_toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
GtkSetStyle();
// Doesn't work this way.
// GtkToolbarSpaceStyle space_style = GTK_TOOLBAR_SPACE_EMPTY;
// gtk_widget_style_set (GTK_WIDGET (m_toolbar), "space_style", &space_style, NULL);
@ -474,7 +479,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
return FALSE;
}
gtk_signal_connect( GTK_OBJECT(tool->m_item),
"enter_notify_event",
GTK_SIGNAL_FUNC(gtk_toolbar_tool_callback),

View File

@ -57,8 +57,13 @@ static void GetGtkStyle(long style,
if ( style & wxTB_TEXT )
{
*gtkStyle = style & wxTB_NOICONS ? GTK_TOOLBAR_TEXT :
( style & wxTB_HORZ_LAYOUT ? GTK_TOOLBAR_BOTH_HORIZ: GTK_TOOLBAR_BOTH );
*gtkStyle = style & wxTB_NOICONS
? GTK_TOOLBAR_TEXT
: (
#ifdef __WXGTK20__
style & wxTB_HORZ_LAYOUT ? GTK_TOOLBAR_BOTH_HORIZ :
#endif // __WXGTK20__
GTK_TOOLBAR_BOTH);
}
else // no text, hence we must have the icons or what would we show?
{
@ -279,7 +284,7 @@ bool wxToolBar::Create( wxWindow *parent,
#ifdef __WXGTK20__
m_toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
GtkSetStyle();
// Doesn't work this way.
// GtkToolbarSpaceStyle space_style = GTK_TOOLBAR_SPACE_EMPTY;
// gtk_widget_style_set (GTK_WIDGET (m_toolbar), "space_style", &space_style, NULL);
@ -474,7 +479,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
return FALSE;
}
gtk_signal_connect( GTK_OBJECT(tool->m_item),
"enter_notify_event",
GTK_SIGNAL_FUNC(gtk_toolbar_tool_callback),