aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <nyamatongwe@gmail.com>2013-06-06 13:45:33 +1000
committernyamatongwe <nyamatongwe@gmail.com>2013-06-06 13:45:33 +1000
commit2799cbaec88447160ad6dd1ab664a53fed5c2fb0 (patch)
treeec24c151751c75262e8eac917d72da0f01492ddb
parent5559cc3923c7a1344c3a21ec61b074ccde62e81d (diff)
downloadscintilla-mirror-2799cbaec88447160ad6dd1ab664a53fed5c2fb0.tar.gz
Disable methods required for GTK+ 3 when building for GTK+ 2.
-rw-r--r--gtk/ScintillaGTK.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 7b039dc3c..49cf2c8cd 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -232,8 +232,10 @@ private:
gint FocusOutThis(GtkWidget *widget);
static gint FocusOut(GtkWidget *widget, GdkEventFocus *event);
static void SizeRequest(GtkWidget *widget, GtkRequisition *requisition);
+#if GTK_CHECK_VERSION(3,0,0)
static void GetPreferredWidth(GtkWidget *widget, gint *minimalWidth, gint *naturalWidth);
static void GetPreferredHeight(GtkWidget *widget, gint *minimalHeight, gint *naturalHeight);
+#endif
static void SizeAllocate(GtkWidget *widget, GtkAllocation *allocation);
#if GTK_CHECK_VERSION(3,0,0)
gboolean DrawTextThis(cairo_t *cr);
@@ -678,6 +680,8 @@ void ScintillaGTK::SizeRequest(GtkWidget *widget, GtkRequisition *requisition) {
#endif
}
+#if GTK_CHECK_VERSION(3,0,0)
+
void ScintillaGTK::GetPreferredWidth(GtkWidget *widget, gint *minimalWidth, gint *naturalWidth) {
GtkRequisition requisition;
SizeRequest(widget, &requisition);
@@ -690,6 +694,8 @@ void ScintillaGTK::GetPreferredHeight(GtkWidget *widget, gint *minimalHeight, gi
*minimalHeight = *naturalHeight = requisition.height;
}
+#endif
+
void ScintillaGTK::SizeAllocate(GtkWidget *widget, GtkAllocation *allocation) {
ScintillaGTK *sciThis = ScintillaFromWidget(widget);
try {