aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-05-01 13:55:47 +1000
committernyamatongwe <unknown>2011-05-01 13:55:47 +1000
commitb8272cb0a4e4b54bcb60169751acba22d00c4c48 (patch)
tree130b36e2ac3cacbe2e51ebe4a8fcc5eb3e3310a3
parent185bbfa2aa2cf81305c98c61e5c8849c15d36bb3 (diff)
downloadscintilla-mirror-b8272cb0a4e4b54bcb60169751acba22d00c4c48.tar.gz
Disable all use of GdkFont with DISABLE_GDK_FONT since the identifier
is missing in GTK+ 3.
-rw-r--r--gtk/PlatGTK.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 4e2247355..23b12886e 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -116,10 +116,17 @@ class FontHandle {
encodingType et;
public:
int ascent;
+#ifndef DISABLE_GDK_FONT
GdkFont *pfont;
+#endif
PangoFontDescription *pfd;
int characterSet;
- FontHandle(GdkFont *pfont_) {
+#ifdef DISABLE_GDK_FONT
+ FontHandle() : et(singleByte), ascent(0), pfd(0), characterSet(-1) {
+ ResetWidths(et);
+ }
+#else
+ FontHandle(GdkFont *pfont_=0) {
et = singleByte;
ascent = 0;
pfont = pfont_;
@@ -127,10 +134,13 @@ public:
characterSet = -1;
ResetWidths(et);
}
+#endif
FontHandle(PangoFontDescription *pfd_, int characterSet_) {
et = singleByte;
ascent = 0;
+#ifndef DISABLE_GDK_FONT
pfont = 0;
+#endif
pfd = pfd_;
characterSet = characterSet_;
ResetWidths(et);
@@ -139,8 +149,8 @@ public:
#ifndef DISABLE_GDK_FONT
if (pfont)
gdk_font_unref(pfont);
-#endif
pfont = 0;
+#endif
if (pfd)
pango_font_description_free(pfd);
pfd = 0;
@@ -671,7 +681,7 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet,
}
return new FontHandle(newid);
#else
- return new FontHandle(0);
+ return new FontHandle();
#endif
}