summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1999-02-10 00:21:09 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-02-10 00:21:09 +0000
commit72d584389835b1f7de3dafd6b0fb0497c63646e3 (patch)
treec8f89ceb2315250f373568289e9a23affb1668d6 /gdk
parent782ad2e7d2157dc454a4a73317917fe2bb43ca5c (diff)
downloadgdk-pixbuf-72d584389835b1f7de3dafd6b0fb0497c63646e3.tar.gz
If we can't find helvetica, fall back to "fixed". If we can't find
Tue Feb 9 19:11:43 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): If we can't find helvetica, fall back to "fixed". If we can't find "fixed", exit cleanly.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdkevents.c2
-rw-r--r--gdk/gdkim.c13
-rw-r--r--gdk/x11/gdkevents-x11.c2
-rw-r--r--gdk/x11/gdkim-x11.c13
4 files changed, 16 insertions, 14 deletions
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index e83b05086..3ac781aac 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -1955,7 +1955,7 @@ gdk_events_queue (void)
while (!gdk_event_queue_find_first() && XPending (gdk_display))
{
- #ifdef USE_XIM
+#ifdef USE_XIM
Window w = None;
XNextEvent (gdk_display, &xevent);
diff --git a/gdk/gdkim.c b/gdk/gdkim.c
index 1d8339974..6451529f7 100644
--- a/gdk/gdkim.c
+++ b/gdk/gdkim.c
@@ -54,7 +54,7 @@ typedef struct {
gpointer value;
} GdkImArg;
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
static void gdk_im_instantiate_cb (Display *display,
XPointer client_data,
XPointer call_data);
@@ -318,6 +318,7 @@ gdk_im_set_best_style (GdkIMStyle style)
return xim_best_allowed_style;
}
+#ifdef USE_X11R6_XIM
static void
gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
{
@@ -340,13 +341,10 @@ gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
private->xic = NULL;
}
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
gdk_im_instantiate_cb, NULL);
-#endif
}
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
static void
gdk_im_instantiate_cb (Display *display,
XPointer client_data, XPointer call_data)
@@ -366,7 +364,6 @@ gdk_im_instantiate_cb (Display *display,
static gint
gdk_im_real_open (void)
{
- XIMCallback destroy_cb;
GList *node;
xim_im = XOpenIM (GDK_DISPLAY(), NULL, NULL, NULL);
@@ -377,10 +374,14 @@ gdk_im_real_open (void)
}
else
{
+#ifdef USE_X11R6_XIM
+ XIMCallback destroy_cb;
+
destroy_cb.callback = gdk_im_destroy_cb;
destroy_cb.client_data = NULL;
if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
+#endif
XGetIMValues (xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL);
@@ -411,7 +412,7 @@ gdk_im_open (void)
if (gdk_im_real_open ())
return TRUE;
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
gdk_im_instantiate_cb, NULL);
#endif
diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
index e83b05086..3ac781aac 100644
--- a/gdk/x11/gdkevents-x11.c
+++ b/gdk/x11/gdkevents-x11.c
@@ -1955,7 +1955,7 @@ gdk_events_queue (void)
while (!gdk_event_queue_find_first() && XPending (gdk_display))
{
- #ifdef USE_XIM
+#ifdef USE_XIM
Window w = None;
XNextEvent (gdk_display, &xevent);
diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c
index 1d8339974..6451529f7 100644
--- a/gdk/x11/gdkim-x11.c
+++ b/gdk/x11/gdkim-x11.c
@@ -54,7 +54,7 @@ typedef struct {
gpointer value;
} GdkImArg;
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
static void gdk_im_instantiate_cb (Display *display,
XPointer client_data,
XPointer call_data);
@@ -318,6 +318,7 @@ gdk_im_set_best_style (GdkIMStyle style)
return xim_best_allowed_style;
}
+#ifdef USE_X11R6_XIM
static void
gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
{
@@ -340,13 +341,10 @@ gdk_im_destroy_cb (XIM im, XPointer client_data, XPointer call_data)
private->xic = NULL;
}
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
gdk_im_instantiate_cb, NULL);
-#endif
}
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
static void
gdk_im_instantiate_cb (Display *display,
XPointer client_data, XPointer call_data)
@@ -366,7 +364,6 @@ gdk_im_instantiate_cb (Display *display,
static gint
gdk_im_real_open (void)
{
- XIMCallback destroy_cb;
GList *node;
xim_im = XOpenIM (GDK_DISPLAY(), NULL, NULL, NULL);
@@ -377,10 +374,14 @@ gdk_im_real_open (void)
}
else
{
+#ifdef USE_X11R6_XIM
+ XIMCallback destroy_cb;
+
destroy_cb.callback = gdk_im_destroy_cb;
destroy_cb.client_data = NULL;
if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
+#endif
XGetIMValues (xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL);
@@ -411,7 +412,7 @@ gdk_im_open (void)
if (gdk_im_real_open ())
return TRUE;
-#ifndef XIM_INST_IS_MISSING_OR_STRANGE
+#ifdef USE_X11R6_XIM
XRegisterIMInstantiateCallback (gdk_display, NULL, NULL, NULL,
gdk_im_instantiate_cb, NULL);
#endif