no_gtk=yes
fi
- min_gtk_version=2.4.0
+ min_gtk_version=2.6.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK+ - version >= $min_gtk_version" >&5
$as_echo_n "checking for GTK+ - version >= $min_gtk_version... " >&6; }
$as_echo "#define __WXGTK210__ 1" >>confdefs.h
- $as_echo "#define __WXGTK26__ 1" >>confdefs.h
-
elif test "$WXGTK2" = 1; then
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
$as_echo "#define __WXGTK210__ 1" >>confdefs.h
- $as_echo "#define __WXGTK26__ 1" >>confdefs.h
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ac_wxgtk218=1
$as_echo "#define __WXGTK210__ 1" >>confdefs.h
- $as_echo "#define __WXGTK26__ 1" >>confdefs.h
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
ac_wxgtk210=1
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
- if test "$ac_wxgtk210" = 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GTK+ is version >= 2.6" >&5
-$as_echo_n "checking if GTK+ is version >= 2.6... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <gtk/gtk.h>
-
-int
-main ()
-{
-
- #if !GTK_CHECK_VERSION(2,6,0)
- Not GTK+ 2.6
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- $as_echo "#define __WXGTK26__ 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ac_wxgtk26=1
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ac_wxgtk26=0
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
fi
CFLAGS="$save_CFLAGS"
esac
if test "$wxGTK_VERSION" != 3; then
- AM_PATH_GTK_2_0(2.4.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
+ AM_PATH_GTK_2_0(2.6.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
fi
if test -z "$wx_cv_lib_gtk"; then
if test "$wxGTK_VERSION" = 3 -o "$wxGTK_VERSION" = any; then
if test "$WXGTK3" = 1; then
AC_DEFINE(__WXGTK218__)
AC_DEFINE(__WXGTK210__)
- AC_DEFINE(__WXGTK26__)
elif test "$WXGTK2" = 1; then
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
[
AC_DEFINE(__WXGTK218__)
AC_DEFINE(__WXGTK210__)
- AC_DEFINE(__WXGTK26__)
AC_MSG_RESULT([yes])
ac_wxgtk218=1
],
],
[
AC_DEFINE(__WXGTK210__)
- AC_DEFINE(__WXGTK26__)
AC_MSG_RESULT([yes])
ac_wxgtk210=1
],
AC_MSG_RESULT([no])
ac_wxgtk210=0
])
-
- if test "$ac_wxgtk210" = 0; then
- dnl test if we have at least GTK+ 2.6:
- AC_MSG_CHECKING([if GTK+ is version >= 2.6])
- AC_TRY_COMPILE([
- #include <gtk/gtk.h>
- ],
- [
- #if !GTK_CHECK_VERSION(2,6,0)
- Not GTK+ 2.6
- #endif
- ],
- [
- AC_DEFINE(__WXGTK26__)
- AC_MSG_RESULT([yes])
- ac_wxgtk26=1
- ],
- [
- AC_MSG_RESULT([no])
- ac_wxgtk26=0
- ])
- fi
fi
CFLAGS="$save_CFLAGS"
// requires that all classes being mapped as wx{File|Dir}PickerWidget have the
// same prototype for the contructor...
// since GTK >= 2.6, there is GtkFileButton
-#if defined(__WXGTK26__) && !defined(__WXUNIVERSAL__)
+#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/filepicker.h"
#define wxFilePickerWidget wxFileButton
#define wxDirPickerWidget wxDirButton
// exact GTK version (without including GTK+ headers that we don't want to
// include from our own public headers), just assume a recent GTK 2.x.
#define __WXGTK20__
-#define __WXGTK26__
#define __WXGTK210__
#define __WXGTK218__
//#define __WXGTK3__
// currently wxAboutBox is implemented natively only under these platforms, for
// the others we provide a generic fallback here
#if !defined(__WXMSW__) && !defined(__WXMAC__) && \
- (!defined(__WXGTK26__) || defined(__WXUNIVERSAL__))
+ (!defined(__WXGTK20__) || defined(__WXUNIVERSAL__))
void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
{
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#if wxUSE_ABOUTDLG && defined(__WXGTK26__)
+#if wxUSE_ABOUTDLG
#include "wx/aboutdlg.h"
#include "wx/utils.h" // for wxLaunchDefaultBrowser()
#endif //WX_PRECOMP
-#ifndef __WXGTK3__
-#include "wx/generic/aboutdlgg.h"
-#endif
-
#include <gtk/gtk.h>
#include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* WXUNUSED(parent))
{
-#ifndef __WXGTK3__
- if ( !gtk_check_version(2,6,0) )
-#endif
{
// don't create another dialog if one is already present
if ( !gs_aboutDialog )
gtk_window_present(GTK_WINDOW(dlg));
}
-#ifndef __WXGTK3__
- else
- // native about dialog not available, fall back to the generic one
- wxGenericAboutBox(info);
-#endif
}
-#endif // wxUSE_ABOUTDLG && GTK+ 2.6+
+#endif // wxUSE_ABOUTDLG
}
else // have both label and bitmap
{
-#ifdef __WXGTK26__
- if ( !gtk_check_version(2,6,0) )
{
image = gtk_button_get_image(GTK_BUTTON(m_widget));
}
- else
-#endif // __WXGTK26__
- {
- // buttons with both label and bitmap are only supported with GTK+
- // 2.6 so far
- //
- // it shouldn't be difficult to implement them ourselves for the
- // previous GTK+ versions by stuffing a container with a label and
- // an image inside GtkButton but there doesn't seem to be much
- // point in doing this for ancient GTK+ versions
- return;
- }
}
wxCHECK_RET( image && GTK_IS_IMAGE(image), "must have image widget" );
// its size) changes
InvalidateBestSize();
}
-#ifdef __WXGTK26__
// normal image is special: setting it enables images for the button and
// resetting it to nothing disables all of them
- else if ( !gtk_check_version(2,6,0) )
+ else
{
GtkWidget *image = gtk_button_get_image(GTK_BUTTON(m_widget));
if ( image && !bitmap.IsOk() )
InvalidateBestSize();
}
-#endif // GTK+ 2.6+
break;
case State_Pressed:
}
// otherwise try icon themes
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if ( !gtk_check_version(2,6,0) )
-#endif
{
gint *sizes = gtk_icon_theme_get_icon_sizes
(
);
g_free(sizes);
}
-#endif // __WXGTK26__
return bundle;
}
/* add a stock icon inside it */
GtkWidget *image = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_BUTTON);
-#if GTK_CHECK_VERSION(2,6,0)
gtk_button_set_image (GTK_BUTTON (button), image);
-#endif
/* add to the given (container) widget */
if (box)
void wxDataViewRenderer::GtkInitHandlers()
{
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
g_signal_connect (GTK_CELL_RENDERER(m_renderer), "editing_started",
G_CALLBACK (wxgtk_renderer_editing_started),
void wxDataViewRenderer::EnableEllipsize(wxEllipsizeMode mode)
{
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if ( gtk_check_version(2, 6, 0) != NULL )
- return;
-#endif
-
GtkCellRendererText * const rend = GtkGetTextRenderer();
if ( !rend )
return;
g_value_set_enum( &gvalue, static_cast<PangoEllipsizeMode>(mode) );
g_object_set_property( G_OBJECT(rend), "ellipsize", &gvalue );
g_value_unset( &gvalue );
-#else // GTK < 2.6
- wxUnusedVar(mode);
-#endif // GTK 2.6/before
}
wxEllipsizeMode wxDataViewRenderer::GetEllipsizeMode() const
{
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if ( gtk_check_version(2, 6, 0) != NULL )
- return wxELLIPSIZE_NONE;
-#endif
-
GtkCellRendererText * const rend = GtkGetTextRenderer();
if ( !rend )
return wxELLIPSIZE_NONE;
g_value_unset( &gvalue );
return mode;
-#else // GTK < 2.6
- return wxELLIPSIZE_NONE;
-#endif // GTK 2.6/before
}
void
m_label = label;
m_value = 0;
-#ifdef __WXGTK26__
- if (GTK_CHECK_VERSION(3,0,0) || gtk_check_version(2,6,0) == NULL)
{
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_progress_new();
m_needsToSetLabel = true;
else
#endif // !wxUSE_UNICODE
+ {
GTKSetLabel();
- }
- else
-#endif
- {
- // Use custom cell code
- wxDataViewCustomRenderer::Init(mode, align);
+ }
}
}
bool wxDataViewProgressRenderer::SetValue( const wxVariant &value )
{
-#ifdef __WXGTK26__
- if (GTK_CHECK_VERSION(3,0,0) || gtk_check_version(2,6,0) == NULL)
{
#if !wxUSE_UNICODE
if ( m_needsToSetLabel )
g_object_set_property( G_OBJECT(m_renderer), "value", &gvalue );
g_value_unset( &gvalue );
}
- else
-#endif
- {
- m_value = (long) value;
-
- if (m_value < 0) m_value = 0;
- if (m_value > 100) m_value = 100;
- }
return true;
}
{
m_choices = choices;
-#ifdef __WXGTK26__
- if (GTK_CHECK_VERSION(3,0,0) || gtk_check_version(2,6,0) == NULL)
{
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_combo_new();
GtkInitHandlers();
}
- else
-#endif
- {
- // Use custom cell code
- wxDataViewCustomRenderer::Init(mode, alignment);
- }
}
bool wxDataViewChoiceRenderer::Render( wxRect rect, wxDC *dc, int state )
bool wxDataViewChoiceRenderer::SetValue( const wxVariant &value )
{
-#ifdef __WXGTK26__
- if (GTK_CHECK_VERSION(3,0,0) || gtk_check_version(2,6,0) == NULL)
{
GValue gvalue = { 0, };
g_value_init( &gvalue, G_TYPE_STRING );
g_object_set_property( G_OBJECT(m_renderer), "text", &gvalue );
g_value_unset( &gvalue );
}
- else
-#endif
- m_data = value.GetString();
return true;
}
bool wxDataViewChoiceRenderer::GetValue( wxVariant &value ) const
{
-#ifdef __WXGTK26__
- if (GTK_CHECK_VERSION(3,0,0) || gtk_check_version(2,6,0) == NULL)
{
GValue gvalue = { 0, };
g_value_init( &gvalue, G_TYPE_STRING );
//wxPrintf( "temp %s\n", temp );
// TODO: remove this code
}
- else
-#endif
- value = m_data;
return true;
}
g_signal_connect (m_treeview, "size_allocate",
G_CALLBACK (gtk_dataviewctrl_size_callback), this);
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
bool fixed = (style & wxDV_VARIABLE_LINE_HEIGHT) == 0;
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), fixed );
}
-#endif
if (style & wxDV_MULTIPLE)
{
if (!wxDataViewCtrlBase::AssociateModel( model ))
return false;
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
bool fixed = (((GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT) == 0) || (model->IsVirtualListModel()));
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), fixed );
}
-#endif
m_internal = new wxDataViewCtrlInternal( this, model );
m_cols.Append( col );
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
if (gtk_tree_view_column_get_sizing( GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) ) !=
GTK_TREE_VIEW_COLUMN_FIXED)
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), FALSE );
}
-#endif
gtk_tree_view_append_column( GTK_TREE_VIEW(m_treeview),
GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) );
m_cols.Insert( col );
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
if (gtk_tree_view_column_get_sizing( GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) ) !=
GTK_TREE_VIEW_COLUMN_FIXED)
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), FALSE );
}
-#endif
gtk_tree_view_insert_column( GTK_TREE_VIEW(m_treeview),
GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()), 0 );
m_cols.Insert( pos, col );
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
if (gtk_tree_view_column_get_sizing( GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) ) !=
GTK_TREE_VIEW_COLUMN_FIXED)
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), FALSE );
}
-#endif
gtk_tree_view_insert_column( GTK_TREE_VIEW(m_treeview),
GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()), pos );
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
-#ifdef __WXGTK26__
- if (!gtk_check_version(2,6,0))
{
x = XLOG2DEV(x);
y = YLOG2DEV(y);
CalcBoundingBox(x+minX, y+minY);
CalcBoundingBox(x+maxX, y+maxY);
}
- else
-#endif //__WXGTK26__
- {
-#if wxUSE_IMAGE
- if ( wxIsNullDouble(angle) )
- {
- DoDrawText(text, x, y);
- return;
- }
-
- wxCoord w;
- wxCoord h;
-
- // TODO: implement later without GdkFont for GTK 2.0
- DoGetTextExtent(text, &w, &h, NULL,NULL, &m_font);
-
- // draw the string normally
- wxBitmap src(w, h);
- wxMemoryDC dc;
- dc.SelectObject(src);
- dc.SetFont(GetFont());
- dc.SetBackground(*wxBLACK_BRUSH);
- dc.SetBrush(*wxBLACK_BRUSH);
- dc.Clear();
- dc.SetTextForeground( *wxWHITE );
- dc.DrawText(text, 0, 0);
- dc.SelectObject(wxNullBitmap);
-
- // Calculate the size of the rotated bounding box.
- double rad = DegToRad(angle);
- double dx = cos(rad),
- dy = sin(rad);
-
- // the rectngle vertices are counted clockwise with the first one being at
- // (0, 0) (or, rather, at (x, y))
- double x2 = w*dx,
- y2 = -w*dy; // y axis points to the bottom, hence minus
- double x4 = h*dy,
- y4 = h*dx;
- double x3 = x4 + x2,
- y3 = y4 + y2;
-
- // calc max and min
- wxCoord maxX = (wxCoord)(dmax(x2, dmax(x3, x4)) + 0.5),
- maxY = (wxCoord)(dmax(y2, dmax(y3, y4)) + 0.5),
- minX = (wxCoord)(dmin(x2, dmin(x3, x4)) - 0.5),
- minY = (wxCoord)(dmin(y2, dmin(y3, y4)) - 0.5);
-
-
- wxImage image = src.ConvertToImage();
-
- image.ConvertColourToAlpha( m_textForegroundColour.Red(),
- m_textForegroundColour.Green(),
- m_textForegroundColour.Blue() );
- image = image.Rotate( rad, wxPoint(0,0) );
-
- int i_angle = (int) angle;
- i_angle = i_angle % 360;
- if (i_angle < 0)
- i_angle += 360;
- int xoffset = 0;
- if ((i_angle >= 90.0) && (i_angle < 270.0))
- xoffset = image.GetWidth();
- int yoffset = 0;
- if ((i_angle >= 0.0) && (i_angle < 180.0))
- yoffset = image.GetHeight();
-
- if ((i_angle >= 0) && (i_angle < 90))
- yoffset -= (int)( cos(rad)*h );
- if ((i_angle >= 90) && (i_angle < 180))
- xoffset -= (int)( sin(rad)*h );
- if ((i_angle >= 180) && (i_angle < 270))
- yoffset -= (int)( cos(rad)*h );
- if ((i_angle >= 270) && (i_angle < 360))
- xoffset -= (int)( sin(rad)*h );
-
- int i_x = x - xoffset;
- int i_y = y - yoffset;
-
- src = image;
- DoDrawBitmap( src, i_x, i_y, true );
-
-
- // it would be better to draw with non underlined font and draw the line
- // manually here (it would be more straight...)
-#if 0
- if ( m_font.GetUnderlined() )
- {
- gdk_draw_line( m_gdkwindow, m_textGC,
- XLOG2DEV(x + x4), YLOG2DEV(y + y4 + font->descent),
- XLOG2DEV(x + x3), YLOG2DEV(y + y3 + font->descent));
- }
-#endif // 0
-
- // update the bounding box
- CalcBoundingBox(x + minX, y + minY);
- CalcBoundingBox(x + maxX, y + maxY);
-#else // !wxUSE_IMAGE
- wxUnusedVar(text);
- wxUnusedVar(x);
- wxUnusedVar(y);
- wxUnusedVar(angle);
-#endif // wxUSE_IMAGE/!wxUSE_IMAGE
- }
}
void wxWindowDCImpl::DoGetTextExtent(const wxString &string,
case GDK_SELECTION_REQUEST:
case GDK_SELECTION_NOTIFY:
case GDK_SELECTION_CLEAR:
-#if GTK_CHECK_VERSION(2,6,0)
case GDK_OWNER_CHANGE:
-#endif
cat = wxEVT_CATEGORY_CLIPBOARD;
break;
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#if wxUSE_FILEPICKERCTRL && defined(__WXGTK26__)
+#if wxUSE_FILEPICKERCTRL
#include "wx/filepicker.h"
#include "wx/tooltip.h"
{
// we can't use the native button for wxFLP_SAVE pickers as it can only
// open existing files and there is no way to create a new file using it
- if (!(style & wxFLP_SAVE) && !(style & wxFLP_USE_TEXTCTRL)
-#ifndef __WXGTK3__
- && gtk_check_version(2,6,0) == NULL
-#endif
- )
+ if (!(style & wxFLP_SAVE) && !(style & wxFLP_USE_TEXTCTRL))
{
// VERY IMPORTANT: this code is identical to relative code in wxDirButton;
// if you find a problem here, fix it also in wxDirButton !
wxGenericFileButton::SetInitialDirectory(dir);
}
-#endif // wxUSE_FILEPICKERCTRL && defined(__WXGTK26__)
-
-
+#endif // wxUSE_FILEPICKERCTRL
-
-#if wxUSE_DIRPICKERCTRL && defined(__WXGTK26__)
+#if wxUSE_DIRPICKERCTRL
#ifdef __UNIX__
#include <unistd.h> // chdir
long style, const wxValidator& validator,
const wxString &name )
{
- if (!(style & wxDIRP_USE_TEXTCTRL)
-#ifndef __WXGTK3__
- && gtk_check_version(2,6,0) == NULL
-#endif
- )
+ if (!(style & wxDIRP_USE_TEXTCTRL))
{
// VERY IMPORTANT: this code is identic to relative code in wxFileButton;
// if you find a problem here, fix it also in wxFileButton !
wxGenericDirButton::SetInitialDirectory(dir);
}
-#endif // wxUSE_DIRPICKERCTRL && defined(__WXGTK26__)
+#endif // wxUSE_DIRPICKERCTRL
case wx: \
return gtk;
- #if GTK_CHECK_VERSION(2,6,0)
#define STOCKITEM_26(wx,gtk) STOCKITEM(wx,gtk)
- #else
- #define STOCKITEM_26(wx,gtk)
- #endif
#if GTK_CHECK_VERSION(2,8,0)
#define STOCKITEM_28(wx,gtk) STOCKITEM(wx,gtk)
}
wxString message;
-#if GTK_CHECK_VERSION(2, 6, 0)
bool needsExtMessage = false;
- if (!m_extendedMessage.empty()
-#ifndef __WXGTK3__
- && gtk_check_version(2, 6, 0) == NULL
-#endif
- )
+ if (!m_extendedMessage.empty())
{
message = m_message;
needsExtMessage = true;
}
- else // extended message not needed or not supported
-#endif // GTK+ 2.6+
+ else // extended message not needed
{
message = GetFullMessage();
}
"%s",
(const char*)wxGTK_CONV(message));
-#if GTK_CHECK_VERSION(2, 6, 0)
if ( needsExtMessage )
{
gtk_message_dialog_format_secondary_text
(const char *)wxGTK_CONV(m_extendedMessage)
);
}
-#endif // GTK+ 2.6+
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2/!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2
g_object_ref(m_widget);
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
// set ellipsize mode
PangoEllipsizeMode ellipsizeMode = PANGO_ELLIPSIZE_NONE;
gtk_label_set_ellipsize( GTK_LABEL(m_widget), ellipsizeMode );
}
-#endif // __WXGTK26__
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
InvalidateBestSize();
-#ifndef __WXGTK3__
- if (gtk_check_version(2,6,0) && IsEllipsized())
- {
- // GTK+ < 2.6 does not support ellipsization so we need to do it
- // manually and as our ellipsization code doesn't deal with markup, we
- // have no choice but to ignore it in this case and always use plain
- // text.
- GTKSetLabelForLabel(GTK_LABEL(m_widget), GetEllipsizedLabel());
- }
- else // Ellipsization not needed or supported by GTK+.
-#endif
{
(this->*setter)(GTK_LABEL(m_widget), label);
}
int sizeFlags )
{
wxStaticTextBase::DoSetSize(x, y, width, height, sizeFlags);
-
-#ifndef __WXGTK3__
- if (gtk_check_version(2,6,0))
- {
- // GTK+ < 2.6 does not support ellipsization - we need to run our
- // generic code (actually it will be run only if IsEllipsized() == true)
- UpdateLabel();
- }
-#endif
}
wxSize wxStaticText::DoGetBestSize() const
win->GetEventHandler()->ProcessEvent(eventShow);
}
-#if GTK_CHECK_VERSION(2,6,0)
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
// restore focus-on-map setting in case ShowWithoutActivating() was called
gtk_window_set_focus_on_map(GTK_WINDOW(win->m_widget), true);
}
-#endif // GTK+ 2.6+
return false;
}
{
if (!m_isShown)
{
-#if GTK_CHECK_VERSION(2,6,0)
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
-#endif // GTK+ 2.6+
Show(true);
}
#endif // __UNIX__ || __OS2__
-#ifdef __WXGTK26__
-
// see the hack below in wxCmdLineParser::GetUsageString().
// TODO: replace this hack with a g_option_group_get_entries()
// call as soon as such function exists;
return wxT(" ") + ret;
}
-#endif // __WXGTK26__
-
#ifdef __UNIX__
wxString
{
wxString usage;
-#ifdef __WXGTK26__
-#ifndef __WXGTK3__
- if (!gtk_check_version(2,6,0))
-#endif
{
// since GTK>=2.6, we can use the glib_check_version() symbol...
// because, as we use the undocumented _GOptionGroup struct, we don't want
// to run this code with future versions which might change it (2.32 is the
// latest one at the time of this writing)
- if (glib_check_version(2,6,0) == NULL && glib_check_version(2,33,0))
+ if (glib_check_version(2,33,0))
{
usage << _("The following standard GTK+ options are also supported:\n");
g_option_group_free (gtkOpts);
}
}
-#else
- wxUnusedVar(names);
- wxUnusedVar(desc);
-#endif // __WXGTK26__
return usage;
}